From f9b0abdd142276ef8e564d27d960af35f1654541 Mon Sep 17 00:00:00 2001 From: Dmitry Shilov Date: Mon, 5 May 2025 15:50:43 +0200 Subject: [PATCH 1/8] fix: Add overflow property and set minimum heights for flex and sidebar containers (#2124) * fix: Add overflow property and set minimum heights for flex and sidebar containers * fix: Update overflow and minimum height properties for tab panes and containers --- less/documentDBFabric.less | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/less/documentDBFabric.less b/less/documentDBFabric.less index 900535700..832679abd 100644 --- a/less/documentDBFabric.less +++ b/less/documentDBFabric.less @@ -211,3 +211,12 @@ a:focus { .fileImportImg img { filter: brightness(0) saturate(100%); } + +.tabPanesContainer { + overflow: auto !important; +} + +.tabs-container { + min-height: 500px; + min-width: 500px; +} From ea6f3d15797df1c74d97c53d8973aafc597ddf2d Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Mon, 5 May 2025 21:17:36 +0530 Subject: [PATCH 2/8] Cloudshell: Few Enhancement (#2128) * few enhancement * fix time --- .../CloudShellTab/CloudShellTerminalCore.tsx | 51 +++++++++---------- .../ShellTypes/AbstractShellHandler.tsx | 26 ++++++++++ .../ShellTypes/MongoShellHandler.test.tsx | 2 +- .../ShellTypes/MongoShellHandler.tsx | 11 +--- .../VCoreMongoShellHandler.test.tsx | 2 +- .../ShellTypes/VCoreMongoShellHandler.tsx | 24 +-------- .../Tabs/CloudShellTab/Utils/AttachAddOn.tsx | 26 ++++++++-- 7 files changed, 76 insertions(+), 66 deletions(-) diff --git a/src/Explorer/Tabs/CloudShellTab/CloudShellTerminalCore.tsx b/src/Explorer/Tabs/CloudShellTab/CloudShellTerminalCore.tsx index da692cc9b..8dff70d08 100644 --- a/src/Explorer/Tabs/CloudShellTab/CloudShellTerminalCore.tsx +++ b/src/Explorer/Tabs/CloudShellTab/CloudShellTerminalCore.tsx @@ -55,20 +55,16 @@ export const startCloudShellTerminal = async (terminal: Terminal, shellType: Ter TelemetryProcessor.trace( Action.CloudShellUserConsent, consentGranted ? ActionModifiers.Success : ActionModifiers.Cancel, - { dataExplorerArea: Areas.CloudShell }, + { + dataExplorerArea: Areas.CloudShell, + shellType: TerminalKind[shellType], + isConsent: consentGranted, + region: resolvedRegion, + }, + startKey, ); if (!consentGranted) { - TelemetryProcessor.traceCancel( - Action.CloudShellTerminalSession, - { - shellType: TerminalKind[shellType], - dataExplorerArea: Areas.CloudShell, - region: resolvedRegion, - isConsent: false, - }, - startKey, - ); terminal.writeln( formatErrorMessage("Session ended. Please close this tab and initiate a new shell session if needed."), ); @@ -262,28 +258,27 @@ export const configureSocketConnection = async ( }; export const sendTerminalStartupCommands = (socket: WebSocket, initCommands: string): void => { + // ensures connections don't remain open indefinitely by implementing an automatic timeout after 120 minutes. + const keepSocketAlive = (socket: WebSocket) => { + if (socket.readyState === WebSocket.OPEN) { + if (pingCount >= MAX_PING_COUNT) { + socket.close(); + } else { + pingCount++; + // The code uses a recursive setTimeout pattern rather than setInterval, + // which ensures each new ping only happens after the previous one completes + // and naturally stops if the socket closes. + keepAliveID = setTimeout(() => keepSocketAlive(socket), 1000); + } + } + }; + if (socket && socket.readyState === WebSocket.OPEN) { socket.send(initCommands); + keepSocketAlive(socket); } else { socket.onopen = () => { socket.send(initCommands); - - // ensures connections don't remain open indefinitely by implementing an automatic timeout after 20 minutes. - const keepSocketAlive = (socket: WebSocket) => { - if (socket.readyState === WebSocket.OPEN) { - if (pingCount >= MAX_PING_COUNT) { - socket.close(); - } else { - socket.send(""); - pingCount++; - // The code uses a recursive setTimeout pattern rather than setInterval, - // which ensures each new ping only happens after the previous one completes - // and naturally stops if the socket closes. - keepAliveID = setTimeout(() => keepSocketAlive(socket), 1000); - } - } - }; - keepSocketAlive(socket); }; } diff --git a/src/Explorer/Tabs/CloudShellTab/ShellTypes/AbstractShellHandler.tsx b/src/Explorer/Tabs/CloudShellTab/ShellTypes/AbstractShellHandler.tsx index f72dda8f6..7d09000ae 100644 --- a/src/Explorer/Tabs/CloudShellTab/ShellTypes/AbstractShellHandler.tsx +++ b/src/Explorer/Tabs/CloudShellTab/ShellTypes/AbstractShellHandler.tsx @@ -56,4 +56,30 @@ export abstract class AbstractShellHandler { return allCommands.join("\n").concat("\n"); } + + /** + * Setup commands for MongoDB shell: + * + * 1. Check if mongosh is already installed + * 2. Download mongosh package if not installed + * 3. Extract the package to access mongosh binaries + * 4. Move extracted files to ~/mongosh directory + * 5. Add mongosh binary path to system PATH + * 6. Apply PATH changes by sourcing .bashrc + * + * Each command runs conditionally only if mongosh + * is not already present in the environment. + */ + protected mongoShellSetupCommands(): string[] { + const PACKAGE_VERSION: string = "2.5.0"; + return [ + "if ! command -v mongosh &> /dev/null; then echo '⚠️ mongosh not found. Installing...'; fi", + `if ! command -v mongosh &> /dev/null; then curl -LO https://downloads.mongodb.com/compass/mongosh-${PACKAGE_VERSION}-linux-x64.tgz; fi`, + `if ! command -v mongosh &> /dev/null; then tar -xvzf mongosh-${PACKAGE_VERSION}-linux-x64.tgz; fi`, + `if ! command -v mongosh &> /dev/null; then mkdir -p ~/mongosh/bin && mv mongosh-${PACKAGE_VERSION}-linux-x64/bin/mongosh ~/mongosh/bin/ && chmod +x ~/mongosh/bin/mongosh; fi`, + `if ! command -v mongosh &> /dev/null; then rm -rf mongosh-${PACKAGE_VERSION}-linux-x64 mongosh-${PACKAGE_VERSION}-linux-x64.tgz; fi`, + "if ! command -v mongosh &> /dev/null; then echo 'export PATH=$HOME/mongosh/bin:$PATH' >> ~/.bashrc; fi", + "source ~/.bashrc", + ]; + } } diff --git a/src/Explorer/Tabs/CloudShellTab/ShellTypes/MongoShellHandler.test.tsx b/src/Explorer/Tabs/CloudShellTab/ShellTypes/MongoShellHandler.test.tsx index b320a9b68..ba6168f96 100644 --- a/src/Explorer/Tabs/CloudShellTab/ShellTypes/MongoShellHandler.test.tsx +++ b/src/Explorer/Tabs/CloudShellTab/ShellTypes/MongoShellHandler.test.tsx @@ -68,7 +68,7 @@ describe("MongoShellHandler", () => { const commands = mongoShellHandler.getSetUpCommands(); expect(Array.isArray(commands)).toBe(true); - expect(commands.length).toBe(6); + expect(commands.length).toBe(7); expect(commands[1]).toContain("mongosh-2.5.0-linux-x64.tgz"); }); }); diff --git a/src/Explorer/Tabs/CloudShellTab/ShellTypes/MongoShellHandler.tsx b/src/Explorer/Tabs/CloudShellTab/ShellTypes/MongoShellHandler.tsx index fce6be513..9da24717c 100644 --- a/src/Explorer/Tabs/CloudShellTab/ShellTypes/MongoShellHandler.tsx +++ b/src/Explorer/Tabs/CloudShellTab/ShellTypes/MongoShellHandler.tsx @@ -2,8 +2,6 @@ import { userContext } from "../../../../UserContext"; import { getHostFromUrl } from "../Utils/CommonUtils"; import { AbstractShellHandler } from "./AbstractShellHandler"; -const PACKAGE_VERSION: string = "2.5.0"; - export class MongoShellHandler extends AbstractShellHandler { private _key: string; private _endpoint: string | undefined; @@ -18,14 +16,7 @@ export class MongoShellHandler extends AbstractShellHandler { } public getSetUpCommands(): string[] { - return [ - "if ! command -v mongosh &> /dev/null; then echo '⚠️ mongosh not found. Installing...'; fi", - `if ! command -v mongosh &> /dev/null; then curl -LO https://downloads.mongodb.com/compass/mongosh-${PACKAGE_VERSION}-linux-x64.tgz; fi`, - `if ! command -v mongosh &> /dev/null; then tar -xvzf mongosh-${PACKAGE_VERSION}-linux-x64.tgz; fi`, - `if ! command -v mongosh &> /dev/null; then mkdir -p ~/mongosh && mv mongosh-${PACKAGE_VERSION}-linux-x64/* ~/mongosh/; fi`, - "if ! command -v mongosh &> /dev/null; then echo 'export PATH=$HOME/mongosh/bin:$PATH' >> ~/.bashrc; fi", - "source ~/.bashrc", - ]; + return this.mongoShellSetupCommands(); } public getConnectionCommand(): string { diff --git a/src/Explorer/Tabs/CloudShellTab/ShellTypes/VCoreMongoShellHandler.test.tsx b/src/Explorer/Tabs/CloudShellTab/ShellTypes/VCoreMongoShellHandler.test.tsx index 7c0baed84..a5d4e1336 100644 --- a/src/Explorer/Tabs/CloudShellTab/ShellTypes/VCoreMongoShellHandler.test.tsx +++ b/src/Explorer/Tabs/CloudShellTab/ShellTypes/VCoreMongoShellHandler.test.tsx @@ -44,7 +44,7 @@ describe("VCoreMongoShellHandler", () => { const commands = vcoreMongoShellHandler.getSetUpCommands(); expect(Array.isArray(commands)).toBe(true); - expect(commands.length).toBe(6); + expect(commands.length).toBe(7); expect(commands[1]).toContain("mongosh-2.5.0-linux-x64.tgz"); expect(commands[0]).toContain("mongosh not found"); }); diff --git a/src/Explorer/Tabs/CloudShellTab/ShellTypes/VCoreMongoShellHandler.tsx b/src/Explorer/Tabs/CloudShellTab/ShellTypes/VCoreMongoShellHandler.tsx index 8a3a38610..3c6c859a8 100644 --- a/src/Explorer/Tabs/CloudShellTab/ShellTypes/VCoreMongoShellHandler.tsx +++ b/src/Explorer/Tabs/CloudShellTab/ShellTypes/VCoreMongoShellHandler.tsx @@ -1,8 +1,6 @@ import { userContext } from "../../../../UserContext"; import { AbstractShellHandler } from "./AbstractShellHandler"; -const PACKAGE_VERSION: string = "2.5.0"; - export class VCoreMongoShellHandler extends AbstractShellHandler { private _endpoint: string | undefined; @@ -15,28 +13,8 @@ export class VCoreMongoShellHandler extends AbstractShellHandler { return "MongoDB VCore"; } - /** - * Setup commands for MongoDB VCore shell: - * - * 1. Check if mongosh is already installed - * 2. Download mongosh package if not installed - * 3. Extract the package to access mongosh binaries - * 4. Move extracted files to ~/mongosh directory - * 5. Add mongosh binary path to system PATH - * 6. Apply PATH changes by sourcing .bashrc - * - * Each command runs conditionally only if mongosh - * is not already present in the environment. - */ public getSetUpCommands(): string[] { - return [ - "if ! command -v mongosh &> /dev/null; then echo '⚠️ mongosh not found. Installing...'; fi", - `if ! command -v mongosh &> /dev/null; then curl -LO https://downloads.mongodb.com/compass/mongosh-${PACKAGE_VERSION}-linux-x64.tgz; fi`, - `if ! command -v mongosh &> /dev/null; then tar -xvzf mongosh-${PACKAGE_VERSION}-linux-x64.tgz; fi`, - `if ! command -v mongosh &> /dev/null; then mkdir -p ~/mongosh && mv mongosh-${PACKAGE_VERSION}-linux-x64/* ~/mongosh/; fi`, - "if ! command -v mongosh &> /dev/null; then echo 'export PATH=$HOME/mongosh/bin:$PATH' >> ~/.bashrc; fi", - "source ~/.bashrc", - ]; + return this.mongoShellSetupCommands(); } public getConnectionCommand(): string { diff --git a/src/Explorer/Tabs/CloudShellTab/Utils/AttachAddOn.tsx b/src/Explorer/Tabs/CloudShellTab/Utils/AttachAddOn.tsx index 9fc011c28..75a19c1aa 100644 --- a/src/Explorer/Tabs/CloudShellTab/Utils/AttachAddOn.tsx +++ b/src/Explorer/Tabs/CloudShellTab/Utils/AttachAddOn.tsx @@ -1,5 +1,6 @@ -import { AbstractShellHandler } from "Explorer/Tabs/CloudShellTab/ShellTypes/AbstractShellHandler"; import { IDisposable, ITerminalAddon, Terminal } from "@xterm/xterm"; +import { AbstractShellHandler } from "../ShellTypes/AbstractShellHandler"; +import { formatErrorMessage } from "./TerminalLogFormats"; interface IAttachOptions { bidirectional?: boolean; @@ -56,8 +57,27 @@ export class AttachAddon implements ITerminalAddon { this._disposables.push(terminal.onBinary((data) => this._sendBinary(data))); } - this._disposables.push(addSocketListener(this._socket, "close", () => this.dispose())); - this._disposables.push(addSocketListener(this._socket, "error", () => this.dispose())); + this._disposables.push(addSocketListener(this._socket, "close", () => this._handleSocketClose(terminal))); + this._disposables.push(addSocketListener(this._socket, "error", () => this._handleSocketClose(terminal))); + } + + /** + * Handles socket close events by terminating processes and showing a message + */ + private _handleSocketClose(terminal: Terminal): void { + if (terminal) { + terminal.writeln( + formatErrorMessage("Session ended. Please close this tab and initiate a new shell session if needed."), + ); + + // Send exit command to terminal + if (this._bidirectional) { + terminal.write(formatErrorMessage("exit\r\n")); + } + } + + // Clean up resources + this.dispose(); } /** From 2fa95a281e5c7cf266a9ab2360ef4b3e200be4e8 Mon Sep 17 00:00:00 2001 From: Laurent Nguyen Date: Wed, 7 May 2025 11:52:41 +0200 Subject: [PATCH 3/8] Disable "Learn more" link for now in Fabric Home (#2129) --- src/Explorer/SplashScreen/FabricHome.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Explorer/SplashScreen/FabricHome.tsx b/src/Explorer/SplashScreen/FabricHome.tsx index 7db6ee041..7b6cae00c 100644 --- a/src/Explorer/SplashScreen/FabricHome.tsx +++ b/src/Explorer/SplashScreen/FabricHome.tsx @@ -1,7 +1,7 @@ /** * Accordion top class */ -import { Link, makeStyles, tokens } from "@fluentui/react-components"; +import { makeStyles, tokens } from "@fluentui/react-components"; import { DocumentAddRegular, LinkMultipleRegular } from "@fluentui/react-icons"; import { SampleDataImportDialog } from "Explorer/SplashScreen/SampleDataImportDialog"; import { CosmosFluentProvider } from "Explorer/Theme/ThemeUtil"; @@ -9,7 +9,6 @@ import { isFabricNative, isFabricNativeReadOnly } from "Platform/Fabric/FabricUt import * as React from "react"; import { userContext } from "UserContext"; import CosmosDbBlackIcon from "../../../images/CosmosDB_black.svg"; -import LinkIcon from "../../../images/Link_blue.svg"; import Explorer from "../Explorer"; export interface SplashScreenProps { @@ -186,12 +185,12 @@ export const FabricHomeScreen: React.FC = (props: SplashScree {title} {getSplashScreenButtons()} -
+ {/*
Need help?{" "} Learn more Learn more -
+
*/} ); From 2dbec019afba6ce701a1fe3bb15d4d88a09f09fb Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Thu, 8 May 2025 06:41:35 +0530 Subject: [PATCH 4/8] CloudShell: Changed User Consent Message and Add appName in commands (#2130) * message change * updated commands --- .../CloudShellTab/CloudShellTerminalCore.tsx | 34 ++++++++++++++++--- .../ShellTypes/AbstractShellHandler.tsx | 6 ++++ .../ShellTypes/CassandraShellHandler.test.tsx | 2 +- .../ShellTypes/MongoShellHandler.test.tsx | 2 +- .../ShellTypes/MongoShellHandler.tsx | 14 ++++++-- .../ShellTypes/PostgresShellHandler.tsx | 2 +- .../ShellTypes/VCoreMongoShellHandler.tsx | 2 +- 7 files changed, 50 insertions(+), 12 deletions(-) diff --git a/src/Explorer/Tabs/CloudShellTab/CloudShellTerminalCore.tsx b/src/Explorer/Tabs/CloudShellTab/CloudShellTerminalCore.tsx index 8dff70d08..996afc351 100644 --- a/src/Explorer/Tabs/CloudShellTab/CloudShellTerminalCore.tsx +++ b/src/Explorer/Tabs/CloudShellTab/CloudShellTerminalCore.tsx @@ -43,13 +43,37 @@ export const startCloudShellTerminal = async (terminal: Terminal, shellType: Ter await ensureCloudShellProviderRegistered(); resolvedRegion = determineCloudShellRegion(); - // Ask for user consent for region - const consentGranted = await askConfirmation( - terminal, - formatWarningMessage( - "The shell environment may be operating in a region different from that of the database, which could impact performance or data compliance. Do you wish to proceed?", + + resolvedRegion = determineCloudShellRegion(); + + terminal.writeln(formatWarningMessage("⚠️ IMPORTANT: Azure Cloud Shell Region Notice ⚠️")); + terminal.writeln( + formatInfoMessage( + "The Cloud Shell environment will operate in a region that may differ from your database's region.", ), ); + terminal.writeln(formatInfoMessage("This has two potential implications:")); + terminal.writeln(formatInfoMessage("1. Performance Impact:")); + terminal.writeln( + formatInfoMessage(" Commands may experience higher latency due to geographic distance between regions."), + ); + terminal.writeln(formatInfoMessage("2. Data Compliance Considerations:")); + terminal.writeln( + formatInfoMessage( + " Data processed through this shell could temporarily reside in a different geographic region,", + ), + ); + terminal.writeln( + formatInfoMessage(" which may affect compliance with data residency requirements or regulations specific"), + ); + terminal.writeln(formatInfoMessage(" to your organization.")); + terminal.writeln(""); + + terminal.writeln("\x1b[94mFor more information on Azure Cosmos DB data governance and compliance, please visit:"); + terminal.writeln("\x1b[94mhttps://learn.microsoft.com/en-us/azure/cosmos-db/data-residency\x1b[0m"); + + // Ask for user consent for region + const consentGranted = await askConfirmation(terminal, formatWarningMessage("Do you wish to proceed?")); // Track user decision TelemetryProcessor.trace( diff --git a/src/Explorer/Tabs/CloudShellTab/ShellTypes/AbstractShellHandler.tsx b/src/Explorer/Tabs/CloudShellTab/ShellTypes/AbstractShellHandler.tsx index 7d09000ae..c6ba7b8f0 100644 --- a/src/Explorer/Tabs/CloudShellTab/ShellTypes/AbstractShellHandler.tsx +++ b/src/Explorer/Tabs/CloudShellTab/ShellTypes/AbstractShellHandler.tsx @@ -22,6 +22,12 @@ export const EXIT_COMMAND = ` printf "\\033[1;31mSession ended. Please close thi * the required methods. */ export abstract class AbstractShellHandler { + /** + * The name of the application using this shell handler. + * This is used for telemetry and logging purposes. + */ + protected APP_NAME = "CosmosExplorerTerminal"; + abstract getShellName(): string; abstract getSetUpCommands(): string[]; abstract getConnectionCommand(): string; diff --git a/src/Explorer/Tabs/CloudShellTab/ShellTypes/CassandraShellHandler.test.tsx b/src/Explorer/Tabs/CloudShellTab/ShellTypes/CassandraShellHandler.test.tsx index ea5310a27..9bf4b3aa7 100644 --- a/src/Explorer/Tabs/CloudShellTab/ShellTypes/CassandraShellHandler.test.tsx +++ b/src/Explorer/Tabs/CloudShellTab/ShellTypes/CassandraShellHandler.test.tsx @@ -87,7 +87,7 @@ describe("CassandraShellHandler", () => { }); test("should return correct connection command", () => { - const expectedCommand = "cqlsh test-endpoint.cassandra.cosmos.azure.com 10350 -u test-account -p test-key --ssl"; + const expectedCommand = `cqlsh test-endpoint.cassandra.cosmos.azure.com 10350 -u test-account -p test-key --ssl`; expect(handler.getConnectionCommand()).toBe(expectedCommand); expect(CommonUtils.getHostFromUrl).toHaveBeenCalledWith("https://test-endpoint.cassandra.cosmos.azure.com:443/"); diff --git a/src/Explorer/Tabs/CloudShellTab/ShellTypes/MongoShellHandler.test.tsx b/src/Explorer/Tabs/CloudShellTab/ShellTypes/MongoShellHandler.test.tsx index ba6168f96..25395322f 100644 --- a/src/Explorer/Tabs/CloudShellTab/ShellTypes/MongoShellHandler.test.tsx +++ b/src/Explorer/Tabs/CloudShellTab/ShellTypes/MongoShellHandler.test.tsx @@ -91,7 +91,7 @@ describe("MongoShellHandler", () => { const command = mongoShellHandler.getConnectionCommand(); expect(command).toBe( - "mongosh --host test-mongo.documents.azure.com --port 10255 --username test-account --password test-key --tls --tlsAllowInvalidCertificates", + "mongosh mongodb://test-mongo.documents.azure.com:10255?appName=CosmosExplorerTerminal --username test-account --password test-key --tls --tlsAllowInvalidCertificates", ); expect(CommonUtils.getHostFromUrl).toHaveBeenCalledWith("https://test-mongo.documents.azure.com:443/"); diff --git a/src/Explorer/Tabs/CloudShellTab/ShellTypes/MongoShellHandler.tsx b/src/Explorer/Tabs/CloudShellTab/ShellTypes/MongoShellHandler.tsx index 9da24717c..d15c42017 100644 --- a/src/Explorer/Tabs/CloudShellTab/ShellTypes/MongoShellHandler.tsx +++ b/src/Explorer/Tabs/CloudShellTab/ShellTypes/MongoShellHandler.tsx @@ -28,9 +28,17 @@ export class MongoShellHandler extends AbstractShellHandler { if (!dbName) { return "echo 'Database name not found.'"; } - return `mongosh --host ${getHostFromUrl(this._endpoint)} --port 10255 --username ${dbName} --password ${ - this._key - } --tls --tlsAllowInvalidCertificates`; + return ( + "mongosh mongodb://" + + getHostFromUrl(this._endpoint) + + ":10255?appName=" + + this.APP_NAME + + " --username " + + dbName + + " --password " + + this._key + + " --tls --tlsAllowInvalidCertificates" + ); } public getTerminalSuppressedData(): string { diff --git a/src/Explorer/Tabs/CloudShellTab/ShellTypes/PostgresShellHandler.tsx b/src/Explorer/Tabs/CloudShellTab/ShellTypes/PostgresShellHandler.tsx index d2b235eca..c22d9d972 100644 --- a/src/Explorer/Tabs/CloudShellTab/ShellTypes/PostgresShellHandler.tsx +++ b/src/Explorer/Tabs/CloudShellTab/ShellTypes/PostgresShellHandler.tsx @@ -54,7 +54,7 @@ export class PostgresShellHandler extends AbstractShellHandler { // All Azure Cosmos DB PostgreSQL deployments follow this convention. // Ref. https://learn.microsoft.com/en-us/azure/cosmos-db/postgresql/reference-limits#database-creation const loginName = userContext.postgresConnectionStrParams.adminLogin; - return `psql -h "${this._endpoint}" -p 5432 -d "citus" -U "${loginName}" --set=sslmode=require`; + return `psql -h "${this._endpoint}" -p 5432 -d "citus" -U "${loginName}" --set=sslmode=require --set=application_name=${this.APP_NAME}`; } public getTerminalSuppressedData(): string { diff --git a/src/Explorer/Tabs/CloudShellTab/ShellTypes/VCoreMongoShellHandler.tsx b/src/Explorer/Tabs/CloudShellTab/ShellTypes/VCoreMongoShellHandler.tsx index 3c6c859a8..85641c5ff 100644 --- a/src/Explorer/Tabs/CloudShellTab/ShellTypes/VCoreMongoShellHandler.tsx +++ b/src/Explorer/Tabs/CloudShellTab/ShellTypes/VCoreMongoShellHandler.tsx @@ -23,7 +23,7 @@ export class VCoreMongoShellHandler extends AbstractShellHandler { } const userName = userContext.vcoreMongoConnectionParams.adminLogin; - return `mongosh "mongodb+srv://${userName}:@${this._endpoint}/?authMechanism=SCRAM-SHA-256&retrywrites=false&maxIdleTimeMS=120000"`; + return `mongosh "mongodb+srv://${userName}:@${this._endpoint}/?authMechanism=SCRAM-SHA-256&retrywrites=false&maxIdleTimeMS=120000&appName=${this.APP_NAME}"`; } public getTerminalSuppressedData(): string { From 985c744198887a026a680a8dd8527dfe31a0e6f0 Mon Sep 17 00:00:00 2001 From: sunghyunkang1111 <114709653+sunghyunkang1111@users.noreply.github.com> Date: Thu, 8 May 2025 09:14:09 -0500 Subject: [PATCH 5/8] get the user defined system key value for updating (#2134) * get the user defined system key value for updating * Added the systemkey check for non-defined system key --- src/Utils/QueryUtils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Utils/QueryUtils.ts b/src/Utils/QueryUtils.ts index 07822a422..643dd526b 100644 --- a/src/Utils/QueryUtils.ts +++ b/src/Utils/QueryUtils.ts @@ -124,7 +124,7 @@ export const extractPartitionKeyValues = ( documentContent: any, partitionKeyDefinition: PartitionKeyDefinition, ): PartitionKey[] => { - if (!partitionKeyDefinition.paths || partitionKeyDefinition.paths.length === 0 || partitionKeyDefinition.systemKey) { + if (!partitionKeyDefinition.paths || partitionKeyDefinition.paths.length === 0) { return undefined; } @@ -136,7 +136,7 @@ export const extractPartitionKeyValues = ( if (value !== undefined) { partitionKeyValues.push(value); - } else { + } else if (!partitionKeyDefinition.systemKey) { partitionKeyValues.push({}); } }); From 0f896f556b1c677c99e403d4cec301d917f5d87c Mon Sep 17 00:00:00 2001 From: Dmitry Shilov Date: Fri, 9 May 2025 12:11:26 +0200 Subject: [PATCH 6/8] feat: Enhance UploadItemsPane with error handling and status icons for file uploads (#2133) --- .../StringInputPane.test.tsx.snap | 16 +-- .../Panes/UploadItemsPane/UploadItemsPane.tsx | 125 +++++++++++++++--- src/Explorer/Tree/Collection.ts | 3 + 3 files changed, 115 insertions(+), 29 deletions(-) diff --git a/src/Explorer/Panes/StringInputPane/__snapshots__/StringInputPane.test.tsx.snap b/src/Explorer/Panes/StringInputPane/__snapshots__/StringInputPane.test.tsx.snap index fe25942d4..038c6d5a4 100644 --- a/src/Explorer/Panes/StringInputPane/__snapshots__/StringInputPane.test.tsx.snap +++ b/src/Explorer/Panes/StringInputPane/__snapshots__/StringInputPane.test.tsx.snap @@ -356,7 +356,7 @@ exports[`StringInput Pane should render Create new directory properly 1`] = ` value="" >