-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add log link next to status message (#367)
- Loading branch information
Showing
8 changed files
with
162 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./mockBuilds"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import type { Build, CondaSpecification } from "../../../common/models"; | ||
|
||
function createBuild(id: number, status: string) { | ||
return { | ||
id, | ||
environment_id: 1, | ||
specification: { | ||
id: 1, | ||
name: "test", | ||
spec: {} as CondaSpecification, | ||
sha256: | ||
"697434666a1c747d80df95189ad5750c1496287871779d2a2919db6cb768a182", | ||
created_on: "2022-11-08T14:28:05.655564" | ||
}, | ||
packages: [], | ||
status, | ||
status_info: null, | ||
size: 0, | ||
scheduled_on: "2022-11-08T14:28:05.655564", | ||
started_on: "2022-11-08T14:28:05.655564", | ||
ended_on: "2022-11-08T14:28:05.655564", | ||
build_artifacts: [] | ||
}; | ||
} | ||
|
||
const completedBuild = createBuild(1, "COMPLETED"); | ||
const failedBuild = createBuild(2, "FAILED"); | ||
const buildingBuild = createBuild(3, "BUILDING"); | ||
|
||
export const mockBuilds: Build[] = [completedBuild, failedBuild, buildingBuild]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import type { Story, ComponentMeta } from "@storybook/react"; | ||
import { Provider } from "react-redux"; | ||
import React from "react"; | ||
|
||
import { store } from "../../../store"; | ||
import { EnvBuilds } from "../components"; | ||
import { mockBuilds } from "../mocks"; | ||
|
||
export default { | ||
component: EnvBuilds | ||
} as ComponentMeta<typeof EnvBuilds>; | ||
|
||
export const Primary = { | ||
args: { | ||
currentBuildId: 1, | ||
selectedBuildId: 1, | ||
mode: "read-only", | ||
builds: mockBuilds | ||
}, | ||
decorators: [ | ||
(Story: Story) => ( | ||
<Provider store={store}> | ||
<Story /> | ||
</Provider> | ||
) | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters