2017-01-12 16:00:44 +02:00
|
|
|
const React = require('react');
|
2017-02-07 20:26:38 +02:00
|
|
|
const StoryHelper = require('./story-helper');
|
2017-02-21 17:45:44 +02:00
|
|
|
const GraphNode = require('./graph-node');
|
2017-01-12 16:00:44 +02:00
|
|
|
|
|
|
|
const {
|
|
|
|
storiesOf
|
|
|
|
} = require('@kadira/storybook');
|
|
|
|
|
|
|
|
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>
|
|
|
|
));
|