nodegraph-api-plugin icon indicating copy to clipboard operation
nodegraph-api-plugin copied to clipboard

add node links

Open lmangani opened this issue 3 years ago • 2 comments

prototype/proposal patch implementing functionality discussed in issue #20 for adding optional links (external and internal) to graph nodes. Link parameters format is similar to the details__ field:

link__{uniquename}__parameter = value

External Links

  • link__id__url, link__id__title

Internal Links

  • link__id__expr, link__id__uid, link__id__name, link__id__title

Format Sample

{ 
  "id": "1", 
  "title": "Service1", 
  "subTitle": "instance:#2", 
  "detail__role": "load",
  "arc__failed": 0.7, 
  "arc__passed": 0.3, 
  "mainStat": "qaz",
  "link__external__url": "http://some/service",
  "link__external__title": "custom link",
  "link__internal__expr": "rate(traces_service_graph_request_total{server=\"${__data.fields.id}\"}[$__interval])",
  "link__internal__title": "request rate",
  "link__internal__uid": "prometheus"
}

lmangani avatar Sep 24 '22 23:09 lmangani

@hoptical any suggestions or feedback? Thanks in advance!

lmangani avatar Sep 27 '22 08:09 lmangani

@lmangani Thanks for your contribution and sorry for being very late in sending my feedback. I had a terrible internet connection in my country for months and couldn't investigate further steps of this repo.

BTW, I reviewed your branch and tried to get a run and check if I can see the links or context menu in the graph layout. The context menu wasn't shown yet and the problem was there. Maybe my input JSON wasn't correct.

Would you please send a full sample of the JSON served to the plugin?

hoptical avatar Feb 10 '23 17:02 hoptical