You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by qi...@apache.org on 2023/04/25 02:41:46 UTC

[skywalking-grafana-plugins] branch main updated (b673948 -> c45ce4d)

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

qiuxiafan pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-grafana-plugins.git


    from b673948  feat: add node and edge frame
     new 6b8020c  fix: query data
     new c45ce4d  fix: frame data

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/datasource.ts | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)


[skywalking-grafana-plugins] 01/02: fix: query data

Posted by qi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

qiuxiafan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-grafana-plugins.git

commit 6b8020c8181c1fa1560fe06eb653144b1ac1b9a1
Author: Fine0830 <fa...@gmail.com>
AuthorDate: Tue Apr 25 10:30:17 2023 +0800

    fix: query data
---
 src/datasource.ts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/datasource.ts b/src/datasource.ts
index 2ebc6d3..4d6a79b 100644
--- a/src/datasource.ts
+++ b/src/datasource.ts
@@ -60,7 +60,7 @@ export class DataSource extends DataSourceApi<MyQuery, MyDataSourceOptions> {
       // fetch services from api
       await this.doRequest(s)
       const t = {
-        query: "query queryData($duration: Duration!) {\n  topology: getGlobalTopology(duration: $duration) {\n    nodes {\n      id\n      name: title\n      type\n      isReal\n    }\n    calls {\n      id\n      source\n      detectPoints\n      target\n    }\n  }}",
+        query: "query queryData($duration: Duration!) {\n  topology: getGlobalTopology(duration: $duration) {\n    nodes {\n      id\n      name\n      type\n      isReal\n    }\n    calls {\n      id\n      source\n      detectPoints\n      target\n    }\n  }}",
         variables: {duration},
       };
       // fetch topology data from api
@@ -92,7 +92,7 @@ export class DataSource extends DataSourceApi<MyQuery, MyDataSourceOptions> {
       });
       console.log(res.data.topology);
       for (const node of nodes) {
-        nodeFrame.add({id: node.id, title: node.title});
+        nodeFrame.add({id: node.id, title: node.name});
       }
       for (const call of calls) {
         nodeFrame.add({id: call.id, target: call.target, source: call.source});


[skywalking-grafana-plugins] 02/02: fix: frame data

Posted by qi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

qiuxiafan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-grafana-plugins.git

commit c45ce4dc24176c9e95262085c7bb51bd1e71b977
Author: Fine0830 <fa...@gmail.com>
AuthorDate: Tue Apr 25 10:41:31 2023 +0800

    fix: frame data
---
 src/datasource.ts | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/datasource.ts b/src/datasource.ts
index 4d6a79b..319f88b 100644
--- a/src/datasource.ts
+++ b/src/datasource.ts
@@ -90,12 +90,11 @@ export class DataSource extends DataSourceApi<MyQuery, MyDataSourceOptions> {
           preferredVisualisationType: 'nodeGraph',
         }
       });
-      console.log(res.data.topology);
       for (const node of nodes) {
         nodeFrame.add({id: node.id, title: node.name});
       }
       for (const call of calls) {
-        nodeFrame.add({id: call.id, target: call.target, source: call.source});
+        edgeFrame.add({id: call.id, target: call.target, source: call.source});
       }
       return [nodeFrame, edgeFrame];
     });