Hey, I am working on a datasource plugin to feed into the new(ish) node graph plugin. In the documentation (Node graph panel | Grafana Labs) I read you can create a context menu (shown after clicking the edge) by using detail__
prefix for fields. However if I do this, nothing happens when I click on the edge:
const nodes = new MutableDataFrame({
name: 'Nodes',
fields: [
{ name: 'id', type: FieldType.string },
{ name: 'title', type: FieldType.string },
{ name: 'mainStat', type: FieldType.string },
{
name: 'arc__failed',
type: FieldType.number,
config: { color: { fixedColor: 'red', mode: FieldColorModeId.Fixed } },
},
{
name: 'arc__passed',
type: FieldType.number,
config: { color: { fixedColor: 'green', mode: FieldColorModeId.Fixed } },
},
{
name: 'arc__running',
type: FieldType.number,
config: { color: { fixedColor: 'blue', mode: FieldColorModeId.Fixed } },
},
{
name: 'arc__other',
type: FieldType.number,
config: { color: { fixedColor: 'gray', mode: FieldColorModeId.Fixed } },
},
],
meta: {
preferredVisualisationType: 'nodeGraph',
},
});
const edges = new MutableDataFrame({
name: 'Edges',
fields: [
{ name: 'id', type: FieldType.string },
{ name: 'source', type: FieldType.string },
{ name: 'target', type: FieldType.string },
// { name: 'mainStat', type: FieldType.string },
{ name: 'detail__A', type: FieldType.string, config: { displayName: 'AAA' } },
{ name: 'detail__D', type: FieldType.string, config: { displayName: 'DDD' } },
],
meta: {
preferredVisualisationType: 'nodeGraph',
},
});
...
nodes.appendRow(['1', 'A', 'AAA', 1, 1, 0]);
nodes.appendRow(['2', 'B', 'BBB', 1, 1, 0]);
nodes.appendRow(['3', 'C', 'CCC', 1, 1, 0]);
nodes.appendRow(['4', 'D', 'DDD', 1, 1, 0]);
nodes.appendRow(['5', 'E', 'EEE', 1, 1, 0]);
edges.appendRow(['AB', '1', '2', 'A 123', '']);
edges.appendRow(['DB', '4', '2', '', 'D 12']);
edges.appendRow(['BC', '2', '3', 'A 123', 'D 12']);
edges.appendRow(['CE', '3', '5', 'A 123', 'D 12']);
Did I misunderstand something, or this feature is missing? I tried to search in the X-Ray datasource plugin, the only plugin I know of using the node graph plugin, but there is no usage of detail__
.
Thanks for your help,
Cheers