From 7d3b06eeb80f5ea868258af929b0b892eb64f3d0 Mon Sep 17 00:00:00 2001 From: Galimede Date: Tue, 13 Jun 2023 15:29:23 +0200 Subject: [PATCH] feat(cc-overview): add error story overview stories --- .../cc-overview/cc-overview.stories.js | 39 ++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/src/components/cc-overview/cc-overview.stories.js b/src/components/cc-overview/cc-overview.stories.js index d64e09bfe..a46b9e686 100644 --- a/src/components/cc-overview/cc-overview.stories.js +++ b/src/components/cc-overview/cc-overview.stories.js @@ -80,6 +80,18 @@ export const orgaMode = makeStory(conf, { }], }); +export const orgaModeWithError = makeStory(conf, { + items: [{ + mode: 'orga', + children: () => [ + createStoryItem(headerOrga, { class: 'head', error: true }), + createStoryItem(statusCodes, { error: true }), + createStoryItem(requests, { style: '', error: true }), + createStoryItem(logsmap, { class: 'main', error: true }), + ], + }], +}); + export const orgaModeWithTwoHeads = makeStory(conf, { docs: 'If you place two or more heads in your overview, you\'ll need to specify how many with the CSS custom property: `--cc-overview-head-count: 2`.', css: placeholderCss, @@ -114,6 +126,22 @@ export const appMode = makeStory(conf, { }], }); +export const appModeWithError = makeStory(conf, { + items: [{ + mode: 'app', + children: () => [ + createStoryItem(headerApp, { class: 'head', error: true }), + createStoryItem(instances, { error: true }), + createStoryItem(scalability, { error: true }), + createStoryItem(deployments, { error: true }), + createStoryItem(metrics, { metrics: { state: 'error' } }), + createStoryItem(statusCodes, { error: true }), + createStoryItem(requests, { style: '', error: true }), + createStoryItem(logsmap, { class: 'main', error: true }), + ], + }], +}); + export const appModeWithBeta = makeStory(conf, { items: [{ mode: 'app', @@ -152,4 +180,13 @@ export const appModeWithTwoHeads = makeStory(conf, { ], }); -enhanceStoriesNames({ defaultStory, orgaMode, orgaModeWithTwoHeads, appMode, appModeWithBeta, appModeWithTwoHeads }); +enhanceStoriesNames({ + defaultStory, + orgaMode, + orgaModeWithError, + orgaModeWithTwoHeads, + appMode, + appModeWithError, + appModeWithBeta, + appModeWithTwoHeads, +});