Skip to content

Commit

Permalink
frontend Map: Update stories
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksandr Dubenko <[email protected]>
  • Loading branch information
sniok committed Jan 22, 2025
1 parent aa87833 commit 5962ad5
Show file tree
Hide file tree
Showing 2 changed files with 407 additions and 11 deletions.
35 changes: 30 additions & 5 deletions frontend/src/components/resourceMap/GraphView.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,43 @@ export default {
const mockNodes: GraphNode[] = [
{
id: 'mock-id',
type: 'kubeObject',
data: {
resource: new Pod(podList[0]),
},
kubeObject: new Pod(podList[0]),
},
{
id: 'custom-node',
label: 'Node Label',
subtitle: 'Node Subtitle',
},
{
id: 'custon-node-2',
label: 'Node with children',
nodes: [
{
id: 'some-id',
label: 'Nested node 1',
},
{
id: 'some-id-2',
label: 'Nested node 2',
},
],
edges: [
{
id: 'some-edge-1',
source: 'some-id',
target: 'some-id-2',
},
],
},
];

const data = { nodes: mockNodes };

const mockSource: GraphSource = {
id: 'mock-source',
label: 'Pods',
useData() {
return { nodes: mockNodes, edges: [] };
return data;
},
};

Expand Down
Loading

0 comments on commit 5962ad5

Please sign in to comment.