This is an automated email from the ASF dual-hosted git repository.

wu-sheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-horizon-ui.git

commit 0a85286f358f699b7114c3b3886096827140d452
Author: Wu Sheng <[email protected]>
AuthorDate: Thu May 21 20:15:51 2026 +0800

    templates: render labeled latest(...) metrics as tables (kong/mongodb/es)
    
    Same fix as K8S, applied to the labeled-metric widgets the upstream
    booster-ui templates render as Table but Horizon rendered as card/line:
    - kong: service "Datastore Reachable" (per service-instance) → table
    - mongodb: "DB Total Data/Index" (per database) + instance "ReplSet
      State" (per node) → table
    - elasticsearch: "Cluster Health" (status) → table
    
    These are single labeled metrics; a scalar card or a time-series line
    mis-represents a per-label breakdown.
---
 .../bundled_templates/layers/elasticsearch.json    | 13 ++++++---
 apps/bff/src/bundled_templates/layers/kong.json    | 11 +++++---
 apps/bff/src/bundled_templates/layers/mongodb.json | 31 ++++++++++++++++------
 3 files changed, 40 insertions(+), 15 deletions(-)

diff --git a/apps/bff/src/bundled_templates/layers/elasticsearch.json 
b/apps/bff/src/bundled_templates/layers/elasticsearch.json
index b94e432..619772c 100644
--- a/apps/bff/src/bundled_templates/layers/elasticsearch.json
+++ b/apps/bff/src/bundled_templates/layers/elasticsearch.json
@@ -82,12 +82,17 @@
       {
         "id": "health",
         "title": "Cluster Health",
-        "type": "line",
+        "type": "table",
         "expressions": [
-          "meter_elasticsearch_cluster_health_status"
+          "latest(meter_elasticsearch_cluster_health_status)"
         ],
-        "span": 3,
-        "rowSpan": 2
+        "span": 4,
+        "rowSpan": 3,
+        "tableHeaders": [
+          "Status",
+          "Value"
+        ],
+        "showTableValues": true
       },
       {
         "id": "nodes",
diff --git a/apps/bff/src/bundled_templates/layers/kong.json 
b/apps/bff/src/bundled_templates/layers/kong.json
index 90c51a1..e09e960 100644
--- a/apps/bff/src/bundled_templates/layers/kong.json
+++ b/apps/bff/src/bundled_templates/layers/kong.json
@@ -174,12 +174,17 @@
       {
         "id": "datastore",
         "title": "Datastore Reachable",
-        "type": "card",
+        "type": "table",
         "expressions": [
           
"latest(aggregate_labels(meter_kong_service_datastore_reachable,sum(service_instance_id)))"
         ],
-        "span": 6,
-        "rowSpan": 1
+        "span": 4,
+        "rowSpan": 3,
+        "tableHeaders": [
+          "Instance",
+          "Reachable"
+        ],
+        "showTableValues": true
       },
       {
         "id": "nginx_errors",
diff --git a/apps/bff/src/bundled_templates/layers/mongodb.json 
b/apps/bff/src/bundled_templates/layers/mongodb.json
index 267245d..31521f7 100644
--- a/apps/bff/src/bundled_templates/layers/mongodb.json
+++ b/apps/bff/src/bundled_templates/layers/mongodb.json
@@ -186,22 +186,32 @@
       {
         "id": "db_data_size",
         "title": "DB Total Data (GB)",
-        "type": "card",
+        "type": "table",
         "expressions": [
           "latest(aggregate_labels(meter_mongodb_cluster_db_data_size, 
sum(database)))/1024/1024/1024"
         ],
         "span": 4,
-        "rowSpan": 1
+        "rowSpan": 3,
+        "tableHeaders": [
+          "Database",
+          "Data (GB)"
+        ],
+        "showTableValues": true
       },
       {
         "id": "db_index_size",
         "title": "DB Total Index (GB)",
-        "type": "card",
+        "type": "table",
         "expressions": [
           "latest(aggregate_labels(meter_mongodb_cluster_db_index_size, 
sum(database)))/1024/1024/1024"
         ],
         "span": 4,
-        "rowSpan": 1
+        "rowSpan": 3,
+        "tableHeaders": [
+          "Database",
+          "Index (GB)"
+        ],
+        "showTableValues": true
       }
     ],
     "instance": [
@@ -228,12 +238,17 @@
       {
         "id": "rs_state",
         "title": "ReplSet State",
-        "type": "line",
+        "type": "table",
         "expressions": [
-          "meter_mongodb_node_rs_state"
+          "latest(meter_mongodb_node_rs_state)"
         ],
-        "span": 3,
-        "rowSpan": 2
+        "span": 4,
+        "rowSpan": 3,
+        "tableHeaders": [
+          "Node",
+          "ReplSet state"
+        ],
+        "showTableValues": true
       },
       {
         "id": "conns",

Reply via email to