Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(site): remove a misplaced warning banner in the frontend#15837

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
SasSwart merged 2 commits intomainfromjjs/provisioner-warnings
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletionsite/src/pages/WorkspacePage/Workspace.stories.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -63,7 +63,16 @@ type Story = StoryObj<typeof Workspace>;

export const Running: Story = {
args: {
workspace: Mocks.MockWorkspace,
workspace: {
...Mocks.MockWorkspace,
latest_build: {
...Mocks.MockWorkspace.latest_build,
matched_provisioners: {
count: 0,
available: 0,
},
},
},
handleStart: action("start"),
handleStop: action("stop"),
buildInfo: Mocks.MockBuildInfo,
Expand Down
8 changes: 4 additions & 4 deletionssite/src/pages/WorkspacePage/Workspace.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -110,13 +110,13 @@ export const Workspace: FC<WorkspaceProps> = ({
(r) => resourceOptionValue(r) === resourcesNav.value,
);

const shouldDisplayBuildLogs =
(buildLogs ?? []).length > 0 && workspace.latest_build.status !== "running";

const workspaceRunning = workspace.latest_build.status === "running";
const haveBuildLogs = (buildLogs ?? []).length > 0;
const provisionersHealthy =
(workspace.latest_build.matched_provisioners?.available ?? 0) > 0;
const shouldDisplayBuildLogs = haveBuildLogs && !workspaceRunning;
const shouldShowProvisionerAlert =
!provisionersHealthy &&(!buildLogs || buildLogs.length === 0);
!workspaceRunning &&!haveBuildLogs && !provisionersHealthy;

return (
<div
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp