You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by de...@apache.org on 2017/03/21 21:11:57 UTC

[1/3] incubator-trafficcontrol git commit: This closes #389

Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master fb538a940 -> c0de68c01


This closes #389


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/c0de68c0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/c0de68c0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/c0de68c0

Branch: refs/heads/master
Commit: c0de68c01ac1a97063eb29b9fb4c9284c5507aaa
Parents: 111c3d9
Author: Dewayne Richardson <de...@apache.org>
Authored: Tue Mar 21 15:11:48 2017 -0600
Committer: Dewayne Richardson <de...@apache.org>
Committed: Tue Mar 21 15:11:48 2017 -0600

----------------------------------------------------------------------

----------------------------------------------------------------------



[3/3] incubator-trafficcontrol git commit: lower refresh rate from 10s to 30s

Posted by de...@apache.org.
lower refresh rate from 10s to 30s


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/5a6b4de1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/5a6b4de1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/5a6b4de1

Branch: refs/heads/master
Commit: 5a6b4de19fac01b3bfb1901a561f4779d8f4612d
Parents: fb538a9
Author: Jeremy Mitchell <mi...@gmail.com>
Authored: Tue Mar 21 13:25:40 2017 -0600
Committer: Dewayne Richardson <de...@apache.org>
Committed: Tue Mar 21 15:11:48 2017 -0600

----------------------------------------------------------------------
 traffic_ops/app/templates/rascal_status/health.html.ep | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/5a6b4de1/traffic_ops/app/templates/rascal_status/health.html.ep
----------------------------------------------------------------------
diff --git a/traffic_ops/app/templates/rascal_status/health.html.ep b/traffic_ops/app/templates/rascal_status/health.html.ep
index bc5b543..47ead84 100644
--- a/traffic_ops/app/templates/rascal_status/health.html.ep
+++ b/traffic_ops/app/templates/rascal_status/health.html.ep
@@ -134,7 +134,7 @@ $(function () {
 			function() { 
 				edgeHealthTable.fnReloadAjax();
 			}, 
-			10000
+			30000
 		);
 
 		// Set the mouseover descriptions of the table headers - prolly should do this smarter, but this works for now.


[2/3] incubator-trafficcontrol git commit: only reload health table if browser window is active

Posted by de...@apache.org.
only reload health table if browser window is active


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/111c3d93
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/111c3d93
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/111c3d93

Branch: refs/heads/master
Commit: 111c3d9349c86902593a6ec6c2ab13a96ea24acf
Parents: 5a6b4de
Author: Jeremy Mitchell <mi...@gmail.com>
Authored: Tue Mar 21 14:52:35 2017 -0600
Committer: Dewayne Richardson <de...@apache.org>
Committed: Tue Mar 21 15:11:48 2017 -0600

----------------------------------------------------------------------
 .../app/templates/rascal_status/health.html.ep  | 31 ++++++++++++++++----
 1 file changed, 25 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/111c3d93/traffic_ops/app/templates/rascal_status/health.html.ep
----------------------------------------------------------------------
diff --git a/traffic_ops/app/templates/rascal_status/health.html.ep b/traffic_ops/app/templates/rascal_status/health.html.ep
index 47ead84..6f877de 100644
--- a/traffic_ops/app/templates/rascal_status/health.html.ep
+++ b/traffic_ops/app/templates/rascal_status/health.html.ep
@@ -130,12 +130,31 @@ $(function () {
                 "sAjaxSource": "/api/1.1/traffic_monitor/stats.json"
 		});
 
-		setInterval(
-			function() { 
-				edgeHealthTable.fnReloadAjax();
-			}, 
-			30000
-		);
+            var reloadHealth = function() {
+                edgeHealthTable.fnReloadAjax();
+            };
+
+            var activeEvent,
+                intervalMilliseconds = 15000,
+                intervalId = setInterval(reloadHealth, intervalMilliseconds);
+
+            $(window).on("blur focus", function(e) {
+                activeEvent = $(this).data("activeEvent");
+                if (activeEvent != e.type) {
+                    switch (e.type) {
+                        case "blur":
+                            clearInterval(intervalId);
+                            intervalId = 0;
+                            break;
+                        case "focus":
+                            if (!intervalId) {
+                                intervalId = setInterval(reloadHealth, intervalMilliseconds);
+                            }
+                        break;
+                    }
+                }
+                $(this).data("activeEvent", e.type);
+            });
 
 		// Set the mouseover descriptions of the table headers - prolly should do this smarter, but this works for now.
 		// use _wrapper here, because of the sCrollY stuff