Skip to content

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

Merged
merged 11 commits into from
May 18, 2022
Merged

Conversation

BrunoQuaresma
Copy link
Collaborator

@BrunoQuaresma BrunoQuaresma commented May 17, 2022

No description provided.

@BrunoQuaresma BrunoQuaresma requested review from presleyp and a team as code owners May 17, 2022 20:14
@BrunoQuaresma BrunoQuaresma self-assigned this May 17, 2022
@BrunoQuaresma BrunoQuaresma requested a review from kylecarbs May 17, 2022 20:14
<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>
Copy link
Collaborator Author

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 = (
Copy link
Collaborator Author

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" }
Copy link
Collaborator Author

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) => {
Copy link
Collaborator Author

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.

Copy link
Member

@kylecarbs kylecarbs left a 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: {
Copy link
Member

Choose a reason for hiding this comment

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

Is this for pagination?

Copy link
Collaborator Author

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.

@BrunoQuaresma BrunoQuaresma enabled auto-merge (squash) May 18, 2022 13:32
@BrunoQuaresma BrunoQuaresma removed request for a team and presleyp May 18, 2022 13:33
@BrunoQuaresma BrunoQuaresma disabled auto-merge May 18, 2022 13:33
@BrunoQuaresma BrunoQuaresma enabled auto-merge (squash) May 18, 2022 13:33
Copy link
Member

@Kira-Pilot Kira-Pilot left a comment

Choose a reason for hiding this comment

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

awesome

@BrunoQuaresma BrunoQuaresma requested review from presleyp and a team May 18, 2022 13:34
@kylecarbs kylecarbs removed request for presleyp and a team May 18, 2022 13:35
@BrunoQuaresma BrunoQuaresma merged commit b748148 into main May 18, 2022
@BrunoQuaresma BrunoQuaresma deleted the bq/add-build-logs branch May 18, 2022 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants