NodeGraph: Include frames with name edges or nodes in node graph (#46047)

* Include frames with name edges or nodes in node graph
This commit is contained in:
Connor Lindsey
2022-03-03 06:42:08 -07:00
committed by GitHub
parent 3b487c2661
commit cb1649e9b8
2 changed files with 11 additions and 2 deletions

View File

@ -323,5 +323,14 @@ export function getNodeGraphDataFrames(frames: DataFrame[]) {
// 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');
return frames.filter((frame) => {
if (frame.meta?.preferredVisualisationType === 'nodeGraph') {
return true;
}
if (frame.name === 'nodes' || frame.name === 'edges') {
return true;
}
return false;
});
}