Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Address PR feedback
  • Loading branch information
mtojek committed Jun 28, 2023
commit efe4928e709063132979ae10b1390eae4af95524
7 changes: 4 additions & 3 deletions site/src/components/Workspace/Workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,10 @@ export const Workspace: FC<React.PropsWithChildren<WorkspaceProps>> = ({
<AlertTitle>Workspace build is pending</AlertTitle>
<AlertDetail>
<div className={styles.alertPendingInQueue}>
This build job is waiting for a provisioner to become
available. If you have been waiting for an extended period,
contact your administrator for assistance.
This workspace build job is waiting for a provisioner to
become available. If you have been waiting for an extended
period of time, please contact your administrator for
assistance.
</div>
<div>
Position in queue:{" "}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the {" "} necessary here? I would imagine the newline becomes a space but maybe not in React-land.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to be necessary. Otherwise, it's merged together: Position in queue:3 (no space).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ export const WorkspaceStatusText: FC<
workspace.latest_build.status,
)

workspace.latest_build.job.queue_size

return (
<ChooseOne>
{/* <ImpendingDeletionText/> determines its own visibility */}
Expand Down
2 changes: 1 addition & 1 deletion site/src/utils/workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ const getPendingWorkspaceStatusText = (
): string => {
const { t } = i18next

if (provisionerJob === undefined || provisionerJob.queue_size === 0) {
if (!provisionerJob || provisionerJob.queue_size === 0) {
return t("workspaceStatus.pending", { ns: "common" })
}
return "Position in queue: " + provisionerJob.queue_position
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use t here too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I skipped this on purpose, as we are not going to implement translations. I learnt some time ago

Expand Down