-
Notifications
You must be signed in to change notification settings - Fork 2
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
Mccalluc/workspace list #2715
Conversation
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.
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)} |
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.
Not sure what the format is here, but we should move this towards being consistent with how other dates are formatted throughout the portal.
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: {}, | ||
}), | ||
}); | ||
} |
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.
Based on our conversation in standup, we want to make another GET to jobs and update jobs state here, right?
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.
Ok, I see the changes in #2717. Thanks!
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.
Yep... but I hit some snags there, so filed #2717 and will come back to it.
Co-authored-by: John Conroy <[email protected]>
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.