2017-02-20 18:15:36 +02:00
|
|
|
import React from 'react';
|
2017-04-05 19:10:04 +03:00
|
|
|
import { storiesOf } from '@kadira/storybook';
|
|
|
|
import withReadme from 'storybook-readme/with-readme';
|
|
|
|
|
|
|
|
import README from './readme.md';
|
|
|
|
|
|
|
|
import StoryHelper from './story-helper';
|
|
|
|
import GraphNode from './graph-node';
|
2017-01-12 16:00:44 +02:00
|
|
|
|
|
|
|
storiesOf('Topology', module)
|
2017-04-05 19:10:04 +03:00
|
|
|
.add('5 services', withReadme(README, () => (
|
2017-02-21 17:45:44 +02:00
|
|
|
<StoryHelper />
|
2017-04-05 19:10:04 +03:00
|
|
|
)))
|
|
|
|
.add('Consul', withReadme(README, () => (
|
2017-02-21 17:45:44 +02:00
|
|
|
<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'
|
2017-03-02 18:40:07 +02:00
|
|
|
}]
|
2017-02-21 17:45:44 +02:00
|
|
|
}}
|
|
|
|
connected={false}
|
|
|
|
/>
|
|
|
|
</svg>
|
2017-04-05 19:10:04 +03:00
|
|
|
)));
|