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
This commit is contained in:
Tomasz Naumowicz 2024-11-14 14:03:17 +01:00 коммит произвёл GitHub
Родитель 77681e4e9b
Коммит 164b82298e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
6 изменённых файлов: 15 добавлений и 15 удалений

Просмотреть файл

@ -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..."
}

Просмотреть файл

@ -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;
}

Просмотреть файл

@ -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,
),
);

Просмотреть файл

@ -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
},

Просмотреть файл

@ -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();

Просмотреть файл

@ -79,7 +79,7 @@ export class DatabaseNameStep extends AzureWizardPromptStep<CreateDatabaseWizard
) {
return localize(
'mongoClusters.databaseExists',
'The database "{0}" already exists in the MongoDB (vCore) cluster "{1}". \n' +
'The database "{0}" already exists in the MongoDB Cluster "{1}". \n' +
'Do not rely on case to distinguish between databases. For example, you cannot use two databases with names like, salesData and SalesData.',
name,
context.mongoClusterItem.mongoCluster.name,