This is an automated email from the ASF dual-hosted git repository.
casion pushed a commit to branch dev-1.3.1
in repository https://gitbox.apache.org/repos/asf/incubator-linkis.git
The following commit(s) were added to refs/heads/dev-1.3.1 by this push:
new a3ab7f425 dev-1.3.1 web merge (#3829)
a3ab7f425 is described below
commit a3ab7f425407fe303f28481e2ff5e6fa42f71ff4
Author: Yonghao Mei <[email protected]>
AuthorDate: Tue Nov 15 17:09:50 2022 +0800
dev-1.3.1 web merge (#3829)
* handle conflict
* merge bug fixes of linkis-1.1.7
* open entrance of new page
---
linkis-web/package.json | 12 +-
.../apps/URM/module/functionManagement/index.vue | 2 +-
.../src/apps/URM/module/udfManagement/index.vue | 2 +-
linkis-web/src/apps/linkis/i18n/common/en.json | 73 ++++
linkis-web/src/apps/linkis/i18n/common/zh.json | 73 ++++
.../src/apps/linkis/module/ECM/engineConn.vue | 2 +-
linkis-web/src/apps/linkis/module/ECM/index.vue | 2 +-
.../module/EnginePluginManagement/index.scss | 16 +-
.../linkis/module/EnginePluginManagement/index.vue | 53 +--
.../module/datasource/datasourceForm/index.vue | 13 +-
.../src/apps/linkis/module/datasource/index.vue | 1 +
.../module/globalHistoryManagement/index.vue | 12 +-
.../module/globalHistoryManagement/viewHistory.vue | 3 +
.../index.scss => ipListManagement/index.js} | 43 +-
.../index.scss | 39 +-
.../apps/linkis/module/ipListManagement/index.vue | 465 +++++++++++++++++++++
.../linkis/module/resourceManagement/index.vue | 5 +-
.../index.scss => tenantTagManagement/index.js} | 43 +-
.../index.scss | 39 +-
.../linkis/module/tenantTagManagement/index.vue | 454 ++++++++++++++++++++
linkis-web/src/apps/linkis/router.js | 20 +
linkis-web/src/apps/linkis/view/linkis/index.vue | 23 +-
linkis-web/src/common/i18n/en.json | 2 +
linkis-web/src/common/i18n/zh.json | 2 +
linkis-web/src/common/service/mixin.js | 11 +-
.../src/components/consoleComponent/result.vue | 2 +-
.../src/dss/module/resourceSimple/engine.vue | 14 +
linkis-web/src/dss/module/resourceSimple/index.vue | 11 +
28 files changed, 1252 insertions(+), 185 deletions(-)
diff --git a/linkis-web/package.json b/linkis-web/package.json
index aec558e02..366f4c322 100644
--- a/linkis-web/package.json
+++ b/linkis-web/package.json
@@ -22,7 +22,7 @@
]
},
"dependencies": {
- "@form-create/iview": "^2.5.27",
+ "@form-create/iview": "2.5.13",
"axios": "0.19.2",
"babel-polyfill": "6.26.0",
"core-js": "2.6.11",
@@ -32,18 +32,18 @@
"eslint-plugin-vue": "6.2.2",
"highlight.js": "9.18.3",
"iview": "3.5.4",
- "jsencrypt": "^3.2.1",
+ "jsencrypt": "3.2.1",
"lodash": "4.17.20",
"md5": "2.3.0",
"mitt": "1.2.0",
"moment": "2.29.1",
"monaco-editor": "0.19.3",
- "object-to-formdata": "^4.2.2",
+ "object-to-formdata": "4.2.2",
"qs": "6.9.4",
"reconnecting-websocket": "4.4.0",
"sql-formatter": "2.3.3",
"svgo": "1.3.0",
- "v-jsoneditor": "^1.4.5",
+ "v-jsoneditor": "1.4.5",
"vue": "2.6.12",
"vue-i18n": "8.22.1",
"vue-router": "3.4.8",
@@ -64,9 +64,9 @@
"filemanager-webpack-plugin": "6.1.7",
"husky": "1.3.1",
"lint-staged": "8.2.1",
- "material-design-icons": "^3.0.1",
+ "material-design-icons": "3.0.1",
"monaco-editor-webpack-plugin": "1.8.2",
- "node-sass": "6.0.0",
+ "node-sass": "4.14.1",
"sass-loader": "10.2.0",
"svg-sprite-loader": "5.0.0",
"vue-cli-plugin-mockjs": "0.1.3",
diff --git a/linkis-web/src/apps/URM/module/functionManagement/index.vue
b/linkis-web/src/apps/URM/module/functionManagement/index.vue
index 4f3422a8a..6062cfb52 100644
--- a/linkis-web/src/apps/URM/module/functionManagement/index.vue
+++ b/linkis-web/src/apps/URM/module/functionManagement/index.vue
@@ -17,7 +17,7 @@
<template>
<div class="function-management">
- <Form class="function-management-searchbar" :model="searchBar" inline>
+ <Form class="function-management-searchbar" @submit.native.prevent
:model="searchBar" inline>
<FormItem prop="functionName"
:label="$t('message.linkis.udf.functionName')">
<Input
v-model="searchBar.functionName"
diff --git a/linkis-web/src/apps/URM/module/udfManagement/index.vue
b/linkis-web/src/apps/URM/module/udfManagement/index.vue
index d99b0d595..a0631260d 100644
--- a/linkis-web/src/apps/URM/module/udfManagement/index.vue
+++ b/linkis-web/src/apps/URM/module/udfManagement/index.vue
@@ -17,7 +17,7 @@
<template>
<div class="function-management">
- <Form class="function-management-searchbar" :model="searchBar" inline>
+ <Form class="function-management-searchbar" @submit.native.prevent
:model="searchBar" inline>
<FormItem prop="functionName" :label="$t('message.linkis.udfName')">
<Input
v-model="searchBar.functionName"
diff --git a/linkis-web/src/apps/linkis/i18n/common/en.json
b/linkis-web/src/apps/linkis/i18n/common/en.json
index c6ebd0aa9..a5c5a56be 100644
--- a/linkis-web/src/apps/linkis/i18n/common/en.json
+++ b/linkis-web/src/apps/linkis/i18n/common/en.json
@@ -154,6 +154,8 @@
"udfFunctionManage": "UDF Management",
"dataSourceManage": "DataSource Manage",
"userResourceManagement": "User Resource Management",
+ "tenantTagManagement": "Tenant Tag Management",
+ "ipListManagement": "White List Management",
"errorCode": "Error Manage",
"gatewayAuthToken": "Token Manage",
"rmExternalResourceProvider": "External Resource Provider Manage",
@@ -175,6 +177,10 @@
"label": " Start Date",
"placeholder": "Please choose the start date"
},
+ "instance": {
+ "label": "Instance",
+ "placeholder": "Please search by entering the instance"
+ },
"creator": {
"label": "Creator",
"placeholder": "Please search by entering the creator"
@@ -327,6 +333,73 @@
"commentValue": "Roll back from version {text}",
"undefinedVersion": "Cannot find the version of DataSource"
},
+ "tenantTagManagement": {
+ "userName": "User Name",
+ "appName": "Application Name",
+ "tenantTag": "Tenant Tag",
+ "search": "Search",
+ "clear": "Clear",
+ "create": "Create",
+ "userCreator": "User-Creator",
+ "createUser": "Create User",
+ "createTime": "Create Time",
+ "desc": "Description",
+ "inputUser": "Please Input User",
+ "inputApp": "Please Input Application",
+ "inputTenant": "Please Input Tenant Tag",
+ "inputDesc": "Please Input Description",
+ "inputCreateUser": "Please Input Creare User",
+ "yourTagMapping": "Your Tag Mapping",
+ "notEmpty": "Cannot be empty",
+ "maxLen": "A maximum of 100 characters is allowed",
+ "contentError": "English, numbers, asterisk and underline only",
+ "contentError1": "English, numbers and underline only",
+ "contentError2": "English, numbers, underscores and dashes only",
+ "check": "Check",
+ "OK": "OK",
+ "Cancel": "Cancel",
+ "action": "Action",
+ "edit": "Edit",
+ "delete": "Delete",
+ "userIsExisted": "User Tag Already Exists",
+ "addSuccessful": "Successfully Addded",
+ "confirmDel": "Confirm Deletion",
+ "isConfirmDel": "Are you sure you want to delete this tag"
+ },
+ "ipListManagement": {
+ "userName": "User Name",
+ "appName": "Application Name",
+ "ipList": "IP List",
+ "search": "Search",
+ "clear": "Clear",
+ "create": "Create",
+ "userCreator": "User-Creator",
+ "createUser": "Create User",
+ "createTime": "Create Time",
+ "desc": "Description",
+ "inputUser": "Please Input User",
+ "inputApp": "Please Input Application",
+ "inputIpList": "Please Input IP List",
+ "inputDesc": "Please Input Description",
+ "inputCreateUser": "Please Input Creare User",
+ "yourTagMapping": "Your Tag Mapping",
+ "notEmpty": "Cannot be empty",
+ "maxLen": "A maximum of 100 characters is allowed",
+ "contentError": "English, numbers, asterisk and underline only",
+ "contentError1": "English, numbers and underline only",
+ "contentError2": "English, numbers, underscores and dashes only",
+ "ipContentError": "Please enter IP addresses in correct
format.(Multiple IP addresses pass through, separate)",
+ "check": "Check",
+ "OK": "OK",
+ "Cancel": "Cancel",
+ "action": "Action",
+ "edit": "Edit",
+ "delete": "Delete",
+ "userIsExisted": "User Tag Already Exists",
+ "addSuccessful": "Successfully Addded",
+ "confirmDel": "Confirm Deletion",
+ "isConfirmDel": "Are you sure you want to delete this tag"
+ },
"basedata": {
"add": "add",
"remove": "remove",
diff --git a/linkis-web/src/apps/linkis/i18n/common/zh.json
b/linkis-web/src/apps/linkis/i18n/common/zh.json
index 6d46ba137..ed1c982d9 100644
--- a/linkis-web/src/apps/linkis/i18n/common/zh.json
+++ b/linkis-web/src/apps/linkis/i18n/common/zh.json
@@ -156,6 +156,8 @@
"functionManagement": "函数管理",
"dataSourceManage": "数据源管理",
"userResourceManagement": "用户资源管理",
+ "tenantTagManagement": "租户标签管理",
+ "ipListManagement": "白名单管理",
"errorCode": "错误码管理",
"gatewayAuthToken": "令牌管理",
"rmExternalResourceProvider": "扩展资源管理",
@@ -177,6 +179,10 @@
"label": "起始时间",
"placeholder": "请选择起始日期"
},
+ "instance": {
+ "label": "实例",
+ "placeholder": "请输入实例"
+ },
"creator": {
"label": "应用",
"placeholder": "请输入应用搜索"
@@ -328,6 +334,73 @@
"used": "可用",
"commentValue": "从版本 {text} 回滚"
},
+ "tenantTagManagement": {
+ "userName": "用户名",
+ "appName": "应用名",
+ "tenantTag": "租户标签",
+ "search": "搜索",
+ "clear": "清空",
+ "create": "新增",
+ "userCreator": "用户-应用",
+ "createUser": "创建人",
+ "createTime": "创建时间",
+ "desc": "业务来源",
+ "inputUser": "请输入用户名",
+ "inputApp": "请输入应用名",
+ "inputTenant": "请输入租户标签",
+ "inputDesc": "请输入业务来源",
+ "inputCreateUser": "请输入创建者",
+ "yourTagMapping": "您的标签映射",
+ "notEmpty": "不能为空",
+ "maxLen": "长度不能超过100",
+ "contentError": "仅限英文、数字、星号和下划线",
+ "contentError1": "仅限英文、数字和下划线",
+ "contentError2": "仅限英文、数字、下划线和横线",
+ "check": "检查",
+ "OK": "确定",
+ "Cancel": "取消",
+ "action": "操作",
+ "edit": "编辑",
+ "delete": "删除",
+ "userIsExisted": "用户标签已存在",
+ "addSuccessful": "添加成功",
+ "confirmDel": "确认删除",
+ "isConfirmDel": "确定要删除这条数据吗"
+ },
+ "ipListManagement": {
+ "userName": "用户名",
+ "appName": "应用名",
+ "ipList": "IP列表",
+ "search": "搜索",
+ "clear": "清空",
+ "create": "新增",
+ "userCreator": "用户-应用",
+ "createUser": "创建人",
+ "createTime": "创建时间",
+ "desc": "业务来源",
+ "inputUser": "请输入用户名",
+ "inputApp": "请输入应用名",
+ "inputIpList": "请输入IP列表",
+ "inputDesc": "请输入业务来源",
+ "inputCreateUser": "请输入创建者",
+ "yourTagMapping": "您的标签映射",
+ "notEmpty": "不能为空",
+ "maxLen": "长度不能超过100",
+ "contentError": "仅限英文、数字、星号和下划线",
+ "contentError1": "仅限英文、数字和下划线",
+ "contentError2": "仅限英文、数字、下划线和横线",
+ "ipContentError": "请输入正确格式的IP地址(多个IP地址通过,分隔)",
+ "check": "检查",
+ "OK": "确定",
+ "Cancel": "取消",
+ "action": "操作",
+ "edit": "编辑",
+ "delete": "删除",
+ "userIsExisted": "用户标签已存在",
+ "addSuccessful": "添加成功",
+ "confirmDel": "确认删除",
+ "isConfirmDel": "确定要删除这条数据吗"
+ },
"basedata": {
"add": "新增",
"remove": "删除",
diff --git a/linkis-web/src/apps/linkis/module/ECM/engineConn.vue
b/linkis-web/src/apps/linkis/module/ECM/engineConn.vue
index 5fb1d28ef..3e0568888 100644
--- a/linkis-web/src/apps/linkis/module/ECM/engineConn.vue
+++ b/linkis-web/src/apps/linkis/module/ECM/engineConn.vue
@@ -414,7 +414,7 @@ export default {
// 添加tag
addEnter (key, value) {
this.formItem.labels.push({ key, value });
-
+
},
// 修改标签
editEnter(editInputKey, editInputValue,editedInputValue) {
diff --git a/linkis-web/src/apps/linkis/module/ECM/index.vue
b/linkis-web/src/apps/linkis/module/ECM/index.vue
index 59cbb58fe..f9487bd38 100644
--- a/linkis-web/src/apps/linkis/module/ECM/index.vue
+++ b/linkis-web/src/apps/linkis/module/ECM/index.vue
@@ -65,7 +65,7 @@
:title="$t('message.linkis.tagEdit')"
v-model="isTagEdit"
:mask-closable="false">
- <Form :label-width="80">
+ <Form :label-width="80" @submit.native.prevent>
<FormItem :label="`${$t('message.linkis.instanceName')}:`">
<Input disabled v-model="formItem.instance" />
</FormItem>
diff --git
a/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.scss
b/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.scss
index f9898b0f2..e84322197 100644
--- a/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.scss
+++ b/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.scss
@@ -22,17 +22,21 @@
justify-content: flex-start;
align-items: center;
font-size: $font-size-base;
-
- .lable {
- width: 180px;
- // flex-basis: 130px;
- text-align: right;
+ .search-item {
+ display: flex;
+ justify-items: center;
+ .lable {
+ width: 180px;
+ // flex-basis: 130px;
+ text-align: right;
+ }
}
+
}
.ivu-col {
display: flex;
- justify-content: center;
+ justify-content: flex-start;
}
}
diff --git a/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.vue
b/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.vue
index d7d073a92..7cb543a2f 100644
--- a/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.vue
+++ b/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.vue
@@ -90,26 +90,30 @@
</div>
</div>
</Modal>
- <Row class="search-bar" type="flex" justify="space-around">
- <Col>
- <span class="lable"
:title="$t('message.linkis.EnginePluginManagement.engineConnType')">{{
$t('message.linkis.EnginePluginManagement.engineConnType') }}</span>
- <Select v-model="ecType" clearable>
- <Option
- v-for="(item) in typeList"
- :label="item"
- :value="item"
- :key="item"/>
- </Select>
+ <Row class="search-bar" type="flex" justify="flex-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 class="lable"
:title="$t('message.linkis.EnginePluginManagement.engineConnVersion')">{{
$t('message.linkis.EnginePluginManagement.engineConnVersion') }}</span>
- <Select v-model="version" clearable>
- <Option
- v-for="(item) in typeVersionList"
- :label="item"
- :value="item"
- :key="item"/>
- </Select>
+ <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" :style="{width: '60px', marginRight: '5px',
padding: '5px'}" @click="resetSearch">{{
@@ -184,27 +188,23 @@ export default {
{
title: "ID",
key: 'id',
- width: 60,
tooltip: true,
align: 'center',
},
{
title:
this.$t('message.linkis.EnginePluginManagement.engineConnType'),
key: 'engineConnType',
- width: 120,
tooltip: true,
align: 'center',
},
{
title:
this.$t('message.linkis.EnginePluginManagement.engineConnVersion'),
key: 'version',
- width: 120,
align: 'center',
},
{
title: this.$t('message.linkis.EnginePluginManagement.fileName'),
key: 'fileName',
- width: 120,
tooltip: true,
align: 'center',
},
@@ -212,48 +212,41 @@ export default {
title: this.$t('message.linkis.EnginePluginManagement.fileSize'),
key: 'fileSize',
tooltip: true,
- width: 120,
align: 'center',
},
{
title: this.$t('message.linkis.EnginePluginManagement.lastModified'),
key: 'lastModified',
tooltip: true,
- width: 120,
align: 'center',
},
{
title:
this.$t('message.linkis.EnginePluginManagement.bmlResourceId'),
key: 'bmlResourceId',
tooltip: true,
- width: 120,
align: 'center',
},
{
title:
this.$t('message.linkis.EnginePluginManagement.bmlResourceVersion'),
key: 'bmlResourceVersion',
slot: 'bmlResourceVersion',
- width: 120,
tooltip: true,
align: 'center',
},
{
title:
this.$t('message.linkis.EnginePluginManagement.lastUpdateTime'),
key: 'lastUpdateTime',
- width: 120,
tooltip: true,
align: 'center',
},
{
title: this.$t('message.linkis.EnginePluginManagement.createTime'),
key: 'createTime',
- width: 120,
tooltip: true,
align: 'center',
},
{
title: this.$t('message.linkis.EnginePluginManagement.action'),
- width: 120,
slot: 'action',
align: 'center',
},
diff --git
a/linkis-web/src/apps/linkis/module/datasource/datasourceForm/index.vue
b/linkis-web/src/apps/linkis/module/datasource/datasourceForm/index.vue
index f30fa1a08..4776c8c70 100644
--- a/linkis-web/src/apps/linkis/module/datasource/datasourceForm/index.vue
+++ b/linkis-web/src/apps/linkis/module/datasource/datasourceForm/index.vue
@@ -33,7 +33,7 @@ import { getKeyDefine, getDataSourceByIdAndVersion } from
'../dataSourceApi'
const type = {
TEXT: { type: 'input' },
- NUMBER: { type: 'input', props: { type: 'number' } },
+ NUMBER: { type: 'input', props: { type: 'number', } },
PASSWORD: { type: 'input', props: { type: 'password' } },
EMAIL: { type: 'input', props: { type: 'email' } },
DATE: { type: 'input', props: { type: 'date' } },
@@ -149,6 +149,7 @@ const typesMap = {
export default {
props: {
data: Object,
+ type: String,
},
data() {
return {
@@ -166,7 +167,7 @@ export default {
field: 'dataSourceName',
value: '',
props: {
- placeholder: this.$t('message.linkis.datasource.sourceName'),
+ placeholder: this.$t('message.linkis.datasource.sourceName')
},
validate: [
{
@@ -184,7 +185,7 @@ export default {
field: 'dataSourceDesc',
value: '',
props: {
- placeholder: this.$t('message.linkis.datasource.sourceDec'),
+ placeholder: this.$t('message.linkis.datasource.sourceDec')
},
},
{
@@ -193,7 +194,7 @@ export default {
field: 'labels',
value: '',
props: {
- placeholder: this.$t('message.linkis.datasource.label'),
+ placeholder: this.$t('message.linkis.datasource.label')
},
},
],
@@ -303,6 +304,10 @@ export default {
}
}
this.rule = this.rule.concat(tempData)
+ let disabled = this.type === this.$t('message.linkis.datasource.watch')
+ this.rule.forEach((item) => {
+ item.props.disabled = disabled;
+ })
return tempData
},
},
diff --git a/linkis-web/src/apps/linkis/module/datasource/index.vue
b/linkis-web/src/apps/linkis/module/datasource/index.vue
index ab0892b6e..bc3843713 100644
--- a/linkis-web/src/apps/linkis/module/datasource/index.vue
+++ b/linkis-web/src/apps/linkis/module/datasource/index.vue
@@ -87,6 +87,7 @@
:data="currentSourceData"
ref="datasourceForm"
v-if="showDataSource && currentStep === 1"
+ :type="actionType"
/>
<div slot="footer">
diff --git
a/linkis-web/src/apps/linkis/module/globalHistoryManagement/index.vue
b/linkis-web/src/apps/linkis/module/globalHistoryManagement/index.vue
index 64d8a4d0a..b637d4201 100644
--- a/linkis-web/src/apps/linkis/module/globalHistoryManagement/index.vue
+++ b/linkis-web/src/apps/linkis/module/globalHistoryManagement/index.vue
@@ -48,6 +48,14 @@
: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"
@@ -374,7 +382,8 @@ export default {
pageNow: page || this.pageSetting.current,
pageSize: this.pageSetting.pageSize,
proxyUser: this.searchBar.proxyUser,
- isAdminView: this.isAdminModel
+ isAdminView: this.isAdminModel,
+ instance: this.searchBar.instance
}
if (!this.isAdminModel) {
delete params.proxyUser
@@ -386,6 +395,7 @@ export default {
delete params.startDate
delete params.endDate
delete params.proxyUser
+ delete params.instance
} else {
let { engine, status, shortcut } = this.searchBar
if (engine === 'all') {
diff --git
a/linkis-web/src/apps/linkis/module/globalHistoryManagement/viewHistory.vue
b/linkis-web/src/apps/linkis/module/globalHistoryManagement/viewHistory.vue
index 8e72bda69..f7c828c77 100644
--- a/linkis-web/src/apps/linkis/module/globalHistoryManagement/viewHistory.vue
+++ b/linkis-web/src/apps/linkis/module/globalHistoryManagement/viewHistory.vue
@@ -428,5 +428,8 @@ export default {
top: 0;
right: 20px;
}
+/deep/ .table-div {
+ height: 100% !important;
+}
</style>
diff --git
a/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.scss
b/linkis-web/src/apps/linkis/module/ipListManagement/index.js
similarity index 62%
copy from linkis-web/src/apps/linkis/module/EnginePluginManagement/index.scss
copy to linkis-web/src/apps/linkis/module/ipListManagement/index.js
index f9898b0f2..5ccbc651e 100644
--- a/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.scss
+++ b/linkis-web/src/apps/linkis/module/ipListManagement/index.js
@@ -5,46 +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';
+
-.search-bar {
- .search-item11 {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- font-size: $font-size-base;
-
- .lable {
- width: 180px;
- // flex-basis: 130px;
- text-align: right;
- }
- }
-
- .ivu-col {
- display: flex;
- justify-content: center;
- }
-
-}
-
-.table-content {
- margin-top: 25px;
-}
-
-
-.modal {
- .footer {
- display: flex;
- justify-content: space-between;
- }
-}
+export default {
+ name: 'ipListManagement',
+ 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/ipListManagement/index.scss
similarity index 79%
copy from linkis-web/src/apps/linkis/module/EnginePluginManagement/index.scss
copy to linkis-web/src/apps/linkis/module/ipListManagement/index.scss
index f9898b0f2..29be39de7 100644
--- a/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.scss
+++ b/linkis-web/src/apps/linkis/module/ipListManagement/index.scss
@@ -5,46 +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;
-
.lable {
- width: 180px;
- // flex-basis: 130px;
- text-align: right;
+ flex-basis: 120px;
+ text-align: center;
}
}
-
- .ivu-col {
- display: flex;
- justify-content: center;
+ .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/ipListManagement/index.vue
b/linkis-web/src/apps/linkis/module/ipListManagement/index.vue
new file mode 100644
index 000000000..e587d386a
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/ipListManagement/index.vue
@@ -0,0 +1,465 @@
+<!--
+ ~ 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 :style="{minWidth: '40px', textOverflow: 'ellipsis', whiteSpace:
'nowrap', overflow: 'hidden', marginRight: '5px', fontSize: '14px', lineHeight:
'32px'}">{{$t('message.linkis.ipListManagement.userName')}}</span>
+ <Input
+ v-model="queryData.user"
+ class="input"
+ :placeholder="$t('message.linkis.ipListManagement.inputUser')"
+ @on-enter="search"
+ ></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>
+ <Input
+ v-model="queryData.creator"
+ class="input"
+ :placeholder="$t('message.linkis.ipListManagement.inputApp')"
+ @on-enter="search"
+ ></Input>
+ </Col>
+ <Col span="9">
+ <Button type="primary" class="button" :style="{width: '70px',
marginRight: '5px', marginLeft: '5px', padding: '5px'}" @click="search">{{
+ $t('message.linkis.ipListManagement.search')
+ }}</Button>
+ <Button type="primary" class="button" :style="{width: '70px',
marginRight: '5px', marginLeft: '5px', padding: '5px'}" @click="clearSearch">{{
+ $t('message.linkis.ipListManagement.clear')
+ }}</Button>
+ <Button type="primary" 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"
+ @on-change="changePage"
+ size="small"
+ show-elevator
+ :prev-text="$t('message.linkis.previousPage')"
:next-text="$t('message.linkis.nextPage')"
+ style="margin: 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="70" :rules="modalDataRule">
+ <FormItem :label="$t('message.linkis.ipListManagement.userName')"
prop="user">
+ <Input class="input" v-model="modalData.user"
@on-change="handleChange" style="width: 319px"></Input>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.ipListManagement.appName')"
prop="creator">
+ <Input class="input" v-model="modalData.creator"
@on-change="handleChange" style="width: 319px"></Input>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.ipListManagement.ipList')"
prop="ipList">
+ <Input class="input" v-model="modalData.ipList" style="width:
319px"></Input>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.ipListManagement.createUser')"
prop="bussinessUser">
+ <Input class="input" v-model="modalData.bussinessUser"
style="width: 319px"></Input>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.ipListManagement.desc')"
prop="desc">
+ <Input class="input" v-model="modalData.desc" style="width:
319px"></Input>
+ </FormItem>
+ </Form>
+ <div style="margin-top: 60px">
+ <span style="width: 60px">{{
$t('message.linkis.ipListManagement.yourTagMapping') }}</span>
+ <Input class="input" v-model="mapping" style="width: 240px;
margin-left: 10px" disabled></Input>
+ <Button type="primary" @click="checkUserTag" style="margin-left:
10px">{{$t('message.linkis.ipListManagement.check')}}</Button>
+ </div>
+ </div>
+ <div slot="footer">
+ <Button
@click="cancel">{{$t('message.linkis.ipListManagement.Cancel')}}</Button>
+ <Button type="primary" :disabled="tagIsExist"
@click="addTenantTag">{{$t('message.linkis.ipListManagement.OK')}}</Button>
+ </div>
+ </Modal>
+ </div>
+</template>
+<script>
+import storage from "@/common/helper/storage";
+import api from '@/common/service/api'
+export default {
+ name: 'ipListManagement',
+ data() {
+ return {
+ loading: false,
+ queryData: {
+ user: '',
+ creator: ''
+ },
+ confirmQuery: {
+ user: '',
+ creator: '',
+ },
+ tableColumns: [
+ {
+ title: "ID",
+ key: 'id',
+ width: 150,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.ipListManagement.userCreator'),
+ key: 'userCreator',
+ width: 350,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.ipListManagement.ipList'),
+ key: 'ipList',
+ width: 350,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.ipListManagement.createUser'),
+ key: 'bussinessUser',
+ width: 350,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.ipListManagement.createTime'),
+ key: 'createTime',
+ width: 245,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ 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: {
+ user: '',
+ creator: '',
+ ipList: '',
+ bussinessUser: '',
+ desc: ''
+ },
+ 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.contentError1'), type: 'string'}
+ ],
+ ipList: [
+ {required: true, message:
this.$t('message.linkis.ipListManagement.notEmpty'), trigger: 'blur'},
+ {validator: this.ipListValidator, trigger: 'blur'}
+ ],
+ bussinessUser: [
+ {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'}
+ ],
+ desc: [
+ {required: true, message:
this.$t('message.linkis.tenantTagManagement.notEmpty'), trigger: 'blur'},
+ {type: 'string', max: 100, message:
this.$t('message.linkis.ipListManagement.maxLen')}
+ ]
+ },
+ tagIsExist: true,
+ mode: 'create',
+ editData: {},
+ page: {
+ pageSize: 10,
+ pageNow: 1,
+ totalPage: 0,
+ },
+ userName: '',
+ }
+ },
+ computed: {
+ mapping () {
+ return (this.modalData.user || 'user') + '-' + (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;
+ await api.fetch("/configuration/user-ip-mapping/query-user-ip-list",
params, "get")
+ .then((res) => {
+ this.datalist = res.userIpList.map((item) => {
+ item.userCreator = item.user + "-" + item.creator;
+ item.createTime = new Date(item.createTime).toLocaleString();
+ return item;
+ })
+ this.page.totalPage = res.totalPage;
+ })
+ this.tableLoading = false;
+ } catch(err) {
+ console.log(err);
+ this.tableLoading = false;
+ }
+
+ },
+ 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'
+ this.modalData.bussinessUser = this.userName;
+ },
+ async checkUserTag() {
+ this.$refs.createTenantForm.validate(async (valid) => {
+ if(valid) {
+ const {user, creator} = this.modalData;
+ if(this.mode === 'edit' && user === this.editData.user && creator
=== this.editData.creator) {
+ this.tagIsExist = false;
+ return;
+ }
+ try {
+ await
api.fetch("/configuration/user-ip-mapping/check-user-creator",
+ {
+ user,
+ creator
+ }, "get").then((res) => {
+ if (res.exist) {
+
this.$Message.error(this.$t('message.linkis.ipListManagement.userIsExisted'))
+ }
+ this.tagIsExist = res.exist;
+ })
+ } catch (err) {
+ console.log(err);
+ this.cancel();
+ }
+ }
+ else {
+ this.$Message.error(this.$t('message.linkis.error.validate'));
+ }
+ })
+ },
+ cancel() {
+ this.showCreateModal = false;
+ this.tagIsExist = true;
+ this.modalData = {
+ user: '',
+ creator: '',
+ ipList: '',
+ bussinessUser: '',
+ desc: ''
+ }
+ this.editData = {
+ user: '',
+ creator: '',
+ ipList: '',
+ bussinessUser: '',
+ desc: ''
+ }
+ },
+ addTenantTag() {
+ const target = this.mode === 'edit' ?
'/configuration/user-ip-mapping/update-user-ip' :
'/configuration/user-ip-mapping/create-user-ip'
+ this.$refs.createTenantForm.validate(async (valid) => {
+ if(valid) {
+ this.clearSearch();
+ try {
+ if(this.mode !== 'edit') {
+ this.page.pageNow = 1;
+ }
+ await api.fetch(target, this.modalData, "post").then(async (res)
=> {
+ console.log(res);
+ await this.getTableData();
+ this.cancel();
+
this.$Message.success(this.$t('message.linkis.ipListManagement.addSuccessful'));
+ });
+ } catch(err) {
+ this.cancel();
+ console.log(err);
+ }
+ } else {
+ this.$Message.error(this.$t('message.linkis.error.validate'));
+ }
+ })
+
+ },
+ edit(data) {
+ const {
+ id, user, creator, ipList, bussinessUser, desc
+ } = data
+ this.modalData = {
+ id, user, creator, ipList, bussinessUser, desc
+ };
+ this.editData = {
+ id, user, creator, ipList, bussinessUser, desc
+ }
+ this.showCreateModal = true;
+ this.mode = 'edit';
+ },
+ delete(data) {
+ this.$Modal.confirm({
+ title: this.$t('message.linkis.ipListManagement.confirmDel'),
+ content: this.$t('message.linkis.ipListManagement.isConfirmDel'),
+ onOk: async () => {
+ await this.confirmDelete(data);
+ await this.getTableData();
+ },
+ onCancel: () => {
+ console.log('cancel');
+ }
+ })
+ },
+ async confirmDelete(data) {
+ try {
+ await api.fetch('configuration/user-ip-mapping/delete-user-ip', {id:
data.id}, 'get');
+ } catch(err) {
+ console.log(err);
+ }
+ },
+ async handleChange() {
+ this.tagIsExist = true;
+ },
+ 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 } = this.queryData;
+ this.confirmQuery = { user, creator };
+ this.page.pageNow = 1;
+ await this.getTableData()
+ }
+ },
+ 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);
+ }
+ }
+ }
+}
+
+</style>
+<style lang="scss">
+.ivu-tooltip-popper {
+ .ivu-tooltip-content {
+ .ivu-tooltip-inner-with-width {
+ word-wrap: break-word;
+ }
+ }
+}
+
+</style>
\ No newline at end of file
diff --git a/linkis-web/src/apps/linkis/module/resourceManagement/index.vue
b/linkis-web/src/apps/linkis/module/resourceManagement/index.vue
index c18edb96a..e813ad014 100644
--- a/linkis-web/src/apps/linkis/module/resourceManagement/index.vue
+++ b/linkis-web/src/apps/linkis/module/resourceManagement/index.vue
@@ -557,7 +557,10 @@ export default {
const yarnType = type === 'memory' ? 'queueMemory' : 'queueCores'
data = row[field].DriverAndYarnResource.yarnResource[yarnType]
} else {
- data = row[field].DriverAndYarnResource.loadInstanceResource[type]
+ // if(type === 'instance') {
+ // type = instances;
+ // }
+ data = row[field].DriverAndYarnResource.loadInstanceResource[type]
|| row[field].DriverAndYarnResource.loadInstanceResource['instances']
}
}
if (type === 'memory' && data !== ' -- ') {
diff --git
a/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.scss
b/linkis-web/src/apps/linkis/module/tenantTagManagement/index.js
similarity index 62%
copy from linkis-web/src/apps/linkis/module/EnginePluginManagement/index.scss
copy to linkis-web/src/apps/linkis/module/tenantTagManagement/index.js
index f9898b0f2..32620a784 100644
--- a/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.scss
+++ b/linkis-web/src/apps/linkis/module/tenantTagManagement/index.js
@@ -5,46 +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';
+
-.search-bar {
- .search-item11 {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- font-size: $font-size-base;
-
- .lable {
- width: 180px;
- // flex-basis: 130px;
- text-align: right;
- }
- }
-
- .ivu-col {
- display: flex;
- justify-content: center;
- }
-
-}
-
-.table-content {
- margin-top: 25px;
-}
-
-
-.modal {
- .footer {
- display: flex;
- justify-content: space-between;
- }
-}
+export default {
+ name: 'tenantTagManagement',
+ 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/tenantTagManagement/index.scss
similarity index 79%
copy from linkis-web/src/apps/linkis/module/EnginePluginManagement/index.scss
copy to linkis-web/src/apps/linkis/module/tenantTagManagement/index.scss
index f9898b0f2..29be39de7 100644
--- a/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.scss
+++ b/linkis-web/src/apps/linkis/module/tenantTagManagement/index.scss
@@ -5,46 +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;
-
.lable {
- width: 180px;
- // flex-basis: 130px;
- text-align: right;
+ flex-basis: 120px;
+ text-align: center;
}
}
-
- .ivu-col {
- display: flex;
- justify-content: center;
+ .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/tenantTagManagement/index.vue
b/linkis-web/src/apps/linkis/module/tenantTagManagement/index.vue
new file mode 100644
index 000000000..3dd5ebb8e
--- /dev/null
+++ b/linkis-web/src/apps/linkis/module/tenantTagManagement/index.vue
@@ -0,0 +1,454 @@
+<!--
+ ~ 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 :style="{minWidth: '40px', textOverflow: 'ellipsis', whiteSpace:
'nowrap', overflow: 'hidden', marginRight: '5px', fontSize: '14px', lineHeight:
'32px'}">{{$t('message.linkis.tenantTagManagement.userName')}}</span>
+ <Input
+ v-model="queryData.user"
+ class="input"
+ :placeholder="$t('message.linkis.tenantTagManagement.inputUser')"
+ @on-enter="search"
+ ></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>
+ <Input
+ v-model="queryData.creator"
+ class="input"
+ :placeholder="$t('message.linkis.tenantTagManagement.inputApp')"
+ @on-enter="search"
+ ></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.tenantTag')}}</span>
+ <Input
+ v-model="queryData.tenantValue"
+ class="input"
+ :placeholder="$t('message.linkis.tenantTagManagement.inputTenant')"
+ @on-enter="search"
+ ></Input>
+ </Col>
+ <Col span="6">
+ <Button type="primary" class="button" :style="{width: '70px',
marginRight: '5px', marginLeft: '5px', padding: '5px'}" @click="search">{{
+ $t('message.linkis.tenantTagManagement.search')
+ }}</Button>
+ <Button type="primary" class="button" :style="{width: '70px',
marginRight: '5px', marginLeft: '5px', padding: '5px'}" @click="clearSearch">{{
+ $t('message.linkis.tenantTagManagement.clear')
+ }}</Button>
+ <Button type="primary" class="button" :style="{width: '70px',
marginRight: '5px', marginLeft: '5px', padding: '5px'}" @click="createTenant">{{
+ $t('message.linkis.tenantTagManagement.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
+ :prev-text="$t('message.linkis.previousPage')"
:next-text="$t('message.linkis.nextPage')"
+ style="margin: 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="70" :rules="modalDataRule">
+ <FormItem :label="$t('message.linkis.tenantTagManagement.userName')"
prop="user">
+ <Input class="input" v-model="modalData.user"
@on-change="handleChange" style="width: 319px"></Input>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.tenantTagManagement.appName')"
prop="creator">
+ <Input class="input" v-model="modalData.creator"
@on-change="handleChange" style="width: 319px"></Input>
+ </FormItem>
+ <FormItem
:label="$t('message.linkis.tenantTagManagement.tenantTag')" prop="tenantValue">
+ <Input class="input" v-model="modalData.tenantValue" style="width:
319px"></Input>
+ </FormItem>
+ <FormItem
:label="$t('message.linkis.tenantTagManagement.createUser')"
prop="bussinessUser">
+ <Input class="input" v-model="modalData.bussinessUser"
style="width: 319px"></Input>
+ </FormItem>
+ <FormItem :label="$t('message.linkis.tenantTagManagement.desc')"
prop="desc">
+ <Input class="input" v-model="modalData.desc" style="width:
319px"></Input>
+ </FormItem>
+ </Form>
+ <div style="margin-top: 60px">
+ <span style="width: 60px">{{
$t('message.linkis.tenantTagManagement.yourTagMapping') }}</span>
+ <Input class="input" v-model="mapping" style="width: 240px;
margin-left: 10px" disabled></Input>
+ <Button type="primary" @click="checkUserTag" style="margin-left:
10px">{{$t('message.linkis.tenantTagManagement.check')}}</Button>
+ </div>
+ </div>
+ <div slot="footer">
+ <Button
@click="cancel">{{$t('message.linkis.tenantTagManagement.Cancel')}}</Button>
+ <Button type="primary" :disabled="tagIsExist"
@click="addTenantTag">{{$t('message.linkis.tenantTagManagement.OK')}}</Button>
+ </div>
+ </Modal>
+ </div>
+</template>
+<script>
+import storage from "@/common/helper/storage";
+import api from '@/common/service/api'
+export default {
+ name: 'tenantTagManagement',
+ data() {
+ return {
+ loading: false,
+ queryData: {
+ user: '',
+ creator: '',
+ tenantValue: '',
+ },
+ confirmQuery: {
+ user: '',
+ creator: '',
+ tenantValue: '',
+ },
+ tableColumns: [
+ {
+ title: "ID",
+ key: 'id',
+ width: 150,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.tenantTagManagement.userCreator'),
+ key: 'userCreator',
+ width: 350,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.tenantTagManagement.tenantTag'),
+ key: 'tenantValue',
+ width: 350,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.tenantTagManagement.createUser'),
+ key: 'bussinessUser',
+ width: 350,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.tenantTagManagement.createTime'),
+ key: 'createTime',
+ width: 245,
+ tooltip: true,
+ align: 'center',
+ },
+ {
+ title: this.$t('message.linkis.tenantTagManagement.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.tenantTagManagement.edit')),
+ h('Button', {
+ props: {
+ type: 'error',
+ size: 'small'
+ },
+ on: {
+ click: () => {
+ this.delete(params.row)
+ }
+ }
+ }, this.$t('message.linkis.tenantTagManagement.delete'))
+ ]);
+ }
+ }
+ ],
+ datalist: [],
+ tableLoading: false,
+ showCreateModal: false,
+ modalData: {
+ user: '',
+ creator: '',
+ tenantValue: '',
+ bussinessUser: '',
+ desc: ''
+ },
+ modalDataRule: {
+ user: [
+ {required: true, message:
this.$t('message.linkis.tenantTagManagement.notEmpty'), trigger: 'blur'},
+ {pattern: /^[0-9a-zA-Z_\*]+$/, message:
this.$t('message.linkis.tenantTagManagement.contentError'), type: 'string'}
+ ],
+ creator: [
+ {required: true, message:
this.$t('message.linkis.tenantTagManagement.notEmpty'), trigger: 'blur'},
+ {pattern: /^[0-9a-zA-Z_]+$/, message:
this.$t('message.linkis.tenantTagManagement.contentError1'), type: 'string'}
+ ],
+ tenantValue: [
+ {required: true, message:
this.$t('message.linkis.tenantTagManagement.notEmpty'), trigger: 'blur'},
+ {pattern: /^[0-9a-zA-Z_\*\-]+$/, message:
this.$t('message.linkis.tenantTagManagement.contentError2'), type: 'string'}
+ ],
+ bussinessUser: [
+ {required: true, message:
this.$t('message.linkis.tenantTagManagement.notEmpty'), trigger: 'blur'},
+ {pattern: /^[0-9a-zA-Z_]+$/, message:
this.$t('message.linkis.tenantTagManagement.contentError1'), type: 'string'}
+ ],
+ desc: [
+ {required: true, message:
this.$t('message.linkis.tenantTagManagement.notEmpty'), trigger: 'blur'},
+ {type: 'string', max: 100, message:
this.$t('message.linkis.tenantTagManagement.maxLen')}
+ ]
+ },
+ tagIsExist: true,
+ mode: 'create',
+ // 缓存,用于校验
+ editData: {},
+ page: {
+ pageSize: 10,
+ pageNow: 1,
+ totalPage: 0,
+ },
+ userName: '',
+ }
+ },
+ computed: {
+ mapping () {
+ return (this.modalData.user || 'user') + '-' + (this.modalData.creator
|| 'creator') + ' --> ' + (this.modalData.tenantValue || 'tenant')
+ }
+ },
+ 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;
+ await api.fetch("/configuration/tenant-mapping/query-tenant-list",
params, "get")
+ .then((res) => {
+ this.datalist = res.tenantList.map((item) => {
+ item.userCreator = item.user + "-" + item.creator;
+ item.createTime = new Date(item.createTime).toLocaleString();
+ return item;
+ });
+ this.page.totalPage = res.totalPage;
+ })
+ this.tableLoading = false;
+ } catch(err) {
+ console.log(err);
+ this.tableLoading = false;
+ }
+
+ },
+ async init() {
+ this.loading = true;
+ await this.getTableData();
+ this.loading = false;
+ },
+ async clearSearch() {
+ this.queryData = {
+ user: '',
+ creator: '',
+ tenantValue: '',
+ };
+ this.confirmQuery = {
+ user: '',
+ creator: ''
+ }
+ this.page.pageNow = 1;
+ await this.getTableData()
+ },
+ async createTenant () {
+ this.showCreateModal = true;
+ this.mode = 'create';
+ this.modalData.bussinessUser = this.userName;
+ },
+ async checkUserTag() {
+ this.$refs.createTenantForm.validate(async (valid) => {
+ if(valid) {
+ const {user, creator} = this.modalData;
+ if(this.mode === 'edit' && user === this.editData.user && creator
=== this.editData.creator) {
+ this.tagIsExist = false;
+ return;
+ }
+ try {
+ await api.fetch("/configuration/tenant-mapping/check-user-creator",
+ {
+ user,
+ creator
+ }, "get").then((res) => {
+ if (res.exist) {
+
this.$Message.error(this.$t('message.linkis.tenantTagManagement.userIsExisted'))
+ }
+ this.tagIsExist = res.exist;
+ })
+ } catch (err) {
+ console.log(err);
+ this.cancel();
+ }
+ }
+ else {
+ this.$Message.error(this.$t('message.linkis.error.validate'));
+ }
+ })
+ },
+ cancel() {
+ this.showCreateModal = false;
+ this.tagIsExist = true;
+ this.modalData = {
+ user: '',
+ creator: '',
+ tenantValue: '',
+ bussinessUser: '',
+ desc: ''
+ };
+ this.editData = {
+ user: '',
+ creator: '',
+ tenantValue: '',
+ bussinessUser: '',
+ desc: ''
+ };
+ this.$refs.createTenantForm.resetFields();
+ },
+ addTenantTag() {
+ const target = this.mode === 'edit' ?
'/configuration/tenant-mapping/update-tenant' :
'/configuration/tenant-mapping/create-tenant'
+ this.$refs.createTenantForm.validate(async (valid) => {
+ if(valid) {
+ this.clearSearch();
+ try {
+ if(this.mode !== 'edit') {
+ this.page.pageNow = 1;
+ }
+ await api.fetch(target, this.modalData, "post").then(async (res)
=> {
+ console.log(res);
+ await this.getTableData();
+ this.cancel();
+
this.$Message.success(this.$t('message.linkis.tenantTagManagement.addSuccessful'));
+ });
+ } catch(err) {
+ this.cancel();
+ console.log(err);
+ }
+ } else {
+ this.$Message.error(this.$t('message.linkis.error.validate'));
+ }
+ })
+
+ },
+ edit(data) {
+ const {
+ id, user, creator, tenantValue, bussinessUser, desc
+ } = data
+ this.modalData = {
+ id, user, creator, tenantValue, bussinessUser, desc
+ };
+ this.editData = {
+ id, user, creator, tenantValue, bussinessUser, desc
+ };
+ this.showCreateModal = true;
+ this.mode = 'edit';
+ },
+ delete(data) {
+ this.$Modal.confirm({
+ title: this.$t('message.linkis.tenantTagManagement.confirmDel'),
+ content: this.$t('message.linkis.tenantTagManagement.isConfirmDel'),
+ onOk: async () => {
+ await this.confirmDelete(data);
+ await this.getTableData();
+ },
+ onCancel: () => {
+ console.log('cancel');
+ }
+ })
+ },
+ async confirmDelete(data) {
+ try {
+ await api.fetch('configuration/tenant-mapping/delete-tenant', {id:
data.id}, 'get');
+ } catch(err) {
+ console.log(err);
+ }
+ },
+ async handleChange() {
+ this.tagIsExist = true;
+ },
+ async changePage(val) {
+ this.page.pageNow = val;
+ await this.getTableData();
+ },
+ async search() {
+ const { user, creator, tenantValue } = this.queryData;
+ this.confirmQuery = { user, creator, tenantValue };
+ this.page.pageNow = 1;
+ await this.getTableData()
+ }
+ },
+ 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);
+ }
+ }
+ }
+}
+
+</style>
\ No newline at end of file
diff --git a/linkis-web/src/apps/linkis/router.js
b/linkis-web/src/apps/linkis/router.js
index 5adabb6e1..2fd6d1667 100644
--- a/linkis-web/src/apps/linkis/router.js
+++ b/linkis-web/src/apps/linkis/router.js
@@ -158,6 +158,16 @@ export default [
publicPage: true,
},
},
+ {
+ name: 'tenantTagManagement',
+ path: 'tenantTagManagement',
+ component: () =>
+ import('./module/tenantTagManagement/index.vue'),
+ meta: {
+ title: 'tenantTagManagement',
+ publicPage: true,
+ }
+ },
{
name: 'errorCode',
path: 'errorCode',
@@ -168,6 +178,16 @@ export default [
publicPage: true,
},
},
+ {
+ name: 'ipListManagement',
+ path: 'ipListManagement',
+ component: () =>
+ import('./module/ipListManagement/index.vue'),
+ meta: {
+ title: 'ipListManagement',
+ publicPage: true,
+ },
+ },
{
name: 'gatewayAuthToken',
path: 'gatewayAuthToken',
diff --git a/linkis-web/src/apps/linkis/view/linkis/index.vue
b/linkis-web/src/apps/linkis/view/linkis/index.vue
index 4b28b4722..298a3e4d2 100644
--- a/linkis-web/src/apps/linkis/view/linkis/index.vue
+++ b/linkis-web/src/apps/linkis/view/linkis/index.vue
@@ -35,7 +35,7 @@
:key="index2"
@on-click="handleCellClick">
<Cell
- v-if="!isLogAdmin? (item.path !=='/console/ECM')&&(item.path
!=='/console/microService')&&item.key !== '1-11':true"
+ v-if="!isLogAdmin? (item.path !=='/console/ECM')&&(item.path
!=='/console/microService')&&(item.key !== '1-10'):true"
:key="index2"
:class="{ crrentItem: crrentItem === item.key }"
:title="item.name"
@@ -43,11 +43,11 @@
<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-11')" type="ios-arrow-down"
class="user-icon"/>
- <Icon v-show="!item.showSubMenu && (item.key === '1-8' ||
item.key === '1-9' || item.key === '1-11')" type="ios-arrow-up"
class="user-icon"/>
+ <Icon v-show="item.showSubMenu && (item.key === '1-8' ||
item.key === '1-9' || item.key === '1-10')" type="ios-arrow-down"
class="user-icon"/>
+ <Icon v-show="!item.showSubMenu && (item.key === '1-8' ||
item.key === '1-9' || item.key === '1-10')" type="ios-arrow-up"
class="user-icon"/>
</div>
</div>
- <div v-if="(item.key === '1-8' || item.key === '1-9' || item.key
=== '1-11') && !item.showSubMenu">
+ <div v-if="(item.key === '1-8' || item.key === '1-9' || item.key
=== '1-10') && !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)"
@@ -114,7 +114,7 @@ export default {
{ key: '1-7', name:
this.$t('message.linkis.sideNavList.function.children.microserviceManage'),
path: '/console/microService' },
{ key: '1-8', name:
this.$t('message.linkis.sideNavList.function.children.dataSourceManage'),
showSubMenu: true },
{ key: '1-9', name:
this.$t('message.linkis.sideNavList.function.children.udfFunctionTitle'), path:
'/console/urm/udfManagement', showSubMenu: true},
- { key: '1-11', name:
this.$t('message.linkis.sideNavList.function.children.basedataManagement'),
showSubMenu: true},
+ { key: '1-10', name:
this.$t('message.linkis.sideNavList.function.children.basedataManagement'),
showSubMenu: true},
],
},
datasourceNavList: {
@@ -135,10 +135,13 @@ export default {
padding: 0,
icon: 'ios-options',
children: [
- {key: '1-11-1', name:
this.$t('message.linkis.sideNavList.function.children.gatewayAuthToken'), path:
'/console/gatewayAuthToken'},
- {key: '1-11-2', name:
this.$t('message.linkis.sideNavList.function.children.errorCode'), path:
'/console/errorCode' },
- {key: '1-11-3', name:
this.$t('message.linkis.sideNavList.function.children.rmExternalResourceProvider'),
path: '/console/rmExternalResourceProvider'},
- {key: '1-11-4', name:
this.$t('message.linkis.sideNavList.function.children.EnginePluginManagement'),
path: '/console/EnginePluginManagement' },
+ {key: '1-10-1', name:
this.$t('message.linkis.sideNavList.function.children.gatewayAuthToken'), path:
'/console/gatewayAuthToken'},
+ {key: '1-10-2', name:
this.$t('message.linkis.sideNavList.function.children.errorCode'), path:
'/console/errorCode' },
+ {key: '1-10-3', name:
this.$t('message.linkis.sideNavList.function.children.rmExternalResourceProvider'),
path: '/console/rmExternalResourceProvider'},
+ {key: '1-10-4', name:
this.$t('message.linkis.sideNavList.function.children.EnginePluginManagement'),
path: '/console/EnginePluginManagement' },
+ {key: '1-10-5', name:
this.$t('message.linkis.sideNavList.function.children.tenantTagManagement'),
path: '/console/tenantTagManagement' },
+ {key: '1-10-6', name:
this.$t('message.linkis.sideNavList.function.children.ipListManagement'), path:
'/console/ipListManagement' },
+
]
},
urmSideNavList: {
@@ -192,7 +195,7 @@ export default {
this.sideNavList.children[7].showSubMenu =
!this.sideNavList.children[7].showSubMenu;
return;
}
- if (index === '1-11') {
+ if (index === '1-10') {
this.sideNavList.children[8].showSubMenu =
!this.sideNavList.children[8].showSubMenu;
return;
}
diff --git a/linkis-web/src/common/i18n/en.json
b/linkis-web/src/common/i18n/en.json
index 435072a5c..d44976fb8 100644
--- a/linkis-web/src/common/i18n/en.json
+++ b/linkis-web/src/common/i18n/en.json
@@ -205,6 +205,8 @@
"RWGLQ": "Task Management",
"YQGLQ": "Engine Management",
"DLGLQ": "Queue Management",
+ "QX": "Select All",
+ "QXQX": "Deselect All",
"SX": "Refresh",
"JSRW": "Cancel Task",
"JSYQ": "Shut Down Engine",
diff --git a/linkis-web/src/common/i18n/zh.json
b/linkis-web/src/common/i18n/zh.json
index 3a57e444c..b70c04e67 100644
--- a/linkis-web/src/common/i18n/zh.json
+++ b/linkis-web/src/common/i18n/zh.json
@@ -206,6 +206,8 @@
"RWGLQ": "任务管理器",
"YQGLQ": "引擎管理器",
"DLGLQ": "队列管理器",
+ "QX": "全选",
+ "QXQX": "取消全选",
"SX": "刷新",
"JSRW": "结束任务",
"JSYQ": "结束引擎",
diff --git a/linkis-web/src/common/service/mixin.js
b/linkis-web/src/common/service/mixin.js
index f02fe4dfa..c7684596b 100644
--- a/linkis-web/src/common/service/mixin.js
+++ b/linkis-web/src/common/service/mixin.js
@@ -40,13 +40,12 @@ export default {
getProjectJsonResult(key, name = 'visualis') {
// 用于判断返回什么样的返回值
const baseInfo = storage.get('baseInfo', 'local');
- if (!baseInfo) return true;
- const vsBi = baseInfo.applications ? (baseInfo.applications.find((item)
=> item.name === name) || {}) : {};
- let projectJson = vsBi.enhanceJson;
- if(!projectJson && key==='rsDownload') {
- projectJson = '{"watermark": false, "rsDownload": true}'
+ if (!baseInfo) {
+ // linkis单独部署的时候没有baseinfo, 不用限制
+ return true;
+ } else {
+ return baseInfo.resultSetExportEnable;
}
- return projectJson ? JSON.parse(projectJson)[key] : true;
},
getFAQUrl() {
const baseInfo = storage.get('baseInfo', 'local');
diff --git a/linkis-web/src/components/consoleComponent/result.vue
b/linkis-web/src/components/consoleComponent/result.vue
index 9cb4fa520..49f97813b 100644
--- a/linkis-web/src/components/consoleComponent/result.vue
+++ b/linkis-web/src/components/consoleComponent/result.vue
@@ -700,7 +700,7 @@ export default {
width: 100%;
height: 42px;
text-align: center;
- padding-top: 10px;
+ margin-top: 10px;
padding-left: 10px;
.page-hint {
display: inline-flex;
diff --git a/linkis-web/src/dss/module/resourceSimple/engine.vue
b/linkis-web/src/dss/module/resourceSimple/engine.vue
index 7963d61d0..c58737815 100644
--- a/linkis-web/src/dss/module/resourceSimple/engine.vue
+++ b/linkis-web/src/dss/module/resourceSimple/engine.vue
@@ -243,6 +243,8 @@ export default {
return 'Datax';
case 'openlookeng':
return 'Openlookeng';
+ case 'elasticsearch':
+ return 'Elasticsearch';
case 'Unlock':
return this.$t('message.common.resourceSimple.KX')
case 'Idle':
@@ -286,6 +288,18 @@ export default {
this.loading = false;
});
},
+ selectAll(isSelectedAll) {
+ this.ideEngineList.forEach((item) => {
+ if (this.supportColor(item.engineStatus) === 'green') item.isActive =
!isSelectedAll;
+ });
+ this.boardEngineList.forEach((item) => {
+ if (this.supportColor(item.engineStatus) === 'green') item.isActive =
!isSelectedAll;
+ });
+ this.otherEngineList.forEach((item) => {
+ if (this.supportColor(item.engineStatus) === 'green') item.isActive =
!isSelectedAll;
+ });
+
+ },
getEngineData() {
if(this.loading) return;
this.ideEngineList = [];
diff --git a/linkis-web/src/dss/module/resourceSimple/index.vue
b/linkis-web/src/dss/module/resourceSimple/index.vue
index cb76e58b8..ca1b75b48 100644
--- a/linkis-web/src/dss/module/resourceSimple/index.vue
+++ b/linkis-web/src/dss/module/resourceSimple/index.vue
@@ -60,6 +60,12 @@
v-if="pointList.length"
:point-list="pointList"></point>
<div>
+ <Button
+ v-if="switcher === 'session'"
+ type="default"
+ @click="selectAll">
+ {{ isSelectedAll ? $t('message.common.resourceSimple.QXQX') :
$t('message.common.resourceSimple.QX')}}
+ </Button>
<Button
type="default"
@click="rest">
@@ -115,6 +121,7 @@ export default {
loading: false,
isJobBtnDisabled: true,
engineDisable: true,
+ isSelectedAll: false,
};
},
methods: {
@@ -198,6 +205,10 @@ export default {
const type = this.switcher === 'session' ?
this.$t('message.common.resourceSimple.YQ') :
this.$t('message.common.resourceSimple.RW');
this.$refs.killModal.open({ type, name: '' });
},
+ selectAll() {
+ this.$refs.engine.selectAll(this.isSelectedAll);
+ this.isSelectedAll = !this.isSelectedAll;
+ },
killJob() {
if (this.switcher === 'session') {
this.$refs.engine.killJob();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]