Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APM] Storybook theme fixes #69730

Merged
merged 5 commits into from
Jun 24, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,60 +10,63 @@ import cytoscape from 'cytoscape';
import React from 'react';
import { Cytoscape } from '../Cytoscape';
import { iconForNode } from '../icons';
import { EuiThemeProvider } from '../../../../../../observability/public';

storiesOf('app/ServiceMap/Cytoscape', module).add(
'example',
() => {
const elements: cytoscape.ElementDefinition[] = [
{
data: {
id: 'opbeans-python',
'service.name': 'opbeans-python',
'agent.name': 'python',
},
},
{
data: {
id: 'opbeans-node',
'service.name': 'opbeans-node',
'agent.name': 'nodejs',
},
},
{
data: {
id: 'opbeans-ruby',
'service.name': 'opbeans-ruby',
'agent.name': 'ruby',
},
},
{ data: { source: 'opbeans-python', target: 'opbeans-node' } },
{
data: {
bidirectional: true,
source: 'opbeans-python',
target: 'opbeans-ruby',
},
},
];
const height = 300;
const width = 1340;
const serviceName = 'opbeans-python';
return (
<Cytoscape
elements={elements}
height={height}
width={width}
serviceName={serviceName}
/>
);
},
{
info: {
propTables: false,
source: false,
storiesOf('app/ServiceMap/Cytoscape', module)
.addDecorator((storyFn) => <EuiThemeProvider>{storyFn()}</EuiThemeProvider>)
.add(
'example',
() => {
const elements: cytoscape.ElementDefinition[] = [
{
data: {
id: 'opbeans-python',
'service.name': 'opbeans-python',
'agent.name': 'python',
},
},
{
data: {
id: 'opbeans-node',
'service.name': 'opbeans-node',
'agent.name': 'nodejs',
},
},
{
data: {
id: 'opbeans-ruby',
'service.name': 'opbeans-ruby',
'agent.name': 'ruby',
},
},
{ data: { source: 'opbeans-python', target: 'opbeans-node' } },
{
data: {
bidirectional: true,
source: 'opbeans-python',
target: 'opbeans-ruby',
},
},
];
const height = 300;
const width = 1340;
const serviceName = 'opbeans-python';
return (
<Cytoscape
elements={elements}
height={height}
width={width}
serviceName={serviceName}
/>
);
},
}
);
{
info: {
propTables: false,
source: false,
},
}
);

storiesOf('app/ServiceMap/Cytoscape', module).add(
'node icons',
Expand Down
Loading