This is an automated email from the ASF dual-hosted git repository. wu-sheng pushed a commit to branch feat/k8s-node-pod-card-alarm-timeline-hint in repository https://gitbox.apache.org/repos/asf/skywalking-horizon-ui.git
commit 9811ecc8029b3cd3331e7237bc9ea2a3ef92529a Author: Wu Sheng <[email protected]> AuthorDate: Sat Jun 27 15:32:42 2026 +0800 feat: K8s Node "Pod Total" card and alarm-timeline range-select hint K8s Node dashboard — add a "Pod Total" card directly under Node Status, showing the current count of pods scheduled on the node (`latest(k8s_node_pod_total)`, all phases). It fills the grid cell that was previously left blank beside the single-line Node Status card. The node scope has no Running-only pod metric, so this is total pods on the node — the latest value of the same series the "Pods on Node" trend charts. Title/tip added to the English source plus all seven locale overlays; node-dashboard doc and changelog updated. Alarms timeline — the hover tooltip now hints both affordances: click a minute to filter, or drag across the timeline to select a range. The brush range-select was previously undiscoverable (no on-screen cue). --- CHANGELOG.md | 4 +++- apps/bff/src/bundled_templates/layers/k8s.i18n.de.json | 7 +++++++ apps/bff/src/bundled_templates/layers/k8s.i18n.es.json | 4 ++++ apps/bff/src/bundled_templates/layers/k8s.i18n.fr.json | 4 ++++ apps/bff/src/bundled_templates/layers/k8s.i18n.ja.json | 4 ++++ apps/bff/src/bundled_templates/layers/k8s.i18n.ko.json | 4 ++++ apps/bff/src/bundled_templates/layers/k8s.i18n.pt.json | 4 ++++ apps/bff/src/bundled_templates/layers/k8s.i18n.zh-CN.json | 1 + apps/bff/src/bundled_templates/layers/k8s.json | 12 ++++++++++++ apps/ui/src/components/charts/AlarmsTimeline.vue | 8 +++++--- docs/dashboards/k8s.md | 2 ++ 11 files changed, 50 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df9a00f..18ee27e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,7 +30,7 @@ The version line is shared by every package in the monorepo (apps + shared packa ### Alarms -- **The alarm timeline reads more clearly** — a clearer selection band and legend, and the detail sidebar reflows cleanly on narrow windows. +- **The alarm timeline reads more clearly** — a clearer selection band and legend, and the detail sidebar reflows cleanly on narrow windows. Hovering the timeline now hints both affordances — click a minute to filter, or drag across the timeline to select a range — so range-selection is no longer hidden. ### User experience @@ -46,6 +46,8 @@ The version line is shared by every package in the monorepo (apps + shared packa - **The Kubernetes Node Status card now reads as a status, not a number.** Instead of a raw `1`, it shows the node's active conditions as colored chips — `Ready` in green, the `*Pressure` / `NetworkUnavailable` conditions in amber/red — so node health is legible at a glance. +- **The Kubernetes Node dashboard gains a Pod Total card.** A compact card now sits directly under Node Status showing the current count of pods scheduled on the selected node (all phases) — the latest value of the same metric the "Pods on Node" trend already charts — so the space beside the status card is no longer blank. + ## 1.0.0 ### Performance & behavior tuning diff --git a/apps/bff/src/bundled_templates/layers/k8s.i18n.de.json b/apps/bff/src/bundled_templates/layers/k8s.i18n.de.json index e9877a2..da1003b 100644 --- a/apps/bff/src/bundled_templates/layers/k8s.i18n.de.json +++ b/apps/bff/src/bundled_templates/layers/k8s.i18n.de.json @@ -193,6 +193,13 @@ null ] }, + { + "title": "Pods gesamt", + "tip": "Aktuell auf diesem Knoten eingeplante Pods (alle Phasen).", + "expressions": [ + null + ] + }, { "title": "Knoten-CPU-Ressourcen", "expressions": [ diff --git a/apps/bff/src/bundled_templates/layers/k8s.i18n.es.json b/apps/bff/src/bundled_templates/layers/k8s.i18n.es.json index e307db0..bd82e5e 100644 --- a/apps/bff/src/bundled_templates/layers/k8s.i18n.es.json +++ b/apps/bff/src/bundled_templates/layers/k8s.i18n.es.json @@ -129,6 +129,10 @@ "title": "Uso de CPU del nodo", "tip": "Uso de CPU en millicores." }, + { + "title": "Total de pods", + "tip": "Pods actualmente programados en este nodo (todas las fases)." + }, { "title": "Recursos de CPU del nodo", "expressionLabels": [ diff --git a/apps/bff/src/bundled_templates/layers/k8s.i18n.fr.json b/apps/bff/src/bundled_templates/layers/k8s.i18n.fr.json index 86b1976..f265574 100644 --- a/apps/bff/src/bundled_templates/layers/k8s.i18n.fr.json +++ b/apps/bff/src/bundled_templates/layers/k8s.i18n.fr.json @@ -131,6 +131,10 @@ "title": "Utilisation CPU du nœud", "tip": "Utilisation CPU en millicores." }, + { + "title": "Total pods", + "tip": "Pods actuellement planifiés sur ce nœud (toutes phases)." + }, { "title": "Ressources CPU du nœud", "expressionLabels": [ diff --git a/apps/bff/src/bundled_templates/layers/k8s.i18n.ja.json b/apps/bff/src/bundled_templates/layers/k8s.i18n.ja.json index 75391e9..deef777 100644 --- a/apps/bff/src/bundled_templates/layers/k8s.i18n.ja.json +++ b/apps/bff/src/bundled_templates/layers/k8s.i18n.ja.json @@ -131,6 +131,10 @@ "title": "ノード CPU 使用率", "tip": "millicore 単位の CPU 使用量。" }, + { + "title": "Pod 合計", + "tip": "現在このノードにスケジュールされている Pod(全フェーズ)。" + }, { "title": "ノード CPU リソース", "expressionLabels": [ diff --git a/apps/bff/src/bundled_templates/layers/k8s.i18n.ko.json b/apps/bff/src/bundled_templates/layers/k8s.i18n.ko.json index e9fd8d9..884c2f2 100644 --- a/apps/bff/src/bundled_templates/layers/k8s.i18n.ko.json +++ b/apps/bff/src/bundled_templates/layers/k8s.i18n.ko.json @@ -131,6 +131,10 @@ "title": "노드 CPU 사용량", "tip": "밀리코어 단위의 CPU 사용량입니다." }, + { + "title": "Pod 총합", + "tip": "현재 이 노드에 스케줄된 Pod(모든 단계)." + }, { "title": "노드 CPU 리소스", "expressionLabels": [ diff --git a/apps/bff/src/bundled_templates/layers/k8s.i18n.pt.json b/apps/bff/src/bundled_templates/layers/k8s.i18n.pt.json index f8f3088..39a9e28 100644 --- a/apps/bff/src/bundled_templates/layers/k8s.i18n.pt.json +++ b/apps/bff/src/bundled_templates/layers/k8s.i18n.pt.json @@ -134,6 +134,10 @@ "title": "Uso de CPU do nó", "tip": "Uso de CPU em millicores." }, + { + "title": "Total de Pods", + "tip": "Pods atualmente agendados neste nó (todas as fases)." + }, { "title": "Recursos de CPU do nó", "expressionLabels": [ diff --git a/apps/bff/src/bundled_templates/layers/k8s.i18n.zh-CN.json b/apps/bff/src/bundled_templates/layers/k8s.i18n.zh-CN.json index 75f3587..b48bbc4 100644 --- a/apps/bff/src/bundled_templates/layers/k8s.i18n.zh-CN.json +++ b/apps/bff/src/bundled_templates/layers/k8s.i18n.zh-CN.json @@ -73,6 +73,7 @@ { "title": "节点状态" }, { "title": "节点上的 Pod" }, { "title": "节点 CPU 使用", "tip": "CPU 使用量,单位 millicore。" }, + { "title": "Pod 总数", "tip": "当前调度到该节点的 Pod(所有阶段)。" }, { "title": "节点 CPU 资源", "expressionLabels": ["total", "allocatable", "requests", "limits"] diff --git a/apps/bff/src/bundled_templates/layers/k8s.json b/apps/bff/src/bundled_templates/layers/k8s.json index 43e5e13..7ff9ef3 100644 --- a/apps/bff/src/bundled_templates/layers/k8s.json +++ b/apps/bff/src/bundled_templates/layers/k8s.json @@ -333,6 +333,18 @@ "span": 6, "rowSpan": 2 }, + { + "id": "node_pod_count", + "title": "Pod Total", + "tip": "Pods currently scheduled on this node (all phases).", + "type": "card", + "expressions": [ + "latest(k8s_node_pod_total)" + ], + "span": 3, + "rowSpan": 1, + "format": "int" + }, { "id": "node_cpu_resources", "title": "Node CPU Resources", diff --git a/apps/ui/src/components/charts/AlarmsTimeline.vue b/apps/ui/src/components/charts/AlarmsTimeline.vue index 62f347c..c809656 100644 --- a/apps/ui/src/components/charts/AlarmsTimeline.vue +++ b/apps/ui/src/components/charts/AlarmsTimeline.vue @@ -153,9 +153,11 @@ function buildOption(): echarts.EChartsCoreOption { · <span style="color:#22c55e;">${recovered} recovered</span> </div>` : '', - total > 0 - ? `<div style="margin-top:2px;font-size:10.5px;color:var(--sw-fg-3);">click to filter to this minute</div>` - : '', + `<div style="margin-top:2px;font-size:10.5px;color:var(--sw-fg-3);">${ + total > 0 + ? 'click to filter to this minute · drag to select a range' + : 'drag to select a range' + }</div>`, ].join(''); }, }, diff --git a/docs/dashboards/k8s.md b/docs/dashboards/k8s.md index 6f7108b..54afa9f 100644 --- a/docs/dashboards/k8s.md +++ b/docs/dashboards/k8s.md @@ -88,6 +88,8 @@ For one selected node (an **Instance** in OAP terms) — its scheduling state an - **Pods on Node** — pods scheduled on the node over time (`k8s_node_pod_total`). +- **Pod Total** — the current count of pods scheduled on the node, as a single latest reading (`latest(k8s_node_pod_total)`). + - **Node CPU Usage** — node CPU usage in millicores (`k8s_node_cpu_usage`). - **Node CPU Resources** — node CPU total against allocatable, requests, and limits, in millicores (`k8s_node_cpu_cores`, `k8s_node_cpu_cores_allocatable`, `k8s_node_cpu_cores_requests`, `k8s_node_cpu_cores_limits`).
