2017-02-20 18:15:36 +02:00
|
|
|
import GraphNode from './graph-node';
|
|
|
|
import StoryHelper from './story-helper';
|
|
|
|
import { storiesOf } from '@kadira/storybook';
|
|
|
|
import React from 'react';
|
2017-01-12 16:00:44 +02:00
|
|
|
|
|
|
|
storiesOf('Topology', module)
|
2017-02-21 17:45:44 +02:00
|
|
|
.add('5 services', () => (
|
|
|
|
<StoryHelper />
|
|
|
|
))
|
|
|
|
.add('Consul', () => (
|
|
|
|
<svg width={180} height={159}>
|
|
|
|
<GraphNode
|
|
|
|
data={{
|
|
|
|
id: 'Consul',
|
|
|
|
attrs: {
|
|
|
|
dcs: 1,
|
|
|
|
healthy: true,
|
|
|
|
instances: 1
|
|
|
|
},
|
|
|
|
metrics: [{
|
|
|
|
name: 'CPU',
|
|
|
|
stat: '50%'
|
|
|
|
}, {
|
|
|
|
name: 'Network',
|
|
|
|
stat: '5.9KB/sec'
|
|
|
|
}, {
|
|
|
|
name: 'Network',
|
|
|
|
stat: '5.9KB/sec'
|
|
|
|
}],
|
|
|
|
x: 0,
|
|
|
|
y: 0
|
|
|
|
}}
|
|
|
|
size={{
|
|
|
|
width: 180,
|
|
|
|
height: 156
|
|
|
|
}}
|
|
|
|
connected={false}
|
|
|
|
/>
|
|
|
|
</svg>
|
|
|
|
));
|