NodeGraph: fix rendering of node graph in dashboard panel (#44552)

Signed-off-by: tharun <rajendrantharun@live.com>
This commit is contained in:
Tharun Rajendran
2022-01-27 22:49:54 +05:30
committed by GitHub
parent b5dd4842d0
commit 5721933e4b
3 changed files with 16 additions and 10 deletions

View File

@ -317,3 +317,11 @@ export function graphBounds(nodes: NodeDatum[]): Bounds {
},
};
}
export function getNodeGraphDataFrames(frames: DataFrame[]) {
// TODO: this not in sync with how other types of responses are handled. Other types have a query response
// processing pipeline which ends up populating redux state with proper data. As we move towards more dataFrame
// oriented API it seems like a better direction to move such processing into to visualisations and do minimal
// and lazy processing here. Needs bigger refactor so keeping nodeGraph and Traces as they are for now.
return frames.filter((frame) => frame.meta?.preferredVisualisationType === 'nodeGraph');
}