You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by ma...@apache.org on 2020/07/21 18:26:36 UTC

[trafficcontrol] branch master updated: Fix TM UI bug with DS available logic (#4900)

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 <ro...@users.noreply.github.com>
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");
 			}