- Notifications
You must be signed in to change notification settings - Fork928
Show build initiator on Workspace Build page#2446
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
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -186,6 +186,37 @@ export const getDisplayWorkspaceBuildStatus = ( | ||
} | ||
} | ||
export const DisplayWorkspaceBuildInitiatedByLanguage = { | ||
autostart: "system/autostart", | ||
autostop: "system/autostop", | ||
} | ||
export const getDisplayWorkspaceBuildInitiatedBy = ( | ||
theme: Theme, | ||
build: TypesGen.WorkspaceBuild, | ||
): { | ||
color: string | ||
initiatedBy: string | ||
} => { | ||
switch (build.reason) { | ||
case "initiator": | ||
return { | ||
color: theme.palette.text.secondary, | ||
initiatedBy: build.initiator_name, | ||
} | ||
case "autostart": | ||
return { | ||
color: theme.palette.secondary.dark, | ||
initiatedBy: DisplayWorkspaceBuildInitiatedByLanguage.autostart, | ||
} | ||
case "autostop": | ||
return { | ||
color: theme.palette.secondary.dark, | ||
initiatedBy: DisplayWorkspaceBuildInitiatedByLanguage.autostop, | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. My feeling (and I know this is boring of me) is that we probably don't need to highlight these values in purple. I am concerned we will be drawing too much attention to information that, while important, is not particularly actionable. That being said, I love that you tried a different design! Maybe post this in the dev-ux channel to get more opinions - I'm not a designer by any stretch of the imagination haha. | ||
} | ||
} | ||
export const getWorkspaceBuildDurationInSeconds = (build: TypesGen.WorkspaceBuild): number | undefined => { | ||
const isCompleted = build.job.started_at && build.job.completed_at | ||