mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Fix importing new project from server dashboard (#11766)
* fix importing new project from server dashboard * also fix not showing list of dbs if the connection from connection dialog already specified the db
This commit is contained in:
@@ -689,19 +689,19 @@ export class ProjectsController {
|
|||||||
if (connection.options['database']) {
|
if (connection.options['database']) {
|
||||||
database = connection.options['database'];
|
database = connection.options['database'];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// choose database if connection was to a server or master
|
// choose database if connection was to a server or master
|
||||||
if (!model.database || model.database === constants.master) {
|
if (!database || database === constants.master) {
|
||||||
const databaseList = await azdata.connection.listDatabases(connectionId);
|
const databaseList = await azdata.connection.listDatabases(connectionId);
|
||||||
database = (await vscode.window.showQuickPick(databaseList.map(dbName => { return { label: dbName }; }),
|
database = (await vscode.window.showQuickPick(databaseList.map(dbName => { return { label: dbName }; }),
|
||||||
{
|
{
|
||||||
canPickMany: false,
|
canPickMany: false,
|
||||||
placeHolder: constants.extractDatabaseSelection
|
placeHolder: constants.extractDatabaseSelection
|
||||||
}))?.label;
|
}))?.label;
|
||||||
|
|
||||||
if (!database) {
|
if (!database) {
|
||||||
throw new Error(constants.databaseSelectionRequired);
|
throw new Error(constants.databaseSelectionRequired);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user