This is an automated email from the ASF dual-hosted git repository. ocket8888 pushed a commit to branch 5.1.x in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
commit 737f777f0298342c6ee326e8b691cd5895261994 Author: Steve Hamrick <[email protected]> AuthorDate: Wed Apr 14 10:35:42 2021 -0600 TM UI - Sort Delivery Service States (#5745) * Sort Delivery Services * Add changelog (cherry picked from commit 47ca424625ba8f1cbc3a8357f33e9ad73dcde897) --- CHANGELOG.md | 1 + traffic_monitor/static/script.js | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f0a94c8..60b4fa0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Fixed ORT being unable to update URLSIG keys for Delivery Services - Fixed an issue where Traffic Ops becoming unavailable caused Traffic Monitor to segfault and crash - [#5754](https://github.com/apache/trafficcontrol/issues/5754) - Ensure Health Threshold Parameters use legacy format for legacy Monitoring Config handler +- [#5744](https://github.com/apache/trafficcontrol/issues/5744) - Sort TM Delivery Service States page by DS name ## [5.1.1] - 2021-03-19 ### Added diff --git a/traffic_monitor/static/script.js b/traffic_monitor/static/script.js index f2511c4..ac86a5c 100644 --- a/traffic_monitor/static/script.js +++ b/traffic_monitor/static/script.js @@ -313,7 +313,10 @@ function getDSProperty(ds, prop) { function getDsStats() { /// \todo add /api/delivery-service-stats which only returns the data needed by the UI, for efficiency ajax("/publish/DsStats", function(r) { - const deliveryServices = new Map(Object.entries(JSON.parse(r).deliveryService)); + const deliveryServices = new Map(Object.entries(JSON.parse(r).deliveryService).sort((dsTupleA, dsTupleB) => { + return -1 * dsTupleA[0].localeCompare(dsTupleB[0]); + })); + const table = document.createElement('TBODY'); table.id = "deliveryservice-stats";
