mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Schema compare server dropdown changes (#5552)
* remove duplicate server entries in server dropdown * change server dropdown to show most recent connections first
This commit is contained in:
@@ -416,7 +416,6 @@ export class SchemaCompareDialog {
|
|||||||
idx = count;
|
idx = count;
|
||||||
}
|
}
|
||||||
|
|
||||||
let db = c.options.databaseDisplayName;
|
|
||||||
let usr = c.options.user;
|
let usr = c.options.user;
|
||||||
let srv = c.options.server;
|
let srv = c.options.server;
|
||||||
|
|
||||||
@@ -432,6 +431,17 @@ export class SchemaCompareDialog {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
values = values.reduce((uniqueValues, conn) => {
|
||||||
|
let exists = uniqueValues.find(x => x.displayName === conn.displayName);
|
||||||
|
if (!exists) {
|
||||||
|
uniqueValues.push(conn);
|
||||||
|
}
|
||||||
|
return uniqueValues;
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
// reverse list so that most recent connections show first
|
||||||
|
values.reverse();
|
||||||
|
|
||||||
// move server of current connection to the top of the list so it is the default
|
// move server of current connection to the top of the list so it is the default
|
||||||
if (idx >= 1) {
|
if (idx >= 1) {
|
||||||
let tmp = values[0];
|
let tmp = values[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user