mirror of
https://github.com/grafana/grafana.git
synced 2025-02-09 06:56:07 -06:00
Test data source: Add random node radius for nodegraph (#75381)
This commit is contained in:
parent
c4ac4eb41b
commit
9d8be05cce
@ -139,6 +139,8 @@ export function generateRandomNodes(count = 10) {
|
||||
nodeFields.arc__errors.values.push(node.error);
|
||||
const rnd = Math.random();
|
||||
nodeFields[NodeGraphDataFrameFieldNames.icon].values.push(rnd > 0.9 ? 'database' : rnd < 0.1 ? 'cloud' : '');
|
||||
nodeFields[NodeGraphDataFrameFieldNames.nodeRadius].values.push(rnd > 0.5 ? 30 : 40);
|
||||
|
||||
for (const edge of node.edges) {
|
||||
const id = `${node.id}--${edge}`;
|
||||
// We can have duplicate edges when we added some more by random
|
||||
|
Loading…
Reference in New Issue
Block a user