Skip to content

Commit

Permalink
linkis console web optimization and add new features (apache#283)
Browse files Browse the repository at this point in the history
* linkis console web optimization and add new features

* fix setting bugs and optimization for code

* remove console info for dev

* remove useless code
  • Loading branch information
mayinrain authored Sep 11, 2023
1 parent a95b477 commit 3a47847
Show file tree
Hide file tree
Showing 20 changed files with 210 additions and 114 deletions.
5 changes: 5 additions & 0 deletions linkis-web/src/apps/linkis/components/variable/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 7 additions & 1 deletion linkis-web/src/apps/linkis/components/variable/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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')"
Expand Down Expand Up @@ -138,5 +145,4 @@ export default {
};
</script>
<style lang="scss" src="./index.scss">
</style>
15 changes: 11 additions & 4 deletions linkis-web/src/apps/linkis/i18n/common/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@
"show": "Show",
"advancedSetting": "Advanced Settings",
"dataDev": "Data Development",
"maxLimit": "(The maximum limit specified is {limit})"
"maxLimit": "(The resource template specifies an upper limit value of {limit})"
},
"globalValiable": "Global Variables",
"rules": {
Expand Down Expand Up @@ -471,8 +471,8 @@
"rules": "Rules",
"startTime": "Start Time",
"endTime": "End Time",
"CPUThreshold": "CPU Threshold",
"MemoryThreshold": "Memory Threshold",
"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",
Expand Down Expand Up @@ -506,7 +506,14 @@
"enTreeName": "Tree Name(EN)",
"treeName": "Tree Name",
"noZH": "Chinese input not allowed",
"customLen": "The length cannot exceed {length}"
"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",
Expand Down
19 changes: 13 additions & 6 deletions linkis-web/src/apps/linkis/i18n/common/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@
"engineRemain": "引擎剩余资源",
"engineUsed": "引擎已用资源",
"engineTop": "引擎上限资源",
"versioTips": "如果没有对应的版本,请确认是否已安装对应的版本引擎物料",
"applicationRole": "应用方"
"versioTips": "如果没有对应的版本,请确认是否已安装对应的版本引擎物料",
"applicationRole": "应用方"
},
"logLoading": "日志请求中,请稍后",
"title": "Linkis管理台",
Expand Down Expand Up @@ -308,7 +308,7 @@
"show": "显示",
"advancedSetting": "高级设置",
"dataDev": "数据开发",
"maxLimit": "(被指定最大限制为{limit})"
"maxLimit": "(资源模板指定上限值为{limit})"
},
"globalValiable": "全局变量",
"rules": {
Expand Down Expand Up @@ -446,8 +446,8 @@
"rules": "规则",
"startTime": "开始时间",
"endTime": "结束时间",
"CPUThreshold": "CPU阈值",
"MemoryThreshold": "内存阈值",
"CPUThreshold": "CPU阈值(核)",
"MemoryThreshold": "内存阈值(G)",
"CPUPercentageThreshold": "CPU百分比阈值",
"MemoryPercentageThreshold": "内存百分比阈值",
"view": "查看",
Expand Down Expand Up @@ -481,7 +481,14 @@
"customLen": "长度不能超过{length}",
"timeError": "时间格式应为XX:XX,请输入正确的时间",
"thresholdError": "请输入0-10000的整数",
"percentageThresholdError": "请输入0-1的数字"
"percentageThresholdError": "请输入0-1的数字",
"enable": "启用",
"disable": "停用",
"confirmEnable": "确认是否启用[{name}]该规则?",
"confirmDisable": "确认是否停用[{name}]该规则?",
"enableSuccessfully": "启用成功",
"disableSuccessfully": "停用成功",
"templateRequired": "是否必填"
},
"basedataManagement": {
"add": "新增",
Expand Down
5 changes: 2 additions & 3 deletions linkis-web/src/apps/linkis/module/ECM/engineConn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,6 @@ export default {
})
this.loading = false;
} catch (err) {
window.console.log(err)
this.loading = false;
}
},
Expand All @@ -407,7 +406,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(获取搜索的状态列表)
Expand All @@ -417,7 +416,7 @@ export default {
let list = statusList.nodeStatus || [];
this.statusList = [...list];
} catch (err) {
window.console.log(err)
return;
}
},
// add tag(添加tag)
Expand Down
6 changes: 2 additions & 4 deletions linkis-web/src/apps/linkis/module/ECM/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,6 @@ export default {
this.page.totalSize = this.tableData.length;
this.loading = false;
} catch (err) {
window.console.log(err)
this.loading = false;
}
},
Expand All @@ -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(获取搜索的状态列表)
Expand All @@ -352,7 +351,7 @@ export default {
let list = statusList.nodeStatus || [];
this.statusList = [...list];
} catch (err) {
window.console.log(err)
return;
}
},
// add tag(添加tag)
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion linkis-web/src/apps/linkis/module/ECM/log.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export default {
}
}
} catch (err) {
window.console.log(err)
return;
}
}
Expand Down
Loading

0 comments on commit 3a47847

Please sign in to comment.