Skip to content

Commit

Permalink
refactor(cluster): 优化节点隔离相关操作和显示
Browse files Browse the repository at this point in the history
- 修改隔离和恢复按钮的标签和确认文本,使用更清晰的表述
- 重构隔离状态的显示方式,使用模板替代映射
-优化隔离状态的标签文案,更符合中文表达
  • Loading branch information
weibaohui committed Dec 26, 2024
1 parent 677bed2 commit 8506344
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions assets/pages/cluster/node.json
Original file line number Diff line number Diff line change
Expand Up @@ -289,16 +289,16 @@
"type": "button",
"icon": "fas fa-lock text-info",
"actionType": "ajax",
"label": "隔离",
"confirmText": "您确认要隔离(cordon) $metadata.name?",
"label": "隔离节点",
"confirmText": "您确认要 隔离(cordon) $metadata.name?",
"api": "post:/k8s/node/cordon/name/$metadata.name"
},
{
"type": "button",
"icon": "fas fa-unlock text-success",
"actionType": "ajax",
"label": "恢复",
"confirmText": "您确认要恢复(uncordon) $metadata.name?",
"label": "解除隔离",
"confirmText": "您确认要 解除隔离(uncordon) $metadata.name?",
"api": "post:/k8s/node/uncordon/name/$metadata.name"
},
{
Expand Down Expand Up @@ -655,12 +655,9 @@
},
{
"name": "spec.unschedulable",
"label": "隔离状态",
"type": "mapping",
"map": {
"true": "<span class='label label-danger'>SchedulingDisabled</span>",
"*": "<span class='label label-success'>Normal</span>"
}
"label": "不可调度",
"type": "tpl",
"tpl": "<span class='label label-${spec.unschedulable === true ? 'danger' : 'success'}'>${spec.unschedulable === true ? '关闭调度' : '调度正常'}</span>"
},
{
"name": "spec.taints",
Expand Down

0 comments on commit 8506344

Please sign in to comment.