Skip to content

Commit

Permalink
Web bug fixed of Engine status display (#1310)
Browse files Browse the repository at this point in the history
* bug fixed:Engine status display

* add some i18n tableColumns
  • Loading branch information
casionone authored Jan 17, 2022
1 parent 77fa00b commit 628dd7c
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 13 deletions.
2 changes: 2 additions & 0 deletions web/src/apps/linkis/i18n/common/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@
"day": "Day"
},
"tableColumns": {
"instanceName": "Instance Name",
"initiator": "Initiator",
"engineInstance": "Engine instance",
"engineType": "Engine type",
"taskID": "Task ID",
Expand Down
2 changes: 2 additions & 0 deletions web/src/apps/linkis/i18n/common/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@
"day": ""
},
"tableColumns": {
"instanceName": "实例名称",
"initiator":"启动者",
"engineInstance": "引擎实例",
"engineType": "引擎类型",
"taskID": "任务ID",
Expand Down
14 changes: 7 additions & 7 deletions web/src/apps/linkis/module/ECM/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
~ 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="ecm" >
<Search :statusList="healthyStatusList" :ownerList="ownerList" @search="search" />
Expand Down Expand Up @@ -123,7 +123,7 @@ export default {
},
columns: [
{
title: "实例名称", // 实例名称
title: this.$t('message.linkis.tableColumns.instanceName'), // 实例名称
key: 'instance',
minWidth: 150,
className: 'table-project-column',
Expand Down Expand Up @@ -157,7 +157,7 @@ export default {
minWidth: 150,
},
{
title: "启动者", // 启动者
title: this.$t('message.linkis.tableColumns.initiator'), // 启动者
key: 'owner',
className: 'table-project-column',
minWidth: 150,
Expand Down Expand Up @@ -282,7 +282,7 @@ export default {
async getListAllNodeHealthyStatus() {
try {
let healthyStatusList = await api.fetch('/linkisManager/listAllECMHealthyStatus', { onlyEditable: true }, 'get') || {};

let list = healthyStatusList.nodeHealthy || [];
this.healthyStatusList = [...list];
} catch (err) {
Expand All @@ -303,7 +303,7 @@ export default {
addEnter (key, value) {
this.formItem.labels.push({ key, value });
},

// 修改tag
editEnter(editInputKey, editInputValue,editedInputValue) {
let index = this.formItem.labels.findIndex((item)=>{
Expand Down
35 changes: 29 additions & 6 deletions web/src/dss/module/resourceSimple/engine.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
~ 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="engine-box">
<Spin
Expand Down Expand Up @@ -50,7 +50,7 @@
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>{{ calssifyName(item) }}</span>
<span>{{ 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"
Expand Down Expand Up @@ -91,7 +91,8 @@
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">
<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"/>
<span>{{ 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"
Expand Down Expand Up @@ -131,7 +132,8 @@
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">
<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"/>
<span>{{ 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"
Expand Down Expand Up @@ -221,10 +223,16 @@ export default {
return 'PipeLine';
case 'shell':
return 'Shell';
case 'Unlock':
return this.$t('message.common.resourceSimple.KX')
case 'Idle':
return this.$t('message.common.resourceSimple.KX');
case 'Error':
return this.$t('message.common.resourceSimple.KX');
case 'ShuttingDown':
return this.$t('message.common.resourceSimple.KX');
case 'Dead':
return this.$t('message.common.resourceSimple.KX');
case 'Busy':
return this.$t('message.common.resourceSimple.FM');
case 'Starting':
Expand Down Expand Up @@ -356,3 +364,18 @@ export default {
},
};
</script>

<style scoped type="text/css">
.yellow {
color: #f4cf2a;
}

.green {
color: #19be6b;
}

.blue {
color: #2d8cf0;
}
</style>

0 comments on commit 628dd7c

Please sign in to comment.