You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by da...@apache.org on 2017/06/08 21:47:41 UTC
[1/2] incubator-trafficcontrol git commit: failed to account for
traffic monitors
Repository: incubator-trafficcontrol
Updated Branches:
refs/heads/master acd48b6bb -> a42e2a38a
failed to account for traffic monitors
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/20b5a4c6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/20b5a4c6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/20b5a4c6
Branch: refs/heads/master
Commit: 20b5a4c6e6c0d79a3aece4da5ecd6dc4d7ff34f0
Parents: acd48b6
Author: Jeremy Mitchell <mi...@gmail.com>
Authored: Thu Jun 8 15:44:00 2017 -0600
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Thu Jun 8 15:46:58 2017 -0600
----------------------------------------------------------------------
.../admin/cdns/config/ConfigController.js | 31 +++++++++++++++-----
.../private/admin/cdns/config/config.tpl.html | 11 +++++++
2 files changed, 35 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/20b5a4c6/traffic_ops/experimental/ui/app/src/modules/private/admin/cdns/config/ConfigController.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/modules/private/admin/cdns/config/ConfigController.js b/traffic_ops/experimental/ui/app/src/modules/private/admin/cdns/config/ConfigController.js
index deeac15..0615ea6 100644
--- a/traffic_ops/experimental/ui/app/src/modules/private/admin/cdns/config/ConfigController.js
+++ b/traffic_ops/experimental/ui/app/src/modules/private/admin/cdns/config/ConfigController.js
@@ -22,22 +22,25 @@ var ConfigController = function(cdn, currentSnapshot, newSnapshot, $scope, $stat
$scope.cdn = cdn;
var oldConfig = currentSnapshot.config || null,
- newConfig = newSnapshot.config;
+ newConfig = newSnapshot.config || null;
var oldContentRouters = currentSnapshot.contentRouters || null,
- newContentRouters = newSnapshot.contentRouters;
+ newContentRouters = newSnapshot.contentRouters || null;
+
+ var oldMonitors = currentSnapshot.monitors || null,
+ newMonitors = newSnapshot.monitors || null;
var oldContentServers = currentSnapshot.contentServers || null,
- newContentServers = newSnapshot.contentServers;
+ newContentServers = newSnapshot.contentServers || null;
var oldDeliveryServices = currentSnapshot.deliveryServices || null,
- newDeliveryServices = newSnapshot.deliveryServices;
+ newDeliveryServices = newSnapshot.deliveryServices || null;
var oldEdgeLocations = currentSnapshot.edgeLocations || null,
- newEdgeLocations = newSnapshot.edgeLocations;
+ newEdgeLocations = newSnapshot.edgeLocations || null;
var oldStats = currentSnapshot.stats || null,
- newStats = newSnapshot.stats;
+ newStats = newSnapshot.stats || null;
var performDiff = function(oldJSON, newJSON, destination) {
var div = null,
@@ -69,7 +72,7 @@ var ConfigController = function(cdn, currentSnapshot, newSnapshot, $scope, $stat
display.innerHTML = '';
display.appendChild(fragment);
} else {
- display.innerHTML = 'Existing snapshot cannot be found. Please perform snapshot.';
+ display.innerHTML = 'Diff failed. You may need to perform your first snapshot.';
}
};
@@ -90,6 +93,12 @@ var ConfigController = function(cdn, currentSnapshot, newSnapshot, $scope, $stat
templateUrl: 'crPopoverTemplate.html'
};
+ $scope.monitorsCount = {
+ added: 0,
+ removed: 0,
+ templateUrl: 'mPopoverTemplate.html'
+ };
+
$scope.contentServersCount = {
added: 0,
removed: 0,
@@ -128,6 +137,13 @@ var ConfigController = function(cdn, currentSnapshot, newSnapshot, $scope, $stat
}, timeout);
};
+ $scope.diffMonitors = function(timeout) {
+ $('#monitors').html('<i class="fa fa-refresh fa-spin fa-1x fa-fw"></i> Generating diff...');
+ $timeout(function() {
+ performDiff(oldMonitors, newMonitors, 'monitors');
+ }, timeout);
+ };
+
$scope.diffContentServers = function(timeout) {
$('#contentServers').html('<i class="fa fa-refresh fa-spin fa-1x fa-fw"></i> Generating diff...');
$timeout(function() {
@@ -183,6 +199,7 @@ var ConfigController = function(cdn, currentSnapshot, newSnapshot, $scope, $stat
angular.element(document).ready(function () {
$scope.diffConfig(0);
$scope.diffContentRouters(0);
+ $scope.diffMonitors(0);
$scope.diffContentServers(0);
$scope.diffDeliveryServices(0);
$scope.diffEdgeLocations(0);
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/20b5a4c6/traffic_ops/experimental/ui/app/src/modules/private/admin/cdns/config/config.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/modules/private/admin/cdns/config/config.tpl.html b/traffic_ops/experimental/ui/app/src/modules/private/admin/cdns/config/config.tpl.html
index 3e91a36..75f26bb 100644
--- a/traffic_ops/experimental/ui/app/src/modules/private/admin/cdns/config/config.tpl.html
+++ b/traffic_ops/experimental/ui/app/src/modules/private/admin/cdns/config/config.tpl.html
@@ -45,6 +45,12 @@ under the License.
</uib-tab-heading>
<pre id="contentRouters"></pre>
</uib-tab>
+ <uib-tab index="1" class="tab" ng-click="diffMonitors(500)">
+ <uib-tab-heading uib-popover-template="monitorsCount.templateUrl" popover-title="{{monitorsCount.added + monitorsCount.removed}} Total Changes" popover-trigger="mouseenter" popover-placement="top" popover-append-to-body="true">
+ Traffic Monitors [ {{monitorsCount.added}} | {{monitorsCount.removed}} ]
+ </uib-tab-heading>
+ <pre id="monitors"></pre>
+ </uib-tab>
<uib-tab index="2" class="tab" ng-click="diffContentServers(500)">
<uib-tab-heading uib-popover-template="contentServersCount.templateUrl" popover-title="{{contentServersCount.added + contentServersCount.removed}} Total Changes" popover-trigger="mouseenter" popover-placement="top" popover-append-to-body="true">
Traffic Servers [ {{contentServersCount.added}} | {{contentServersCount.removed}} ]
@@ -89,6 +95,11 @@ under the License.
<div>{{contentRoutersCount.removed}} removals (--)</div>
</script>
+<script type="text/ng-template" id="mPopoverTemplate.html">
+ <div>{{monitorsCount.added}} additions (++)</div>
+ <div>{{monitorsCount.removed}} removals (--)</div>
+</script>
+
<script type="text/ng-template" id="csPopoverTemplate.html">
<div>{{contentServersCount.added}} additions (++)</div>
<div>{{contentServersCount.removed}} removals (--)</div>
[2/2] incubator-trafficcontrol git commit: This closes #658
Posted by da...@apache.org.
This closes #658
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/a42e2a38
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/a42e2a38
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/a42e2a38
Branch: refs/heads/master
Commit: a42e2a38a6c008a467e059acebcf6104110e3ba3
Parents: 20b5a4c
Author: Dan Kirkwood <da...@gmail.com>
Authored: Thu Jun 8 15:47:16 2017 -0600
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Thu Jun 8 15:47:16 2017 -0600
----------------------------------------------------------------------
----------------------------------------------------------------------