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


The following commit(s) were added to refs/heads/main by this push:
     new 17d3a71  mesh + general: restore Top 20 APIs widget, service-scoped
17d3a71 is described below

commit 17d3a71165a9e15bb94131bde89cfb6ebd7788da
Author: Wu Sheng <[email protected]>
AuthorDate: Sat May 16 23:59:07 2026 +0800

    mesh + general: restore Top 20 APIs widget, service-scoped
    
    Previous commit removed the widget outright — wrong call. The fix was
    to drop the `layerScope: true` flag so the MQE runs against the
    selected service (entity `{ scope: Service, serviceName: … }`) instead
    of `{ scope: All }`. Restored as service-scoped:
    
      top_n(endpoint_cpm, 20, des)        — top 20 endpoints by traffic
      top_n(endpoint_resp_time, 20, des)  — by slowness
      top_n(endpoint_sla,  20, asc)/100   — worst success rate
    
    mesh: also drop the now-redundant `top_endpoints_in_service` (10) —
    top_apis (20) covers the same metric, just wider.
    general: appended top_apis to the service dashboard alongside the
    existing slow-statements record.
    
    Same data the operator expected: endpoints UNDER the selected service,
    ranked across three pivots. No more cross-layer leak.
---
 apps/bff/src/bundled_templates/layers/general.json | 15 +++++++++++++++
 apps/bff/src/bundled_templates/layers/mesh.json    | 14 +++++++-------
 2 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/apps/bff/src/bundled_templates/layers/general.json 
b/apps/bff/src/bundled_templates/layers/general.json
index 81df05c..249b34d 100644
--- a/apps/bff/src/bundled_templates/layers/general.json
+++ b/apps/bff/src/bundled_templates/layers/general.json
@@ -174,6 +174,21 @@
         "expressions": ["top_n(top_n_service_database_statement, 20, des)"],
         "span": 12,
         "rowSpan": 4
+      },
+      {
+        "id": "top_apis",
+        "title": "Top 20 APIs",
+        "tip": "Top endpoints under the selected service, by traffic / 
slowness / worst success rate.",
+        "type": "top",
+        "expressions": [
+          "top_n(endpoint_cpm,20,des)",
+          "top_n(endpoint_resp_time,20,des)",
+          "top_n(endpoint_sla,20,asc)/100"
+        ],
+        "expressionLabels": ["Traffic", "Slow", "Successful Rate"],
+        "expressionUnits": ["rpm", "ms", "%"],
+        "span": 12,
+        "rowSpan": 4
       }
     ],
     "instance": [
diff --git a/apps/bff/src/bundled_templates/layers/mesh.json 
b/apps/bff/src/bundled_templates/layers/mesh.json
index 9a7e110..4e6ef65 100644
--- a/apps/bff/src/bundled_templates/layers/mesh.json
+++ b/apps/bff/src/bundled_templates/layers/mesh.json
@@ -214,14 +214,14 @@
         "rowSpan": 3
       },
       {
-        "id": "top_endpoints_in_service",
-        "title": "Top 10 endpoints in service",
-        "tip": "Ranked across the selected service's endpoints.",
+        "id": "top_apis",
+        "title": "Top 20 APIs",
+        "tip": "Top endpoints under the selected service, by traffic / 
slowness / worst success rate.",
         "type": "top",
         "expressions": [
-          "top_n(endpoint_cpm,10,des)",
-          "top_n(endpoint_resp_time,10,des)",
-          "top_n(endpoint_sla,10,asc)/100"
+          "top_n(endpoint_cpm,20,des)",
+          "top_n(endpoint_resp_time,20,des)",
+          "top_n(endpoint_sla,20,asc)/100"
         ],
         "expressionLabels": [
           "Traffic",
@@ -234,7 +234,7 @@
           "%"
         ],
         "span": 6,
-        "rowSpan": 3
+        "rowSpan": 4
       }
     ],
     "instance": [

Reply via email to