mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Sort endpoints (#7402)
This commit is contained in:
@@ -205,6 +205,18 @@ export class BdcDashboardOverviewPage {
|
||||
}
|
||||
|
||||
this.endpointsRowContainer.clearItems();
|
||||
|
||||
// Sort the endpoints. The sort method is that SQL Server Master is first - followed by all
|
||||
// others in alphabetical order by endpoint
|
||||
const sqlServerMasterEndpoints = endpoints.filter(e => e.name === Endpoint.sqlServerMaster);
|
||||
endpoints = endpoints.filter(e => e.name !== Endpoint.sqlServerMaster)
|
||||
.sort((e1, e2) => {
|
||||
if (e1.endpoint < e2.endpoint) { return -1; }
|
||||
if (e1.endpoint > e2.endpoint) { return 1; }
|
||||
return 0;
|
||||
});
|
||||
endpoints.unshift(...sqlServerMasterEndpoints);
|
||||
|
||||
endpoints.forEach((e, i) => {
|
||||
createServiceEndpointRow(this.modelBuilder, this.endpointsRowContainer, e, this.model, hyperlinkedEndpoints.some(he => he === e.name), i === endpoints.length - 1);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user