Skip to content

Commit

Permalink
Merge branch 'master' into renameAsyncParam
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Mar 30, 2020
2 parents e6d45e9 + 8b31ce0 commit de074f9
Show file tree
Hide file tree
Showing 150 changed files with 3,709 additions and 934 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import React from 'react';
import { storiesOf } from '@storybook/react';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { TraceAPIResponse } from '../../../../../../../../../plugins/apm/server/lib/traces/get_trace';
import { WaterfallContainer } from './index';
import {
location,
urlParams,
simpleTrace,
traceWithErrors,
traceChildStartBeforeParent
} from './waterfallContainer.stories.data';
import { getWaterfall } from './Waterfall/waterfall_helpers/waterfall_helpers';

storiesOf('app/TransactionDetails/Waterfall', module).add(
'simple',
() => {
const waterfall = getWaterfall(
simpleTrace as TraceAPIResponse,
'975c8d5bfd1dd20b'
);
return (
<WaterfallContainer
location={location}
urlParams={urlParams}
waterfall={waterfall}
exceedsMax={false}
/>
);
},
{ info: { source: false } }
);

storiesOf('app/TransactionDetails/Waterfall', module).add(
'with errors',
() => {
const waterfall = getWaterfall(
(traceWithErrors as unknown) as TraceAPIResponse,
'975c8d5bfd1dd20b'
);
return (
<WaterfallContainer
location={location}
urlParams={urlParams}
waterfall={waterfall}
exceedsMax={false}
/>
);
},
{ info: { source: false } }
);

storiesOf('app/TransactionDetails/Waterfall', module).add(
'child starts before parent',
() => {
const waterfall = getWaterfall(
traceChildStartBeforeParent as TraceAPIResponse,
'975c8d5bfd1dd20b'
);
return (
<WaterfallContainer
location={location}
urlParams={urlParams}
waterfall={waterfall}
exceedsMax={false}
/>
);
},
{ info: { source: false } }
);
Loading

0 comments on commit de074f9

Please sign in to comment.