Skip to content
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

Mccalluc/workspace list #2715

Merged
merged 5 commits into from
Jun 29, 2022
Merged

Mccalluc/workspace list #2715

merged 5 commits into from
Jun 29, 2022

Conversation

mccalluc
Copy link
Contributor

Pull lists of workspaces and jobs from the API. Ugly, but it has surfaced a number of problems with the API. Juan has been making hot fixes for some, and filed issues for others:

This does not include the changes you suggested to that creation API calls will also update the lists. I'll push a separate branch for that... I was getting into the weeds.

@mccalluc mccalluc marked this pull request as ready for review June 28, 2022 19:53
@mccalluc mccalluc requested a review from john-conroy June 28, 2022 20:46
Copy link
Collaborator

@john-conroy john-conroy left a comment

Choose a reason for hiding this comment

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

Ignoring the html because it's very temporary, but if you'd like feedback there I can take another glance.

<pre>{JSON.stringify(workspace, 0, 2)}</pre>
</details>
<div>
<b>{workspace.name}</b> | Created {workspace.datetime_created.slice(0, 10)}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure what the format is here, but we should move this towards being consistent with how other dates are formatted throughout the portal.

Comment on lines +30 to +42
async function startJob({ workspaceId, workspacesEndpoint, workspacesToken }) {
await fetch(`${workspacesEndpoint}/workspaces/${workspaceId}/start`, {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
'UWS-Authorization': `Token ${workspacesToken}`,
},
body: JSON.stringify({
job_type: 'JupyterLabJob',
job_details: {},
}),
});
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Based on our conversation in standup, we want to make another GET to jobs and update jobs state here, right?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok, I see the changes in #2717. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep... but I hit some snags there, so filed #2717 and will come back to it.

@mccalluc mccalluc merged commit ddf2b9a into main Jun 29, 2022
@mccalluc mccalluc deleted the mccalluc/workspace-list branch June 29, 2022 17:36
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.

2 participants