mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-20 17:30:46 +00:00
Added container unprovisioning
This commit is contained in:
@@ -477,6 +477,21 @@ export default class Explorer {
|
|||||||
},
|
},
|
||||||
body: JSON.stringify(provisionData)
|
body: JSON.stringify(provisionData)
|
||||||
})
|
})
|
||||||
|
const websocketId = await response.text();
|
||||||
|
const unprovisionData = {
|
||||||
|
resourceId: userContext.databaseAccount.id,
|
||||||
|
websocketId: websocketId
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener("beforeunload", async () => {
|
||||||
|
const response = await window.fetch("http://localhost:443/api/containerpooling/unprovision", {
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
[HttpHeaders.contentType]: "application/json",
|
||||||
|
},
|
||||||
|
body: JSON.stringify(unprovisionData)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
this.notebookServerInfo({
|
this.notebookServerInfo({
|
||||||
notebookServerEndpoint: userContext.features.notebookServerUrl || `http://localhost:443/api/containerpooling/resid${userContext.databaseAccount.id}/forward/`,
|
notebookServerEndpoint: userContext.features.notebookServerUrl || `http://localhost:443/api/containerpooling/resid${userContext.databaseAccount.id}/forward/`,
|
||||||
|
|||||||
Reference in New Issue
Block a user