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 819641593 optimize ui (#3965)
819641593 is described below
commit 819641593b7d25adea0c675dd43516c72507aa35
Author: Yonghao Mei <[email protected]>
AuthorDate: Mon Dec 5 18:12:07 2022 +0800
optimize ui (#3965)
---
linkis-web/src/apps/linkis/i18n/common/en.json | 10 +++--
linkis-web/src/apps/linkis/i18n/common/zh.json | 20 +++++----
.../linkis/module/EnginePluginManagement/index.vue | 23 +++++++----
.../linkis/module/datasourceEnv/EditForm/index.vue | 4 +-
.../src/apps/linkis/module/datasourceEnv/index.vue | 2 +-
.../module/datasourceType/EditForm/index.vue | 36 ++++++++--------
.../module/datasourceTypeKey/EditForm/index.vue | 48 +++++++++++-----------
.../module/gatewayAuthToken/EditForm/index.vue | 29 ++++++++++++-
.../src/apps/linkis/module/udfManager/index.vue | 3 +-
9 files changed, 109 insertions(+), 66 deletions(-)
diff --git a/linkis-web/src/apps/linkis/i18n/common/en.json
b/linkis-web/src/apps/linkis/i18n/common/en.json
index 7e6acf219..1eb54b0ab 100644
--- a/linkis-web/src/apps/linkis/i18n/common/en.json
+++ b/linkis-web/src/apps/linkis/i18n/common/en.json
@@ -415,7 +415,8 @@
"cancel": "Cancel",
"modalTitle": "Info",
"modalFormat": "Confirm deleting the {0} record?",
- "modalDelete": "Confirm that the record should be deleted?",
+ "modalDelete1": "Confirm that the record [{username}] should be
deleted?",
+ "modalDelete": "Confirm that the record [{envName}] should be
deleted?",
"modalDeleteSuccess": "Successfully delete",
"modalDeleteFail": "Fail to delete",
"modalAddSuccess": "Successfully added",
@@ -429,6 +430,7 @@
"legalUsers": "Legal Users",
"legalHosts": "Legal Hosts",
"elapseDay": "Elapse Day",
+ "permanentlyValid": "Permanently Valid",
"businessOwner": "Owner",
"createTime":"Create Time",
"updateTime": "Update Time",
@@ -445,7 +447,8 @@
},
"elapseDayValidate": {
"size": "The Elapse Day cannot be less than -1",
- "empty": "Please enter the elapse day"
+ "empty": "Please enter the elapse day",
+ "GT0": "Valid days must be greater than 0"
}
},
"errorCode": {
@@ -546,7 +549,8 @@
"versionList": "Version List",
"rollback": "Rollback",
"action": "Operate",
- "checkEngineConnTypeAndVersion": "Please select the engine type and
version"
+ "checkEngineConnTypeAndVersion": "Please select the engine type and
version",
+ "upload": "Please click the button to upload the engine plug-in"
}
}
}
diff --git a/linkis-web/src/apps/linkis/i18n/common/zh.json
b/linkis-web/src/apps/linkis/i18n/common/zh.json
index e9215ea74..6a4930d6b 100644
--- a/linkis-web/src/apps/linkis/i18n/common/zh.json
+++ b/linkis-web/src/apps/linkis/i18n/common/zh.json
@@ -161,7 +161,7 @@
"errorCode": "错误码管理",
"gatewayAuthToken": "令牌管理",
"rmExternalResourceProvider": "扩展资源管理",
- "udfManager": "用户管理",
+ "udfManager": "管理员用户",
"udfTree": "UDF分类",
"datasourceAccess": "数据源权限",
"datasourceEnv": "数据源环境",
@@ -417,7 +417,8 @@
"cancel": "取消",
"modalTitle": "提示信息",
"modalFormat": "确定删除 {0} 这条记录?",
- "modalDelete": "确认是否删除该记录?",
+ "modalDelete1": "确认是否删除[{username}]该记录?",
+ "modalDelete": "确认是否删除[{envName}]该记录?",
"modalDeleteSuccess": "删除成功",
"modalDeleteFail": "删除失败",
"modalAddSuccess": "添加成功",
@@ -429,13 +430,14 @@
"tokenName": "名称",
"legalUsers": "用户",
"legalHosts": "主机",
- "elapseDay": "过期天数",
+ "elapseDay": "有效天数",
+ "permanentlyValid": "永久有效",
"businessOwner": "所属者",
"createTime":"创建时间",
"updateTime": "更新时间",
"updateBy": "更新人",
"searchPlaceholder": "令牌名称/用户/主机",
- "info":"过期天数: -1 表示永久",
+ "info":"有效天数: -1 表示永久",
"legalUsersInfo": "*允许所有用户;多用户使用,隔开,例如:user1,user2",
"legalUsersValidate": {
"empty": "请填写用户",
@@ -447,7 +449,8 @@
},
"elapseDayValidate": {
"format": "格式不正确,使用*或使用,分割,例如:host1,host2",
- "empty": "请填写过期天数"
+ "empty": "请填写有效天数",
+ "GT0": "有效天数必须大于0"
}
},
"errorCode": {
@@ -515,10 +518,10 @@
"valueType": "值类型",
"defaultValue": "默认值",
"scope": "范围",
- "require": "必填",
+ "require": "必要字段",
"description": "描述",
"descriptionEn": "描述(英文)",
- "valueRegex": "值校验",
+ "valueRegex": "值校验规则",
"createTime": "创建时间",
"updateTime": "更新时间",
"searchPlaceholder": "名称",
@@ -548,7 +551,8 @@
"versionList": "版本列表",
"rollback": "回滚",
"action": "操作",
- "checkEngineConnTypeAndVersion": "请选择引擎类型及版本"
+ "checkEngineConnTypeAndVersion": "请选择引擎类型及版本",
+ "upload": "请点击上传引擎插件"
}
}
}
diff --git a/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.vue
b/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.vue
index f6c1eede7..7fd0843f9 100644
--- a/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.vue
+++ b/linkis-web/src/apps/linkis/module/EnginePluginManagement/index.vue
@@ -72,9 +72,11 @@
>
<Spin size="large" fix v-if="loadingForm"></Spin>
<div style="height: 200px">
- <form style="width: 200px;height: 200px">
- <input type="file" @change="getFile($event)" />
+ <form style="width: 200px;height: 200px" v-show="false">
+ <input ref="upload" type="file" @change="getFile($event)"
accept=".zip"/>
</form>
+ <Button type="default" style="width: 100%; height: 70%; font-size:
50px;" size="large" icon="ios-cloud-upload-outline"
@click="handleClick"></Button>
+ <span style="margin-top: 30px; text-align: center; display:
inline-block; width:100%;
font-size:14px">{{$t('message.linkis.EnginePluginManagement.upload')}}</span>
</div>
<div slot="footer">
@@ -83,7 +85,7 @@
<Button
type="primary"
@click="handleCancel"
- >{{ $t('message.linkis.close') }}</Button>
+ >{{ $t('message.linkis.cancel') }}</Button>
<Button type="primary" @click="onSubmit">{{
$t('message.linkis.complete')}}</Button>
</div>
@@ -120,12 +122,12 @@
$t('message.linkis.EnginePluginManagement.Reset')}}</Button>
<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: '120px', marginRight: '5px',
padding: '5px'}" @click="createOrUpdate(1)">{{
+ <!-- <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>
+ $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>
<Table
@@ -229,6 +231,10 @@ export default {
key: 'lastModified',
tooltip: true,
align: 'center',
+ render: (h, params) => {
+ let time = new
Date(parseInt(params.row.lastModified)).toLocaleString().replace(/:\d(1,2)$/, '
')
+ return h('span', time);
+ }
},
{
title:
this.$t('message.linkis.EnginePluginManagement.bmlResourceId'),
@@ -489,6 +495,9 @@ export default {
this.$Message.error(e);
})
},
+ handleClick () {
+ this.$refs.upload.click();
+ }
},
}
</script>
diff --git a/linkis-web/src/apps/linkis/module/datasourceEnv/EditForm/index.vue
b/linkis-web/src/apps/linkis/module/datasourceEnv/EditForm/index.vue
index 06b94a0fa..71f02e440 100644
--- a/linkis-web/src/apps/linkis/module/datasourceEnv/EditForm/index.vue
+++ b/linkis-web/src/apps/linkis/module/datasourceEnv/EditForm/index.vue
@@ -181,7 +181,7 @@ export default {
field: 'uris',
value: '',
props: {
- placeholder: "",
+ placeholder: 'thrift://127.0.0.1:9083',
},
validate: [
{
@@ -201,7 +201,7 @@ export default {
value: '',
hidden: true,
props: {
- placeholder: "",
+ placeholder: '[email protected]',
},
},
{
diff --git a/linkis-web/src/apps/linkis/module/datasourceEnv/index.vue
b/linkis-web/src/apps/linkis/module/datasourceEnv/index.vue
index 61f498753..d19a15780 100644
--- a/linkis-web/src/apps/linkis/module/datasourceEnv/index.vue
+++ b/linkis-web/src/apps/linkis/module/datasourceEnv/index.vue
@@ -256,7 +256,7 @@ export default {
onTableDelete(row){
this.$Modal.confirm({
title: this.$t('message.linkis.basedataManagement.modal.modalTitle'),
- content:
this.$t('message.linkis.basedataManagement.modal.modalDelete'),
+ content:
this.$t('message.linkis.basedataManagement.modal.modalDelete', {envName:
row.envName}),
onOk: ()=>{
let params = {
id: row.id
diff --git
a/linkis-web/src/apps/linkis/module/datasourceType/EditForm/index.vue
b/linkis-web/src/apps/linkis/module/datasourceType/EditForm/index.vue
index 28b791ce7..442537b7f 100644
--- a/linkis-web/src/apps/linkis/module/datasourceType/EditForm/index.vue
+++ b/linkis-web/src/apps/linkis/module/datasourceType/EditForm/index.vue
@@ -84,15 +84,15 @@ export default {
props: {
placeholder: "mysql database",
},
- validate: [
- {
- required: true,
- message: `${this.$t(
- 'message.linkis.datasource.pleaseInput'
- )}
`+this.$t('message.linkis.basedataManagement.datasourceType.description'),
- trigger: 'blur',
- },
- ],
+ // validate: [
+ // {
+ // required: true,
+ // message: `${this.$t(
+ // 'message.linkis.datasource.pleaseInput'
+ // )}
`+this.$t('message.linkis.basedataManagement.datasourceType.description'),
+ // trigger: 'blur',
+ // },
+ // ],
},
{
type: 'input',
@@ -102,15 +102,15 @@ export default {
props: {
placeholder: "mysql database",
},
- validate: [
- {
- required: true,
- message: `${this.$t(
- 'message.linkis.datasource.pleaseInput'
- )}
`+this.$t('message.linkis.basedataManagement.datasourceType.option'),
- trigger: 'blur',
- },
- ],
+ // validate: [
+ // {
+ // required: true,
+ // message: `${this.$t(
+ // 'message.linkis.datasource.pleaseInput'
+ // )}
`+this.$t('message.linkis.basedataManagement.datasourceType.option'),
+ // trigger: 'blur',
+ // },
+ // ],
},
{
type: 'select',
diff --git
a/linkis-web/src/apps/linkis/module/datasourceTypeKey/EditForm/index.vue
b/linkis-web/src/apps/linkis/module/datasourceTypeKey/EditForm/index.vue
index c303f9c20..f1c240548 100644
--- a/linkis-web/src/apps/linkis/module/datasourceTypeKey/EditForm/index.vue
+++ b/linkis-web/src/apps/linkis/module/datasourceTypeKey/EditForm/index.vue
@@ -150,8 +150,8 @@ export default {
},
{
type: 'input',
- title:
this.$t('message.linkis.basedataManagement.datasourceTypeKey.defaultValue'),
- field: 'defaultValue',
+ title:
this.$t('message.linkis.basedataManagement.datasourceTypeKey.valueRegex'),
+ field: 'valueRegex',
value: '',
props: {
placeholder: "",
@@ -161,15 +161,15 @@ export default {
required: false,
message: `${this.$t(
'message.linkis.datasource.pleaseInput'
- )}
`+this.$t('message.linkis.basedataManagement.datasourceTypeKey.defaultValue'),
+ )}
`+this.$t('message.linkis.basedataManagement.datasourceTypeKey.valueRegex'),
trigger: 'blur',
},
],
},
{
type: 'input',
- title:
this.$t('message.linkis.basedataManagement.datasourceTypeKey.scope'),
- field: 'scope',
+ title:
this.$t('message.linkis.basedataManagement.datasourceTypeKey.defaultValue'),
+ field: 'defaultValue',
value: '',
props: {
placeholder: "",
@@ -179,11 +179,29 @@ export default {
required: false,
message: `${this.$t(
'message.linkis.datasource.pleaseInput'
- )}
`+this.$t('message.linkis.basedataManagement.datasourceTypeKey.scope'),
+ )}
`+this.$t('message.linkis.basedataManagement.datasourceTypeKey.defaultValue'),
trigger: 'blur',
},
],
},
+ // {
+ // type: 'input',
+ // title:
this.$t('message.linkis.basedataManagement.datasourceTypeKey.scope'),
+ // field: 'scope',
+ // value: '',
+ // props: {
+ // placeholder: "",
+ // },
+ // validate: [
+ // {
+ // required: false,
+ // message: `${this.$t(
+ // 'message.linkis.datasource.pleaseInput'
+ // )}
`+this.$t('message.linkis.basedataManagement.datasourceTypeKey.scope'),
+ // trigger: 'blur',
+ // },
+ // ],
+ // },
{
type: 'switch',
title:
this.$t('message.linkis.basedataManagement.datasourceTypeKey.require'),
@@ -240,24 +258,6 @@ export default {
},
],
},
- {
- type: 'input',
- title:
this.$t('message.linkis.basedataManagement.datasourceTypeKey.valueRegex'),
- field: 'valueRegex',
- value: '',
- props: {
- placeholder: "",
- },
- validate: [
- {
- required: false,
- message: `${this.$t(
- 'message.linkis.datasource.pleaseInput'
- )}
`+this.$t('message.linkis.basedataManagement.datasourceTypeKey.valueRegex'),
- trigger: 'blur',
- },
- ],
- },
]
}
},
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 af97f23fe..1bd7c2488 100644
--- a/linkis-web/src/apps/linkis/module/gatewayAuthToken/EditForm/index.vue
+++ b/linkis-web/src/apps/linkis/module/gatewayAuthToken/EditForm/index.vue
@@ -127,14 +127,36 @@ export default {
},
],
},
+ {
+ type: 'radio',
+ title:
this.$t('message.linkis.basedataManagement.gatewayAuthToken.permanentlyValid'),
+ field: "permanentlyValid",
+ value: false,
+ hidden: false,
+ options: [
+ {value: false,label: "否",disabled: false},
+ {value: true,label: "是",disabled: false},
+ ],
+ on: {
+ 'on-change': () => {
+ this.rule[5].hidden = !this.rule[5].hidden;
+ if(this.rule[5].hidden) {
+ this.formModel.elapseDay = -1;
+ } else {
+ this.formModel.elapseDay = 1;
+ }
+ }
+ }
+ },
{
type: 'inputNumber',
title:
this.$t('message.linkis.basedataManagement.gatewayAuthToken.elapseDay'),
field: 'elapseDay',
- value: -1,
+ value: 1,
+ hidden: false,
info:
this.$t('message.linkis.basedataManagement.gatewayAuthToken.info'),
props: {
- placeholder: "eg . -1",
+ placeholder: "eg . 1",
},
validate: [
{
@@ -144,6 +166,9 @@ export default {
if(!value){
reject(this.$t('message.linkis.basedataManagement.gatewayAuthToken.elapseDayValidate.empty'))
}
+ if(!this.formModel.permanentlyValid && value < 1) {
+
reject(this.$t('message.linkis.basedataManagement.gatewayAuthToken.elapseDayValidate.GT0'))
+ }
resolve()
})
},
diff --git a/linkis-web/src/apps/linkis/module/udfManager/index.vue
b/linkis-web/src/apps/linkis/module/udfManager/index.vue
index 674b4fd71..64c957839 100644
--- a/linkis-web/src/apps/linkis/module/udfManager/index.vue
+++ b/linkis-web/src/apps/linkis/module/udfManager/index.vue
@@ -160,6 +160,7 @@ export default {
onAdd(){
this.modalEditData={
id: "",
+ userName: "",
errorCode: "",
errorDesc: "",
errorRegex: '',
@@ -176,7 +177,7 @@ export default {
this.$Modal.confirm({
title: this.$t('message.linkis.basedataManagement.modal.modalTitle'),
- content:
this.$t('message.linkis.basedataManagement.modal.modalDelete'),
+ content:
this.$t('message.linkis.basedataManagement.modal.modalDelete1', {username:
row.userName}),
onOk: ()=>{
let params = {
id: row.id
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]