web app, fleshed out delete sessions, updated sessions dialog to use selection and buttons for joining/deletion
This commit is contained in:
parent
aa55daf2e8
commit
98e8e2d627
4 changed files with 63 additions and 18 deletions
|
@ -36,6 +36,11 @@ async function putJson(url, data) {
|
|||
return await sendJson(url, data, 'PUT');
|
||||
}
|
||||
|
||||
async function deleteJson(url, data) {
|
||||
console.log('DELETE: ', url);
|
||||
return await sendJson(url, data, 'DELETE');
|
||||
}
|
||||
|
||||
class CoreRest {
|
||||
constructor() {
|
||||
this.currentSession = null;
|
||||
|
@ -65,6 +70,10 @@ class CoreRest {
|
|||
return await putJson(`/sessions/${this.currentSession}/state`, {state});
|
||||
}
|
||||
|
||||
async deleteSession(sessionId) {
|
||||
return await deleteJson(`/sessions/${sessionId}`);
|
||||
}
|
||||
|
||||
async getEmaneModels() {
|
||||
return await $.getJSON(`/sessions/${this.currentSession}/emane/models`);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue