From 164b82298ef16ea116f666100abf8928932365f0 Mon Sep 17 00:00:00 2001 From: Tomasz Naumowicz Date: Thu, 14 Nov 2024 14:03:17 +0100 Subject: [PATCH] vCore: unified display names of vCore commands and output formatting (#2419) * vCore: Unified display names Stopped using vCore for messages, moved to "Cluster(s)" * vCore: Unified display names --- package.json | 16 ++++++++-------- src/commands/importDocuments.ts | 2 +- src/mongoClusters/commands/createDatabase.ts | 2 +- src/mongoClusters/commands/exportDocuments.ts | 6 +++--- src/mongoClusters/commands/launchShell.ts | 2 +- .../wizards/create/PromptDatabaseNameStep.ts | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index d5dcdf63..5a3b4a36 100644 --- a/package.json +++ b/package.json @@ -588,42 +588,42 @@ "icon": "$(warning)" }, { - "category": "MongoDB (vCore)", + "category": "MongoDB Clusters", "command": "command.mongoClusters.dropCollection", "title": "Drop Collection..." }, { - "category": "MongoDB (vCore)", + "category": "MongoDB Clusters", "command": "command.mongoClusters.dropDatabase", "title": "Drop Database..." }, { - "category": "MongoDB (vCore)", + "category": "MongoDB Clusters", "command": "command.mongoClusters.createCollection", "title": "Create Collection..." }, { - "category": "MongoDB (vCore)", + "category": "MongoDB Clusters", "command": "command.mongoClusters.createDatabase", "title": "Create Database..." }, { - "category": "MongoDB (vCore)", + "category": "MongoDB Clusters", "command": "command.mongoClusters.importDocuments", "title": "Import Documents into Collection..." }, { - "category": "MongoDB (vCore)", + "category": "MongoDB Clusters", "command": "command.mongoClusters.exportDocuments", "title": "Export Documents from Collection..." }, { - "category": "MongoDB (vCore)", + "category": "MongoDB Clusters", "command": "command.mongoClusters.launchShell", "title": "Launch Shell" }, { - "category": "MongoDB (vCore)", + "category": "MongoDB Clusters", "command": "command.mongoClusters.removeWorkspaceConnection", "title": "Remove Connection..." } diff --git a/src/commands/importDocuments.ts b/src/commands/importDocuments.ts index 0ee54ea2..baa18f8a 100644 --- a/src/commands/importDocuments.ts +++ b/src/commands/importDocuments.ts @@ -216,6 +216,6 @@ async function insertDocumentsIntoMongoCluster( message = `Import failed. The operation was not acknowledged by the database.`; } - ext.outputChannel.appendLog('MongoDB (vCore): ' + message); + ext.outputChannel.appendLog('MongoDB Clusters ' + message); return message; } diff --git a/src/mongoClusters/commands/createDatabase.ts b/src/mongoClusters/commands/createDatabase.ts index 127707b4..19c90e51 100644 --- a/src/mongoClusters/commands/createDatabase.ts +++ b/src/mongoClusters/commands/createDatabase.ts @@ -23,7 +23,7 @@ export async function createDatabase(context: IActionContext, clusterNode?: Mong throw new Error( localize( 'mongoClusters.notSignedIn', - 'You are not signed in to the MongoDB (vCore) cluster. Please sign in (by expanding the node "{0}") and try again.', + 'You are not signed in to the MongoDB Cluster. Please sign in (by expanding the node "{0}") and try again.', clusterNode.mongoCluster.name, ), ); diff --git a/src/mongoClusters/commands/exportDocuments.ts b/src/mongoClusters/commands/exportDocuments.ts index cd6e9f19..fccc6857 100644 --- a/src/mongoClusters/commands/exportDocuments.ts +++ b/src/mongoClusters/commands/exportDocuments.ts @@ -43,7 +43,7 @@ export async function mongoClustersExportQueryResults( ); const filePath = targetUri.fsPath; // Convert `vscode.Uri` to a regular file path - ext.outputChannel.appendLog(`MongoDB (vCore): Exporting data to: ${filePath}`); + ext.outputChannel.appendLog(`MongoDB Clusters: Exporting data to: ${filePath}`); let documentCount = 0; @@ -58,7 +58,7 @@ export async function mongoClustersExportQueryResults( ); }); - ext.outputChannel.appendLog(`MongoDB (vCore): Exported document count: ${documentCount}`); + ext.outputChannel.appendLog(`MongoDB Clusters: Exported document count: ${documentCount}`); } async function runExportWithProgressAndDescription( @@ -80,7 +80,7 @@ async function runExportWithProgressAndDescription( await exportFunction(progress, cancellationToken); } catch (error) { vscode.window.showErrorMessage('Failed to export documents. Please see the output for details.'); - ext.outputChannel.appendLog(`MongoDB (vCore): Error exporting documents: ${error}`); + ext.outputChannel.appendLog(`MongoDB Clusters: Error exporting documents: ${error}`); } progress.report({ increment: 100 }); // Complete the progress bar }, diff --git a/src/mongoClusters/commands/launchShell.ts b/src/mongoClusters/commands/launchShell.ts index 480c30f4..92e99936 100644 --- a/src/mongoClusters/commands/launchShell.ts +++ b/src/mongoClusters/commands/launchShell.ts @@ -50,7 +50,7 @@ export async function launchShell( // shellParameters = `"${connStringWithDb}" --eval 'db.getCollection("${node.collectionInfo.name}")'` // } - const terminal: vscode.Terminal = vscode.window.createTerminal('MongoDB (vCore) Shell'); + const terminal: vscode.Terminal = vscode.window.createTerminal('MongoDB Clusters Shell'); terminal.sendText('mongosh ' + shellParameters); terminal.show(); diff --git a/src/mongoClusters/wizards/create/PromptDatabaseNameStep.ts b/src/mongoClusters/wizards/create/PromptDatabaseNameStep.ts index 7f48faa7..9665b63d 100644 --- a/src/mongoClusters/wizards/create/PromptDatabaseNameStep.ts +++ b/src/mongoClusters/wizards/create/PromptDatabaseNameStep.ts @@ -79,7 +79,7 @@ export class DatabaseNameStep extends AzureWizardPromptStep