move system dbs to bottom of the list in update project from db dialog (#18791)

This commit is contained in:
Kim Santiago
2022-03-22 18:12:19 -07:00
committed by GitHub
parent 1fa453f8f2
commit 5a87e552bc

View File

@@ -234,6 +234,10 @@ export class UpdateProjectFromDatabaseDialog {
let values = [];
try {
values = await this.getDatabaseValues(connectionProfile.connectionId);
// move system dbs to the bottom of the list so it's easier to find user dbs
const systemDbs = values.filter(db => constants.systemDbs.includes(db));
values = values.filter(db => !constants.systemDbs.includes(db)).concat(systemDbs);
} catch (e) {
// if the user doesn't have access to master, just set the database of the connection profile
values = [connectionProfile.databaseName];