1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-15 15:50:06 +02:00
copilot/ui/src/components/topology/story.js

39 lines
831 B
JavaScript
Raw Normal View History

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';
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-02-21 17:45:44 +02:00
}}
connected={false}
/>
</svg>
2017-04-05 19:10:04 +03:00
)));