mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-20 09:20:16 +00:00
* Default to new backend endpoint if the endpoint in current context does not match existing set in constants. * Remove some env references. * Added comments with reasoning for selecting new backend by default. * Update comment. * Remove all references to useNewPortalBackendEndpoint now that old backend is disabled in all environments. * Resolve lint issues. * Removed references to old backend from Cassandra and Mongo Apis * fix unit tests --------- Co-authored-by: Asier Isayas <aisayas@microsoft.com>
12 lines
483 B
TypeScript
12 lines
483 B
TypeScript
import { userContext } from "../../../UserContext";
|
|
|
|
export function getMongoShellUrl(): string {
|
|
const { databaseAccount: account } = userContext;
|
|
const resourceId = account?.id;
|
|
const accountName = account?.name;
|
|
const mongoEndpoint = account?.properties?.mongoEndpoint || account?.properties?.documentEndpoint;
|
|
const queryString = `resourceId=${resourceId}&accountName=${accountName}&mongoEndpoint=${mongoEndpoint}`;
|
|
|
|
return `/mongoshell/index.html?${queryString}`;
|
|
}
|