mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-21 01:41:31 +00:00
Initialize Container Request payload change
This commit is contained in:
@@ -132,8 +132,8 @@ export default class Explorer {
|
|||||||
await this._refreshNotebooksEnabledStateForAccount();
|
await this._refreshNotebooksEnabledStateForAccount();
|
||||||
this.isNotebookEnabled(
|
this.isNotebookEnabled(
|
||||||
userContext.authType !== AuthType.ResourceToken &&
|
userContext.authType !== AuthType.ResourceToken &&
|
||||||
((await this._containsDefaultNotebookWorkspace(userContext.databaseAccount)) ||
|
((await this._containsDefaultNotebookWorkspace(userContext.databaseAccount)) ||
|
||||||
userContext.features.enableNotebooks)
|
userContext.features.enableNotebooks)
|
||||||
);
|
);
|
||||||
|
|
||||||
this.isShellEnabled(this.isNotebookEnabled() && isPublicInternetAccessAllowed());
|
this.isShellEnabled(this.isNotebookEnabled() && isPublicInternetAccessAllowed());
|
||||||
@@ -468,7 +468,10 @@ export default class Explorer {
|
|||||||
cosmosKey: userContext.masterKey,
|
cosmosKey: userContext.masterKey,
|
||||||
cosmosEndpoint: userContext.databaseAccount.properties.documentEndpoint,
|
cosmosEndpoint: userContext.databaseAccount.properties.documentEndpoint,
|
||||||
resourceId: userContext.databaseAccount.id,
|
resourceId: userContext.databaseAccount.id,
|
||||||
dbAcountName: userContext.databaseAccount.name
|
dbAccountName: userContext.databaseAccount.name,
|
||||||
|
aadToken: userContext.authorizationToken,
|
||||||
|
resourceGroup: userContext.resourceGroup,
|
||||||
|
subscriptionId: userContext.subscriptionId
|
||||||
}
|
}
|
||||||
const response = await window.fetch("http://localhost:443/api/containerpooling/provision", {
|
const response = await window.fetch("http://localhost:443/api/containerpooling/provision", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
@@ -483,15 +486,15 @@ export default class Explorer {
|
|||||||
websocketId: websocketId
|
websocketId: websocketId
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener("beforeunload", async () => {
|
window.addEventListener("beforeunload", async () => {
|
||||||
const response = await window.fetch("http://localhost:443/api/containerpooling/unprovision", {
|
const response = await window.fetch("http://localhost:443/api/containerpooling/unprovision", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
[HttpHeaders.contentType]: "application/json",
|
[HttpHeaders.contentType]: "application/json",
|
||||||
},
|
},
|
||||||
body: JSON.stringify(unprovisionData)
|
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/`,
|
||||||
@@ -542,7 +545,7 @@ export default class Explorer {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
private async ensureNotebookWorkspaceRunning() {
|
private async ensureNotebookWorkspaceRunning() {
|
||||||
@@ -1164,9 +1167,9 @@ export default class Explorer {
|
|||||||
title = "Cassandra Shell";
|
title = "Cassandra Shell";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ViewModels.TerminalKind.PostgreSQL:
|
case ViewModels.TerminalKind.PostgreSQL:
|
||||||
title = "PostgreSQL Shell";
|
title = "PostgreSQL Shell";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new Error("Terminal kind: ${kind} not supported");
|
throw new Error("Terminal kind: ${kind} not supported");
|
||||||
|
|||||||
Reference in New Issue
Block a user