Skip to content

Commit

Permalink
feat(ns): 添加节点亲和性配置的可视化展示
Browse files Browse the repository at this point in the history
- 在 pod.json 文件中添加了节点亲和性配置的表格展示
- 新增了 matchExpressions 和 matchFields 的列定义
- 使用 mapping 类型展示了操作符的友好名称
- 通过 each 类型展示了多个值的列表
  • Loading branch information
weibaohui committed Jan 21, 2025
1 parent 5aec3b7 commit d4b74b7
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions assets/pages/ns/pod.json
Original file line number Diff line number Diff line change
Expand Up @@ -2257,6 +2257,46 @@
"items": {
"type": "table",
"source": "${item.matchExpressions}",
"visibleOn": "${item.matchExpressions}",
"columns": [
{
"name": "key",
"label": "",
"width": "250px"
},
{
"name": "operator",
"label": "操作符",
"type": "mapping",
"map": {
"In": "<span class='label label-success'>包含</span>",
"NotIn": "<span class='label label-warning'>不包含</span>",
"Exists": "<span class='label label-info'>存在</span>"
},
"placeholder": "-",
"width": "50px"
},
{
"name": "values",
"label": "",
"type": "each",
"items": {
"type": "tpl",
"tpl": "${item}<br>"
},
"placeholder": "-"
}
]
}
},
{
"name": "spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms",
"visibleOn": "${spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms}",
"type": "each",
"items": {
"type": "table",
"source": "${item.matchFields}",
"visibleOn": "${item.matchFields}",
"columns": [
{
"name": "key",
Expand Down

0 comments on commit d4b74b7

Please sign in to comment.