You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2020/10/13 09:36:31 UTC

[skywalking] branch separate-ui-template updated: Add doc about the UI template.

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

wusheng pushed a commit to branch separate-ui-template
in repository https://gitbox.apache.org/repos/asf/skywalking.git


The following commit(s) were added to refs/heads/separate-ui-template by this push:
     new 60d0ab2  Add doc about the UI template.
60d0ab2 is described below

commit 60d0ab2b4115580cce958055992e66de64d63a76
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Tue Oct 13 17:36:09 2020 +0800

    Add doc about the UI template.
---
 docs/en/ui/README.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/docs/en/ui/README.md b/docs/en/ui/README.md
index 2693f7e..1096b11 100644
--- a/docs/en/ui/README.md
+++ b/docs/en/ui/README.md
@@ -33,6 +33,57 @@ Two default dashboards are provided to visualize the metrics of service and data
 
 User could click the `lock` button left aside the `Service/Instance/Endpoint Reload` button to custom your own dashboard.
 
+### Custom Dashboard
+Users could customize the dashboard. The default dashboards are provided through the default templates located in 
+`/ui-initialized-templates` folders.
+
+The template file follows this format.
+```yaml
+templates:
+  - name: template name # The unique name
+    # The type includes DASHBOARD, TOPOLOGY_INSTANCE, TOPOLOGY_ENDPOINT.
+    # DASHBOARD type templates could have multiple definitions, by using different names.
+    # TOPOLOGY_INSTANCE, TOPOLOGY_ENDPOINT type templates should be defined once, 
+    # as they are used in the topology page only.
+    type: "DASHBOARD" 
+    # Custom the dashboard or create a new one on the UI, set the metrics as you like in the edit mode.
+    # Then, you could export this configuration through the page and add it here.
+    configuration: |-
+      [
+        {
+          "name":"Spring Sleuth",
+          "type":"service",
+          "children":[
+            {
+              "name":"Sleuth",
+              "children": [{
+                "width": "3",
+                "title": "HTTP Request",
+                "height": "200",
+                "entityType": "ServiceInstance",
+                "independentSelector": false,
+                "metricType": "REGULAR_VALUE",
+                "metricName": "meter_http_server_requests_count",
+                "queryMetricType": "readMetricsValues",
+                "chartType": "ChartLine",
+                "unit": "Count"
+              }
+              ...
+              ]
+            }
+          ]
+      }
+      ]
+    # Activated means this templates added into the UI page automatically.
+    # False means providing a basic template, user needs to add it manually on the page.
+    activated: false
+    # True means wouldn't show up on the dashboard. Only keeps the definition in the storage.
+    disabled: false
+```
+
+**NOTE**, UI initialized templates would only be initialized if there is no template in the storage has the same name.
+Check the entity named as `ui_template` in your storage.
+
 ## Topology
 Topology map shows the relationship among the services and instances with metrics.