This is an automated email from the ASF dual-hosted git repository.

mattjackson pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new fb06602  Fix TM UI bug with DS available logic (#4900)
fb06602 is described below

commit fb0660241fda31efa033c1c78263c8f2b859e0f1
Author: Robert O Butts <[email protected]>
AuthorDate: Tue Jul 21 12:26:21 2020 -0600

    Fix TM UI bug with DS available logic (#4900)
---
 traffic_monitor/static/script.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/traffic_monitor/static/script.js b/traffic_monitor/static/script.js
index 8a3698a..e3d0391 100644
--- a/traffic_monitor/static/script.js
+++ b/traffic_monitor/static/script.js
@@ -232,8 +232,8 @@ function getDsStats() {
 
                for (const [dsName, deliveryService] of deliveryServices) {
                        const row = table.insertRow(0);
-                       const available = !deliveryService.isAvailable || 
!deliveryService.isAvailable[0] || !deliveryService.isAvailable[0].value === 
"true";
-                       if (available) {
+                       const available = deliveryService.isAvailable && 
deliveryService.isAvailable[0] && deliveryService.isAvailable[0].value === 
"true";
+                       if (!available) {
                                row.classList.add("error");
                        }
 

Reply via email to