Skip to content

Commit

Permalink
docs: update MachineActionForm errors story
Browse files Browse the repository at this point in the history
  • Loading branch information
petermakowski committed Oct 6, 2023
1 parent f2a6a9c commit 216e04e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/app/machines/components/ErrorDetails/ErrorDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const ErrorDetailsItem = ({
systemIds: ActionState["failedSystemIds"];
}) => {
return (
<dl>
<dl className="u-no-margin--bottom">
<dt>{errorMessage}</dt>
{systemIds?.map((systemId) => (
<dd key={systemId}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type { Meta } from "@storybook/react";
import { MachineActionForm } from "./MachineActionFormWrapper";

import { ACTION_STATUS } from "app/base/constants";
import ErrorDetails from "app/machines/components/ErrorDetails";
import { NodeActions } from "app/store/types/node";

const meta: Meta<typeof MachineActionForm> = {
Expand Down Expand Up @@ -56,11 +57,15 @@ export const MultipleMachinesError = {
selectedMachines: { items: ["abc123", "def456"] },
action: NodeActions.ABORT,
actionStatus: ACTION_STATUS.error,
actionErrors: [
"There was an error",
"There was another error",
"There was a third error",
],
actionErrors: (
<ErrorDetails
failedSystemIds={["abc123", "def456"]}
failureDetails={{
"There was an error": ["abc123"],
"There was another error": ["def456"],
}}
/>
),
filter: {},
},
};

0 comments on commit 216e04e

Please sign in to comment.