-
Notifications
You must be signed in to change notification settings - Fork 929
feat: Add timeline in the workspace page #1533
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
<span style={{ color: theme.palette.text.secondary }}>{duration}</span> | ||
</TableCell> | ||
<TableCell> | ||
<span style={{ color: theme.palette.text.secondary }}>{new Date(b.created_at).toLocaleString()}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used toLocaleString()
because it is better to have, for logs at least, the format 5/17/2022, 2:06:25 PM
instead of 50 seconds ago
.
@@ -47,3 +48,71 @@ export const getWorkspaceStatus = (workspaceBuild?: WorkspaceBuild): WorkspaceSt | |||
return "error" | |||
} | |||
} | |||
|
|||
export const getDisplayStatus = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Moved this to
utils/workspaces
so I could use it in the Timeline component. - I see we also have another
getStatus
function so I moved this with a new name. Probably we want to use only one, but I think it is better to make this on the design refactoring.
@@ -29,6 +41,8 @@ export type WorkspaceEvent = | |||
| { type: "STOP" } | |||
| { type: "RETRY" } | |||
| { type: "UPDATE" } | |||
| { type: "LOAD_MORE_BUILDS" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will implement this when the BE is done
throw Error("Cannot refresh workspace without id") | ||
} | ||
}, | ||
loadMoreBuilds: async (context) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will change when the BE is ready.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
states: { | ||
idle: { | ||
on: { | ||
LOAD_MORE_BUILDS: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this for pagination?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeap! To load more/old builds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome
No description provided.