mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-22 10:21:37 +00:00
Adding vcore mongo quickstart (#1600)
* Safety checkin * Adding vcoremongo to Main * Safety checkin * Adding vcoremongo to Main * Safety commit * Safety checkin * Adding vcoremongo to Main * Safety commit * Integrating mongo shell * Safety checkin * Adding vcoremongo to Main * Safety commit * Integrating mongo shell * Safety checkin * Safety commit * Enable mongo shell in its own tab * Safety checkin * Adding vcoremongo to Main * Safety commit * Integrating mongo shell * Safety checkin * Safety commit * Safety commit * Integrating mongo shell * Safety checkin * Safety commit * Enable mongo shell in its own tab * Adding message * Integrated mongo shell * Moving Juno endpoint back to prod * Fixed command bar unit tests * Fixing spelling
This commit is contained in:
@@ -28,6 +28,10 @@ export class JupyterLabAppFactory {
|
||||
this.isShellStarted = content?.includes("citus=>");
|
||||
}
|
||||
|
||||
private isVCoreMongoShellStarted(content: string | undefined) {
|
||||
this.isShellStarted = content?.includes("Enter password");
|
||||
}
|
||||
|
||||
constructor(closeTab: () => void) {
|
||||
this.onShellExited = closeTab;
|
||||
this.isShellStarted = false;
|
||||
@@ -43,6 +47,9 @@ export class JupyterLabAppFactory {
|
||||
case "Postgres":
|
||||
this.checkShellStarted = this.isPostgresShellStarted;
|
||||
break;
|
||||
case "VCoreMongo":
|
||||
this.checkShellStarted = this.isVCoreMongoShellStarted;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,4 +11,5 @@ export interface TerminalProps {
|
||||
apiType: ApiType;
|
||||
subscriptionId: string;
|
||||
tabId: string;
|
||||
username?: string;
|
||||
}
|
||||
|
||||
@@ -7,17 +7,24 @@ import { HttpHeaders } from "../Common/Constants";
|
||||
import { Action } from "../Shared/Telemetry/TelemetryConstants";
|
||||
import * as TelemetryProcessor from "../Shared/Telemetry/TelemetryProcessor";
|
||||
import { updateUserContext } from "../UserContext";
|
||||
import "./index.css";
|
||||
import { JupyterLabAppFactory } from "./JupyterLabAppFactory";
|
||||
import { TerminalProps } from "./TerminalProps";
|
||||
import "./index.css";
|
||||
|
||||
const createServerSettings = (props: TerminalProps): ServerConnection.ISettings => {
|
||||
let body: BodyInit | undefined;
|
||||
let headers: HeadersInit | undefined;
|
||||
if (props.terminalEndpoint) {
|
||||
body = JSON.stringify({
|
||||
let bodyObj: { endpoint: string; username?: string } = {
|
||||
endpoint: props.terminalEndpoint,
|
||||
});
|
||||
};
|
||||
if (props.username) {
|
||||
bodyObj = {
|
||||
...bodyObj,
|
||||
username: props.username,
|
||||
};
|
||||
}
|
||||
body = JSON.stringify(bodyObj);
|
||||
headers = {
|
||||
[HttpHeaders.contentType]: "application/json",
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user