You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by pe...@apache.org on 2023/11/23 14:13:21 UTC
(linkis) branch master updated: update linkis-web for 1.5.0 (#4979)
This is an automated email from the ASF dual-hosted git repository.
peacewong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/linkis.git
The following commit(s) were added to refs/heads/master by this push:
new 87661dd01 update linkis-web for 1.5.0 (#4979)
87661dd01 is described below
commit 87661dd01b9fa324b43eaee217c871fecdbdf7e5
Author: Yonghao Mei <73...@users.noreply.github.com>
AuthorDate: Thu Nov 23 22:13:14 2023 +0800
update linkis-web for 1.5.0 (#4979)
* chore: add new pages to linkis-web and fix bugs of web
* upd: update version
---
linkis-web/package.json | 2 +-
.../release-docs/licenses/LICENSE-hint.css.txt | 21 +
.../src/apps/linkis/assets/styles/console.scss | 21 +
.../src/apps/linkis/assets/styles/hint.min.css | 21 +
.../src/apps/linkis/components/variable/index.scss | 5 +
.../src/apps/linkis/components/variable/index.vue | 10 +-
linkis-web/src/apps/linkis/i18n/common/en.json | 121 ++++-
linkis-web/src/apps/linkis/i18n/common/zh.json | 85 ++-
.../src/apps/linkis/module/ECM/engineConn.vue | 15 +-
linkis-web/src/apps/linkis/module/ECM/index.vue | 10 +-
linkis-web/src/apps/linkis/module/ECM/log.vue | 67 ++-
.../module/EnginePluginManagement/index.scss | 18 +-
.../linkis/module/EnginePluginManagement/index.vue | 66 +--
.../index.scss => acrossClusterRule/index.js} | 17 +-
.../{udfTree => acrossClusterRule}/index.scss | 64 +--
.../apps/linkis/module/acrossClusterRule/index.vue | 586 +++++++++++++++++++++
.../src/apps/linkis/module/codeQuery/index.scss | 5 +
.../src/apps/linkis/module/codeQuery/index.vue | 34 +-
.../index.scss => configManagement/index.js} | 17 +-
.../{udfTree => configManagement}/index.scss | 68 ++-
.../apps/linkis/module/configManagement/index.vue | 549 +++++++++++++++++++
.../src/apps/linkis/module/datasource/index.vue | 2 +-
.../apps/linkis/module/datasourceTypeKey/index.vue | 2 +-
.../module/gatewayAuthToken/EditForm/index.vue | 1 -
.../module/globalHistoryManagement/index.scss | 35 +-
.../module/globalHistoryManagement/index.vue | 237 +++++----
.../module/globalHistoryManagement/viewHistory.vue | 57 +-
linkis-web/src/apps/linkis/module/header/index.vue | 4 +-
.../apps/linkis/module/ipListManagement/index.vue | 11 +-
.../module/resourceManagement/engineConn.vue | 29 +-
.../linkis/module/resourceManagement/index.vue | 53 +-
.../apps/linkis/module/resourceManagement/log.vue | 52 +-
.../linkis/module/resourceManagement/search.vue | 12 +-
.../rmExternalResourceProvider/EditForm/index.vue | 11 +-
.../src/apps/linkis/module/setting/setting.vue | 60 ++-
.../linkis/module/tenantTagManagement/index.vue | 11 +-
.../src/apps/linkis/module/udfTree/index.scss | 1 -
.../{codeQuery/index.scss => userConfig/index.js} | 17 +-
.../index.scss | 45 +-
.../src/apps/linkis/module/userConfig/index.vue | 524 ++++++++++++++++++
linkis-web/src/apps/linkis/view/linkis/index.vue | 71 ++-
linkis-web/src/common/i18n/en.json | 2 +-
linkis-web/src/common/i18n/zh.json | 2 +-
.../src/components/consoleComponent/result.vue | 7 +-
.../components/consoleComponent/resultSetList.vue | 4 +-
.../src/components/consoleComponent/toolbar.vue | 79 ++-
linkis-web/src/components/table/table.css | 19 +-
linkis-web/src/components/table/table.vue | 76 +--
.../virtualTable/historyTable/historyTable.vue | 7 +-
linkis-web/src/dss/module/footer/index.vue | 2 +-
linkis-web/src/dss/module/header/index.vue | 4 +-
.../src/dss/module/resourceSimple/engine.vue | 245 ++++-----
.../src/dss/module/resourceSimple/index.scss | 199 +++----
linkis-web/src/dss/module/resourceSimple/job.vue | 2 +-
linkis-web/src/dss/module/resourceSimple/queue.vue | 21 +-
55 files changed, 2991 insertions(+), 715 deletions(-)
diff --git a/linkis-web/package.json b/linkis-web/package.json
index b04dbcd53..b43a05d18 100644
--- a/linkis-web/package.json
+++ b/linkis-web/package.json
@@ -1,6 +1,6 @@
{
"name": "linkis",
- "version": "1.4.0",
+ "version": "1.5.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
diff --git a/linkis-web/release-docs/licenses/LICENSE-hint.css.txt b/linkis-web/release-docs/licenses/LICENSE-hint.css.txt
new file mode 100644
index 000000000..9961a4fb3
--- /dev/null
+++ b/linkis-web/release-docs/licenses/LICENSE-hint.css.txt
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2021 Kushagra Gour
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file
diff --git a/linkis-web/src/apps/linkis/assets/styles/console.scss b/linkis-web/src/apps/linkis/assets/styles/console.scss
index 45a7a4a6d..008a4b768 100644
--- a/linkis-web/src/apps/linkis/assets/styles/console.scss
+++ b/linkis-web/src/apps/linkis/assets/styles/console.scss
@@ -17,8 +17,29 @@
@charset "UTF-8";
@import '@/common/style/variables.scss';
+ @import './hint.min.css';
+// * {
+// font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "JinbiaoSong", "JinbiaoSongExt";
+// }
+body {
+ font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif, "JinbiaoSong", "JinbiaoSongExt";
+}
.console-page{
+ .ivu-input {
+ font-family: Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "JinbiaoSong", "JinbiaoSongExt";
+ }
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "JinbiaoSong", "JinbiaoSongExt" !important;
+ .monaco-editor {
+ --monaco-monospace-font: "SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace, "JinbiaoSong", "JinbiaoSongExt";
+ }
+ .monaco-mouse-cursor-text {
+ font-family: Consolas, "Courier New", monospace, "JinbiaoSong", "JinbiaoSongExt" !important;
+ }
+ .ivu-tooltip-inner {
+ overflow-wrap: break-word;
+ white-space: normal;
+ }
position: $relative;
width: $percent-all;
height: $percent-all;
diff --git a/linkis-web/src/apps/linkis/assets/styles/hint.min.css b/linkis-web/src/apps/linkis/assets/styles/hint.min.css
new file mode 100644
index 000000000..0c0d22d32
--- /dev/null
+++ b/linkis-web/src/apps/linkis/assets/styles/hint.min.css
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*! Hint.css - v2.7.0 - 2021-10-01
+* https://kushagra.dev/lab/hint/
+* Copyright (c) 2021 Kushagra Gour */
+
+[class*=hint--]{position:relative ; width: 80;}[class*=hint--]:after,[class*=hint--]:before{position:absolute;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);transform:translate3d(0,0,0);visibility:hidden;opacity:0;z-index:1000000;pointer-events:none;-webkit-transition:.3s ease;-moz-transition:.3s ease;transition:.3s ease;-webkit-transition-delay:0s;-moz-transition-delay:0s;transition-delay:0s}[class*=hint--]:hover:after,[class*=hint--]:hover:before{visibility:visi [...]
diff --git a/linkis-web/src/apps/linkis/components/variable/index.scss b/linkis-web/src/apps/linkis/components/variable/index.scss
index 9140e16a3..fd603d45f 100644
--- a/linkis-web/src/apps/linkis/components/variable/index.scss
+++ b/linkis-web/src/apps/linkis/components/variable/index.scss
@@ -89,6 +89,11 @@
border: 1px solid red;
}
}
+ .two-lines {
+ height: 60px;
+ resize: none;
+ overflow-y: scroll;
+ }
.we-variable-content-input[disabled] {
background-color: #f3f3f3;
opacity: 1;
diff --git a/linkis-web/src/apps/linkis/components/variable/index.vue b/linkis-web/src/apps/linkis/components/variable/index.vue
index 662a3fef2..0d0ba9aed 100644
--- a/linkis-web/src/apps/linkis/components/variable/index.vue
+++ b/linkis-web/src/apps/linkis/components/variable/index.vue
@@ -36,7 +36,7 @@
<template v-for="(item, index) in variable.settings">
<div
:key="index"
- :title="item.description"
+ :title="`${item.description}${item.specialLimit ? $t('message.linkis.setting.maxLimit', { limit: item.specialLimit.maxValue }) : ''}`"
class="we-variable-content-item"
v-if="getItemIsShow(item)">
<span class="we-variable-content-label-group">
@@ -54,6 +54,13 @@
:key="i"
:value="validateItem">{{ validateItem }}</Option>
</Select>
+ <textarea
+ v-model="item.configValue"
+ :placeholder="item.defaultValue ? `${$t('message.linkis.defaultValue')}:${item.defaultValue}` : $t('message.linkis.noDefaultValue')"
+ class="two-lines we-variable-content-input"
+ :class="{'un-valid': unValid && unValid.key === item.key}"
+ v-else-if="item.key === 'spark.conf'">
+ </textarea>
<input
v-model="item.configValue"
:placeholder="item.defaultValue ? `${$t('message.linkis.defaultValue')}:${item.defaultValue}` : $t('message.linkis.noDefaultValue')"
@@ -138,5 +145,4 @@ export default {
};
</script>
<style lang="scss" src="./index.scss">
-
</style>
diff --git a/linkis-web/src/apps/linkis/i18n/common/en.json b/linkis-web/src/apps/linkis/i18n/common/en.json
index c2a692250..eaec2aa06 100644
--- a/linkis-web/src/apps/linkis/i18n/common/en.json
+++ b/linkis-web/src/apps/linkis/i18n/common/en.json
@@ -36,6 +36,7 @@
"log": "Task Log",
"detail": "Task Detail",
"result": "Task Result",
+ "engineLog": "Engine Log",
"startUp": "Start-up",
"tagEdit": "Edit",
"tipForKill": "The unlock engines of ECM [{instance}}] will be killed",
@@ -71,8 +72,12 @@
"noselection": "Please select first",
"searchName": "Please enter username to search",
"generalView": "Switch to the Common View",
+ "showAdvancedSearch": "Advanced Search",
+ "hideAdvancedSearch": "Hide Advanced Search",
"manageView": "Switch to the Admin View",
"back": "Back",
+ "download": "Download Log",
+ "confirmText": "Confirm downloading the log",
"prev": "Previous Step",
"complete": "Complete",
"close": "Close",
@@ -130,8 +135,8 @@
"minimumAvailableResources": "Minimum Available Resources",
"startTime": "Start Time",
"costTime": "Time Elapsed",
- "executeApplicationName": "Execution Engine",
- "requestApplicationName": "Created From",
+ "executeApplicationName": "Engine",
+ "requestApplicationName": "App",
"user": "User",
"createdTime": "Created at",
"updateTime": "Update Time",
@@ -177,6 +182,7 @@
"userResourceManagement": "User Resource Management",
"tenantTagManagement": "Tenant Tag Management",
"ipListManagement": "White List Management",
+ "acrossClusterRule": "Across Cluster Rule Management",
"errorCode": "Error Manage",
"gatewayAuthToken": "Token Manage",
"engineConfigurationTemplate": "Engine Configuration Template",
@@ -190,13 +196,38 @@
"EnginePluginManagement": "Engine Plugin Management",
"basedataManagement": "Basic Data Management",
"codeQuery": "Code Retrieval",
- "EngineConnList": "Engine Conn List"
+ "EngineConnList": "Engine Conn List",
+ "opsTool": "OPS Tool",
+ "userConfig": "User Configuration",
+ "configManagement": "Configuration Management"
}
}
},
+ "EnginePluginManagement": {
+ "engineConnType": "Engine Type",
+ "engineConnVersion": "Engine Version",
+ "create": "Add Engine Plugin",
+ "fileName": "File Name",
+ "fileSize": "File Size",
+ "lastModified": "File Update Time",
+ "bmlResourceId": "Material Resource Id",
+ "bmlResourceVersion": "Material Resource Version",
+ "lastUpdateTime": "Update Time",
+ "createTime": "Creation Time",
+ "Reset": "Reset",
+ "delete": "Delete the version of the selected material",
+ "update": "Update Engine Plugin",
+ "updateFileOnly": "Update",
+ "resourceVersion": "Engine Material BML Version",
+ "user": "Affiliated Person",
+ "deleteCurrentbml": "Delete",
+ "versionList": "Version List",
+ "rollback": "Roll Back ",
+ "action": "Operation"
+ },
"modal": {
"modalTitle": "Prompt message ",
- "modalDelete": "Confirm whether to delete the [{name} option?",
+ "modalDelete": "Confirm whether to delete the [{name}] option?",
"modalDeleteRecord": "Confirm whether to delete the record?",
"modalDeleteTask": "Confirm whether to stop the selected task?",
"modalDeleteInstance": "Determines whether to stop the current selected instance?",
@@ -212,12 +243,12 @@
"placeholder": "Please choose the start date"
},
"instance": {
- "label": "Instance",
+ "label": "Entrance Instance",
"placeholder": "Please search by entering the instance"
},
"creator": {
- "label": "Creator",
- "placeholder": "Please search by entering the creator"
+ "label": "App",
+ "placeholder": "Please search by entering the application name"
},
"engine": {
"label": "Engine"
@@ -226,7 +257,7 @@
"label": "Status"
},
"appType": "App Type",
- "engineType": "Engine"
+ "engineType": "Engine Type"
},
"columns": {
"taskID": "Task ID",
@@ -300,7 +331,8 @@
"hide": "Hide",
"show": "Show",
"advancedSetting": "Advanced Settings",
- "dataDev": "Data Development"
+ "dataDev": "Data Development",
+ "maxLimit": "(The resource template specifies an upper limit value of {limit})"
},
"globalValiable": "Global Variables",
"rules": {
@@ -400,7 +432,7 @@
"addSuccessful": "Successfully Addded",
"editSuccessful": "Successfully edited",
"confirmDel": "Confirm Deletion",
- "isConfirmDel": "Are you sure you want to delete this tag({name})"
+ "isConfirmDel": "Confirm whether to delete the [{name}] option?"
},
"ipListManagement": {
"userName": "User Name",
@@ -417,7 +449,7 @@
"inputApp": "Please Input Application",
"inputIpList": "Please Input IP List",
"inputDesc": "Please Input Description",
- "inputCreateUser": "Please Input Creare User",
+ "inputCreateUser": "Please Input Create User",
"yourTagMapping": "Your Tag Mapping",
"notEmpty": "Cannot be empty",
"maxLen": "A maximum of 100 characters is allowed",
@@ -435,17 +467,66 @@
"addSuccessful": "Successfully Addded",
"editSuccessful": "Successfully edited",
"confirmDel": "Confirm Deletion",
- "isConfirmDel": "Are you sure you want to delete this tag({name})"
+ "isConfirmDel": "Confirm whether to delete the [{name}] option?",
+ "cluster": "Cluster Label",
+ "inputCluster": "Please Input Cluster Label",
+ "rules": "Rules",
+ "startTime": "Start Time",
+ "endTime": "End Time",
+ "CPUThreshold": "CPU Threshold(Core)",
+ "MemoryThreshold": "Memory Threshold(G)",
+ "CPUPercentageThreshold": "CPU Percentage Threshold",
+ "MemoryPercentageThreshold": "Memory Percentage Threshold",
+ "timeError": "The time format should be XX:XX, please enter the correct time",
+ "thresholdError": "Please enter an integer between 0 and 10000",
+ "percentageThresholdError": "Please enter an integer between 0 and 1",
+ "view": "View",
+ "errorJson": "Please enter a JSON that is formatted correctly and not empty",
+ "deleteSuccess": "Delete Successfully",
+ "createRules": "Create",
+ "editRules": "Edit",
+ "viewRules": "View Rules",
+ "yes": "Yes",
+ "no": "No",
+ "isValid": "Effective or Not",
+ "engineType": "Engine Type",
+ "key": "Config Key",
+ "inputKey": "Please Input Key",
+ "name": "Name",
+ "description": "Description",
+ "defaultValue": "Default Value",
+ "validType": "Validate Type",
+ "validRange": "Validate Range",
+ "dataType": "Boundary Type",
+ "category": "Category",
+ "none": "None",
+ "regex": "Regex",
+ "numInterval": "Number InterVal",
+ "oft": "OFT",
+ "enName": "Configuration Name(EN)",
+ "enDescription": "Configuration Description(EN)",
+ "enTreeName": "Tree Name(EN)",
+ "treeName": "Tree Name",
+ "noZH": "Chinese input not allowed",
+ "customLen": "The length cannot exceed {length}",
+ "enable": "Enable",
+ "disable": "Disable",
+ "confirmEnable": "Confirm whether to enable the [{name}] option?",
+ "confirmDisable": "Confirm whether to disable the [{name}] option?",
+ "enableSuccessfully": "Enable Successfully",
+ "disableSuccessfully": "Disable Successfully",
+ "templateRequired": "Required"
},
"codeQuery": {
"executionCode": "Execution Code",
"dateRange": "Date Range",
+ "engineType": "Engine Type",
"placeholder": {
- "executionCode": "Please input execution code",
+ "executionCode": "Please Input Execution Code",
"dateRange": "Please select date range",
"status": "Please select status"
},
- "inputCode": "Please input execution code",
+ "inputCode": "Please Input Execution Code",
"id": "ID",
"code": "Code",
"check": "View",
@@ -602,8 +683,8 @@
"createTime": "Create Time",
"updateTime": "Update Time",
"searchPlaceholder": "Name",
- "searchName": "名称",
- "searchType": "类型",
+ "searchName": "Name",
+ "searchType": "Type",
"all": "All"
}
},
@@ -633,6 +714,14 @@
"rollback": "Rollback",
"checkEngineConnTypeAndVersion": "Please select the engine type and version",
"upload": "Please click the button to upload the engine plugin"
+ },
+ "userConfig": {
+ "keyName": "Configuration Name",
+ "defaultValue": "Default Value",
+ "configVKey": "Configuration",
+ "configValue": "Configuration Value",
+ "configValuePro": "Please Input Configuration Value",
+ "versionInputPro": "Please Input Engine Version"
}
}
}
diff --git a/linkis-web/src/apps/linkis/i18n/common/zh.json b/linkis-web/src/apps/linkis/i18n/common/zh.json
index 9e9182ea1..ba1a8919b 100644
--- a/linkis-web/src/apps/linkis/i18n/common/zh.json
+++ b/linkis-web/src/apps/linkis/i18n/common/zh.json
@@ -36,6 +36,7 @@
"log": "任务日志",
"detail": "任务详情",
"result": "任务结果",
+ "engineLog": "引擎日志",
"startUp": "启动",
"tagEdit": "编辑",
"tipForKill": "将要停止此ECM实例 【{instance}】上的空闲引擎",
@@ -71,8 +72,12 @@
"noselection": "请先选择",
"searchName": "请输入用户名搜索",
"generalView": "切换普通视图",
+ "showAdvancedSearch": "高级筛选",
+ "hideAdvancedSearch": "隐藏高级筛选",
"manageView": "切换管理员视图",
"back": "返回",
+ "download": "下载日志",
+ "confirmText": "确认下载该日志",
"prev": "上一步",
"complete": "完成",
"close": "关闭",
@@ -129,8 +134,8 @@
"maximumAvailableResources": "最大可用资源",
"minimumAvailableResources": "最小可用资源",
"startTime": "启动时间",
- "executeApplicationName": "执行引擎",
- "requestApplicationName": "创建者",
+ "executeApplicationName": "引擎",
+ "requestApplicationName": "应用",
"user": "用户",
"createdTime": "创建时间",
"updateTime": "更新时间",
@@ -145,8 +150,8 @@
"engineRemain": "引擎剩余资源",
"engineUsed": "引擎已用资源",
"engineTop": "引擎上限资源",
- "versioTips": "如果没有对应的版本,请确认是否已安装对应的版本引擎物料",
- "applicationRole": "应用方"
+ "versioTips": "如果没有对应的版本,请确认是否已安装对应的版本引擎物料",
+ "applicationRole": "应用方"
},
"logLoading": "日志请求中,请稍后",
"title": "Linkis管理台",
@@ -177,6 +182,7 @@
"userResourceManagement": "用户资源管理",
"tenantTagManagement": "租户标签管理",
"ipListManagement": "白名单管理",
+ "acrossClusterRule": "跨集群规则管理",
"errorCode": "错误码管理",
"gatewayAuthToken": "令牌管理",
"rmExternalResourceProvider": "扩展资源管理",
@@ -190,7 +196,10 @@
"basedataManagement": "基础数据管理",
"codeQuery": "代码检索",
"engineConfigurationTemplate": "引擎配置模板",
- "EngineConnList": "引擎列表"
+ "EngineConnList": "引擎列表",
+ "opsTool": "运维工具",
+ "userConfig": "用户配置",
+ "configManagement": "配置项管理"
}
}
},
@@ -212,7 +221,7 @@
"placeholder": "请选择起始日期"
},
"instance": {
- "label": "实例",
+ "label": "Entrance 实例",
"placeholder": "请输入实例"
},
"creator": {
@@ -300,7 +309,8 @@
"hide": "隐藏",
"show": "显示",
"advancedSetting": "高级设置",
- "dataDev": "数据开发"
+ "dataDev": "数据开发",
+ "maxLimit": "(资源模板指定上限值为{limit})"
},
"globalValiable": "全局变量",
"rules": {
@@ -432,7 +442,55 @@
"userIsExisted": "用户标签已存在",
"addSuccessful": "添加成功",
"confirmDel": "确认删除",
- "isConfirmDel": "确定要删除这条数据吗({name})"
+ "isConfirmDel": "确定要删除这条数据吗({name})",
+ "cluster": "集群标签",
+ "inputCluster": "请输入集群标签",
+ "rules": "规则",
+ "startTime": "开始时间",
+ "endTime": "结束时间",
+ "CPUThreshold": "CPU阈值(核)",
+ "MemoryThreshold": "内存阈值(G)",
+ "CPUPercentageThreshold": "CPU百分比阈值",
+ "MemoryPercentageThreshold": "内存百分比阈值",
+ "view": "查看",
+ "errorJson": "请输入格式正确且不为空的JSON",
+ "deleteSuccess": "删除成功",
+ "createRules": "新建",
+ "editRules": "编辑",
+ "viewRules": "查看规则",
+ "yes": "是",
+ "no": "否",
+ "isValid": "是否生效",
+ "engineType": "引擎类型",
+ "key": "配置Key",
+ "inputKey": "请输入Key",
+ "name": "配置名称",
+ "description": "配置描述",
+ "defaultValue": "默认值",
+ "validType": "校验类型",
+ "validRange": "校验范围",
+ "dataType": "边界值类型",
+ "category": "分类",
+ "treeName": "目录名称",
+ "none": "无",
+ "regex": "正则校验",
+ "numInterval": "数值校验",
+ "oft": "选择校验",
+ "enName": "配置名称(英文)",
+ "enDescription": "配置描述(英文)",
+ "enTreeName": "目录名称(英文)",
+ "noZH": "不允许输入中文",
+ "customLen": "长度不能超过{length}",
+ "timeError": "时间格式应为XX:XX,请输入正确的时间",
+ "thresholdError": "请输入0-10000的整数",
+ "percentageThresholdError": "请输入0-1的数字",
+ "enable": "启用",
+ "disable": "停用",
+ "confirmEnable": "确认是否启用[{name}]该规则?",
+ "confirmDisable": "确认是否停用[{name}]该规则?",
+ "enableSuccessfully": "启用成功",
+ "disableSuccessfully": "停用成功",
+ "templateRequired": "是否必填"
},
"basedataManagement": {
"add": "新增",
@@ -608,6 +666,7 @@
"codeQuery": {
"executionCode": "执行代码",
"dateRange": "时间范围",
+ "engineType": "引擎类型",
"placeholder": {
"executionCode": "请输入执行代码",
"dateRange": "时间范围",
@@ -623,7 +682,15 @@
"submitUser": "提交用户",
"createdTime": "创建时间",
"searchRange": "仅可查询T-1的历史代码"
+ },
+ "userConfig": {
+ "keyName": "配置项名称",
+ "defaultValue": "配置项默认值",
+ "configVKey": "配置项",
+ "configValue": "配置值",
+ "configValuePro": "请输入配置值",
+ "versionInputPro": "请输入引擎版本"
}
- }
+ }
}
}
diff --git a/linkis-web/src/apps/linkis/module/ECM/engineConn.vue b/linkis-web/src/apps/linkis/module/ECM/engineConn.vue
index 3f19ff3a8..333fa486b 100644
--- a/linkis-web/src/apps/linkis/module/ECM/engineConn.vue
+++ b/linkis-web/src/apps/linkis/module/ECM/engineConn.vue
@@ -223,11 +223,13 @@ export default {
on: {
click: () => {
this.showviewlog = true
+ this.$refs.logPanel.clearLogs()
+
this.$refs.logPanel.getLogs(0, {
- emInstance: params.row.emInstance,
- instance: params.row.instance,
- applicationName: params.row.applicationName,
- engineType: params.row.engineType,
+ emInstance: params?.row?.emInstance || '',
+ instance: params?.row?.instance || '',
+ applicationName: params?.row?.applicationName || '',
+ engineType: params?.row?.engineType || '',
})
}
}
@@ -383,7 +385,6 @@ export default {
})
this.loading = false;
} catch (err) {
- window.console.log(err)
this.loading = false;
}
},
@@ -406,7 +407,7 @@ export default {
let list = healthyStatusList.nodeStatus || [];
this.healthyStatusList = [...list];
} catch (err) {
- window.console.log(err)
+ return;
}
},
// Get a list of states for a search(获取搜索的状态列表)
@@ -416,7 +417,7 @@ export default {
let list = statusList.nodeStatus || [];
this.statusList = [...list];
} catch (err) {
- window.console.log(err)
+ return;
}
},
// add tag(添加tag)
diff --git a/linkis-web/src/apps/linkis/module/ECM/index.vue b/linkis-web/src/apps/linkis/module/ECM/index.vue
index 4794cdf8f..e2bc61907 100644
--- a/linkis-web/src/apps/linkis/module/ECM/index.vue
+++ b/linkis-web/src/apps/linkis/module/ECM/index.vue
@@ -318,7 +318,6 @@ export default {
this.page.totalSize = this.tableData.length;
this.loading = false;
} catch (err) {
- window.console.log(err)
this.loading = false;
}
},
@@ -342,7 +341,7 @@ export default {
let list = healthyStatusList.nodeHealthy || [];
this.healthyStatusList = [...list];
} catch (err) {
- window.console.log(err)
+ return;
}
},
// Get a list of states for a search(获取搜索的状态列表)
@@ -352,7 +351,7 @@ export default {
let list = statusList.nodeStatus || [];
this.statusList = [...list];
} catch (err) {
- window.console.log(err)
+ return;
}
},
// add tag(添加tag)
@@ -400,14 +399,14 @@ export default {
this.page.pageNow = 1;
},
// search(搜索)
- search(e) {
+ async search(e) {
let param = {
instance: e.instance.replace(/ /g, ''),
nodeHealthy: e.nodeHealthy,
owner: e.owner,
tenantLabel: e.tenant,
}
- api.fetch('/linkisManager/listAllEMs',param,'get').then((res)=>{
+ await api.fetch('/linkisManager/listAllEMs',param,'get').then((res)=>{
this.tableData = res.EMs
})
@@ -444,7 +443,6 @@ export default {
// 传回的是Byte
this.$Message.success(this.$t('message.linkis.killFinishedInfo', { killEngineNum, memory: memory / 1024 / 1024 / 1024, cores }))
} catch (err) {
- window.console.warn(err);
this.killInfo = {
curInstance: '',
all: 0,
diff --git a/linkis-web/src/apps/linkis/module/ECM/log.vue b/linkis-web/src/apps/linkis/module/ECM/log.vue
index c186edaf4..275d3a121 100644
--- a/linkis-web/src/apps/linkis/module/ECM/log.vue
+++ b/linkis-web/src/apps/linkis/module/ECM/log.vue
@@ -23,7 +23,10 @@
<TabPane name="gc" label="gc"></TabPane>
<TabPane v-if="['hive', 'spark'].includes(engineType)" name="yarnApp" label="yarnApp"></TabPane>
</Tabs>
- <Button class="backButton" type="primary" @click="back">{{$t('message.linkis.back')}}</Button>
+ <div class="btns">
+ <Button class="downloadButton" type="default" @click="downloadLog">{{$t('message.linkis.download')}}</Button>
+ <Button class="backButton" type="primary" @click="back">{{$t('message.linkis.back')}}</Button>
+ </div>
<log :logs="logs" :scriptViewState="scriptViewState"/>
<Page
ref="page"
@@ -58,6 +61,7 @@ export default {
scriptViewState: {
bottomContentHeight: window.innerHeight - 353
},
+ param: {},
engineType: '',
};
},
@@ -80,6 +84,31 @@ export default {
this.page.pageNow = val;
this.getLogs((val - 1) * this.page.pageSize)
},
+ clearLogs() {
+ this.logs = {
+ all: '',
+ }
+ this.tabName = 'stdout'
+ },
+ async downloadLog() {
+ this.$Modal.confirm({
+ title: this.$t('message.linkis.download'),
+ content: this.$t('message.linkis.confirmText'),
+ onOk: async () => {
+ const {emInstance, instance, logDirSuffix } = this.param;
+ // eslint-disable-next-line no-unused-vars
+ const url = `/api/rest_j/v1/engineconnManager/downloadEngineLog?emInstance=${emInstance}&instance=${instance}&logDirSuffix=${encodeURIComponent(logDirSuffix)}&logType=${this.tabName}`;
+ const downloadLink = document.createElement('a');
+ downloadLink.href = url;
+ downloadLink.download = 'log';
+ downloadLink.style.display = 'none';
+ document.body.appendChild(downloadLink);
+ downloadLink.click();
+ document.body.removeChild(downloadLink);
+ }
+ })
+
+ },
async getLogs(fromLine, param) {
if (param) {
this.param = param
@@ -96,17 +125,23 @@ export default {
logType: this.tabName
}
}
- let res = await api.fetch('/linkisManager/openEngineLog', params, 'post') || {};
- if (res && res.result) {
- if (res.result.rows < 1000) { // the last page(最后一页)
- this.page.totalSize = this.page.pageNow * 1000
- } else {
- this.page.totalSize = (this.page.pageNow + 1) * 1000
- }
- this.logs = {
- all: res.result.logs ? res.result.logs.join('\n') : ''
+ try {
+ let res = await api.fetch('/linkisManager/openEngineLog', params, 'post') || {};
+ if (res && res.result) {
+ if (res.result.rows < 1000) { // the last page(最后一页)
+ this.page.totalSize = this.page.pageNow * 1000
+ } else {
+ this.page.totalSize = (this.page.pageNow + 1) * 1000
+ }
+ this.param.logDirSuffix = res.result.logPath.split('/').slice(0, -1).join('/');
+ this.logs = {
+ all: res.result.logs ? res.result.logs.join('\n') : ''
+ }
}
+ } catch (err) {
+ return;
}
+
}
},
resize() {
@@ -129,10 +164,20 @@ export default {
.log {
height: 100%;
}
- .backButton {
+.btns {
position: absolute;
top: -2px;
right: 20px;
+ display: grid;
+ grid-template-columns: auto auto;
+ justify-items: end;
+ .downloadButton {
+ margin-right: 10px;
+ margin-top: 2px;
+ }
+ .backButton {
+ margin-top: 2px;
+ }
}
.page {
text-align: center
diff --git a/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.scss b/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.scss
index e84322197..6c6d8b289 100644
--- a/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.scss
+++ b/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.scss
@@ -17,26 +17,22 @@
@import '@/common/style/variables.scss';
.search-bar {
- .search-item11 {
+ .search-item {
display: flex;
justify-content: flex-start;
align-items: center;
font-size: $font-size-base;
- .search-item {
- display: flex;
- justify-items: center;
- .lable {
- width: 180px;
- // flex-basis: 130px;
- text-align: right;
- }
+
+ .lable {
+ min-width: 90px;
+ // flex-basis: 130px;
+ text-align: right;
}
-
}
.ivu-col {
display: flex;
- justify-content: flex-start;
+ justify-content: center;
}
}
diff --git a/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.vue b/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.vue
index 7baffd3ad..9a799cd23 100644
--- a/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.vue
+++ b/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.vue
@@ -64,7 +64,7 @@
</div>
</div>
</Modal>
- <Modal
+ <!-- <Modal
width="800"
class="modal"
v-model="showFileOperate"
@@ -99,45 +99,31 @@
</div>
</div>
</div>
- </Modal>
- <Row class="search-bar" type="flex" justify="start">
- <Col span="5">
- <div class="search-item">
- <span class="lable" :title="$t('message.linkis.EnginePluginManagement.engineConnType')">{{ $t('message.linkis.EnginePluginManagement.engineConnType') }}</span>
- <Select v-model="ecType" clearable style="width: 180px; margin-left: 5px;">
- <Option
- v-for="(item) in typeList"
- :label="item"
- :value="item"
- :key="item"/>
- </Select>
- </div>
- </Col>
- <Col span="5">
- <div class="search-item">
- <span class="lable" :title="$t('message.linkis.EnginePluginManagement.engineConnVersion')">{{ $t('message.linkis.EnginePluginManagement.engineConnVersion') }}</span>
- <Select v-model="version" clearable style="width: 180px; margin-left: 5px;">
- <Option
- v-for="(item) in typeVersionList"
- :label="item"
- :value="item"
- :key="item"/>
- </Select>
- </div>
- </Col>
- <Col span="12">
- <Button type="primary" class="button" :style="{width: '60px', marginRight: '5px', marginLeft: '5px', padding: '5px'}" @click="initECMList()">{{
- $t('message.linkis.search') }}</Button>
- <Button type="primary" :style="{width: '60px', marginRight: '5px', padding: '5px'}" @click="resetSearch">{{
- $t('message.linkis.EnginePluginManagement.Reset')}}</Button>
- <!-- <Button type="primary" :style="{width: '120px', marginRight: '5px', padding: '5px'}" @click="createOrUpdate(1)">{{
- $t('message.linkis.EnginePluginManagement.update')}}</Button>
- <Button type="error" :style="{width: '120px', marginRight: '5px', padding: '5px'}" @click="deleteBML">{{
- $t('message.linkis.EnginePluginManagement.delete')}}</Button> -->
- <!-- <Button type="primary" :style="{width: '90px', marginRight: '5px', padding: '5px'}" @click="createOrUpdate(0)">{{
- $t('message.linkis.EnginePluginManagement.create') }}</Button> -->
- </Col>
- </Row>
+ </Modal> -->
+ <div class="search-bar" style="display: flex;align-items: flex-start">
+
+ <span :style="{ whiteSpace: 'nowrap', marginRight: '5px', fontSize: '14px', lineHeight: '32px'}" :title="$t('message.linkis.EnginePluginManagement.engineConnType')">{{$t('message.linkis.EnginePluginManagement.engineConnType')}}</span>
+ <Select v-model="ecType" clearable style="width: 180px">
+ <Option
+ v-for="(item) in typeList"
+ :label="item"
+ :value="item"
+ :key="item"/>
+ </Select>
+
+ <span :style="{ whiteSpace: 'nowrap', marginRight: '5px', marginLeft: '5px', fontSize: '14px', lineHeight: '32px'}" :title="$t('message.linkis.EnginePluginManagement.engineConnVersion')">{{$t('message.linkis.EnginePluginManagement.engineConnVersion')}}</span>
+ <Select v-model="version" clearable style="width: 180px; margin-right: 5px;">
+ <Option
+ v-for="(item) in typeVersionList"
+ :label="item"
+ :value="item"
+ :key="item"/>
+ </Select>
+ <Button type="primary" class="Button" @click="initECMList()">{{
+ $t('message.linkis.search') }}</Button>
+ <Button type="primary" :style="{ marginLeft: '10px' }" @click="resetSearch">{{
+ $t('message.linkis.EnginePluginManagement.Reset')}}</Button>
+ </div>
<Table
border
size="small"
diff --git a/linkis-web/src/apps/linkis/module/codeQuery/index.scss b/linkis-web/src/apps/linkis/module/acrossClusterRule/index.js
similarity index 85%
copy from linkis-web/src/apps/linkis/module/codeQuery/index.scss
copy to linkis-web/src/apps/linkis/module/acrossClusterRule/index.js
index 71d03bb32..ad9a1f84f 100644
--- a/linkis-web/src/apps/linkis/module/codeQuery/index.scss
+++ b/linkis-web/src/apps/linkis/module/acrossClusterRule/index.js
@@ -5,20 +5,19 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
-@import '@/common/style/variables.scss';
-.code-query {
- .table-content {
- margin-top: 16px;
- height: 610px;
- }
-}
+export default {
+ name: 'acrossClusterRule',
+ events: [],
+ component: () => import('./index.vue'),
+};
\ No newline at end of file
diff --git a/linkis-web/src/apps/linkis/module/udfTree/index.scss b/linkis-web/src/apps/linkis/module/acrossClusterRule/index.scss
similarity index 67%
copy from linkis-web/src/apps/linkis/module/udfTree/index.scss
copy to linkis-web/src/apps/linkis/module/acrossClusterRule/index.scss
index 7ea4fd680..97d93f160 100644
--- a/linkis-web/src/apps/linkis/module/udfTree/index.scss
+++ b/linkis-web/src/apps/linkis/module/acrossClusterRule/index.scss
@@ -14,52 +14,46 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
@import '@/common/style/variables.scss';
-
.search-bar {
.search-item {
display: flex;
justify-content: flex-start;
align-items: center;
font-size: $font-size-base;
-
.lable {
- min-width: 90px;
- // flex-basis: 130px;
- text-align: right;
+ flex-basis: 120px;
+ text-align: center;
}
+ .search-label {
+ min-width: 40px;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+ margin-right: 5px;
+ font-size: 14px;
+ line-height: 32px
+ }
+
}
-
- .ivu-col {
- display: flex;
- justify-content: center;
+ .button {
+ width: 70px;
+ margin-right: 5px;
+ margin-left: 5px;
+ padding: 5px;
}
-
-}
-
-.table-content {
- margin-top: 25px;
-}
-
-.datasource-type-wrap {
- .project-header {
- height: 32px;
-
- .header-title {
- font-size: $font-size-large;
- font-weight: bold;
- padding-left: 12px;
- border-left: 3px solid $primary-color;
- color: $text-title-color;
- }
-
+ .search {
+ margin-left: 25px;
}
-
-}
-
-.modal {
- .footer {
- display: flex;
- justify-content: space-between;
+ .ivu-input-wrapper {
+ width: calc(100% - 105px);
}
}
+.table-content {
+ margin-top: 25px;
+ height: 687px;
+}
+.form {
+ padding: 0px 40px;
+}
\ No newline at end of file
diff --git a/linkis-web/src/apps/linkis/module/acrossClusterRule/index.vue b/linkis-web/src/apps/linkis/module/acrossClusterRule/index.vue
new file mode 100644
index 000000000..89e35b8f8
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/acrossClusterRule/index.vue
@@ -0,0 +1,586 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<template>
+ <div class="tenantManagement">
+ <Spin
+ v-if="loading"
+ size="large"
+ fix/>
+ <Row class="search-bar">
+ <Col span="6" class="search-item">
+ <span :title="$t('message.linkis.ipListManagement.userName')" class="search-label">{{$t('message.linkis.ipListManagement.userName')}}</span>
+ <Input
+ v-model="queryData.username"
+ class="input"
+ :placeholder="$t('message.linkis.ipListManagement.inputUser')"
+ @on-enter="search"
+ style="width: 290px"
+ ></Input>
+ </Col>
+ <Col span="6" class="search-item">
+ <span :title="$t('message.linkis.ipListManagement.appName')" class="search-label">{{$t('message.linkis.ipListManagement.appName')}}</span>
+ <Input
+ v-model="queryData.creator"
+ class="input"
+ :placeholder="$t('message.linkis.ipListManagement.inputApp')"
+ @on-enter="search"
+ style="width: 290px"
+ ></Input>
+ </Col>
+ <Col span="6" class="search-item">
+ <span :title="$t('message.linkis.ipListManagement.cluster')" class="search-label">{{$t('message.linkis.ipListManagement.cluster')}}</span>
+ <Input
+ v-model="queryData.clusterName"
+ class="input"
+ :placeholder="$t('message.linkis.ipListManagement.inputCluster')"
+ @on-enter="search"
+ style="width: 290px"
+ ></Input>
+ </Col>
+ <Col span="6">
+ <Button type="primary" class="button" @click="search">{{
+ $t('message.linkis.ipListManagement.search')
+ }}</Button>
+ <Button type="warning" class="button" @click="clearSearch">{{
+ $t('message.linkis.ipListManagement.clear')
+ }}</Button>
+ <Button type="success" class="button" @click="createRules">{{
+ $t('message.linkis.ipListManagement.create')
+ }}</Button>
+ </Col>
+ </Row>
+ <Table
+ border
+ size="small"
+ align="center"
+ :columns="tableColumns"
+ :data="datalist"
+ :loading="tableLoading"
+ class="table-content data-source-table">
+
+ </Table>
+ <Page
+ :page-size="page.pageSize"
+ :current="page.pageNow"
+ :total="page.totalPage"
+ @on-change="changePage"
+ size="small"
+ show-elevator
+ show-total
+ :prev-text="$t('message.linkis.previousPage')" :next-text="$t('message.linkis.nextPage')"
+ class="page"
+ ></Page>
+ <Modal
+ v-model="showCreateModal"
+ class="modal"
+ width="620px"
+ :title="modalTitle"
+ @on-cancel="cancel">
+ <div class="form">
+ <Form ref="createRuleForm" :model="modalData" label-position="left" :label-width="92" :rules="modalDataRule">
+ <FormItem :label="$t('message.linkis.ipListManagement.cluster')" prop="clusterName">
+ <Input class="input" v-model="modalData.clusterName"></Input>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.ipListManagement.userName')" prop="username">
+ <Input class="input" v-model="modalData.username"></Input>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.ipListManagement.appName')" prop="creator">
+ <Input class="input" v-model="modalData.creator"></Input>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.ipListManagement.startTime')" prop="startTime">
+ <Input class="input" v-model="modalData.startTime" placeholder="XX:XX"></Input>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.ipListManagement.endTime')" prop="endTime">
+ <Input class="input" v-model="modalData.endTime" placeholder="XX:XX"></Input>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.ipListManagement.CPUThreshold')" prop="CPUThreshold">
+ <Input class="input" v-model="modalData.CPUThreshold"></Input>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.ipListManagement.MemoryThreshold')" prop="MemoryThreshold">
+ <Input class="input" v-model="modalData.MemoryThreshold"></Input>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.ipListManagement.CPUPercentageThreshold')" prop="CPUPercentageThreshold">
+ <Input class="input" v-model="modalData.CPUPercentageThreshold" placeholder="0~1"></Input>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.ipListManagement.MemoryPercentageThreshold')" prop="MemoryPercentageThreshold">
+ <Input class="input" v-model="modalData.MemoryPercentageThreshold" placeholder="0~1"></Input>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.ipListManagement.isValid')" prop="isValid">
+ <RadioGroup v-model="modalData.isValid">
+ <Radio label="Y">{{$t('message.linkis.ipListManagement.yes')}}</Radio>
+ <Radio label="N">{{$t('message.linkis.ipListManagement.no')}}</Radio>
+ </RadioGroup>
+ </FormItem>
+ </Form>
+ </div>
+ <div slot="footer">
+ <Button @click="cancel">{{$t('message.linkis.ipListManagement.Cancel')}}</Button>
+ <Button type="primary" @click="addRules" :loading="isRequesting">{{$t('message.common.ok')}}</Button>
+ </div>
+ </Modal>
+ <Modal
+ v-model="showViewModal"
+ :title="modalTitle"
+ width="620px"
+ class="modal"
+ @on-cancel="cancel">
+ <v-jsoneditor ref="editor" :options="viewerOptions" />
+ </Modal>
+ </div>
+</template>
+<script>
+import storage from "@/common/helper/storage";
+import api from '@/common/service/api';
+import { cloneDeep, isNumber } from 'lodash';
+export default {
+ name: 'acrossClusterRule',
+ data() {
+ return {
+ modalTitle: '',
+ loading: false,
+ queryData: {
+ username: '',
+ creator: ''
+ },
+ confirmQuery: {
+ username: '',
+ creator: '',
+ },
+ tableColumns: [
+ {
+ title: "ID",
+ key: 'id',
+ width: 133,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.ipListManagement.cluster'),
+ key: 'clusterName',
+ width: 450,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.ipListManagement.userCreator'),
+ key: 'userCreator',
+ width: 550,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.ipListManagement.isValid'),
+ key: 'isValid',
+ width: 200,
+ tooltip: true,
+ align: 'center',
+ render: (h, params) => {
+ return h('div', [
+ h('span', params.row.isValid === 'Y' ? this.$t('message.linkis.ipListManagement.yes') : this.$t('message.linkis.ipListManagement.no'))
+ ]);
+ }
+ },
+ {
+ title: this.$t('message.linkis.ipListManagement.rules'),
+ key: '',
+ width: 100,
+ tooltip: true,
+ align: 'center',
+ render: (h, params) => {
+ return h('div', [
+ h('Button', {
+ props: {
+ type: 'primary',
+ size: 'small'
+ },
+ on: {
+ click: () => {
+ this.viewRule(params.row)
+ }
+ }
+ }, this.$t('message.linkis.ipListManagement.view'))
+ ]);
+ }
+ },
+ {
+ title: this.$t('message.linkis.ipListManagement.action'),
+ key: 'action',
+ width: 200,
+ align: 'center',
+ render: (h, params) => {
+ return h('div', [
+ h('Button', {
+ props: {
+ type: 'primary',
+ size: 'small'
+ },
+ style: {
+ marginRight: '5px'
+ },
+ on: {
+ click: () => {
+ this.edit(params.row)
+ }
+ }
+ }, this.$t('message.linkis.ipListManagement.edit')),
+ h('Button', {
+ props: {
+ type: 'error',
+ size: 'small'
+ },
+ style: {
+ marginRight: '5px'
+ },
+ on: {
+ click: () => {
+ this.delete(params.row)
+ }
+ }
+ }, this.$t('message.linkis.ipListManagement.delete')),
+ h('Button', {
+ props: {
+ type: params.row.isValid === 'N' ? 'success' : 'warning',
+ size: 'small'
+ },
+ on: {
+ click: () => {
+ this.enable(params.row)
+ }
+ }
+ }, params.row.isValid === 'N' ? this.$t('message.linkis.ipListManagement.enable') : this.$t('message.linkis.ipListManagement.disable')),
+ ]);
+ }
+ }
+ ],
+ datalist: [],
+ tableLoading: false,
+ showCreateModal: false,
+ modalData: {
+ username: '',
+ creator: '',
+ clusterName: '',
+ CPUThreshold: '',
+ CPUPercentageThreshold: '',
+ MemoryThreshold: '',
+ MemoryPercentageThreshold: '',
+ startTime: '',
+ endTime: '',
+ isValid: 'Y'
+ },
+ modalDataRule: {
+ username: [
+ {required: true, message: this.$t('message.linkis.ipListManagement.notEmpty'), trigger: 'blur'},
+ {pattern: /^[0-9a-zA-Z_]+$/, message: this.$t('message.linkis.ipListManagement.contentError1'), type: 'string'}
+ ],
+ creator: [
+ {required: true, message: this.$t('message.linkis.ipListManagement.notEmpty'), trigger: 'blur'},
+ {pattern: /^[0-9a-zA-Z_]+$/, message: this.$t('message.linkis.ipListManagement.contentError1'), type: 'string'}
+ ],
+ parsedRules: [
+ {required: true, message: this.$t('message.linkis.ipListManagement.notEmpty'), trigger: 'blur', type: 'object'},
+ {validator: this.ruleJsonValidator, trigger: 'blur'}
+ ],
+ clusterName: [
+ {required: true, message: this.$t('message.linkis.ipListManagement.notEmpty'), trigger: 'blur'},
+ {pattern: /^[0-9a-zA-Z_]+$/, message: this.$t('message.linkis.ipListManagement.contentError1'), type: 'string'}
+ ],
+ startTime: [
+ {required: true, message: this.$t('message.linkis.ipListManagement.notEmpty'), trigger: 'blur'},
+ {pattern: /^([01]\d|2[0-3]):[0-5]\d$/, message: this.$t('message.linkis.ipListManagement.timeError'), type: 'string'}
+ ],
+ endTime: [
+ {required: true, message: this.$t('message.linkis.ipListManagement.notEmpty'), trigger: 'blur'},
+ {pattern: /^([01]\d|2[0-3]):[0-5]\d$/, message: this.$t('message.linkis.ipListManagement.timeError'), type: 'string'}
+ ],
+ MemoryThreshold: [
+ {required: true, message: this.$t('message.linkis.ipListManagement.notEmpty'), trigger: 'blur'},
+ {validator: this.thresholdValidator, trigger: 'blur'},
+ ],
+ CPUThreshold: [
+ {required: true, message: this.$t('message.linkis.ipListManagement.notEmpty'), trigger: 'blur'},
+ {validator: this.thresholdValidator, trigger: 'blur'},
+ ],
+ MemoryPercentageThreshold: [
+ {required: true, message: this.$t('message.linkis.ipListManagement.notEmpty'), trigger: 'blur'},
+ {validator: this.percentageThresholdValidator, trigger: 'blur'},
+ {type: 'string', max: 4, message: this.$t('message.linkis.ipListManagement.customLen', {length: '4'})}
+ ],
+ CPUPercentageThreshold: [
+ {required: true, message: this.$t('message.linkis.ipListManagement.notEmpty'), trigger: 'blur'},
+ {validator: this.percentageThresholdValidator, trigger: 'blur'},
+ {type: 'string', max: 4, message: this.$t('message.linkis.ipListManagement.customLen', {length: '4'})}
+ ],
+ },
+ // tagIsExist: true,
+ mode: 'create',
+ page: {
+ pageSize: 10,
+ pageNow: 1,
+ totalPage: 0,
+ },
+ userName: '',
+ isRequesting: false,
+ json: '',
+ viewerOptions: {
+ mode: 'view'
+ },
+ editorOptions: {
+ mode: 'code'
+ },
+ showViewModal: false,
+ errorJson: false,
+ }
+ },
+ computed: {
+ mapping () {
+ return (this.modalData.username || 'username') + '-' + (this.modalData.creator || 'creator') + ' --> ' + (this.modalData.ipList || 'IPList')
+ }
+ },
+ methods: {
+ async getTableData() {
+ try {
+ this.tableLoading = true;
+ let params = {};
+ const keys = Object.keys(this.confirmQuery);
+ for (let i = 0; i< keys.length; i++) {
+ if(this.confirmQuery[keys[i]]) {
+ params[[keys[i]]] = this.confirmQuery[keys[i]];
+ }
+ }
+ params.pageNow = this.page.pageNow;
+ params.pageSize = this.page.pageSize;
+ const res = await api.fetch("/configuration/acrossClusterRule/list", params, "get")
+
+ this.datalist = res.acrossClusterRuleList.map((item) => {
+ item.userCreator = item.username + "-" + item.creator;
+ item.parsedRules = JSON.parse(item.rules)
+ // item.createTime = new Date(item.createTime).toLocaleString();
+ return item;
+ })
+ this.page.totalPage = res.totalPage;
+
+ this.tableLoading = false;
+ } catch(err) {
+ this.tableLoading = false;
+ }
+
+ },
+ async init() {
+ this.loading = true;
+ await this.getTableData();
+ this.loading = false;
+ },
+ async clearSearch() {
+ this.queryData = {
+ username: '',
+ creator: '',
+ clusterName: '',
+ };
+ this.confirmQuery = {
+ username: '',
+ creator: '',
+ clusterName: '',
+ }
+ this.page.pageNow = 1;
+ await this.getTableData()
+ },
+ async createRules () {
+ this.showCreateModal = true;
+ this.mode = 'create';
+ this.modalTitle = this.$t('message.linkis.ipListManagement.createRules')
+ this.modalData.username = this.userName;
+ },
+ cancel() {
+ this.showCreateModal = false;
+ this.modalData = {
+ username: '',
+ creator: '',
+ clusterName: '',
+ CPUThreshold: '',
+ CPUPercentageThreshold: '',
+ MemoryThreshold: '',
+ MemoryPercentageThreshold: '',
+ startTime: '',
+ endTime: '',
+ isValid: 'Y'
+ }
+ this.$refs.createRuleForm.resetFields();
+ },
+ addRules() {
+ if(this.isRequesting) return;
+ const restfulMode = this.mode === 'edit' ? 'put' : 'post';
+ const target = this.mode === 'edit' ? '/configuration/acrossClusterRule/update' : '/configuration/acrossClusterRule/add';
+ this.$refs.createRuleForm.validate(async (valid) => {
+ if(valid) {
+ this.clearSearch();
+ try {
+ if(this.mode !== 'edit') {
+ this.page.pageNow = 1;
+ }
+ this.isRequesting = true
+ const body = cloneDeep(this.modalData);
+ // body.CPUThreshold = Number(body.CPUThreshold);
+ // body.MemoryThreshold = Number(body.MemoryThreshold);
+ // body.CPUPercentageThreshold = Number(body.CPUPercentageThreshold);
+ // body.MemoryPercentageThreshold = Number(body.MemoryPercentageThreshold);
+ const res = await api.fetch(target, body, restfulMode)
+ window.console.log(res);
+ await this.getTableData();
+ this.cancel();
+ this.$Message.success(this.$t('message.linkis.udf.success'));
+ this.isRequesting = false
+ } catch(err) {
+ this.isRequesting = false
+ }
+ } else {
+ this.$Message.error(this.$t('message.linkis.error.validate'));
+ }
+ })
+
+ },
+ edit(data) {
+ const {
+ id, username, creator, clusterName, parsedRules, isValid
+ } = data
+ const { CPUPercentageThreshold, MemoryPercentageThreshold, MemoryThreshold, CPUThreshold } = parsedRules?.thresholdRule || {};
+ const { startTime, endTime } = parsedRules?.timeRule || {}
+ this.modalData = {
+ id, username, creator, clusterName, CPUPercentageThreshold, MemoryPercentageThreshold, MemoryThreshold, CPUThreshold, startTime, endTime, isValid
+ };
+ this.showCreateModal = true;
+ this.mode = 'edit';
+ this.modalTitle = this.$t('message.linkis.ipListManagement.editRules')
+ },
+ delete(data) {
+ this.$Modal.confirm({
+ title: this.$t('message.linkis.ipListManagement.confirmDel'),
+ content: this.$t('message.linkis.ipListManagement.isConfirmDel', {name: `${data.userCreator}`}),
+ onOk: async () => {
+ await this.confirmDelete(data);
+ await this.getTableData();
+ }
+ })
+ },
+ async confirmEnable(id, status) {
+ let targetStatus = ''
+ if(status === 'N') {
+ targetStatus = 'Y';
+ } else {
+ targetStatus = 'N'
+ }
+ try {
+ await api.fetch('/configuration/acrossClusterRule/isValid', { id, isValid: targetStatus }, 'put');
+ if(status === 'N') {
+ this.$Message.success(this.$t('message.linkis.ipListManagement.enableSuccessfully'));
+ } else {
+ this.$Message.success(this.$t('message.linkis.ipListManagement.disableSuccessfully'));
+ }
+
+ } catch (err) {
+ return;
+ }
+
+
+ },
+ enable(data) {
+ this.$Modal.confirm({
+ title: this.$t('message.linkis.ipListManagement.confirmDel'),
+ content: data.isValid === 'N' ? this.$t('message.linkis.ipListManagement.confirmEnable', {name: `${data.id}`}) : this.$t('message.linkis.ipListManagement.confirmDisable', {name: `${data.id}`}),
+ onOk: async () => {
+ await this.confirmEnable(data.id, data.isValid);
+ await this.getTableData();
+ },
+ })
+ },
+ async confirmDelete(data) {
+ try {
+ const { username, creator } = data
+ await api.fetch('/configuration/acrossClusterRule/delete', { username, creator }, 'delete');
+ this.$Message.success(this.$t('message.linkis.ipListManagement.deleteSuccess'));
+ } catch(err) {
+ return;
+ }
+ },
+ thresholdValidator (rule, val, cb) {
+ const threshold = Number(val)
+ if(isNumber(threshold) && threshold >= 0 && threshold <= 10000) {
+ cb()
+ } else {
+ cb(new Error(this.$t('message.linkis.ipListManagement.thresholdError')))
+ }
+ },
+ percentageThresholdValidator (rule, val, cb) {
+ const threshold = Number(val)
+ if(isNumber(threshold) && threshold >= 0 && threshold <= 1) {
+ cb()
+ } else {
+ cb(new Error(this.$t('message.linkis.ipListManagement.percentageThresholdError')))
+ }
+ },
+ async changePage(val) {
+ this.page.pageNow = val;
+ await this.getTableData();
+ },
+ async search() {
+ const { username, creator, clusterName } = this.queryData;
+ this.confirmQuery = { username, creator, clusterName };
+ this.page.pageNow = 1;
+ await this.getTableData()
+ },
+ viewRule(row) {
+ this.$refs.editor.editor.set(row.parsedRules)
+ this.showViewModal = true;
+ this.$refs.editor.editor.expandAll();
+ this.modalTitle = this.$t('message.linkis.ipListManagement.viewRules')
+ }
+ },
+ created() {
+ this.userName = storage.get('userName') || storage.get('baseInfo', 'local').username || '';
+ this.init();
+ }
+
+};
+</script>
+<style lang="scss" src="./index.scss" scoped></style>
+<style lang="scss" scoped>
+
+.modal {
+ .input-area {
+ padding: 20px 50px;
+ .item {
+ display: flex;
+ margin-bottom: 10px;
+ .input {
+ width: calc(100% - 66px);
+ }
+ }
+ }
+}
+.page {
+ bottom: 10px;
+ overflow: hidden;
+ text-align: center;
+}
+.ivu-tooltip-popper {
+ .ivu-tooltip-content {
+ .ivu-tooltip-inner-with-width {
+ word-wrap: break-word;
+ }
+ }
+}
+</style>
diff --git a/linkis-web/src/apps/linkis/module/codeQuery/index.scss b/linkis-web/src/apps/linkis/module/codeQuery/index.scss
index 71d03bb32..49d9afef4 100644
--- a/linkis-web/src/apps/linkis/module/codeQuery/index.scss
+++ b/linkis-web/src/apps/linkis/module/codeQuery/index.scss
@@ -21,4 +21,9 @@
margin-top: 16px;
height: 610px;
}
+ .datepicker {
+ /deep/.ivu-input-with-suffix {
+ padding-right: 0px;
+ }
+ }
}
diff --git a/linkis-web/src/apps/linkis/module/codeQuery/index.vue b/linkis-web/src/apps/linkis/module/codeQuery/index.vue
index 1afef71a2..1abe31d36 100644
--- a/linkis-web/src/apps/linkis/module/codeQuery/index.vue
+++ b/linkis-web/src/apps/linkis/module/codeQuery/index.vue
@@ -47,6 +47,21 @@
:editable="false"
/>
</FormItem>
+
+ <FormItem prop="creator" :label="$t('message.linkis.formItems.creator.label')" :label-width="38">
+ <Input
+ :maxlength="50"
+ v-model.trim="searchBar.creator"
+ :placeholder="$t('message.linkis.formItems.creator.placeholder')"
+ style="width:90px;"
+ />
+ </FormItem>
+
+ <FormItem prop="engineType" :label="$t('message.linkis.formItems.engineType')" :label-width="60">
+ <Select v-model="searchBar.engineType" style="width: 90px">
+ <Option v-for="(item) in getEngineTypes" :label="item === 'all' ? $t('message.linkis.engineTypes.all'): item" :value="item" :key="item" />
+ </Select>
+ </FormItem>
<FormItem prop="status" :label="$t('message.linkis.formItems.status.label')" :label-width="38">
<Select v-model="searchBar.status" style="width: 90px">
<Option
@@ -157,6 +172,7 @@ export default {
return date.valueOf() > Date.now() - 86400000
}
},
+ getEngineTypes: [],
statusType: [
{
label: this.$t('message.linkis.statusType.all'),
@@ -314,7 +330,7 @@ export default {
throw Error(this.$t('message.linkis.codeQuery.inputCode'));
}
this.beforeSearch = false;
- const { executionCode, shortcut, status } = this.searchParams;
+ const { executionCode, shortcut, status, engineType,creator } = this.searchParams;
const { pageNow, pageSize } = this.page;
const params = {
executionCode,
@@ -323,7 +339,9 @@ export default {
isAdminView: this.isAdminModel,
pageNow,
pageSize,
- status
+ status,
+ engineType,
+ creator
}
if (!shortcut[0]) {
delete params.startDate
@@ -332,12 +350,18 @@ export default {
if (!status || status === 'all') {
delete params.status
}
+ if (!engineType || engineType === 'all') {
+ delete params.engineType
+ }
+ if (!creator) {
+ delete params.creator
+ }
+
const res = await api.fetch(`/jobhistory/es/search`, params, 'get');
this.tableData = res.tasks.content
this.page.totalPage = res.tasks.totalElements
this.tableLoading = false
} catch (err) {
- window.console.warn(err);
this.tableLoading = false
}
},
@@ -374,6 +398,9 @@ export default {
api.fetch('/jobhistory/governanceStationAdmin', 'get').then(res => {
this.isLogAdmin = res.admin
})
+ api.fetch('/configuration/engineType', 'get').then(res => {
+ this.getEngineTypes = ['all', ...res.engineType]
+ })
},
beforeRouteEnter(to, from, next) {
if(from.name !== 'codeDetail') {
@@ -385,6 +412,7 @@ export default {
next();
},
mounted() {
+
if(sessionStorage.getItem('code-use-cache') === 'true') {
this.searchParams = JSON.parse(sessionStorage.getItem('code-search'));
this.searchBar = JSON.parse(sessionStorage.getItem('code-search'));
diff --git a/linkis-web/src/apps/linkis/module/codeQuery/index.scss b/linkis-web/src/apps/linkis/module/configManagement/index.js
similarity index 85%
copy from linkis-web/src/apps/linkis/module/codeQuery/index.scss
copy to linkis-web/src/apps/linkis/module/configManagement/index.js
index 71d03bb32..e247fed6a 100644
--- a/linkis-web/src/apps/linkis/module/codeQuery/index.scss
+++ b/linkis-web/src/apps/linkis/module/configManagement/index.js
@@ -5,20 +5,19 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
-@import '@/common/style/variables.scss';
-.code-query {
- .table-content {
- margin-top: 16px;
- height: 610px;
- }
-}
+export default {
+ name: 'configManagement',
+ events: [],
+ component: () => import('./index.vue'),
+};
\ No newline at end of file
diff --git a/linkis-web/src/apps/linkis/module/udfTree/index.scss b/linkis-web/src/apps/linkis/module/configManagement/index.scss
similarity index 64%
copy from linkis-web/src/apps/linkis/module/udfTree/index.scss
copy to linkis-web/src/apps/linkis/module/configManagement/index.scss
index 7ea4fd680..ef693ec9d 100644
--- a/linkis-web/src/apps/linkis/module/udfTree/index.scss
+++ b/linkis-web/src/apps/linkis/module/configManagement/index.scss
@@ -14,52 +14,50 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
@import '@/common/style/variables.scss';
-
.search-bar {
.search-item {
display: flex;
justify-content: flex-start;
align-items: center;
font-size: $font-size-base;
-
+ .search-label {
+ min-width: 40px;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+ margin-right: 5px;
+ font-size: 14px;
+ line-height: 32px
+ }
.lable {
- min-width: 90px;
- // flex-basis: 130px;
- text-align: right;
+ flex-basis: 120px;
+ text-align: center;
}
}
-
- .ivu-col {
- display: flex;
- justify-content: center;
+ .button {
+ width: 70px;
+ margin-right: 5px;
+ margin-left: 5px;
+ padding: 5px;
}
-
-}
-
-.table-content {
- margin-top: 25px;
-}
-
-.datasource-type-wrap {
- .project-header {
- height: 32px;
-
- .header-title {
- font-size: $font-size-large;
- font-weight: bold;
- padding-left: 12px;
- border-left: 3px solid $primary-color;
- color: $text-title-color;
- }
-
+ .search {
+ margin-left: 25px;
}
-
-}
-
-.modal {
- .footer {
- display: flex;
- justify-content: space-between;
+ .ivu-input-wrapper {
+ width: calc(100% - 105px);
}
}
+.page {
+ bottom: 10px;
+ overflow: hidden;
+ text-align: center;
+}
+.table-content {
+ margin-top: 25px;
+ height: 687px;
+}
+.form {
+ padding: 0 50px;
+}
\ No newline at end of file
diff --git a/linkis-web/src/apps/linkis/module/configManagement/index.vue b/linkis-web/src/apps/linkis/module/configManagement/index.vue
new file mode 100644
index 000000000..79525310d
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/configManagement/index.vue
@@ -0,0 +1,549 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<template>
+ <div class="tenantManagement">
+ <Spin
+ v-if="loading"
+ size="large"
+ fix/>
+ <Row class="search-bar">
+ <Col span="6" class="search-item">
+ <span :title="$t('message.linkis.ipListManagement.engineType')" class="search-label">{{$t('message.linkis.ipListManagement.engineType')}}</span>
+ <Select v-model="queryData.engineType" style="width: 290px">
+ <Option v-for="(item) in getEngineTypes" :label="item === 'all' ? $t('message.linkis.engineTypes.all'): item" :value="item" :key="item" />
+ </Select>
+ </Col>
+ <Col span="6" class="search-item">
+ <span :title="$t('message.linkis.ipListManagement.key')" class="search-label">{{$t('message.linkis.ipListManagement.key')}}</span>
+ <Input
+ v-model="queryData.key"
+ style="width: 290px"
+ :placeholder="$t('message.linkis.ipListManagement.inputKey')"
+ @on-enter="search"
+ ></Input>
+ </Col>
+ <Col span="9">
+ <Button type="primary" class="button" @click="search">{{
+ $t('message.linkis.ipListManagement.search')
+ }}</Button>
+ <Button type="warning" class="button" @click="clearSearch">{{
+ $t('message.linkis.ipListManagement.clear')
+ }}</Button>
+ <Button type="success" class="button" @click="createTenant">{{
+ $t('message.linkis.ipListManagement.create')
+ }}</Button>
+ </Col>
+ </Row>
+ <Table
+ border
+ size="small"
+ align="center"
+ :columns="tableColumns"
+ :data="datalist"
+ :loading="tableLoading"
+ class="table-content data-source-table">
+
+ </Table>
+ <Page
+ :page-size="page.pageSize"
+ :current="page.pageNow"
+ :total="page.totalPage"
+ show-total
+ @on-change="changePage"
+ size="small"
+ show-elevator
+ :prev-text="$t('message.linkis.previousPage')" :next-text="$t('message.linkis.nextPage')"
+ class="page"
+ ></Page>
+ <Modal
+ v-model="showCreateModal"
+ class="modal"
+ :title="modalTitle"
+ @on-cancel="cancel">
+ <div class="form">
+ <Form ref="createTenantForm" :model="modalData" label-position="left" :label-width="100" :rules="modalDataRule">
+ <FormItem :label="$t('message.linkis.ipListManagement.key')" prop="key">
+ <Input class="input" v-model="modalData.key"></Input>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.ipListManagement.name')" prop="name">
+ <Input class="input" v-model="modalData.name"></Input>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.ipListManagement.description')" prop="description">
+ <Input class="input" v-model="modalData.description"></Input>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.ipListManagement.treeName')" prop="treeName">
+ <Input class="input" v-model="modalData.treeName"></Input>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.ipListManagement.defaultValue')" prop="defaultValue">
+ <Input class="input" v-model="modalData.defaultValue"></Input>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.ipListManagement.validType')" prop="validateType">
+ <Select class="input" v-model="modalData.validateType">
+ <Option v-for="(item) in validateTypeList" :label="item.label" :value="item.value" :key="item.value" />
+ </Select>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.ipListManagement.dataType')" prop="boundaryType">
+ <Select class="input" v-model="modalData.boundaryType">
+ <Option v-for="(item) in boundaryTypeList" :label="item.label" :value="item.value" :key="item.value" />
+ </Select>
+ </FormItem>
+ <FormItem :rules="{required: modalData.validateType !== 'None' , message: $t('message.linkis.ipListManagement.notEmpty'), trigger: 'blur'}" :label="$t('message.linkis.ipListManagement.validRange')" prop="validateRange">
+ <Input class="input" v-model="modalData.validateRange"></Input>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.ipListManagement.engineType')" prop="engineType">
+ <Select class="input" v-model="modalData.engineType">
+ <Option v-for="(item) in getEngineTypes" :label="item === 'all' ? $t('message.linkis.engineTypes.all'): item" :value="item" :key="item" />
+ </Select>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.ipListManagement.templateRequired')" prop="templateRequired">
+ <RadioGroup v-model="modalData.templateRequired">
+ <Radio label="1">{{$t('message.linkis.ipListManagement.yes')}}</Radio>
+ <Radio label="0">{{$t('message.linkis.ipListManagement.no')}}</Radio>
+ </RadioGroup>
+ </FormItem>
+ <FormItem v-if="mode !== 'edit'" :label="$t('message.linkis.ipListManagement.enName')" prop="enName">
+ <Input class="input" v-model="modalData.enName"></Input>
+ </FormItem>
+ <FormItem v-if="mode !== 'edit'" :label="$t('message.linkis.ipListManagement.enDescription')" prop="enDescription">
+ <Input class="input" v-model="modalData.enDescription"></Input>
+ </FormItem>
+ <FormItem v-if="mode !== 'edit'" :label="$t('message.linkis.ipListManagement.enTreeName')" prop="enTreeName">
+ <Input class="input" v-model="modalData.enTreeName"></Input>
+ </FormItem>
+ </Form>
+ </div>
+ <div slot="footer">
+ <Button @click="cancel">{{$t('message.linkis.ipListManagement.Cancel')}}</Button>
+ <Button type="primary" @click="addConfig" :loading="isRequesting">{{$t('message.common.ok')}}</Button>
+ </div>
+ </Modal>
+ </div>
+</template>
+<script>
+import api from '@/common/service/api'
+import { cloneDeep } from 'lodash';
+export default {
+ name: 'configManagement',
+ data() {
+ return {
+ validateTypeList: [
+ { label: this.$t('message.linkis.ipListManagement.none'), value: 'None'},
+ { label: this.$t('message.linkis.ipListManagement.regex'), value: 'Regex'},
+ { label: this.$t('message.linkis.ipListManagement.numInterval'), value: 'NumInterval'},
+ { label: this.$t('message.linkis.ipListManagement.oft'), value: 'OFT'},
+ ],
+ modalTitle: '',
+ getEngineTypes: [],
+ loading: false,
+ queryData: {
+ engineType: '',
+ key: ''
+ },
+ confirmQuery: {
+ engineType: '',
+ key: '',
+ },
+ tableColumns: [
+ {
+ title: "ID",
+ key: 'id',
+ width: 60,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.ipListManagement.key'),
+ key: 'key',
+ width: 300,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.ipListManagement.name'),
+ key: 'name',
+ width: 300,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.ipListManagement.description'),
+ key: 'description',
+ width: 300,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.ipListManagement.defaultValue'),
+ key: 'defaultValue',
+ width: 150,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.ipListManagement.validType'),
+ key: 'formatValidateType',
+ width: 200,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.ipListManagement.validRange'),
+ key: 'validateRange',
+ width: 280,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.ipListManagement.dataType'),
+ key: 'formatBoundaryType',
+ width: 150,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.ipListManagement.engineType'),
+ key: 'engineType',
+ width: 150,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.ipListManagement.treeName'),
+ key: 'treeName',
+ width: 120,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.ipListManagement.templateRequired'),
+ key: 'templateRequired',
+ width: 200,
+ tooltip: true,
+ align: 'center',
+ render: (h, params) => {
+ return h('div', [
+ h('span', params.row.templateRequired === '1' ? this.$t('message.linkis.ipListManagement.yes') : this.$t('message.linkis.ipListManagement.no'))
+ ]);
+ }
+ },
+ {
+ title: this.$t('message.linkis.ipListManagement.action'),
+ key: 'action',
+ width: 200,
+ align: 'center',
+ render: (h, params) => {
+ return h('div', [
+ h('Button', {
+ props: {
+ type: 'primary',
+ size: 'small'
+ },
+ style: {
+ marginRight: '5px'
+ },
+ on: {
+ click: () => {
+ this.edit(params.row)
+ }
+ }
+ }, this.$t('message.linkis.ipListManagement.edit')),
+ h('Button', {
+ props: {
+ type: 'error',
+ size: 'small'
+ },
+ on: {
+ click: () => {
+ this.delete(params.row)
+ }
+ }
+ }, this.$t('message.linkis.ipListManagement.delete'))
+ ]);
+ }
+ }
+ ],
+ datalist: [],
+ tableLoading: false,
+ showCreateModal: false,
+ modalData: {
+ key: '',
+ name: '',
+ description: '',
+ defaultValue: '',
+ validateType: '',
+ validateRange: '',
+ boundaryType: '',
+ treeName: '',
+ enName: '',
+ enDescription: '',
+ enTreeName: '',
+ templateRequired: '0',
+ },
+ modalDataRule: {
+ key: [
+ {required: true, message: this.$t('message.linkis.ipListManagement.notEmpty'), trigger: 'blur'},
+ {pattern: /^[^\u4E00-\u9FFF]+$/, message: this.$t('message.linkis.ipListManagement.noZH'), type: 'string'},
+ {type: 'string', max: 50, message: this.$t('message.linkis.ipListManagement.customLen', {length: '50'})}
+ ],
+ name: [
+ {required: true, message: this.$t('message.linkis.ipListManagement.notEmpty'), trigger: 'blur'},
+ {type: 'string', max: 50, message: this.$t('message.linkis.ipListManagement.customLen', {length: '50'})}
+ ],
+ description: [
+ {required: true, message: this.$t('message.linkis.ipListManagement.notEmpty'), trigger: 'blur'},
+ {type: 'string', max: 200, message: this.$t('message.linkis.ipListManagement.customLen', {length: '200'})}
+ ],
+ validateType: [
+ {required: true, message: this.$t('message.linkis.ipListManagement.notEmpty'), trigger: 'change'},
+ ],
+ validateRange: [
+ {type: 'string', max: 150, message: this.$t('message.linkis.ipListManagement.customLen', {length: '150'})},
+ ],
+ boundaryType: [
+ {required: true, message: this.$t('message.linkis.tenantTagManagement.notEmpty'), trigger: 'change', type: 'number'},
+ ],
+ treeName: [
+ {required: true, message: this.$t('message.linkis.tenantTagManagement.notEmpty'), trigger: 'blur'},
+ {type: 'string', max: 20, message: this.$t('message.linkis.ipListManagement.customLen', {length: '20'})}
+ ],
+ engineType: [
+ {pattern: /^[^\u4E00-\u9FFF]+$/, message: this.$t('message.linkis.ipListManagement.noZH'), type: 'string'},
+ ],
+ enName: [
+ {pattern: /^[^\u4E00-\u9FFF]+$/, message: this.$t('message.linkis.ipListManagement.noZH'), type: 'string'},
+ {type: 'string', max: 200, message: this.$t('message.linkis.ipListManagement.customLen', {length: '200'})}
+ ],
+ enDescription: [
+ {pattern: /^[^\u4E00-\u9FFF]+$/, message: this.$t('message.linkis.ipListManagement.noZH'), type: 'string'},
+ {type: 'string', max: 100, message: this.$t('message.linkis.ipListManagement.customLen', {length: '100'})}
+ ],
+ enTreeName: [
+ {pattern: /^[^\u4E00-\u9FFF]+$/, message: this.$t('message.linkis.ipListManagement.noZH'), type: 'string'},
+ {type: 'string', max: 100, message: this.$t('message.linkis.ipListManagement.customLen', {length: '100'})}
+ ],
+ },
+ mode: 'create',
+ page: {
+ pageSize: 10,
+ pageNow: 1,
+ totalPage: 0,
+ },
+ isRequesting: false,
+ boundaryTypeMap: ['none', 'with min', 'with max', 'min and max both'],
+ boundaryTypeList: ['none', 'with min', 'with max', 'min and max both'].map((item, index) => {
+ return {
+ label: item,
+ value: index
+ }
+ })
+ }
+ },
+ methods: {
+ async getTableData() {
+ try {
+ this.tableLoading = true;
+ let params = {};
+ if(this.confirmQuery?.engineType === 'all') delete this.confirmQuery.engineType;
+ const keys = Object.keys(this.confirmQuery);
+ for (let i = 0; i< keys.length; i++) {
+ if(this.confirmQuery[keys[i]]) {
+ params[[keys[i]]] = this.confirmQuery[keys[i]];
+ }
+ }
+ params.pageNow = this.page.pageNow;
+ params.pageSize = this.page.pageSize;
+ const res = await api.fetch("/configuration/baseKeyValue", params, "get")
+
+ this.datalist = res.configKeyList.map((item) => {
+ item.formatBoundaryType = this.boundaryTypeMap[item.boundaryType]
+ item.formatValidateType = this.validateTypeList.find(p => p.value === item.validateType)?.label || ''
+ item.templateRequired = item.templateRequired ? '1' : '0'
+ return item
+ });
+ this.page.totalPage = res.totalPage;
+ this.tableLoading = false;
+ } catch(err) {
+ this.tableLoading = false;
+ }
+
+ },
+ async init() {
+ this.loading = true;
+ await this.getTableData();
+ this.loading = false;
+ },
+ async clearSearch() {
+ this.queryData = {
+ engineType: '',
+ key: ''
+ };
+ this.confirmQuery = {
+ engineType: '',
+ key: ''
+ }
+ this.page.pageNow = 1;
+ await this.getTableData()
+ },
+ async createTenant () {
+ this.modalTitle = this.$t('message.linkis.ipListManagement.createRules')
+ this.showCreateModal = true;
+ this.mode = 'create'
+ this.$refs.createTenantForm.resetFields()
+ },
+ cancel() {
+ this.showCreateModal = false;
+ this.modalData = {
+ key: '',
+ name: '',
+ description: '',
+ defaultValue: '',
+ engineType: '',
+ validateType: '',
+ validateRange: '',
+ boundaryType: '',
+ treeName: '',
+ enName: '',
+ enDescription: '',
+ enTreeName: ''
+ }
+ },
+ addConfig() {
+ if(this.isRequesting) return;
+ const target = '/configuration/baseKeyValue'
+ this.$refs.createTenantForm.validate(async (valid) => {
+ if(valid) {
+
+ try {
+ if(this.mode !== 'edit') {
+ this.page.pageNow = 1;
+ }
+ this.isRequesting = true
+ const body = cloneDeep(this.modalData);
+ if(!body.engineType || body.engineType === 'all') delete body.engineType
+ body.templateRequired = body.templateRequired === '1'
+ await api.fetch(target, body, "post")
+ await this.clearSearch();
+ this.cancel();
+ this.$Message.success(this.$t('message.linkis.udf.success'));
+
+ this.isRequesting = false
+ } catch(err) {
+ this.isRequesting = false
+ }
+ } else {
+ this.$Message.error(this.$t('message.linkis.error.validate'));
+ }
+ })
+
+ },
+ edit(data) {
+ const {
+ id,
+ key,
+ name,
+ description,
+ defaultValue,
+ validateType,
+ validateRange,
+ boundaryType,
+ treeName,
+ enName,
+ enDescription,
+ enTreeName,
+ engineType,
+ templateRequired
+ } = data
+ this.modalData = {
+ id,
+ key,
+ name,
+ description,
+ defaultValue,
+ validateType,
+ validateRange,
+ boundaryType,
+ treeName,
+ enName,
+ enDescription,
+ enTreeName,
+ engineType,
+ templateRequired
+ };
+ this.showCreateModal = true;
+ this.modalTitle = this.$t('message.linkis.ipListManagement.editRules')
+ this.$refs.createTenantForm.resetFields()
+ this.mode = 'edit';
+ },
+ delete(data) {
+ this.$Modal.confirm({
+ title: this.$t('message.linkis.ipListManagement.confirmDel'),
+ content: this.$t('message.linkis.ipListManagement.isConfirmDel', {name: `${data.name}`}),
+ onOk: async () => {
+ await this.confirmDelete(data);
+ await this.getTableData();
+ },
+ })
+ },
+ async confirmDelete(data) {
+ try {
+ await api.fetch('/configuration/baseKeyValue', {id: data.id}, 'delete');
+ } catch(err) {
+ return;
+ }
+ },
+ async changePage(val) {
+ this.page.pageNow = val;
+ await this.getTableData();
+ },
+ async search() {
+ const { engineType, key } = this.queryData;
+ this.confirmQuery = { engineType, key };
+ this.page.pageNow = 1;
+ await this.getTableData()
+ }
+ },
+ created() {
+ api.fetch('/configuration/engineType', 'get').then(res => {
+ this.getEngineTypes = ['all', ...res.engineType]
+ })
+ this.init();
+ }
+
+};
+</script>
+<style lang="scss" src="./index.scss" scoped></style>
+<style lang="scss" scoped>
+
+.modal {
+ .form {
+ .input {
+ width: 319px;
+ }
+ }
+}
+
+
+.ivu-tooltip-popper {
+ .ivu-tooltip-content {
+ .ivu-tooltip-inner-with-width {
+ word-wrap: break-word;
+ }
+ }
+}
+
+</style>
diff --git a/linkis-web/src/apps/linkis/module/datasource/index.vue b/linkis-web/src/apps/linkis/module/datasource/index.vue
index ae569d53f..1ad41841b 100644
--- a/linkis-web/src/apps/linkis/module/datasource/index.vue
+++ b/linkis-web/src/apps/linkis/module/datasource/index.vue
@@ -426,7 +426,7 @@ export default {
title: this.$t('message.linkis.datasource.action'),
key: 'action',
tooltip: true,
- minWidth: 120,
+ minWidth: 160,
align: 'center',
slot: 'action',
},
diff --git a/linkis-web/src/apps/linkis/module/datasourceTypeKey/index.vue b/linkis-web/src/apps/linkis/module/datasourceTypeKey/index.vue
index d47eef8d0..2c22e08a5 100644
--- a/linkis-web/src/apps/linkis/module/datasourceTypeKey/index.vue
+++ b/linkis-web/src/apps/linkis/module/datasourceTypeKey/index.vue
@@ -20,7 +20,7 @@
<div class="search-bar" style="display: flex;align-items: flex-start">
<span :style="{ whiteSpace: 'nowrap', marginRight: '5px', fontSize: '14px', lineHeight: '32px'}" :title="$t('message.linkis.basedataManagement.datasourceTypeKey.searchName')">{{$t('message.linkis.basedataManagement.datasourceTypeKey.searchName')}}</span>
- <Input style="width: 150px" v-model="searchName" clearable class="input" :placeholder="$t('message.linkis.basedataManagement.datasourceTypeKey.searchPlaceholder')"></Input>
+ <Input style="width: 150px; marigin-right:15px;" v-model="searchName" clearable class="input" :placeholder="$t('message.linkis.basedataManagement.datasourceTypeKey.searchPlaceholder')"></Input>
<span :style="{ whiteSpace: 'nowrap',marginLeft:'5px', marginRight: '5px', fontSize: '14px', lineHeight: '32px'}" :title="$t('message.linkis.basedataManagement.datasourceTypeKey.searchType')">{{$t('message.linkis.basedataManagement.datasourceTypeKey.searchType')}}</span>
<Select style="width: 150px;margin-right: 15px" v-model="datasourceType" >
diff --git a/linkis-web/src/apps/linkis/module/gatewayAuthToken/EditForm/index.vue b/linkis-web/src/apps/linkis/module/gatewayAuthToken/EditForm/index.vue
index c120b27a1..cddf5c4f8 100644
--- a/linkis-web/src/apps/linkis/module/gatewayAuthToken/EditForm/index.vue
+++ b/linkis-web/src/apps/linkis/module/gatewayAuthToken/EditForm/index.vue
@@ -71,7 +71,6 @@ export default {
validate: [
{
required: true,
- pattern: /^[A-Za-z]+-[A-Za-z]+$/g,
message: `${this.$t(
'message.linkis.datasource.pleaseInput'
)}`+this.$t('message.linkis.basedataManagement.gatewayAuthToken.tokenName'),
diff --git a/linkis-web/src/apps/linkis/module/globalHistoryManagement/index.scss b/linkis-web/src/apps/linkis/module/globalHistoryManagement/index.scss
index 1e201eb15..5cc3eca29 100644
--- a/linkis-web/src/apps/linkis/module/globalHistoryManagement/index.scss
+++ b/linkis-web/src/apps/linkis/module/globalHistoryManagement/index.scss
@@ -41,10 +41,39 @@
height: 100%;
.global-history-searchbar {
position: $relative;
- .float-right {
- position: $absolute;
- right: 10px;
+ .search-btns {
+ display: inline-block;
+ vertical-align: top;
+ .search-btn {
+ margin: 0 10px 10px 0
+ }
+ }
+ .searchbar-items {
+ display: inline-block;
+ .searchbar-item {
+ display: inline-block;
+ margin-right: 4px;
+ margin-bottom: 10px;
+ .ivu-input-suffix {
+ display: none;
+ }
+ .ivu-input-with-suffix {
+ padding-right: 0;
+ }
+ .label {
+ text-align: right;
+ vertical-align: middle;
+ float: left;
+ font-size: 12px;
+ color: #515a6e;
+ line-height: 1;
+ padding: 10px 12px 10px 0;
+ box-sizing: border-box;
+ }
+ }
}
+
+
}
.ivu-form {
display: flex;
diff --git a/linkis-web/src/apps/linkis/module/globalHistoryManagement/index.vue b/linkis-web/src/apps/linkis/module/globalHistoryManagement/index.vue
index 8a35fa869..21e33d475 100644
--- a/linkis-web/src/apps/linkis/module/globalHistoryManagement/index.vue
+++ b/linkis-web/src/apps/linkis/module/globalHistoryManagement/index.vue
@@ -17,115 +17,131 @@
<template>
<div class="global-history">
- <Form class="global-history-searchbar" :model="searchBar" inline>
- <FormItem prop="id" :label="$t('message.linkis.jobId')">
- <InputNumber
- v-model="searchBar.id"
- :placeholder="$t('message.linkis.formItems.id.placeholder')"
- style="width:60px;"
- :min="1"
- ></InputNumber>
- </FormItem>
- <FormItem prop="proxyUser" :label="$t('message.linkis.userName')" v-if="isAdminModel">
- <Input
- :maxlength="50"
- v-model="searchBar.proxyUser"
- :placeholder="$t('message.linkis.searchName')"
- style="width:60px;"
- />
- </FormItem>
- <FormItem prop="shortcut" :label="$t('message.linkis.formItems.date.label')">
- <DatePicker
- :transfer="true"
- class="datepicker"
- :options="shortcutOpt"
- v-model="searchBar.shortcut"
- type="daterange"
- placement="bottom-start"
- format="yyyy-MM-dd"
- :placeholder="$t('message.linkis.formItems.date.placeholder')"
- style="width: 160px"
- :editable="false"
- />
- </FormItem>
- <FormItem prop="instance" :label="$t('message.linkis.formItems.instance.label')">
- <Input
- :maxlength="50"
- v-model="searchBar.instance"
- :placeholder="$t('message.linkis.formItems.instance.placeholder')"
- style="width:100px;"
- />
- </FormItem>
- <FormItem prop="creator" :label="$t('message.linkis.formItems.creator.label')">
- <Input
- :maxlength="50"
- v-model="searchBar.creator"
- :placeholder="$t('message.linkis.formItems.creator.placeholder')"
- style="width:80px;"
- />
- </FormItem>
- <FormItem prop="engine" :label="$t('message.linkis.formItems.engine.label')">
- <Select v-model="searchBar.engine" style="width: 70px">
- <Option v-for="(item) in getEngineTypes" :label="item === 'all' ? $t('message.linkis.engineTypes.all'): item" :value="item" :key="item" />
- </Select>
- </FormItem>
- <FormItem prop="status" :label="$t('message.linkis.formItems.status.label')">
- <Select v-model="searchBar.status" style="width: 70px">
- <Option
- v-for="(item) in statusType"
- :label="item.label"
- :value="item.value"
- :key="item.value"
+ <div class="global-history-searchbar">
+ <div class="searchbar-items">
+ <div class="searchbar-item">
+ <label class="label">{{$t('message.linkis.jobId')}}</label>
+ <InputNumber
+ v-model="searchBar.id"
+ :placeholder="$t('message.linkis.formItems.id.placeholder')"
+ style="width:100px;"
+ :min="1"
+ ></InputNumber>
+ </div>
+ <div v-if="isAdminModel" class="searchbar-item">
+ <label class="label">{{$t('message.linkis.userName')}}</label>
+ <Input
+ :maxlength="50"
+ v-model="searchBar.proxyUser"
+ :placeholder="$t('message.linkis.searchName')"
+ style="width:60px;"
/>
- </Select>
- </FormItem>
- <FormItem>
+ </div>
+ <div class="searchbar-item">
+ <label class="label">{{$t('message.linkis.formItems.date.label')}}</label>
+ <DatePicker
+ :transfer="true"
+ class="datepicker"
+ :options="shortcutOpt"
+ v-model="searchBar.shortcut"
+ type="daterange"
+ placement="bottom-start"
+ format="yyyy-MM-dd"
+ :placeholder="$t('message.linkis.formItems.date.placeholder')"
+ style="width: 160px"
+ :editable="false"
+ />
+ </div>
+ <div class="searchbar-item">
+ <label class="label">{{$t('message.linkis.formItems.creator.label')}}</label>
+ <Input
+ :maxlength="50"
+ v-model.trim="searchBar.creator"
+ :placeholder="$t('message.linkis.formItems.creator.placeholder')"
+ style="width:80px;"
+ />
+ </div>
+ <div class="searchbar-item">
+ <label class="label">{{$t('message.linkis.formItems.engine.label')}}</label>
+ <Select v-model="searchBar.engine" style="width: 70px">
+ <Option v-for="(item) in getEngineTypes" :label="item === 'all' ? $t('message.linkis.engineTypes.all'): item" :value="item" :key="item" />
+ </Select>
+ </div>
+ <div class="searchbar-item">
+ <label class="label">{{$t('message.linkis.formItems.status.label')}}</label>
+ <Select v-model="searchBar.status" style="width: 70px">
+ <Option
+ v-for="(item) in statusType"
+ :label="item.label"
+ :value="item.value"
+ :key="item.value"
+ />
+ </Select>
+ </div>
+ <Form v-show="showAdvance" class="global-history-searchbar" :model="searchBar" inline>
+ <FormItem prop="instance" :label="$t('message.linkis.formItems.instance.label')">
+ <Input
+ v-model="searchBar.instance"
+ :placeholder="$t('message.linkis.formItems.instance.placeholder')"
+ style="width:150px;"
+ />
+ </FormItem>
+ </Form>
+ </div>
+ <div class="search-btns">
<Button
+ class="search-btn"
type="primary"
@click="search"
style="margin-right: 10px;"
>{{ $t('message.linkis.search') }}</Button>
<Button
+ class="search-btn"
type="warning"
@click="reset"
style="margin-right: 10px;"
>{{ $t('message.linkis.clearSearch') }}</Button>
- <Button type="error" @click="stop" style="margin-right: 10px;">{{$t('message.linkis.stop')}}</Button>
+ <Button class="search-btn" type="error" @click="stop" style="margin-right: 10px;">{{$t('message.linkis.stop')}}</Button>
<Button
+ class="search-btn"
type="primary"
@click="switchAdmin"
- v-if="isLogAdmin || isHistoryAdmin"
+ v-show="isLogAdmin || isHistoryAdmin"
+ style="margin-right: 10px;"
>{{ isAdminModel ? $t('message.linkis.generalView') : $t('message.linkis.manageView') }}</Button>
- </FormItem>
- </Form>
- <div >
- <div class="global-history-table" :style="{width: '100%', 'height': moduleHeight+'px'}">
- <Icon v-show="isLoading" type="ios-loading" size="30" class="global-history-loading" />
- <history-table
- v-if="!isLoading"
- :columns="column"
- :data="list"
- :height="moduleHeight"
- :no-data-text="$t('message.linkis.noDataText')"
- border
- stripe
- @checkall="checkChange"
- @select-change="selectChange"
- />
- </div>
- <div class="global-history-page">
- <Page
- :total="pageSetting.total"
- :page-size="pageSetting.pageSize"
- :current="pageSetting.current"
- size="small"
- show-total
- show-elevator
- :prev-text="$t('message.linkis.previousPage')" :next-text="$t('message.linkis.nextPage')"
- @on-change="changePage"
- />
+ <Button
+ class="search-btn"
+ type="primary"
+ @click="clickAdvance"
+ >{{ showAdvance ? $t('message.linkis.hideAdvancedSearch') : $t('message.linkis.showAdvancedSearch') }}</Button>
</div>
</div>
+ <div class="global-history-table" :style="{width: '100%', 'height': moduleHeight +'px'}">
+ <Icon v-show="isLoading" type="ios-loading" size="30" class="global-history-loading" />
+ <history-table
+ v-if="!isLoading"
+ :columns="column"
+ :data="list"
+ :height="moduleHeight"
+ :no-data-text="$t('message.linkis.noDataText')"
+ border
+ stripe
+ @checkall="checkChange"
+ @select-change="selectChange"
+ />
+ </div>
+ <div class="global-history-page">
+ <Page
+ :total="pageSetting.total"
+ :page-size="pageSetting.pageSize"
+ :current="pageSetting.current"
+ size="small"
+ show-total
+ show-elevator
+ :prev-text="$t('message.linkis.previousPage')" :next-text="$t('message.linkis.nextPage')"
+ @on-change="changePage"
+ />
+ </div>
</div>
</template>
<script>
@@ -146,6 +162,7 @@ export default {
column: [],
getEngineTypes: [],
isLoading: false,
+ showAdvance: false,
pageSetting: {
total: 0,
pageSize: 50,
@@ -265,13 +282,13 @@ export default {
moduleHeight: 300
}
},
- created() {
+ async created() {
// Get whether it is a historical administrator(获取是否是历史管理员权限)
- api.fetch('/jobhistory/governanceStationAdmin', 'get').then(res => {
+ await api.fetch('/jobhistory/governanceStationAdmin', 'get').then(res => {
this.isLogAdmin = res.admin
this.isHistoryAdmin = res.historyAdmin
})
- api.fetch('/configuration/engineType', 'get').then(res => {
+ await api.fetch('/configuration/engineType', 'get').then(res => {
this.getEngineTypes = ['all', ...res.engineType]
})
},
@@ -292,6 +309,7 @@ export default {
sessionStorage.removeItem('last-admin-model');
sessionStorage.removeItem('last-searchbar-status');
sessionStorage.removeItem('last-pageSetting-status');
+ sessionStorage.removeItem('last-searchbar-advance');
}
next();
},
@@ -301,11 +319,20 @@ export default {
methods: {
getHeight() {
this.moduleHeight = this.$parent.$el.clientHeight - 228
+ if(this.showAdvance) {
+ this.moduleHeight -= 42
+ }
+ },
+ clickAdvance() {
+ this.showAdvance = !this.showAdvance
+ this.getHeight()
},
init() {
let isAdminModel = storage.get('last-admin-model')
const lastSearch = storage.get('last-searchbar-status')
const lastPage = storage.get('last-pageSetting-status')
+ this.showAdvance = storage.get('last-searchbar-advance')
+ this.getHeight()
if (lastSearch) {
if (lastSearch.shortcut[0] && lastSearch.shortcut[1]) {
lastSearch.shortcut = [new Date(lastSearch.shortcut[0]), new Date(lastSearch.shortcut[1])]
@@ -365,13 +392,15 @@ export default {
taskID: params.row.taskID,
execID: params.row.strongerExecId,
status: params.row.status,
- fileName
+ fileName,
+ engineInstance: params.row.engineInstance,
}
if (this.isAdminModel) {
query.proxyUser = params.row.executeUser
}
storage.set('last-searchbar-status', this.searchBar)
storage.set('last-pageSetting-status', this.pageSetting)
+ storage.set('last-searchbar-advance', this.showAdvance)
// Jump to view the history details page(跳转查看历史详情页面)
this.$router.push({
path: '/console/viewHistory',
@@ -479,7 +508,8 @@ export default {
progress: item.progress,
failedReason: getFailedReason(item),
runType: item.runType,
- instance: item.instance
+ instance: item.instance,
+ engineInstance: item.engineInstance,
}
})
}
@@ -535,13 +565,13 @@ export default {
key: 'source',
align: 'center',
ellipsis: true,
- width: 190
+ width: 170
},
{
title: this.$t('message.linkis.tableColumns.executionCode'),
key: 'executionCode',
align: 'center',
- width: 440,
+ width: 420,
// overflow to show(溢出以...显示)
ellipsis: true
// renderType: 'tooltip',
@@ -568,7 +598,7 @@ export default {
key: 'failedReason',
align: 'center',
className: 'history-failed',
- width: 210,
+ width: 200,
renderType: 'a',
renderParams: {
hasDoc: this.checkIfHasDoc,
@@ -576,16 +606,15 @@ export default {
}
},
{
- title: `${this.$t(
- 'message.linkis.tableColumns.requestApplicationName'
- )}/${this.$t('message.linkis.tableColumns.executeApplicationName')}`,
+ title: this.$t('message.linkis.tableColumns.requestApplicationName') + ' / ' + this.$t('message.linkis.tableColumns.executeApplicationName'),
key: 'requestApplicationName',
align: 'center',
- width: 140,
+ width: 130,
renderType: 'concat',
renderParams: {
concatKey: 'executeApplicationName'
}
+
},
{
title: this.$t('message.linkis.tableColumns.user'),
diff --git a/linkis-web/src/apps/linkis/module/globalHistoryManagement/viewHistory.vue b/linkis-web/src/apps/linkis/module/globalHistoryManagement/viewHistory.vue
index 8742188b9..67556e127 100644
--- a/linkis-web/src/apps/linkis/module/globalHistoryManagement/viewHistory.vue
+++ b/linkis-web/src/apps/linkis/module/globalHistoryManagement/viewHistory.vue
@@ -21,12 +21,14 @@
<TabPane name="log" :label="$t('message.linkis.log')"></TabPane>
<!-- <TabPane name="detail" :label="$t('message.linkis.detail')" disabled></TabPane> -->
<TabPane name="result" :label="$t('message.linkis.result')"></TabPane>
+ <TabPane v-if="hasEngine" name="engineLog" :label="$t('message.linkis.engineLog')"></TabPane>
</Tabs>
<Button v-if="!isHistoryDetail" class="backButton" type="primary" @click="back">{{$t('message.linkis.back')}}</Button>
<Icon v-show="isLoading" type="ios-loading" size="30" class="global-history-loading" />
<log v-if="tabName === 'log'" :logs="logs" :from-line="fromLine" :script-view-state="scriptViewState" />
<result
v-if="tabName === 'result'"
+ class="result-class"
ref="result"
:script="script"
:dispatch="dispatch"
@@ -38,6 +40,7 @@
@on-analysis="openAnalysisTab"
:visualParams="visualParams"
/>
+ <ViewLog ref="logPanel" :inHistory="true" v-show="tabName === 'engineLog' && hasEngine" @back="showviewlog = false" />
</div>
</template>
<script>
@@ -46,12 +49,14 @@ import log from '@/components/consoleComponent/log.vue'
import api from '@/common/service/api'
import mixin from '@/common/service/mixin'
import util from '@/common/util'
+import ViewLog from '@/apps/linkis/module/resourceManagement/log.vue'
import { isUndefined } from 'lodash'
export default {
name: 'viewHistory',
components: {
log,
- result
+ result,
+ ViewLog
},
mixins: [mixin],
props: {},
@@ -88,17 +93,34 @@ export default {
warning: '',
info: ''
},
+ engineLogs: '',
fromLine: 1,
isAdminModel: false,
- jobhistoryTask: null
+ jobhistoryTask: null,
+ hasEngine: false,
+ param: {}
}
},
created() {
this.hasResultData = false
},
- mounted() {
+ async mounted() {
let taskID = this.$route.query.taskID
- this.initHistory(taskID)
+ let engineInstance = this.$route.query.engineInstance
+
+ if(engineInstance) {
+ let url = '/linkisManager/ecinfo/ecrHistoryList?';
+ const endDate = new Date();
+ const startDate = new Date();
+ startDate.setMonth(startDate.getMonth() - 3);
+ url += `instance=${engineInstance}&startDate=${this.formatDate(startDate)}&endDate=${this.formatDate(endDate)}`;
+ const res = await api.fetch(url,'get')
+ const param = res.engineList[0]
+ this.param = param;
+ this.hasEngine = !!param;
+
+ }
+ this.initHistory(taskID);
const node = document.getElementsByClassName('global-history')[0];
this.scriptViewState.bottomContentHeight = node.clientHeight - 85
},
@@ -123,6 +145,18 @@ export default {
desc: this.$t('message.linkis.serverTip')
})
}
+ } else if(name === 'engineLog') {
+ if(this.param) {
+ this.$refs.logPanel.getLogs(0, {
+ applicationName: "linkis-cg-engineconn",
+ emInstance: this.param?.ecmInstance || '',
+ instance: this.param?.serviceInstance || '',
+ ticketId: this.param?.ticketId || '',
+ engineType: this.param?.engineType || '',
+ logDirSuffix: this.param?.logDirSuffix || '',
+ })
+ }
+
}
},
changeResultSet(data, cb) {
@@ -280,6 +314,16 @@ export default {
}
}
},
+ formatDate(date) {
+ const year = date.getFullYear();
+ const month = (date.getMonth() + 1).toString().padStart(2, '0');
+ const day = date.getDate().toString().padStart(2, '0');
+ const hours = date.getHours().toString().padStart(2, '0');
+ const minutes = date.getMinutes().toString().padStart(2, '0');
+ const seconds = date.getSeconds().toString().padStart(2, '0');
+
+ return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+ },
// Get historical details(获取历史详情)
async initHistory(jobId) {
try {
@@ -351,7 +395,7 @@ export default {
if (rst.dirFileTrees) {
// The order of the result set in the background is sorted by string according to the name of the result set. When displaying, there will be a problem that the result set cannot be matched, so add sorting(后台的结果集顺序是根据结果集名称按字符串排序的,展示时会出现结果集对应不上的问题,所以加上排序)
let scriptResultList = rst.dirFileTrees.children.sort(
- (a, b) => parseInt(a.name, 10) - parseInt(b.name, 10)
+ (a, b) => parseInt(a.name.split('_')[1].split('.')[0], 10) - parseInt(b.name.split('_')[1].split('.')[0], 10)
)
if (scriptResultList.length) {
const currentResultPath = rst.dirFileTrees.children[0].path
@@ -437,5 +481,8 @@ export default {
/deep/ .table-div {
height: 100% !important;
}
+/deep/ .log {
+ height: calc(100% - 70px)
+}
</style>
diff --git a/linkis-web/src/apps/linkis/module/header/index.vue b/linkis-web/src/apps/linkis/module/header/index.vue
index 423ce81d5..1486ee110 100644
--- a/linkis-web/src/apps/linkis/module/header/index.vue
+++ b/linkis-web/src/apps/linkis/module/header/index.vue
@@ -27,7 +27,7 @@
src=""
:alt="$t('message.common.logoName')"
>
- <span class="version">v{{sysVersion}}</span>
+ <span class="version">{{sysVersion}}{{clusterInfo ? `(${clusterInfo})`:''}}</span>
</div>
</div>
<div
@@ -72,6 +72,7 @@ export default {
data() {
return {
sysVersion: process.env.VUE_APP_VERSION,
+ clusterInfo: '',
isUserMenuShow: false,
userName: "",
isSandbox: process.env.NODE_ENV === "sandbox",
@@ -84,6 +85,7 @@ export default {
methods: {
init() {
this.userName = storage.get('userName');
+ this.clusterInfo = storage.get('clusterInfo') || ''
},
handleOutsideClick() {
this.isUserMenuShow = false;
diff --git a/linkis-web/src/apps/linkis/module/ipListManagement/index.vue b/linkis-web/src/apps/linkis/module/ipListManagement/index.vue
index e411dc781..2c833f669 100644
--- a/linkis-web/src/apps/linkis/module/ipListManagement/index.vue
+++ b/linkis-web/src/apps/linkis/module/ipListManagement/index.vue
@@ -32,7 +32,7 @@
></Input>
</Col>
<Col span="6" class="search-item">
- <span :style="{minWidth: '40px', textOverflow: 'ellipsis', whiteSpace: 'nowrap', overflow: 'hidden', marginRight: '5px', fontSize: '14px', lineHeight: '32px'}">{{$t('message.linkis.ipListManagement.appName')}}</span>
+ <span :title="$t('message.linkis.ipListManagement.appName')" :style="{minWidth: '40px', textOverflow: 'ellipsis', whiteSpace: 'nowrap', overflow: 'hidden', marginRight: '5px', fontSize: '14px', lineHeight: '32px'}">{{$t('message.linkis.ipListManagement.appName')}}</span>
<Input
v-model="queryData.creator"
class="input"
@@ -67,6 +67,7 @@
:current="page.pageNow"
:total="page.totalPage"
@on-change="changePage"
+ show-total
size="small"
show-elevator
:prev-text="$t('message.linkis.previousPage')" :next-text="$t('message.linkis.nextPage')"
@@ -268,7 +269,6 @@ export default {
})
this.tableLoading = false;
} catch(err) {
- window.console.log(err);
this.tableLoading = false;
}
@@ -318,7 +318,6 @@ export default {
})
this.isRequesting = false
} catch (err) {
- window.console.log(err);
this.isRequesting = false
}
}
@@ -365,7 +364,6 @@ export default {
this.isRequesting = false
} catch(err) {
this.isRequesting = false
- window.console.log(err);
}
} else {
this.$Message.error(this.$t('message.linkis.error.validate'));
@@ -394,16 +392,13 @@ export default {
await this.confirmDelete(data);
await this.getTableData();
},
- onCancel: () => {
- window.console.log('cancel');
- }
})
},
async confirmDelete(data) {
try {
await api.fetch('configuration/user-ip-mapping/delete-user-ip', {id: data.id}, 'get');
} catch(err) {
- window.console.log(err);
+ return;
}
},
async handleChange() {
diff --git a/linkis-web/src/apps/linkis/module/resourceManagement/engineConn.vue b/linkis-web/src/apps/linkis/module/resourceManagement/engineConn.vue
index 25b87391f..c8f11cb7a 100644
--- a/linkis-web/src/apps/linkis/module/resourceManagement/engineConn.vue
+++ b/linkis-web/src/apps/linkis/module/resourceManagement/engineConn.vue
@@ -140,6 +140,12 @@ export default {
minWidth: 100,
className: 'table-project-column'
},
+ {
+ title: this.$t('message.linkis.tableColumns.status'),
+ key: 'status',
+ minWidth: 100,
+ className: 'table-project-column'
+ },
{
title: this.$t('message.linkis.tableColumns.label'),
key: 'labelValue',
@@ -198,13 +204,14 @@ export default {
on: {
click: () => {
this.showviewlog = true
+ this.$refs.logPanel.clearLogs();
this.$refs.logPanel.getLogs(0, {
applicationName: "linkis-cg-engineconn",
- emInstance: params.row.ecmInstance,
- instance: params.row.serviceInstance,
- ticketId: params.row.ticketId,
- engineType: params.row.engineType,
- logDirSuffix: params.row.logDirSuffix,
+ emInstance: params?.row?.ecmInstance || '',
+ instance: params?.row?.serviceInstance || '',
+ ticketId: params?.row?.ticketId || '',
+ engineType: params?.row?.engineType || '',
+ logDirSuffix: params?.row?.logDirSuffix || '',
})
}
}
@@ -253,7 +260,6 @@ export default {
this.engineTypes = data && data.engineType ? data.engineType : []
this.loading = false;
} catch (err) {
- window.console.log(err)
this.loading = false;
}
},
@@ -276,7 +282,7 @@ export default {
let list = healthyStatusList.nodeStatus || [];
this.healthyStatusList = [...list];
} catch (err) {
- window.console.log(err)
+ return;
}
},
// Get a list of states for a search(获取搜索的状态列表)
@@ -286,7 +292,7 @@ export default {
let list = statusList.nodeStatus || [];
this.statusList = [...list];
} catch (err) {
- window.console.log(err)
+ return;
}
},
// add tag(添加tag)
@@ -328,7 +334,7 @@ export default {
this.$refs.search.search(true);
},
// search(搜索)
- search(e) {
+ async search(e) {
let url = '/linkisManager/ecinfo/ecrHistoryList?';
if (e.instance) url += `instance=${e.instance?.replace(/ /g, '') || ''}&`
if (e.owner) url += `creator=${e.owner}&`
@@ -342,11 +348,12 @@ export default {
}
}
if (e.engineType) url += `engineType=${e.engineType}&`
+ if (e.status) url += `status=${e.status}&`
if (this.page.pageNow) url += `pageNow=${this.page.pageNow}&`
if (this.page.pageSize) url += `pageSize=${this.page.pageSize}`
- api.fetch(url,'get').then((res)=>{
+ await api.fetch(url,'get').then((res)=>{
this.tableData=res.engineList
- this.page.totalSize = res.totalPage ? res.totalPage : this.page.totalSize;
+ this.page.totalSize = res.totalPage ? res.totalPage : res.engineList.length;
})
},
// time format conversion(时间格式转换)
diff --git a/linkis-web/src/apps/linkis/module/resourceManagement/index.vue b/linkis-web/src/apps/linkis/module/resourceManagement/index.vue
index 12f438b5a..b86136488 100644
--- a/linkis-web/src/apps/linkis/module/resourceManagement/index.vue
+++ b/linkis-web/src/apps/linkis/module/resourceManagement/index.vue
@@ -22,12 +22,8 @@
size="large"
fix/>
<div class="resource-title" :class="{'admin-title': !isAdminModel}">
- <div style="display: inline-block;">
- <div style="display: flex;align-items: center; height: 37px;margin-right: 10px">
- <span class="title-text" >{{$t('message.linkis.resourceManagement.resourceUsage')}}</span>
- <Icon class="title-icon" @click="refreshResource" type="md-refresh"></Icon>
- </div>
- </div>
+ <!-- <span class="title-text" >{{$t('message.linkis.resourceManagement.resourceUsage')}}</span>
+ <Icon class="title-icon" @click="refreshResource" type="md-refresh"></Icon> -->
<Form v-if="isLogAdmin" class="global-history-searchbar" :style="{float: isAdminModel ? 'none' : 'right'}" :model="searchBar" inline>
<FormItem v-show="isAdminModel" prop="userName" :label="$t('message.linkis.userName')">
<Input
@@ -392,16 +388,29 @@ export default {
},
computed: {
},
- created() {
+ async created() {
// Get whether it is a historical administrator(获取是否是历史管理员权限)
- api.fetch('/jobhistory/governanceStationAdmin', 'get').then((res) => {
+ await api.fetch('/jobhistory/governanceStationAdmin', 'get').then(async (res) => {
this.isLogAdmin = res.admin;
- this.initExpandList();
+ if(this.isLogAdmin) {
+ this.isAdminModel = true;
+ this.page = {
+ totalSize: 0,
+ sizeOpts: [15, 30, 45],
+ pageSize: 15,
+ pageNow: 1
+ }
+ await this.search()
+ } else {
+ await this.initExpandList();
+ }
this.getKeyList();
+
})
- api.fetch('/linkisManager/rm/engineType', 'get').then(res => {
+ await api.fetch('/linkisManager/rm/engineType', 'get').then(res => {
this.engines = ['all'].concat(res.engineType)
})
+
},
methods: {
@@ -464,7 +473,6 @@ export default {
if(enginesList.length) await this.expandChange(enginesList[0])
this.loading = false;
} catch (err) {
- window.console.log(err)
this.loading = false;
}
},
@@ -581,17 +589,22 @@ export default {
}
return data;
},
- switchAdmin() {
+ async switchAdmin() {
this.isAdminModel = !this.isAdminModel
- this.page = {
- totalSize: 0,
- sizeOpts: [15, 30, 45],
- pageSize: 15,
- pageNow: 1
+ if(this.isAdminModel) {
+ this.page = {
+ totalSize: 0,
+ sizeOpts: [15, 30, 45],
+ pageSize: 15,
+ pageNow: 1
+ }
+ this.search()
+ } else {
+ await this.initExpandList();
}
- this.search()
+
},
- search() {
+ async search() {
const param = {
username: this.searchBar.userName,
creator: this.searchBar.appType,
@@ -599,7 +612,7 @@ export default {
page: this.page.pageNow,
size: this.page.pageSize
}
- api.fetch('/linkisManager/rm/allUserResource', param, 'get').then((res) => {
+ await api.fetch('/linkisManager/rm/allUserResource', param, 'get').then((res) => {
this.adminTableData = res.resources
this.page.totalSize = res.total
}).catch(() => {
diff --git a/linkis-web/src/apps/linkis/module/resourceManagement/log.vue b/linkis-web/src/apps/linkis/module/resourceManagement/log.vue
index 39f79b003..837cfe94d 100644
--- a/linkis-web/src/apps/linkis/module/resourceManagement/log.vue
+++ b/linkis-web/src/apps/linkis/module/resourceManagement/log.vue
@@ -23,7 +23,11 @@
<TabPane name="gc" label="gc"></TabPane>
<TabPane v-if="['hive', 'spark'].includes(engineType)" name="yarnApp" label="yarnApp"></TabPane>
</Tabs>
- <Button class="backButton" type="primary" @click="back">{{$t('message.linkis.back')}}</Button>
+ <div class="btns">
+ <Button class="downloadButton" :style="!inHistory ? 'margin-right: 10px' : 'margin-right: 0px'" type="default" @click="downloadLog">{{$t('message.linkis.download')}}</Button>
+ <Button v-if="!inHistory" class="backButton" type="primary" @click="back">{{$t('message.linkis.back')}}</Button>
+ </div>
+
<log :logs="logs" :scriptViewState="scriptViewState"/>
<Page
ref="page"
@@ -44,6 +48,12 @@ export default {
components: {
log
},
+ props: {
+ inHistory: {
+ default: false,
+ type: Boolean,
+ }
+ },
data() {
return {
tabName: 'stdout',
@@ -58,6 +68,7 @@ export default {
scriptViewState: {
bottomContentHeight: window.innerHeight - 353
},
+ param: {},
engineType: '',
};
},
@@ -80,6 +91,33 @@ export default {
this.page.pageNow = val;
this.getLogs((val - 1) * this.page.pageSize)
},
+ clearLogs() {
+ this.logs = {
+ all: '',
+ }
+ this.tabName = 'stdout'
+ },
+ async downloadLog() {
+ this.$Modal.confirm({
+ title: this.$t('message.linkis.download'),
+ content: this.$t('message.linkis.confirmText'),
+ onOk: async () => {
+ const {emInstance, instance, logPath } = this.param;
+ // eslint-disable-next-line no-unused-vars
+
+ const url = `/api/rest_j/v1/engineconnManager/downloadEngineLog?emInstance=${emInstance}&instance=${instance}&logDirSuffix=${encodeURIComponent(logPath)}&logType=${this.tabName}`;
+
+ const downloadLink = document.createElement('a');
+ downloadLink.href = url;
+ downloadLink.download = 'log';
+ downloadLink.style.display = 'none';
+ document.body.appendChild(downloadLink);
+ downloadLink.click();
+ document.body.removeChild(downloadLink);
+ }
+ })
+
+ },
async getLogs(fromLine, param) {
if (param) {
this.param = param
@@ -99,6 +137,7 @@ export default {
}
}
let res = await api.fetch('/linkisManager/openEngineLog', params, 'post') || {};
+ this.param.logPath = res.result.logPath.split('/').slice(0, -1).join('/');
if (res && res.result) {
if (res.result.rows < 1000) { // the last page(最后一页)
this.page.totalSize = this.page.pageNow * 1000
@@ -131,10 +170,19 @@ export default {
.log {
height: 100%;
}
- .backButton {
+.btns {
position: absolute;
top: -2px;
right: 20px;
+ display: grid;
+ grid-template-columns: auto auto;
+ justify-items: end;
+ .downloadButton {
+ margin-top: 2px
+ }
+ .backButton {
+ margin-top: 2px
+ }
}
.page {
text-align: center
diff --git a/linkis-web/src/apps/linkis/module/resourceManagement/search.vue b/linkis-web/src/apps/linkis/module/resourceManagement/search.vue
index 2a6550740..3d0d10950 100644
--- a/linkis-web/src/apps/linkis/module/resourceManagement/search.vue
+++ b/linkis-web/src/apps/linkis/module/resourceManagement/search.vue
@@ -46,6 +46,15 @@
:key="item"/>
</Select>
</FormItem>
+ <FormItem prop="status" :label="$t('message.linkis.tableColumns.status')" >
+ <Select v-model="searchBar.status" style="width:100px" clearable>
+ <Option
+ v-for="(item) in statusList"
+ :label="item"
+ :value="item"
+ :key="item"/>
+ </Select>
+ </FormItem>
<FormItem>
<Button type="primary" @click="search(false)">
{{ $t('message.linkis.search') }}
@@ -83,7 +92,8 @@ export default {
instance: "",
engineType: "",
owner: "",
- shortcut: [today, today]
+ shortcut: [today, today],
+ status: "",
},
shortcutOpt: {
shortcuts: [
diff --git a/linkis-web/src/apps/linkis/module/rmExternalResourceProvider/EditForm/index.vue b/linkis-web/src/apps/linkis/module/rmExternalResourceProvider/EditForm/index.vue
index 75c0d4d96..07589bdb9 100644
--- a/linkis-web/src/apps/linkis/module/rmExternalResourceProvider/EditForm/index.vue
+++ b/linkis-web/src/apps/linkis/module/rmExternalResourceProvider/EditForm/index.vue
@@ -102,15 +102,6 @@ export default {
props: {
placeholder: "",
},
- validate: [
- {
- required: true,
- message: `${this.$t(
- 'message.linkis.datasource.pleaseInput'
- )} `+this.$t('message.linkis.basedataManagement.rmExternalResourceProvider.labels'),
- trigger: 'blur',
- },
- ],
},
{
type: 'v-jsoneditor',
@@ -136,7 +127,7 @@ export default {
getData(data){
this.formData = {...data}
window.console.log(this.formData)
- if(this.formData.config.length>0){
+ if(this.formData.config?.length>0){
this.formData.config = JSON.parse(this.formData.config)
}else{
this.formData.config= {}
diff --git a/linkis-web/src/apps/linkis/module/setting/setting.vue b/linkis-web/src/apps/linkis/module/setting/setting.vue
index 3fed0420f..7e6ea424d 100644
--- a/linkis-web/src/apps/linkis/module/setting/setting.vue
+++ b/linkis-web/src/apps/linkis/module/setting/setting.vue
@@ -30,7 +30,7 @@
closable
>
<TabPane
- v-for="menu in menuList"
+ v-for="(menu, index) in menuList"
:key="menu.categoryId"
:label="menu.categoryName"
:name="`${menu.categoryName}`"
@@ -47,7 +47,7 @@
:iseditListItem="iseditListItem"
:isdeleteListItem="isdeleteListItem"
:isOpenAdd="isOpenAdd"
- :currentCardIndex.sync="currentCardIndex"
+ :currentCardIndex.sync="currentCardIndex[index]"
>
</cardList>
</TabPane>
@@ -275,7 +275,7 @@ export default {
},
],
},
- currentCardIndex: 0,
+ currentCardIndex: [],
versionList: [] //Version list
};
},
@@ -288,6 +288,9 @@ export default {
this.$nextTick(() => {
this.getAppVariable(this.menuList[0].categoryName || "");
this.currentTabName = `${this.menuList[0].categoryName}`;
+ for(let i = 0;i < this.menuList.length; i++) {
+ this.currentCardIndex.push(0)
+ }
if (this.menuList[0] && this.menuList[0].childCategory && this.menuList[0].childCategory.length) {
this.subCategory = {
[this.menuList[0].categoryName]: this.menuList[0].childCategory[0]
@@ -305,8 +308,8 @@ export default {
},
methods: {
- getMenuList(condition) {
- api.fetch("/configuration/getCategory", "get").then((rst) => {
+ async getMenuList(condition) {
+ await api.fetch("/configuration/getCategory", "get").then((rst) => {
this.menuList = rst.Category || [];
this.$nextTick(() => {
if (this.currentTabName) {
@@ -322,6 +325,7 @@ export default {
getAppVariable(type = '') {
this.activeMenu = type;
+
let parameter = type.split("-"); // cut directory name(切割目录name)
// If there is only a first-level directory, it will directly return ['creator'], if it is a second-level directory, ['creator', 'engineType', 'version'](如果只有一级目录则直接返回['creator'],如果为二级目录则['creator', 'engineType', 'version'])
api
@@ -466,11 +470,11 @@ export default {
let type = ''
// Determine whether there is a sub-item, and if it exists, splicing(判断是否存在子项,如果存在就进行拼接)
if (menuListItem.childCategory && menuListItem.childCategory.length) {
- this.currentCardIndex = 0;
+ // this.currentCardIndex[index] = 0;
if (condition === 'new') {
- this.currentCardIndex = menuListItem.childCategory.length - 1;
+ this.currentCardIndex[index] = menuListItem.childCategory.length - 1;
}
- let currentItem = menuListItem.childCategory[this.currentCardIndex];
+ let currentItem = menuListItem.childCategory[this.currentCardIndex[index]];
if (!this.subCategory[menuListItem.categoryName] || condition === 'new') {
this.subCategory[menuListItem.categoryName] = currentItem
}
@@ -561,33 +565,45 @@ export default {
},
//delete directory application(删除目录应用)
- removeTab(name) {
+ async removeTab(name) {
//Find the data in the menuList of the tab you clicked to delete(找到点击删除的tab 在menuList里的数据)
let menuItem = this.menuList.find((item) => item.categoryName === name);
//Determine whether the current active tab is the same as the tab currently clicked to delete(判断当前的活动tab是否和当前点击删除的tab一样)
const activeIndex = this.menuList.findIndex((item) => item.categoryName === this.currentTabName) + 1;
const curIndex = this.menuList.findIndex((item) => item.categoryName === name);
+ const lastIndex = this.menuList.findIndex((item) => item.categoryName === this.currentTabName);
+ const lastName = this.menuList[lastIndex].categoryName
if (curIndex === activeIndex) {
this.menuList.splice(curIndex, 1);
- api
- .fetch(
- "/configuration/deleteCategory",
- { categoryId: menuItem.categoryId },
- "post"
- )
- .then(() => {
- this.getMenuList(); //Call getMenuList to re-render the newly added menuList data(调用getMenuList 重新渲染新增的menuList数据)
- this.$Message.success(`删除${name}应用成功`);
- });
+ try {
+ await api
+ .fetch(
+ "/configuration/deleteCategory",
+ { categoryId: menuItem.categoryId },
+ "post"
+ )
+ .then(async () => {
+ // await this.getMenuList(); //Call getMenuList to re-render the newly added menuList data(调用getMenuList 重新渲染新增的menuList数据)
+
+ this.clickTabChange(lastName)
+ this.$Message.success(`删除${name}应用成功`);
+ });
+ } catch (err) {
+ this.$Message.error(`删除${name}应用失败`);
+ }
+
+
} else {
- api
+ await api
.fetch(
"/configuration/deleteCategory",
{ categoryId: menuItem.categoryId },
"post"
)
- .then(() => {
- this.getMenuList(); //Call getMenuList to re-render the newly added menuList data(调用getMenuList 重新渲染新增的menuList数据)
+ .then(async () => {
+ // await this.getMenuList(); //Call getMenuList to re-render the newly added menuList data(调用getMenuList 重新渲染新增的menuList数据)
+
+ this.clickTabChange(lastName)
this.$Message.success(`删除${name}应用成功`);
});
}
diff --git a/linkis-web/src/apps/linkis/module/tenantTagManagement/index.vue b/linkis-web/src/apps/linkis/module/tenantTagManagement/index.vue
index 75aea5c91..4818e09b7 100644
--- a/linkis-web/src/apps/linkis/module/tenantTagManagement/index.vue
+++ b/linkis-web/src/apps/linkis/module/tenantTagManagement/index.vue
@@ -32,7 +32,7 @@
></Input>
</Col>
<Col span="6" class="search-item">
- <span :style="{minWidth: '40px', textOverflow: 'ellipsis', whiteSpace: 'nowrap', overflow: 'hidden', marginRight: '5px', fontSize: '14px', lineHeight: '32px'}">{{$t('message.linkis.tenantTagManagement.appName')}}</span>
+ <span :title="$t('message.linkis.tenantTagManagement.appName')" :style="{minWidth: '40px', textOverflow: 'ellipsis', whiteSpace: 'nowrap', overflow: 'hidden', marginRight: '5px', fontSize: '14px', lineHeight: '32px'}">{{$t('message.linkis.tenantTagManagement.appName')}}</span>
<Input
v-model="queryData.creator"
class="input"
@@ -78,6 +78,7 @@
@on-change="changePage"
size="small"
show-elevator
+ show-total
:prev-text="$t('message.linkis.previousPage')" :next-text="$t('message.linkis.nextPage')"
style="position: absoulute; bottom: 10px; overflow: hidden; text-align: center;"
></Page>
@@ -281,7 +282,6 @@ export default {
})
this.tableLoading = false;
} catch(err) {
- window.console.log(err);
this.tableLoading = false;
}
@@ -332,7 +332,6 @@ export default {
})
this.isRequesting = false
} catch (err) {
- window.console.log(err);
this.isRequesting = false
}
}
@@ -380,7 +379,6 @@ export default {
this.isRequesting = false;
} catch(err) {
this.isRequesting = false;
- window.console.log(err);
}
} else {
this.$Message.error(this.$t('message.linkis.error.validate'));
@@ -410,16 +408,13 @@ export default {
await this.confirmDelete(data);
await this.getTableData();
},
- onCancel: () => {
- window.console.log('cancel');
- }
})
},
async confirmDelete(data) {
try {
await api.fetch('configuration/tenant-mapping/delete-tenant', {id: data.id}, 'get');
} catch(err) {
- window.console.log(err);
+ return;
}
},
async handleChange() {
diff --git a/linkis-web/src/apps/linkis/module/udfTree/index.scss b/linkis-web/src/apps/linkis/module/udfTree/index.scss
index 7ea4fd680..f520cdfcd 100644
--- a/linkis-web/src/apps/linkis/module/udfTree/index.scss
+++ b/linkis-web/src/apps/linkis/module/udfTree/index.scss
@@ -36,7 +36,6 @@
}
}
-
.table-content {
margin-top: 25px;
}
diff --git a/linkis-web/src/apps/linkis/module/codeQuery/index.scss b/linkis-web/src/apps/linkis/module/userConfig/index.js
similarity index 85%
copy from linkis-web/src/apps/linkis/module/codeQuery/index.scss
copy to linkis-web/src/apps/linkis/module/userConfig/index.js
index 71d03bb32..000e8e120 100644
--- a/linkis-web/src/apps/linkis/module/codeQuery/index.scss
+++ b/linkis-web/src/apps/linkis/module/userConfig/index.js
@@ -5,20 +5,19 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
-@import '@/common/style/variables.scss';
-.code-query {
- .table-content {
- margin-top: 16px;
- height: 610px;
- }
-}
+export default {
+ name: 'userConfig',
+ events: [],
+ component: () => import('./index.vue'),
+};
\ No newline at end of file
diff --git a/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.scss b/linkis-web/src/apps/linkis/module/userConfig/index.scss
similarity index 72%
copy from linkis-web/src/apps/linkis/module/EnginePluginManagement/index.scss
copy to linkis-web/src/apps/linkis/module/userConfig/index.scss
index e84322197..29be39de7 100644
--- a/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.scss
+++ b/linkis-web/src/apps/linkis/module/userConfig/index.scss
@@ -5,50 +5,39 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
@import '@/common/style/variables.scss';
-
.search-bar {
- .search-item11 {
+ .search-item {
display: flex;
justify-content: flex-start;
align-items: center;
font-size: $font-size-base;
- .search-item {
- display: flex;
- justify-items: center;
- .lable {
- width: 180px;
- // flex-basis: 130px;
- text-align: right;
- }
+ .lable {
+ flex-basis: 120px;
+ text-align: center;
}
-
}
-
- .ivu-col {
- display: flex;
- justify-content: flex-start;
+ .search {
+ margin-left: 25px;
+ }
+ .ivu-input-wrapper {
+ width: calc(100% - 105px);
}
-
}
-
.table-content {
- margin-top: 25px;
-}
-
-
-.modal {
- .footer {
- display: flex;
- justify-content: space-between;
- }
+ margin-top: 25px;
+ height: 687px;
}
+.form {
+ padding: 40px 50px;
+}
\ No newline at end of file
diff --git a/linkis-web/src/apps/linkis/module/userConfig/index.vue b/linkis-web/src/apps/linkis/module/userConfig/index.vue
new file mode 100644
index 000000000..701a781c0
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/userConfig/index.vue
@@ -0,0 +1,524 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<template>
+ <div class="tenantManagement">
+ <Spin
+ v-if="loading"
+ size="large"
+ fix/>
+ <Row class="search-bar">
+ <Col span="4" class="search-item">
+ <span :style="{minWidth: '40px', textOverflow: 'ellipsis', whiteSpace: 'nowrap', overflow: 'hidden', marginRight: '5px', fontSize: '14px', lineHeight: '32px'}" :title="$t('message.linkis.ipListManagement.userName')">{{$t('message.linkis.ipListManagement.userName')}}</span>
+ <Input
+ v-model="queryData.user"
+ class="input"
+ clearable
+ :placeholder="$t('message.linkis.ipListManagement.inputUser')"
+ @on-enter="search"
+ ></Input>
+ </Col>
+ <Col span="4" class="search-item">
+ <span :style="{minWidth: '40px', textOverflow: 'ellipsis', whiteSpace: 'nowrap', overflow: 'hidden', marginRight: '5px', fontSize: '14px', lineHeight: '32px'}" :title="$t('message.linkis.ipListManagement.appName')">{{$t('message.linkis.ipListManagement.appName')}}</span>
+ <Input
+ v-model="queryData.creator"
+ class="input"
+ clearable
+ :placeholder="$t('message.linkis.ipListManagement.inputApp')"
+ @on-enter="search"
+ ></Input>
+ </Col>
+ <Col span="4" class="search-item">
+ <span :style="{minWidth: '60px', textOverflow: 'ellipsis', whiteSpace: 'nowrap', overflow: 'hidden', marginRight: '5px', fontSize: '14px', lineHeight: '32px'}" :title="$t('message.linkis.formItems.engineType')">{{$t('message.linkis.formItems.engineType')}}</span>
+ <Select v-model="queryData.engineType" filterable clearable style="width: calc(100% - 85px);">
+ <Option v-for="item in engineTypeOptions" :value="item.value" :key="item.value" :label="item.label"/>
+ </Select>
+ </Col>
+ <Col span="4" class="search-item">
+ <span :style="{minWidth: '40px', textOverflow: 'ellipsis', whiteSpace: 'nowrap', overflow: 'hidden', marginRight: '5px', fontSize: '14px', lineHeight: '32px'}" :title="$t('message.linkis.userConfig.configVKey')" >{{$t('message.linkis.userConfig.configVKey')}}</span>
+ <Input
+ v-model="queryData.key"
+ class="input"
+ clearable
+ :placeholder="$t('message.linkis.userConfig.configValuePro')"
+ @on-enter="search"
+ ></Input>
+ </Col>
+ <Col span="8">
+ <Button type="primary" class="button" :style="{width: '70px', marginRight: '5px', marginLeft: '5px', padding: '5px'}" @click="search">{{
+ $t('message.linkis.ipListManagement.search')
+ }}</Button>
+ <Button type="warning" class="button" :style="{width: '70px', marginRight: '5px', marginLeft: '5px', padding: '5px'}" @click="clearSearch">{{
+ $t('message.linkis.ipListManagement.clear')
+ }}</Button>
+ <Button type="success" class="button" :style="{width: '70px', marginRight: '5px', marginLeft: '5px', padding: '5px'}" @click="createTenant">{{
+ $t('message.linkis.ipListManagement.create')
+ }}</Button>
+ </Col>
+ </Row>
+ <Table
+ border
+ size="small"
+ align="center"
+ :columns="tableColumns"
+ :data="datalist"
+ :loading="tableLoading"
+ class="table-content data-source-table">
+
+ </Table>
+ <Page
+ :page-size="page.pageSize"
+ :current="page.pageNow"
+ :total="page.totalPage"
+ show-total
+ @on-change="changePage"
+ size="small"
+ show-elevator
+ :prev-text="$t('message.linkis.previousPage')" :next-text="$t('message.linkis.nextPage')"
+ style="position: absoulute; bottom: 10px; overflow: hidden; text-align: center;"
+ ></Page>
+ <Modal
+ v-model="showCreateModal"
+ class="modal"
+ @on-cancel="cancel">
+ <div class="form">
+ <Form ref="createTenantForm" :model="modalData" label-position="left" :label-width="100" :rules="modalDataRule">
+ <FormItem :label="$t('message.linkis.ipListManagement.userName')" prop="user">
+ <Input class="input" v-model="modalData.user" :disabled="isEdit" clearable style="width: 319px" :placeholder="$t('message.linkis.ipListManagement.inputUser')"></Input>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.ipListManagement.appName')" prop="creator">
+ <Input class="input" v-model="modalData.creator" :disabled="isEdit" clearable style="width: 319px" :placeholder="$t('message.linkis.ipListManagement.inputApp')"></Input>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.formItems.engineType')" prop="engineType">
+ <Select v-model="modalData.engineType" clearable :disabled="isEdit" filterable @on-change="changeEngineType" style="width: 319px;">
+ <Option v-for="item in allEngineTypeOptions" :value="item.value" :key="item.value" :label="item.label"/>
+ </Select>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.EnginePluginManagement.engineConnVersion')" prop="version">
+ <Select v-model="modalData.version" :disabled="noVersionSelectConfig || isEdit" filterable clearable @on-open-change="fetchVersionOption" @on-change="changFormVal" style="width: 319px;">
+ <Option v-for="item in versionOption" :value="item.value" :key="item.value" >{{item.label}}</Option>
+ </Select>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.userConfig.configVKey')" prop="configKey">
+ <Select v-model="modalData.configKey" :disabled="noSelectConfig || isEdit" filterable clearable @on-open-change="fetchConfigOption" @on-select="onSelect" style="width: 319px;">
+ <Option v-for="item in configOption" :key="item.value" :value="item.value" >{{item.label}}</Option>
+ </Select>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.userConfig.configValue')" :rules="{required: !!defaultValue , message: $t('message.linkis.ipListManagement.notEmpty'), trigger: 'blur'}" prop="configValue">
+ <Input class="input" v-model="modalData.configValue" clearable style="width: 319px" :placeholder="$t('message.linkis.userConfig.configValuePro')"></Input>
+ </FormItem>
+ </Form>
+ </div>
+ <div slot="footer">
+ <Button @click="cancel">{{$t('message.linkis.ipListManagement.Cancel')}}</Button>
+ <Button type="primary" :disabled="btnDisabled" @click="addUserConfig" :loading="isRequesting">{{$t('message.common.ok')}}</Button>
+ </div>
+ </Modal>
+ </div>
+</template>
+<script>
+import storage from "@/common/helper/storage";
+import api from '@/common/service/api'
+export default {
+ name: 'userConfig',
+ data() {
+ return {
+ loading: false,
+ queryData: {
+ user: '',
+ creator: '',
+ engineType: '',
+ key: ''
+ },
+ confirmQuery: {
+ user: '',
+ creator: '',
+ engineType: '',
+ key: ''
+ },
+ tableColumns: [
+ {
+ title: this.$t('message.linkis.ipListManagement.userName'),
+ key: 'user',
+ width: 150,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.ipListManagement.appName'),
+ key: 'creator',
+ width: 140,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.formItems.engineType'),
+ key: 'engineType',
+ width: 110,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.EnginePluginManagement.engineConnVersion'),
+ key: 'version',
+ width: 130,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.userConfig.configVKey'),
+ key: 'key',
+ width: 260,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.userConfig.keyName'),
+ key: 'name',
+ width: 260,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.userConfig.defaultValue'),
+ key: 'defaultValue',
+ width: 240,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.userConfig.configValue'),
+ key: 'configValue',
+ width: 240,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.ipListManagement.action'),
+ key: 'action',
+ width: 100,
+ align: 'center',
+ render: (h, params) => {
+ return h('div', [
+ h('Button', {
+ props: {
+ type: 'primary',
+ size: 'small'
+ },
+ style: {
+ marginRight: '5px'
+ },
+ on: {
+ click: () => {
+ this.edit(params.row)
+ }
+ }
+ }, this.$t('message.linkis.ipListManagement.edit'))
+ ]);
+ }
+ }
+ ],
+ datalist: [],
+ tableLoading: false,
+ showCreateModal: false,
+ modalData: {
+ user: '',
+ creator: '',
+ engineType: '',
+ version: '',
+ configKey: '',
+ configValue: ''
+ },
+ modalDataRule: {
+ user: [
+ {required: true, message: this.$t('message.linkis.ipListManagement.notEmpty'), trigger: 'blur'},
+ {pattern: /^[0-9a-zA-Z_\*]+$/, message: this.$t('message.linkis.ipListManagement.contentError'), type: 'string'}
+ ],
+ creator: [
+ {required: true, message: this.$t('message.linkis.ipListManagement.notEmpty'), trigger: 'blur'},
+ {pattern: /^[0-9a-zA-Z_*]+$/, message: this.$t('message.linkis.ipListManagement.contentError'), type: 'string'}
+ ],
+ engineType: [
+ {required: true, message: this.$t('message.linkis.ipListManagement.notEmpty'), trigger: 'blur'}
+ ],
+ version: [
+ {required: true, message: this.$t('message.linkis.ipListManagement.notEmpty'), trigger: 'blur'}
+ ],
+ configKey: [
+ {required: true, message: this.$t('message.linkis.tenantTagManagement.notEmpty'), trigger: 'blur'}
+ ]
+ },
+ btnDisabled: false,
+ mode: 'create',
+ page: {
+ pageSize: 10,
+ pageNow: 1,
+ totalPage: 0,
+ },
+ userName: '',
+ isRequesting: false,
+ engineTypeOptions: [],
+ allEngineTypeOptions: [],
+ configOption: [],
+ versionOption: [],
+ defaultValue: '',
+ }
+ },
+ computed: {
+ isEdit () {
+ return this.mode === 'edit'
+ },
+ noVersionSelectConfig () {
+ return !(this.modalData.engineType) || this.isEdit;
+ },
+ noSelectConfig () {
+ const valid = !(this.modalData.user && this.modalData.creator && this.modalData.engineType && this.modalData.version)
+ !valid && this.changFormVal();
+ return valid;
+ }
+ },
+ methods: {
+ async getTableData() {
+ try {
+ this.tableLoading = true;
+ let params = {};
+ const keys = Object.keys(this.confirmQuery);
+ for (let i = 0; i< keys.length; i++) {
+ if(this.confirmQuery[keys[i]]) {
+ params[[keys[i]]] = this.confirmQuery[keys[i]];
+ }
+ }
+ params.pageNow = this.page.pageNow;
+ params.pageSize = this.page.pageSize;
+ const res = await api.fetch("/configuration/userKeyValue", params, "get")
+
+ this.datalist = res.configValueList.map((item) => {
+ const labelValue = item.labelValue;
+ const baseArr = labelValue.split(',');
+ const userArr = baseArr[0].split('-');
+ const engineArr = baseArr[1].split('-');
+ item.user = userArr[0];
+ item.creator = userArr[1];
+ item.engineType = engineArr[0];
+ item.version = engineArr[1];
+ return item;
+ });
+ this.page.totalPage = res.totalPage;
+ this.tableLoading = false;
+ } catch(err) {
+ this.tableLoading = false;
+ }
+
+ },
+ async getEngineOptionsData() {
+ try {
+ api.fetch("/configuration/engineType", {}, "get")
+ .then((res) => {
+ res.engineType = res.engineType.map((item) => {
+ return {label: item, value: item};
+ });
+ this.engineTypeOptions = [...res.engineType];
+ this.allEngineTypeOptions = [...res.engineType];
+ this.allEngineTypeOptions.unshift({label: this.$t('message.linkis.all'),value: '*'});
+ })
+ } catch(err) {
+ return;
+ }
+ },
+ async init() {
+ this.loading = true;
+ await this.getTableData();
+ this.loading = false;
+ },
+ async clearSearch() {
+ this.queryData = {
+ user: '',
+ creator: ''
+ };
+ this.confirmQuery = {
+ user: '',
+ creator: ''
+ }
+ this.page.pageNow = 1;
+ await this.getTableData()
+ },
+ async createTenant () {
+ this.showCreateModal = true;
+ this.mode = 'create';
+ },
+ cancel() {
+ this.showCreateModal = false;
+ this.modalData = {
+ user: '',
+ creator: '',
+ engineType: '',
+ version: '',
+ configKey: '',
+ configValue: ''
+ }
+ this.configOption = [];
+ this.versionOption = [];
+ },
+ addUserConfig() {
+ if(this.isRequesting) return;
+ const target = '/configuration/keyvalue'
+ this.$refs.createTenantForm.validate(async (valid) => {
+ if(valid) {
+ this.clearSearch();
+ try {
+ if(this.mode !== 'edit') {
+ this.page.pageNow = 1;
+ }
+ this.isRequesting = true
+ await api.fetch(target, this.modalData, "post")
+ await this.getTableData();
+ this.cancel();
+ this.$Message.success(this.$t('message.linkis.udf.success'));
+ this.isRequesting = false
+ } catch(err) {
+ this.isRequesting = false
+ }
+ } else {
+ this.$Message.error(this.$t('message.linkis.error.validate'));
+ }
+ })
+
+ },
+ edit(data) {
+ const {
+ user, creator, engineType, version, key, configValue, defaultValue
+ } = data;
+ this.configOption.push({value: key, label: key});
+ this.defaultValue = defaultValue
+ this.modalData = {
+ user, creator, engineType, version, configKey: key, configValue,
+ };
+ this.versionOption = [{label: version, value: version}];
+ this.showCreateModal = true;
+ this.mode = 'edit';
+ },
+ ipListValidator(rule, val, cb) {
+ if (!val) {
+ cb(new Error(this.$t('message.linkis.ipListManagement.notEmpty')));
+ }
+ if(val === '*') {
+ cb();
+ }
+ const ipArr = val.split(',');
+ ipArr.forEach(ip => {
+ if(!/^((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])$/.test(ip)) {
+ cb(new Error(this.$t('message.linkis.ipListManagement.ipContentError')));
+ }
+ })
+ cb();
+ },
+ async changePage(val) {
+ this.page.pageNow = val;
+ await this.getTableData();
+ },
+ async search() {
+ const { user, creator, engineType, key } = this.queryData;
+ this.confirmQuery = { user, creator, engineType, key };
+ this.page.pageNow = 1;
+ await this.getTableData()
+ },
+ changeEngineType(val) {
+ if (val === '*') {
+ this.modalData.version = "*";
+ this.versionOption = [{label: this.$t('message.linkis.all'),value: '*'}];
+ } else {
+ this.modalData.version = "";
+ this.versionOption = [];
+ }
+ this.modalData.configKey = '';
+ },
+ fetchVersionOption(val) {
+ if (!val || this.isEdit) return;
+ api.fetch(`/engineplugin/getTypeVersionList/${this.modalData.engineType}`, {}, 'get').then((res) => {
+ let keyArr = [];
+ res.queryList.forEach((item) => {
+ if (!keyArr.includes(item)) {
+ keyArr.push({label: item, value: item});
+ }
+ });
+ if (this.modalData.version === "*") {
+ keyArr.unshift({label: this.$t('message.linkis.all'),value: '*'});
+ }
+ this.versionOption = keyArr;
+ })
+ },
+ changFormVal() {
+ if (this.isEdit) return;
+ this.modalData.configKey = '';
+ },
+ fetchConfigOption(val) {
+ if (!val || this.isEdit) return;
+ const {user, creator, engineType, version} = this.modalData;
+ api.fetch('/configuration/getItemList', {user, creator, engineType, version, pageSize: 10000}, 'get').then((res) => {
+ let keyArr = [];
+ res.itemList.forEach((item) => {
+ if (!keyArr.includes(item.key)) {
+ keyArr.push({label: item.key, value: item.key, defaultValue: item.defaultValue});
+ }
+ });
+ this.configOption = keyArr;
+ })
+ },
+ onSelect(val) {
+ this.defaultValue = this.configOption.find((item) => {
+ return item.value === val
+ })?.defaultValue
+ }
+ },
+ created() {
+ this.userName = storage.get('userName') || storage.get('baseInfo', 'local').username || '';
+ this.init();
+ this.getEngineOptionsData();
+ }
+
+};
+</script>
+<style lang="scss" src="./index.scss" scoped></style>
+<style lang="scss" scoped>
+
+.modal {
+
+ .input-area {
+ padding: 20px 50px;
+ .item {
+ display: flex;
+ margin-bottom: 10px;
+ .input {
+ width: calc(100% - 66px);
+ }
+ }
+ }
+}
+.search-bar .ivu-input-wrapper {
+ width: calc(100% - 75px);
+}
+</style>
+<style lang="scss">
+.ivu-tooltip-popper {
+ .ivu-tooltip-content {
+ .ivu-tooltip-inner-with-width {
+ word-wrap: break-word;
+ }
+ }
+}
+
+</style>
diff --git a/linkis-web/src/apps/linkis/view/linkis/index.vue b/linkis-web/src/apps/linkis/view/linkis/index.vue
index 1494e9a05..fb579a4a0 100644
--- a/linkis-web/src/apps/linkis/view/linkis/index.vue
+++ b/linkis-web/src/apps/linkis/view/linkis/index.vue
@@ -30,25 +30,25 @@
<CellGroup v-for="(item, index2) in sideNavList.children" :key="index2"
@on-click="handleCellClick">
<Cell
- v-if="!isLogAdmin? (item.path !=='/console/ECM')&&(item.path !=='/console/microService')&&(item.key !== '1-10'):true"
+ v-if="!isLogAdmin? (item.path !=='/console/ECM')&&(item.path !=='/console/microService')&&(item.key !== '1-10')&&(item.key !== '1-12'):true"
:key="index2" :class="{ crrentItem: crrentItem === item.key }" :title="item.name"
:name="item.key">
<div>
<span>{{item.name}}</span>
<div class="sub-menu-row">
<Icon
- v-show="item.showSubMenu && (item.key === '1-8' || item.key === '1-9' || item.key === '1-10')"
+ v-show="item.showSubMenu && (item.key === '1-8' || item.key === '1-9' || item.key === '1-10' || item.key === '1-12')"
type="ios-arrow-down" class="user-icon" />
<Icon
- v-show="!item.showSubMenu && (item.key === '1-8' || item.key === '1-9' || item.key === '1-10')"
+ v-show="!item.showSubMenu && (item.key === '1-8' || item.key === '1-9' || item.key === '1-10' || item.key === '1-12')"
type="ios-arrow-up" class="user-icon" />
</div>
</div>
<div
- v-if="(item.key === '1-8' || item.key === '1-9' || item.key === '1-10') && !item.showSubMenu">
+ v-if="(item.key === '1-8' || item.key === '1-9' || item.key === '1-10' || item.key === '1-12') && !item.showSubMenu">
<div @click.stop="">
<CellGroup
- v-for="(item3, index3) in (item.key === '1-9' ? urmSideNavList.children : item.key === '1-8' ?datasourceNavList.children:basedataNavList.children)"
+ v-for="(item3, index3) in getChildMap(item.key).children"
:key="index3" @on-click="clickToRoute">
<div
v-if="isLogAdmin ? true : item3.key === '1-8-1' || item3.key === '1-9-2' || item3.key === '1-9-1'">
@@ -180,7 +180,14 @@ export default {
),
showSubMenu: true,
},
- // { key: '1-11', name: this.$t('message.linkis.sideNavList.function.children.codeQuery'), path: '/console/codeQuery' },
+ { key: '1-11', name: this.$t('message.linkis.sideNavList.function.children.codeQuery'), path: '/console/codeQuery' },
+ {
+ key: '1-12',
+ name: this.$t(
+ 'message.linkis.sideNavList.function.children.opsTool'
+ ),
+ showSubMenu: true,
+ },
],
},
datasourceNavList: {
@@ -204,7 +211,7 @@ export default {
path: '/console/datasourceEnv',
},
{key: '1-8-3', name: this.$t('message.linkis.sideNavList.function.children.datasourceType'), path: '/console/datasourceType' },
- // {key: '1-8-4', name: this.$t('message.linkis.sideNavList.function.children.datasourceAccess'), path: '/console/datasourceAccess' },
+ {key: '1-8-4', name: this.$t('message.linkis.sideNavList.function.children.datasourceAccess'), path: '/console/datasourceAccess' },
{
key: '1-8-5',
name: this.$t(
@@ -262,6 +269,20 @@ export default {
),
path: '/console/ipListManagement',
},
+ {
+ key: '1-10-7',
+ name: this.$t(
+ 'message.linkis.sideNavList.function.children.acrossClusterRule'
+ ),
+ path: '/console/acrossClusterRule',
+ },
+ {
+ key: '1-10-8',
+ name: this.$t(
+ 'message.linkis.sideNavList.function.children.configManagement'
+ ),
+ path: '/console/configManagement',
+ },
],
},
urmSideNavList: {
@@ -288,6 +309,21 @@ export default {
{key: '1-9-4', name: this.$t('message.linkis.sideNavList.function.children.udfTree'), path: '/console/udfTree' },
],
},
+ opsTool: {
+ key: '1',
+ name: this.$t('message.linkis.sideNavList.function.children.opsTool'),
+ padding: 0,
+ icon: 'ios-options',
+ children: [
+ {
+ key: '1-12-1',
+ name: this.$t(
+ 'message.linkis.sideNavList.function.children.userConfig'
+ ),
+ path: '/console/userConfig',
+ },
+ ],
+ },
breadcrumbSecondName: this.$t(
'message.linkis.sideNavList.function.children.globalHistory'
),
@@ -330,9 +366,19 @@ export default {
// Whether the result set can be downloaded
api.fetch('/user/baseinfo', 'get').then((res) => {
storage.set('resultSetExportEnable', res.resultSetExportEnable ? true : false,'session')
+ storage.set('clusterInfo', res.linkisClusterName || '')
})
},
methods: {
+ getChildMap(key) {
+ const map = {
+ '1-8': this.datasourceNavList,
+ '1-9': this.urmSideNavList,
+ '1-10': this.basedataNavList,
+ '1-12': this.opsTool,
+ }
+ return map[key]
+ },
handleCellClick(index) {
if (index === '1-8') {
this.sideNavList.children[6].showSubMenu =
@@ -349,6 +395,11 @@ export default {
!this.sideNavList.children[8].showSubMenu
return
}
+ if (index === '1-12') {
+ this.sideNavList.children[10].showSubMenu =
+ !this.sideNavList.children[10].showSubMenu
+ return
+ }
// index = index.split('-')[0] + '-' + index.split('-')[1]; //防止出现三级菜单
let activedCellParent
switch (index) {
@@ -396,11 +447,7 @@ export default {
})
},
clickToRoute(index) {
- const activedCellParent = index.split('-').slice(0, 2).join('-') === '1-9'
- ? this.urmSideNavList
- : index.split('-').slice(0, 2).join('-') === '1-8'
- ? this.datasourceNavList
- : this.basedataNavList
+ const activedCellParent = this.getChildMap(index.split('-').slice(0, 2).join('-'))
this.crrentItem = index
const activedCell = activedCellParent.children.find(
(item) => item.key === index
diff --git a/linkis-web/src/common/i18n/en.json b/linkis-web/src/common/i18n/en.json
index db26f2218..aac078b18 100644
--- a/linkis-web/src/common/i18n/en.json
+++ b/linkis-web/src/common/i18n/en.json
@@ -308,7 +308,7 @@
"lineFilter": "Line Filter",
"resultGroupLineFilter": "Result Group Line Filter",
"resultGroup": "Result Group",
- "all": "all",
+ "all": "All Results({count})",
"autoFormat": "Auto Format",
"downloadMode": "Download Mode :",
"deepAnalysis": "Deep Analysis",
diff --git a/linkis-web/src/common/i18n/zh.json b/linkis-web/src/common/i18n/zh.json
index a38fa3deb..688153101 100644
--- a/linkis-web/src/common/i18n/zh.json
+++ b/linkis-web/src/common/i18n/zh.json
@@ -314,7 +314,7 @@
"lineFilter": "列筛选",
"resultGroupLineFilter": "对结果集的列进行筛选",
"resultGroup": "结果集",
- "all": "是否全量",
+ "all": "所有结果集({count}个)",
"autoFormat": "自动格式化",
"downloadMode": "下载方式:",
"deepAnalysis": "分 析 进 阶",
diff --git a/linkis-web/src/components/consoleComponent/result.vue b/linkis-web/src/components/consoleComponent/result.vue
index 8c901ad7e..d59ac743e 100644
--- a/linkis-web/src/components/consoleComponent/result.vue
+++ b/linkis-web/src/components/consoleComponent/result.vue
@@ -23,6 +23,7 @@
ref="toolbar"
v-show="result.path"
:current-path="result.path"
+ :all-path="result.allPath"
:show-filter="tableData.type !== 'normal'"
:script="script"
:row="hightLightRow"
@@ -248,9 +249,13 @@ export default {
total: 0,
path: '',
cache: {},
+ allPath: []
};
if (this.script.resultList && this.script.resultSet !== undefined) {
- res = this.script.resultList[this.script.resultSet].result
+ res = this.script.resultList[this.script.resultSet].result
+ if(res) {
+ res.allPath = this.script.resultList.map(result => result.path);
+ }
}
if(!res && this.script.result){
res = this.script.result
diff --git a/linkis-web/src/components/consoleComponent/resultSetList.vue b/linkis-web/src/components/consoleComponent/resultSetList.vue
index 80c8a99d7..28652e576 100644
--- a/linkis-web/src/components/consoleComponent/resultSetList.vue
+++ b/linkis-web/src/components/consoleComponent/resultSetList.vue
@@ -24,7 +24,7 @@
@click.stop="showList"
class="ivu-select-selection">
<div class="">
- <span class="ivu-select-selected-value">{{$t('message.common.resultList')}}{{ current - 0 + 1 }}</span>
+ <span class="ivu-select-selected-value">{{$t('message.common.resultList')}}{{ +current + 1 }}</span>
<i class="ivu-icon ivu-icon-ios-arrow-down ivu-select-arrow"></i>
</div>
</div>
@@ -45,7 +45,7 @@
v-for="(item, index) in list"
:class="{current: current-0 === index}"
:data-index="index"
- :key="item.path">{{$t('message.common.resultList')}}{{ +item.name.split('.')[0].substring(1) + 1 }}</li>
+ :key="item.path">{{$t('message.common.resultList')}}{{ index + 1 }}</li>
</virtual-list>
</div>
</div>
diff --git a/linkis-web/src/components/consoleComponent/toolbar.vue b/linkis-web/src/components/consoleComponent/toolbar.vue
index 20bcd8e67..bcdff0af0 100644
--- a/linkis-web/src/components/consoleComponent/toolbar.vue
+++ b/linkis-web/src/components/consoleComponent/toolbar.vue
@@ -148,11 +148,14 @@
{{$t('message.common.toolbar.downloadMode')}}
</Row>
<Row>
- <Checkbox v-model="allDownload">{{$t('message.common.toolbar.all')}}</Checkbox>
- </Row>
- <Row>
- <Checkbox v-model="autoFormat">{{$t('message.common.toolbar.autoFormat')}}</Checkbox>
+ <Checkbox v-model="allDownload">{{$t('message.common.toolbar.all', {count: String(allPath.length)})}}</Checkbox>
</Row>
+ <div v-if="isExcel">
+ <Row>
+ <Checkbox v-model="autoFormat">{{$t('message.common.toolbar.autoFormat')}}</Checkbox>
+ </Row>
+ </div>
+
</div>
<Row class="confirm">
<Col span="10">
@@ -227,6 +230,10 @@ export default {
type: String,
default: '',
},
+ allPath: {
+ type: Array,
+ default: () => []
+ },
showFilter: {
type: Boolean,
default: false
@@ -294,7 +301,10 @@ export default {
return describe
},
isAll() {
- return ['hql', 'sql'].includes(this.script.runType) && this.download.format === '2';
+ return ['hql', 'sql'].includes(this.script.runType) || this.download.format === '1';
+ },
+ isExcel() {
+ return this.download.format === '2';
},
rsDownload() {
return storage.get('resultSetExportEnable');
@@ -342,6 +352,19 @@ export default {
const resultType = this.resultsShowType === '1' ? 'visual' : 'dataWrangler';
this.$emit('on-analysis', resultType);
},
+ downloadFromHref(url) {
+ const link = document.createElement('a');
+ link.setAttribute('href', url);
+ link.setAttribute('download', '');
+ const evObj = document.createEvent('MouseEvents');
+ evObj.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, true, false, 0, null);
+ return link.dispatchEvent(evObj)
+ },
+ pause(msec = 1000) {
+ return new Promise((resolve) => {
+ setTimeout(resolve, msec);
+ })
+ },
async downloadConfirm() {
const splitor = this.download.format === '1' ? 'csv' : 'xlsx';
const charset = this.download.coding === '1' ? 'utf-8' : 'gbk';
@@ -359,11 +382,11 @@ export default {
let temPath = this.currentPath;
// The result set path of the api execution download is different(api执行下载的结果集路径不一样)
let apiPath = `${this.getResultUrl}/resultsetToExcel`;
- if (this.isAll && this.allDownload) {
+ if (this.isAll && this.allDownload && this.isExcel) {
temPath = temPath.substring(0, temPath.lastIndexOf('/'));
apiPath = `${this.getResultUrl}/resultsetsToExcel`
}
- let url = `http://${window.location.host}/api/rest_j/v1/` + apiPath +'?path=' + temPath + '&charset=' + charset + '&outputFileType=' + splitor + '&nullValue=' + nullValue + '&outputFileName=' + filename;
+ let url = `http://${window.location.host}/api/rest_j/v1/` + apiPath + '?charset=' + charset + '&outputFileType=' + splitor + '&nullValue=' + nullValue;
// If the api execution page gets the result set, you need to bring the taskId(如果是api执行页获取结果集,需要带上taskId)
if(this.getResultUrl !== 'filesystem') {
url += `&taskId=${this.comData.taskID}`
@@ -373,19 +396,45 @@ export default {
let separator = encodeURIComponent(separatorItem.key || '');
url += `&csvSeparator=${separator}`
}
- if(this.isAll) {
+ if(this.isAll && this.isExcel) {
url += `&autoFormat=${this.autoFormat}`
}
// Before downloading, use the heartbeat interface to confirm whether to log in(下载之前条用心跳接口确认是否登录)
await api.fetch('/user/heartbeat', 'get');
- const link = document.createElement('a');
- link.setAttribute('href', url);
- link.setAttribute('download', '');
- const evObj = document.createEvent('MouseEvents');
- evObj.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, true, false, 0, null);
- const flag = link.dispatchEvent(evObj);
+ const eventList = [];
+ let flag = null;
+ if (this.isAll && !this.isExcel && this.allDownload) {
+ let count = 0
+ for(let [index, path] of this.allPath.sort((a, b) => {
+ return +(a.split('.')[0].substring(1)) - +(b.split('.')[0].substring(1))
+ }).entries()) {
+ let temUrl = url;
+ temUrl += `&path=${path}`
+ const name = `ResultSet${index + 1}`
+ temUrl += '&outputFileName=' + name
+ const event = this.downloadFromHref(temUrl)
+ eventList.push(event);
+ if(++count >= 10) {
+ await this.pause(1000);
+ count = 0;
+ }
+ }
+ // this.allPath.forEach(path => {
+ // let temUrl = url;
+ // temUrl += `&path=${path}`
+ // const name = `ResultSet${Number(path.substring(temPath.lastIndexOf('/')).split('.')[0].split('_')[1]) + 1}`
+ // temUrl += '&outputFileName=' + name
+ // const event = this.downloadFromHref(temUrl)
+ // eventList.push(event);
+ // });
+ } else {
+ url += `&path=${temPath}` + '&outputFileName=' + filename
+ flag = this.downloadFromHref(url);
+ }
this.$nextTick(() => {
- if (flag) {
+ if (flag && this.isExcel) {
+ this.$Message.success(this.$t('message.common.toolbar.success.download'));
+ } else if (!this.isExcel && !eventList.includes(false)) {
this.$Message.success(this.$t('message.common.toolbar.success.download'));
}
});
diff --git a/linkis-web/src/components/table/table.css b/linkis-web/src/components/table/table.css
index 423c5b310..3cd124284 100644
--- a/linkis-web/src/components/table/table.css
+++ b/linkis-web/src/components/table/table.css
@@ -142,16 +142,29 @@
overflow: auto;
}
.bottom-td {
- overflow: hidden;
- white-space: nowrap;
box-sizing: border-box;
text-align: center;
- text-overflow: ellipsis;
vertical-align: middle;
border-bottom: 1px solid #e8eaec;
border-right: 1px solid #e8eaec;
transition: background-color 0.2s ease-in-out;
}
+.scroll {
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+}
+.scroll::-webkit-scrollbar {
+ display: none;
+}
+.scroll::-webkit-scrollbar-thumb {
+ background: transparent
+}
+.wrap {
+ white-space: pre-line;
+ word-break: break-all;
+}
+
.trselect td {
background-color: #ebf7ff;
}
diff --git a/linkis-web/src/components/table/table.vue b/linkis-web/src/components/table/table.vue
index aa13f59ac..e3ca03d90 100644
--- a/linkis-web/src/components/table/table.vue
+++ b/linkis-web/src/components/table/table.vue
@@ -71,44 +71,49 @@
style="width:100%;table-layout:fixed;"
:style="{height:`${loadedNum*tdHeight}px`}"
>
- <tr
- v-for="(items,indexs) in showTableList"
- @click="rowClick(items,indexs+dataTop/tdHeight+1)"
- @dblclick="rowDblclick(items,indexs+dataTop/tdHeight+1)"
- :key="indexs"
- :style="{'line-height':`${tdHeight}px`}"
- :class="selectIndex==indexs?'trselect':'trhover'"
- >
- <td
- class="bottom-td"
- v-if="columns[0].type=='index'"
- :style="{width: columns[0].width? `${columns[0].width}px` : 'auto', height:`${tdHeight}px`}"
+ <tbody>
+ <tr
+ v-for="(items,indexs) in showTableList"
+ @click="rowClick(items,indexs+dataTop/tdHeight)"
+ @dblclick="rowDblclick(items,indexs+dataTop/tdHeight+1)"
+ :key="indexs"
+ :style="{'line-height':`${tdHeight}px`}"
+ :class="selectIndex==indexs?'trselect':'trhover'"
>
- {{indexs+dataTop/tdHeight+1}}</td>
- <td
- class="bottom-td"
- v-if="columns[0].type=='select'"
- ></td>
- <template v-for="(item,index) in columnsBottom">
<td
- v-if="item.key"
class="bottom-td"
- :key="index"
- :style="{width: item.width?`${item.width}px`:'auto', height:`${tdHeight}px`}"
- :title="item.logic==undefined?items[item.key]:item.logic(items)"
+ v-if="columns[0].type=='index'"
+ :style="{width: columns[0].width? `${columns[0].width}px` : 'auto', height:`${tdHeight}px`}"
>
- {{item.logic==undefined?items[item.key]:item.logic(items)}}
- </td>
+ {{indexs+dataTop/tdHeight+1}}</td>
<td
- v-if="item.slot"
class="bottom-td"
- :key="index"
- :style="{width: item.width?`${item.width}px`:'auto', height:`${tdHeight}px`}"
- >
- <slot :name="item.slot" :row="items" :index="indexs+dataTop/tdHeight+1"></slot>
- </td>
- </template>
- </tr>
+ v-if="columns[0].type=='select'"
+ ></td>
+ <template v-for="(item,index) in columnsBottom">
+ <td
+ v-if="item.key"
+ :key="`${index}-${indexs}`"
+ class="bottom-td"
+ :class="[hasLineBreak(item.logic==undefined?items[item.key]:item.logic(items)) ? '' : 'hint--bottom hint--rounded']"
+ :style="{width: item.width?`${item.width}px`:'auto'}"
+ :aria-label="item.logic==undefined?items[item.key]:item.logic(items)"
+ >
+ <p v-if="hasLineBreak(item.logic==undefined?items[item.key]:item.logic(items))" style="width: 100%" class="wrap">{{item.logic==undefined?items[item.key]:item.logic(items)}}</p>
+ <div v-else class="scroll" :aria-label="item.logic==undefined?items[item.key]:item.logic(items)" :style="{width: '100%', height:`${tdHeight}px`}">{{item.logic==undefined?items[item.key]:item.logic(items)}}</div>
+
+ </td>
+ <td
+ v-if="item.slot"
+ class="bottom-td"
+ :key="index"
+ :style="{width: item.width?`${item.width}px`:'auto', height:`${tdHeight}px`}"
+ >
+ <slot :name="item.slot" :row="items" :index="indexs+dataTop/tdHeight+1"></slot>
+ </td>
+ </template>
+ </tr>
+ </tbody>
</table>
<div v-show="showTableList.length < 1" class="no-data-tip" :style="noDataStyle">
暂无数据
@@ -324,6 +329,13 @@ export default {
}
}
},
+ hasLineBreak(content) {
+ if (content.split(/\n/).length > 1) {
+ return true
+ }
+ return false
+ },
+
//scroll bar scroll down(滚动条向下滚动)
handleScrollBottom() {
if (this.dataTop > this.scrollTop) {
diff --git a/linkis-web/src/components/virtualTable/historyTable/historyTable.vue b/linkis-web/src/components/virtualTable/historyTable/historyTable.vue
index 420d6dced..65988bd7c 100644
--- a/linkis-web/src/components/virtualTable/historyTable/historyTable.vue
+++ b/linkis-web/src/components/virtualTable/historyTable/historyTable.vue
@@ -51,12 +51,13 @@
v-for="(th, index) in columns"
:key="th.key"
:style="{'text-align': th.align}"
- class="we-table-row-cell">
+ class="we-table-row-cell"
+ :aria-label="td[th.key]"
+ :class="[!th.ellipsis ? '' : 'hint--bottom hint--rounded']">
<div
class="we-table-row-label"
:style="{'width': th.width ? th.width + 'px' : getComputedWidth(th)}"
- :class="{'ellipsis': th.ellipsis, [th.className]: true}"
- :title="th.ellipsis ? td[th.key] : ''">
+ :class="{'ellipsis': th.ellipsis, [th.className]: true}">
<table-expand
v-if="th.renderType"
:row="td"
diff --git a/linkis-web/src/dss/module/footer/index.vue b/linkis-web/src/dss/module/footer/index.vue
index 6ff551ad9..27de5718e 100644
--- a/linkis-web/src/dss/module/footer/index.vue
+++ b/linkis-web/src/dss/module/footer/index.vue
@@ -66,7 +66,7 @@ export default {
},
methods: {
getRunningJob() {
- api.fetch('/jobhistory/list', {
+ api.fetch('/jobhistory/listundonetasks', {
pageSize: 100,
status: 'Running,Inited,Scheduled',
}, 'get').then((rst) => {
diff --git a/linkis-web/src/dss/module/header/index.vue b/linkis-web/src/dss/module/header/index.vue
index c1ebe1276..ee9c25e29 100644
--- a/linkis-web/src/dss/module/header/index.vue
+++ b/linkis-web/src/dss/module/header/index.vue
@@ -29,7 +29,7 @@
src="../../assets/images/Linkis.svg"
:alt="$t('message.common.logoName')"
>
- <span class="version">{{sysVersion}}</span>
+ <span class="version">{{sysVersion}}{{clusterInfo ? `(${clusterInfo})`:''}}</span>
</div>
</div>
<div
@@ -74,6 +74,7 @@ export default {
isUserMenuShow: false,
userName: "",
isSandbox: process.env.NODE_ENV === "sandbox",
+ clusterInfo: '',
};
},
mixins: [mixin],
@@ -83,6 +84,7 @@ export default {
methods: {
init() {
this.userName = storage.get('userName');
+ this.clusterInfo = storage.get('clusterInfo') || ''
},
handleOutsideClick() {
this.isUserMenuShow = false;
diff --git a/linkis-web/src/dss/module/resourceSimple/engine.vue b/linkis-web/src/dss/module/resourceSimple/engine.vue
index b603f10df..b9acb7c53 100644
--- a/linkis-web/src/dss/module/resourceSimple/engine.vue
+++ b/linkis-web/src/dss/module/resourceSimple/engine.vue
@@ -21,135 +21,138 @@
v-if="loading"
size="large"
fix/>
- <div
- class="engine-content"
- v-if="ideEngineList.length > 0">
- <div class="engine-header-bar">
- <h3 class="data-type-title">{{ $t('message.common.resourceSimple.YS') }}</h3>
- <div class="classify">
- <span style="width: auto; white-space: nowrap;">{{ $t('message.common.resourceSimple.FL') }}</span>
- <Select v-model="ideSelectData">
- <Option
- v-for="item in typeList"
- :value="item.value"
- :key="item.value">{{ item.label }}</Option>
- </Select>
- </div>
- </div>
+ <div class="engine-content-wrapper">
<div
- class="engine-list"
- v-for="item in ideClassList"
- :key="item">
- <span class="engline-name">{{ calssifyName(item) }}</span>
- <ul class="engine-ul">
- <template
- v-for="(subitem, index) in ideEngineList">
- <Tooltip :key="index" :content="calssifyName(subitem.engineType)" placement="left" :disabled="calssifyName(subitem.engineType).length < 8">
- <li
- class="engine-li"
- :class="[{'active': subitem.isActive}, supportColor(subitem.engineStatus)]"
- v-if="subitem.engineType === item || subitem.engineStatus === item || (item === 'Idle' && (subitem.engineStatus === 'Error' || subitem.engineStatus === 'ShuttingDown' || subitem.engineStatus === 'Dead'))"
- :key="index"
- @click="subitem.isActive = !subitem.isActive">
- <span class="ellipsis">{{ calssifyName(subitem.engineType) }}</span>
- <!-- <SvgIcon class='engine-icon job-content-icon' :class="supportIcon(subitem).className" icon-class="common" style='font-size: 30px;' :color="supportIcon(subitem).color === 'yellow' ? '#f4cf2a': supportIcon(subitem).color"/> -->
- <Icon
- v-show="subitem.isActive"
- class="engine-right"
- :class="supportColor(subitem.engineStatus)"
- type="md-checkmark"></Icon>
- </li>
- </Tooltip>
- </template>
- </ul>
- </div>
- </div>
- <div
- class="engine-content"
- v-if="boardEngineList.length > 0">
- <div class="engine-header-bar">
- <h3 class="data-type-title">{{ $t('message.common.resourceSimple.ZH') }}</h3>
- <div class="classify">
- <span style="width: auto; white-space: nowrap;">{{ $t('message.common.resourceSimple.FL') }}</span>
- <Select v-model="boardSelectData">
- <Option
- v-for="item in typeList"
- :value="item.value"
- :key="item.value">{{ item.label }}</Option>
- </Select>
+ class="engine-content"
+ v-if="ideEngineList.length > 0">
+ <div class="engine-header-bar">
+ <h3 class="data-type-title">{{ $t('message.common.resourceSimple.YS') }}</h3>
+ <div class="classify">
+ <span style="width: auto; white-space: nowrap;">{{ $t('message.common.resourceSimple.FL') }}</span>
+ <Select v-model="ideSelectData">
+ <Option
+ v-for="item in typeList"
+ :value="item.value"
+ :key="item.value">{{ item.label }}</Option>
+ </Select>
+ </div>
+ </div>
+ <div
+ class="engine-list"
+ v-for="item in ideClassList"
+ :key="item">
+ <span class="engline-name">{{ calssifyName(item) }}</span>
+ <ul class="engine-ul">
+ <template
+ v-for="(subitem, index) in ideEngineList">
+ <Tooltip :key="index" :content="calssifyName(subitem.engineType)" placement="left" :disabled="calssifyName(subitem.engineType).length < 8">
+ <li
+ class="engine-li"
+ :class="[{'active': subitem.isActive}, supportColor(subitem.engineStatus)]"
+ v-if="subitem.engineType === item || subitem.engineStatus === item || (item === 'Idle' && (subitem.engineStatus === 'Error' || subitem.engineStatus === 'ShuttingDown' || subitem.engineStatus === 'Dead'))"
+ :key="index"
+ @click="subitem.isActive = !subitem.isActive">
+ <span class="ellipsis">{{ calssifyName(subitem.engineType) }}</span>
+ <!-- <SvgIcon class='engine-icon job-content-icon' :class="supportIcon(subitem).className" icon-class="common" style='font-size: 30px;' :color="supportIcon(subitem).color === 'yellow' ? '#f4cf2a': supportIcon(subitem).color"/> -->
+ <Icon
+ v-show="subitem.isActive"
+ class="engine-right"
+ :class="supportColor(subitem.engineStatus)"
+ type="md-checkmark"></Icon>
+ </li>
+ </Tooltip>
+ </template>
+ </ul>
</div>
</div>
<div
- class="engine-list"
- v-for="item in boardClassList"
- :key="item">
- <span class="engline-name">{{ calssifyName(item) }}</span>
- <ul class="engine-ul">
- <template
- v-for="(subitem, index) in boardEngineList">
- <Tooltip :key="index" :content="calssifyName(subitem.engineType)" placement="left" :disabled="calssifyName(subitem.engineType).length < 8">
- <li
- class="engine-li"
- :class="[{'active': subitem.isActive}, supportColor(subitem.engineStatus)]"
- v-if="subitem.engineType === item || subitem.engineStatus === item || (item === 'Idle' && (subitem.engineStatus === 'Error' || subitem.engineStatus === 'ShuttingDown' || subitem.engineStatus === 'Dead'))"
- :key="index"
- @click="subitem.isActive = !subitem.isActive">
- <span class="ellipsis">{{ calssifyName(subitem.engineType) }}</span>
- <!-- <SvgIcon class='engine-icon job-content-icon' :class="supportIcon(subitem).className" icon-class="common" style='font-size: 30px;' :color="supportIcon(subitem).color === 'yellow' ? '#f4cf2a': supportIcon(subitem).color"/>-->
- <Icon
- v-show="subitem.isActive"
- class="engine-right"
- :class="supportColor(subitem.engineStatus)"
- type="md-checkmark"></Icon>
- </li>
- </Tooltip>
- </template>
- </ul>
- </div>
- </div>
- <div
- class="engine-content"
- v-if="otherEngineList.length > 0">
- <div class="engine-header-bar">
- <h3 class="data-type-title">Other</h3>
- <div class="classify">
- <span style="width: auto; white-space: nowrap;">{{ $t('message.common.resourceSimple.FL') }}</span>
- <Select v-model="otherSelectData">
- <Option
- v-for="item in typeList"
- :value="item.value"
- :key="item.value">{{ item.label }}</Option>
- </Select>
+ class="engine-content"
+ v-if="boardEngineList.length > 0">
+ <div class="engine-header-bar">
+ <h3 class="data-type-title">{{ $t('message.common.resourceSimple.ZH') }}</h3>
+ <div class="classify">
+ <span style="width: auto; white-space: nowrap;">{{ $t('message.common.resourceSimple.FL') }}</span>
+ <Select v-model="boardSelectData">
+ <Option
+ v-for="item in typeList"
+ :value="item.value"
+ :key="item.value">{{ item.label }}</Option>
+ </Select>
+ </div>
+ </div>
+ <div
+ class="engine-list"
+ v-for="item in boardClassList"
+ :key="item">
+ <span class="engline-name">{{ calssifyName(item) }}</span>
+ <ul class="engine-ul">
+ <template
+ v-for="(subitem, index) in boardEngineList">
+ <Tooltip :key="index" :content="calssifyName(subitem.engineType)" placement="left" :disabled="calssifyName(subitem.engineType).length < 8">
+ <li
+ class="engine-li"
+ :class="[{'active': subitem.isActive}, supportColor(subitem.engineStatus)]"
+ v-if="subitem.engineType === item || subitem.engineStatus === item || (item === 'Idle' && (subitem.engineStatus === 'Error' || subitem.engineStatus === 'ShuttingDown' || subitem.engineStatus === 'Dead'))"
+ :key="index"
+ @click="subitem.isActive = !subitem.isActive">
+ <span class="ellipsis">{{ calssifyName(subitem.engineType) }}</span>
+ <!-- <SvgIcon class='engine-icon job-content-icon' :class="supportIcon(subitem).className" icon-class="common" style='font-size: 30px;' :color="supportIcon(subitem).color === 'yellow' ? '#f4cf2a': supportIcon(subitem).color"/>-->
+ <Icon
+ v-show="subitem.isActive"
+ class="engine-right"
+ :class="supportColor(subitem.engineStatus)"
+ type="md-checkmark"></Icon>
+ </li>
+ </Tooltip>
+ </template>
+ </ul>
</div>
</div>
<div
- class="engine-list"
- v-for="item in otherClassList"
- :key="item">
- <span class="engline-name">{{ calssifyName(item) }}</span>
- <ul class="engine-ul">
- <template
- v-for="(subitem, index) in otherEngineList">
- <Tooltip :key="index" :content="calssifyName(subitem.engineType)" placement="left" :disabled="calssifyName(subitem.engineType).length < 8">
- <li
- class="engine-li"
- :class="[{'active': subitem.isActive}, supportColor(subitem.engineStatus)]"
- v-if="subitem.engineType === item || subitem.engineStatus === item || (item === 'Idle' && (subitem.engineStatus === 'Error' || subitem.engineStatus === 'ShuttingDown' || subitem.engineStatus === 'Dead'))"
- :key="index"
- @click="subitem.isActive = !subitem.isActive">
- <span class="ellipsis">{{ calssifyName(subitem.engineType) }}</span>
- <!-- <SvgIcon class='engine-icon job-content-icon' :class="supportIcon(subitem).className" icon-class="common" style='font-size: 30px;' :color="supportIcon(subitem).color === 'yellow' ? '#f4cf2a': supportIcon(subitem).color"/>-->
- <Icon
- v-show="subitem.isActive"
- class="engine-right"
- :class="supportColor(subitem.engineStatus)"
- type="md-checkmark"></Icon>
- </li>
- </Tooltip>
- </template>
- </ul>
+ class="engine-content"
+ v-if="otherEngineList.length > 0">
+ <div class="engine-header-bar">
+ <h3 class="data-type-title">Other</h3>
+ <div class="classify">
+ <span style="width: auto; white-space: nowrap;">{{ $t('message.common.resourceSimple.FL') }}</span>
+ <Select v-model="otherSelectData">
+ <Option
+ v-for="item in typeList"
+ :value="item.value"
+ :key="item.value">{{ item.label }}</Option>
+ </Select>
+ </div>
+ </div>
+ <div
+ class="engine-list"
+ v-for="item in otherClassList"
+ :key="item">
+ <span class="engline-name">{{ calssifyName(item) }}</span>
+ <ul class="engine-ul">
+ <template
+ v-for="(subitem, index) in otherEngineList">
+ <Tooltip :key="index" :content="calssifyName(subitem.engineType)" placement="left" :disabled="calssifyName(subitem.engineType).length < 8">
+ <li
+ class="engine-li"
+ :class="[{'active': subitem.isActive}, supportColor(subitem.engineStatus)]"
+ v-if="subitem.engineType === item || subitem.engineStatus === item || (item === 'Idle' && (subitem.engineStatus === 'Error' || subitem.engineStatus === 'ShuttingDown' || subitem.engineStatus === 'Dead'))"
+ :key="index"
+ @click="subitem.isActive = !subitem.isActive">
+ <span class="ellipsis">{{ calssifyName(subitem.engineType) }}</span>
+ <!-- <SvgIcon class='engine-icon job-content-icon' :class="supportIcon(subitem).className" icon-class="common" style='font-size: 30px;' :color="supportIcon(subitem).color === 'yellow' ? '#f4cf2a': supportIcon(subitem).color"/>-->
+ <Icon
+ v-show="subitem.isActive"
+ class="engine-right"
+ :class="supportColor(subitem.engineStatus)"
+ type="md-checkmark"></Icon>
+ </li>
+ </Tooltip>
+ </template>
+ </ul>
+ </div>
</div>
</div>
+
<span
class="no-data"
v-if="ideEngineList.length === 0 && boardEngineList.length === 0 && otherEngineList.length === 0">{{ $t('message.common.resourceSimple.ZWSJ') }}</span>
@@ -245,6 +248,8 @@ export default {
return 'Openlookeng';
case 'elasticsearch':
return 'Elasticsearch';
+ case 'trino':
+ return 'Trino';
case 'Unlock':
return this.$t('message.common.resourceSimple.KX')
case 'Idle':
diff --git a/linkis-web/src/dss/module/resourceSimple/index.scss b/linkis-web/src/dss/module/resourceSimple/index.scss
index 783e44f84..71478c8a3 100644
--- a/linkis-web/src/dss/module/resourceSimple/index.scss
+++ b/linkis-web/src/dss/module/resourceSimple/index.scss
@@ -47,9 +47,20 @@
}
}
}
+ .queue-app {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ grid-gap: 10px;
+ .queue-app-item {
+ text-align: left;
+ }
+ .pl60 {
+ padding-left: 20px;
+ }
+ }
.queue-manager-top {
.queue-manager-top-content {
- height: 180px;
+ height: 134px;
overflow-y: auto;
}
.queue-manager-item {
@@ -296,9 +307,9 @@
}
}
// engine manager style(引擎管理器样式)
+
.engine-box {
height: 100%;
- overflow-y: auto;
position: $relative;
.no-data {
font-size: $font-size-base;
@@ -325,114 +336,120 @@
background: $tooltip-color ;
}
}
-.engine-content {
- padding: 0 15px;
- .engine-header-bar {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-top: 10px;
- margin-bottom: 10px;
- .data-type-title {
- font-size: 18px;
- font-weight: bold;
- }
- .classify {
- flex-basis: 30%;
+.engine-content-wrapper {
+
+ overflow-y: auto;
+ height: 100%;
+ .engine-content {
+ padding: 0 15px;
+ .engine-header-bar {
display: flex;
- justify-content: space-around;
+ justify-content: space-between;
align-items: center;
- >span {
- margin-right: 5px;
- width: 40px;
- font-size: $font-size-base;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ .data-type-title {
+ font-size: 18px;
+ font-weight: bold;
+ }
+ .classify {
+ flex-basis: 30%;
+ display: flex;
+ justify-content: space-around;
+ align-items: center;
+ >span {
+ margin-right: 5px;
+ width: 40px;
+ font-size: $font-size-base;
+ }
}
}
- }
- .engine-list {
- display: flex;
- align-items: center;
- padding-left: 30px;
- .engline-name {
- flex-basis: 62px;
- font-size: 16px;
- margin-right: 20px;
- }
- .engine-ul {
- flex: 1;
+ .engine-list {
display: flex;
- justify-content: flex-start;
align-items: center;
- flex-wrap: wrap;
- .engine-li {
- border: $border-width-base $border-style-base $border-color-base;
- border-radius: $border-radius-base;
- padding: 5px;
- position: $relative;
- width: 60px;
- height: 60px;
- margin: 8px 20px 8px 0;
- box-sizing: border-box;
+ padding-left: 30px;
+ .engline-name {
+ flex-basis: 62px;
+ font-size: 16px;
+ margin-right: 20px;
+ }
+ .engine-ul {
+ flex: 1;
display: flex;
- justify-content: center;
+ justify-content: flex-start;
align-items: center;
- &:hover {
- background-color: $background-color-base;
+ flex-wrap: wrap;
+ .engine-li {
+ border: $border-width-base $border-style-base $border-color-base;
border-radius: $border-radius-base;
- cursor: pointer;
- }
- &.active.yellow {
- border: $border-width-base $border-style-base $yellow-color;
- background-color: $background-color-base;
- }
- &.active.green {
- border: $border-width-base $border-style-base $success-color;
- background-color: $background-color-base;
- }
- &.active.blue {
- border: $border-width-base $border-style-base $primary-color;
- background-color: $background-color-base;
- }
- .engine-icon {
- &::before {
- font-size: 40px;
+ padding: 5px;
+ position: $relative;
+ width: 60px;
+ height: 60px;
+ margin: 8px 20px 8px 0;
+ box-sizing: border-box;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ &:hover {
+ background-color: $background-color-base;
+ border-radius: $border-radius-base;
+ cursor: pointer;
}
- }
- .engine-icon.yellow {
- &::before {
- color: $yellow-color;
+ &.active.yellow {
+ border: $border-width-base $border-style-base $yellow-color;
+ background-color: $background-color-base;
}
- }
- .engine-icon.green {
- &::before {
- color: $success-color;
+ &.active.green {
+ border: $border-width-base $border-style-base $success-color;
+ background-color: $background-color-base;
}
- }
- .engine-icon.blue {
- &::before {
- color: $primary-color;
+ &.active.blue {
+ border: $border-width-base $border-style-base $primary-color;
+ background-color: $background-color-base;
}
- }
- .engine-right {
- position: $absolute;
- top: 0;
- left: 0;
- border-radius: 0 0 5px 0;
- font-weight: bold;
- &:before {
- color: $background-color-base;
+ .engine-icon {
+ &::before {
+ font-size: 40px;
+ }
+ }
+ .engine-icon.yellow {
+ &::before {
+ color: $yellow-color;
+ }
}
- &.yellow {
- background-color: $yellow-color;
+ .engine-icon.green {
+ &::before {
+ color: $success-color;
+ }
}
- &.green {
- background-color: $success-color;
+ .engine-icon.blue {
+ &::before {
+ color: $primary-color;
+ }
}
- &.blue {
- background-color: $primary-color;
+ .engine-right {
+ position: $absolute;
+ top: 0;
+ left: 0;
+ border-radius: 0 0 5px 0;
+ font-weight: bold;
+ &:before {
+ color: $background-color-base;
+ }
+ &.yellow {
+ background-color: $yellow-color;
+ }
+ &.green {
+ background-color: $success-color;
+ }
+ &.blue {
+ background-color: $primary-color;
+ }
}
}
}
}
}
}
+
diff --git a/linkis-web/src/dss/module/resourceSimple/job.vue b/linkis-web/src/dss/module/resourceSimple/job.vue
index 1d384d5b3..f37b12bc1 100644
--- a/linkis-web/src/dss/module/resourceSimple/job.vue
+++ b/linkis-web/src/dss/module/resourceSimple/job.vue
@@ -112,7 +112,7 @@ export default {
if(this.loading) return;
this.jobList = [];
this.loading = true;
- api.fetch('/jobhistory/list', {
+ api.fetch('/jobhistory/listundonetasks', {
pageSize: 100,
status: 'Running,Inited,Scheduled',
}, 'get').then((rst) => {
diff --git a/linkis-web/src/dss/module/resourceSimple/queue.vue b/linkis-web/src/dss/module/resourceSimple/queue.vue
index cd37f63d4..ad2ec492e 100644
--- a/linkis-web/src/dss/module/resourceSimple/queue.vue
+++ b/linkis-web/src/dss/module/resourceSimple/queue.vue
@@ -55,9 +55,21 @@
suffixe="GB"
width="120px"
height="120px"
- :title="$t('message.common.resourceSimple.NC')"></v-circle>
+ :title="$t('message.common.resourceSimple.NC')"
+ class="queue-manager-circle"></v-circle>
+ <v-circle
+ :percent="getPercentage(infos.queueInfo.numActiveApps, infos.queueInfo.maxApps)"
+ :used="infos.queueInfo.numActiveApps"
+ :max="infos.queueInfo.maxApps"
+ suffixe=""
+ width="120px"
+ height="120px"
+ title="Applications"></v-circle>
</div>
</div>
+ <div class="queue-app">
+ <div class="queue-app-item pl60">Num Pending Applications: {{infos.queueInfo.numPendingApps}}</div>
+ </div>
<div class="queue-manager-top">
<span class="queue-manager-title">{{ $t('message.common.resourceSimple.ZYSYPHB') }}</span>
<div
@@ -111,6 +123,13 @@ export default {
};
},
methods: {
+ getPercentage(numerator, denominator) {
+ if(denominator !== 0) {
+ return numerator / denominator
+ } else {
+ return 0
+ }
+ },
getQueueList() {
this.loading = true;
// Get queue resource usage status(获取队列资源使用状态)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org