mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Filter out system dbs from create project from db dialog (#15610)
* filter out system dbs from create project from db dialog * use includes instead of find
This commit is contained in:
@@ -228,7 +228,9 @@ export class CreateProjectFromDatabaseDialog {
|
|||||||
// populate database dropdown with the databases for this connection
|
// populate database dropdown with the databases for this connection
|
||||||
if (connectionId) {
|
if (connectionId) {
|
||||||
this.sourceDatabaseDropDown!.loading = true;
|
this.sourceDatabaseDropDown!.loading = true;
|
||||||
const databaseValues = await azdata.connection.listDatabases(connectionId);
|
const databaseValues = (await azdata.connection.listDatabases(connectionId))
|
||||||
|
// filter out system dbs
|
||||||
|
.filter(db => !constants.systemDbs.includes(db));
|
||||||
|
|
||||||
this.sourceDatabaseDropDown!.values = databaseValues;
|
this.sourceDatabaseDropDown!.values = databaseValues;
|
||||||
this.sourceDatabaseDropDown!.loading = false;
|
this.sourceDatabaseDropDown!.loading = false;
|
||||||
|
|||||||
@@ -521,7 +521,7 @@ export class PublishDatabaseDialog {
|
|||||||
if (connectionId) {
|
if (connectionId) {
|
||||||
const databaseValues = (await azdata.connection.listDatabases(connectionId))
|
const databaseValues = (await azdata.connection.listDatabases(connectionId))
|
||||||
// filter out system dbs
|
// filter out system dbs
|
||||||
.filter(db => constants.systemDbs.find(systemdb => db === systemdb) === undefined);
|
.filter(db => !constants.systemDbs.includes(db));
|
||||||
|
|
||||||
this.targetDatabaseDropDown!.values = databaseValues;
|
this.targetDatabaseDropDown!.values = databaseValues;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user