diff --git a/frontend/src/components/daemonset/List.stories.tsx b/frontend/src/components/daemonset/List.stories.tsx index df52c2bc82d..529ff4d3140 100644 --- a/frontend/src/components/daemonset/List.stories.tsx +++ b/frontend/src/components/daemonset/List.stories.tsx @@ -336,3 +336,69 @@ const Template: StoryFn = () => { }; export const DaemonSets = Template.bind({}); + +export const Loading = Template.bind({}); +Loading.parameters = { + storyshots: { disable: true }, + msw: { + handlers: { + story: [ + http.get('http://localhost:4466/apis/apps/v1/daemonsets', () => new Promise(() => {})), + ], + }, + }, +}; + +export const Empty = Template.bind({}); +Empty.parameters = { + msw: { + handlers: { + story: [ + http.get('http://localhost:4466/apis/apps/v1/daemonsets', () => + HttpResponse.json({ + kind: 'DaemonSetList', + items: [], + metadata: {}, + }) + ), + ], + }, + }, +}; + +export const Error = Template.bind({}); +Error.parameters = { + msw: { + handlers: { + story: [ + http.get('http://localhost:4466/apis/apps/v1/daemonsets', () => HttpResponse.error()), + ], + }, + }, +}; + +export const LongName = Template.bind({}); +LongName.parameters = { + msw: { + handlers: { + story: [ + http.get('http://localhost:4466/apis/apps/v1/daemonsets', () => + HttpResponse.json({ + kind: 'DaemonSetList', + items: [ + { + ...objList[0], + metadata: { + ...objList[0].metadata, + name: 'this-is-a-very-long-daemonset-name-that-should-test-overflow-behaviour', + namespace: 'this-is-also-a-very-long-namespace-name', + }, + }, + ], + metadata: {}, + }) + ), + ], + }, + }, +}; diff --git a/frontend/src/components/daemonset/__snapshots__/List.Empty.stories.storyshot b/frontend/src/components/daemonset/__snapshots__/List.Empty.stories.storyshot new file mode 100644 index 00000000000..aaf134b63e5 --- /dev/null +++ b/frontend/src/components/daemonset/__snapshots__/List.Empty.stories.storyshot @@ -0,0 +1,150 @@ +
++ No data to be shown. +
++ No data to be shown. +
+|
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+ Name
+
+
+
+
+
+
+ 0
+
+
+ |
+
+
+
+
+
+
+
+ Namespace
+
+
+
+
+
+
+ 0
+
+
+ |
+
+
+
+
+
+
+
+ Pods
+
+
+
+
+
+
+ 0
+
+
+ |
+
+
+
+
+
+
+
+ Current
+
+
+
+
+
+
+ 0
+
+
+ |
+
+
+
+
+
+
+
+ Desired
+
+
+
+
+
+
+ 0
+
+
+ |
+
+
+
+
+
+
+
+ Ready
+
+
+
+
+
+
+ 0
+
+
+ |
+
+
+
+
+
+
+
+ Node Selector
+
+
+
+
+
+
+ 0
+
+
+ |
+
+
+
+
+
+
+
+ Containers
+
+
+
+
+
+
+ 0
+
+
+ |
+
+
+
+
+
+
+
+ Images
+
+
+
+
+
+
+ 0
+
+
+ |
+
+
+
+
+
+
+
+ Age
+
+
+
+
+
+
+ 0
+
+
+ |
+
+
+
+
+
+
+
+ Actions
+
+ |
+
|---|---|---|---|---|---|---|---|---|---|---|---|
| + + + + + + | ++ + this-is-a-very-long-daemonset-name-that-should-test-overflow-behaviour + + | ++ + this-is-also-a-very-long-namespace-name + + | ++ 2 + | ++ 2 + | ++ 2 + | ++ 2 + | +
+
+
+
+
+ + kubernetes.io/os: linux + + |
+ + + gadget + + | ++ + ghcr.io/inspektor-gadget/inspektor-gadget:v0.15.0 + + | +
+ + 90d + + |
+ + + | +