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/02/17 15:33:28 UTC

[1/9] incubator-trafficcontrol git commit: This closes #288

Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master b5a1605a0 -> 6d9cd7480


This closes #288


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

Branch: refs/heads/master
Commit: 6d9cd74804c64a8b36068904cd7cd22f677cb0b0
Parents: 9aeb10a
Author: Dewayne Richardson <de...@apache.org>
Authored: Fri Feb 17 08:33:17 2017 -0700
Committer: Dewayne Richardson <de...@apache.org>
Committed: Fri Feb 17 08:33:17 2017 -0700

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

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



[3/9] incubator-trafficcontrol git commit: cdnId can be passed in in place of cdn name if desired

Posted by de...@apache.org.
cdnId can be passed in in place of cdn name if desired


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

Branch: refs/heads/master
Commit: 064b26b051594749582cda87be138af4091136e2
Parents: 96d134a
Author: Jeremy Mitchell <mi...@gmail.com>
Authored: Thu Feb 16 19:30:43 2017 -0700
Committer: Dewayne Richardson <de...@apache.org>
Committed: Fri Feb 17 08:33:17 2017 -0700

----------------------------------------------------------------------
 docs/source/development/traffic_ops_api/v12/cachegroup.rst | 4 +++-
 traffic_ops/app/lib/API/Cachegroup.pm                      | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/064b26b0/docs/source/development/traffic_ops_api/v12/cachegroup.rst
----------------------------------------------------------------------
diff --git a/docs/source/development/traffic_ops_api/v12/cachegroup.rst b/docs/source/development/traffic_ops_api/v12/cachegroup.rst
index 391c278..bc9f775 100644
--- a/docs/source/development/traffic_ops_api/v12/cachegroup.rst
+++ b/docs/source/development/traffic_ops_api/v12/cachegroup.rst
@@ -636,7 +636,9 @@ Cache Group
   +==============+=========+===============================================+
   | action       | string  | queue or dequeue                              |
   +--------------+---------+-----------------------------------------------+
-  | cdn          | string  | cdn name                                      |
+  | cdn          | string  | cdn name or cdn ID is required                |
+  +--------------+---------+-----------------------------------------------+
+  | cdnId        | string  | cdn ID or cdn name is required                |
   +--------------+---------+-----------------------------------------------+
 
   **Response Properties**

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/064b26b0/traffic_ops/app/lib/API/Cachegroup.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/API/Cachegroup.pm b/traffic_ops/app/lib/API/Cachegroup.pm
index fb7e4e1..2a4a359 100644
--- a/traffic_ops/app/lib/API/Cachegroup.pm
+++ b/traffic_ops/app/lib/API/Cachegroup.pm
@@ -390,7 +390,7 @@ sub postupdatequeue {
 	}
 
 	my $cdn = $params->{cdn};
-	my $cdn_id = $self->db->resultset('Cdn')->search( { name => $cdn } )->get_column('id')->single();
+	my $cdn_id = $params->{cdnId} // $self->db->resultset('Cdn')->search( { name => $cdn } )->get_column('id')->single();
 	if ( !defined($cdn_id) ) {
 		return $self->alert( "cdn " . $cdn . " does not exist." );
 	}


[9/9] incubator-trafficcontrol git commit: hooks up cache group server update queue/dequeue

Posted by de...@apache.org.
hooks up cache group server update queue/dequeue


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

Branch: refs/heads/master
Commit: 4f058cb92d32c0c18fba5fdcb0d7b156c9d7de10
Parents: a06c203
Author: Jeremy Mitchell <mi...@gmail.com>
Authored: Thu Feb 16 20:09:23 2017 -0700
Committer: Dewayne Richardson <de...@apache.org>
Committed: Fri Feb 17 08:33:17 2017 -0700

----------------------------------------------------------------------
 .../ui/app/src/common/api/CacheGroupService.js  | 25 +++++++
 .../form/cacheGroup/FormCacheGroupController.js |  8 ---
 .../edit/FormEditCacheGroupController.js        | 66 +++++++++++++++--
 .../form/cacheGroup/form.cacheGroup.tpl.html    |  6 +-
 .../TableCacheGroupServersController.js         | 76 +++++++++++++++++---
 .../table.cacheGroupServers.tpl.html            |  8 +--
 .../cacheGroups/table.cacheGroups.tpl.html      |  4 +-
 7 files changed, 164 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/4f058cb9/traffic_ops/experimental/ui/app/src/common/api/CacheGroupService.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/api/CacheGroupService.js b/traffic_ops/experimental/ui/app/src/common/api/CacheGroupService.js
index 5f5f725..5f996e7 100644
--- a/traffic_ops/experimental/ui/app/src/common/api/CacheGroupService.js
+++ b/traffic_ops/experimental/ui/app/src/common/api/CacheGroupService.js
@@ -64,6 +64,31 @@ var CacheGroupService = function(Restangular, locationUtils, messageModel) {
             );
     };
 
+    this.queueServerUpdates = function(cgId, cdnId) {
+        return Restangular.one("cachegroups", cgId).customPOST( { action: "queue", cdnId: cdnId }, "queue_update" )
+            .then(
+                function() {
+                    messageModel.setMessages([ { level: 'success', text: 'Queued cache group server updates' } ], false);
+                },
+                function(fault) {
+                    messageModel.setMessages(fault.data.alerts, false);
+                }
+            );
+    };
+
+    this.clearServerUpdates = function(cgId, cdnId) {
+        return Restangular.one("cachegroups", cgId).customPOST( { action: "dequeue", cdnId: cdnId}, "queue_update" )
+            .then(
+                function() {
+                    messageModel.setMessages([ { level: 'success', text: 'Cleared cache group server updates' } ], false);
+                },
+                function(fault) {
+                    messageModel.setMessages(fault.data.alerts, false);
+                }
+            );
+    };
+
+
 };
 
 CacheGroupService.$inject = ['Restangular', 'locationUtils', 'messageModel'];

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/4f058cb9/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/FormCacheGroupController.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/FormCacheGroupController.js b/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/FormCacheGroupController.js
index ff377eb..5eb334d 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/FormCacheGroupController.js
+++ b/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/FormCacheGroupController.js
@@ -35,14 +35,6 @@ var FormCacheGroupController = function(cacheGroup, $scope, $location, formUtils
 
     $scope.cacheGroup = cacheGroup;
 
-    $scope.queueUpdates = function() {
-        alert('not hooked up yet: queuing updates for all cachegroup servers');
-    };
-
-    $scope.dequeueUpdates = function() {
-        alert('not hooked up yet: dequeuing updates for all cachegroup servers');
-    };
-
     $scope.viewAsns = function() {
         $location.path($location.path() + '/asns');
     };

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/4f058cb9/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/edit/FormEditCacheGroupController.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/edit/FormEditCacheGroupController.js b/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/edit/FormEditCacheGroupController.js
index 4f4e707..aab9dfc 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/edit/FormEditCacheGroupController.js
+++ b/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/edit/FormEditCacheGroupController.js
@@ -22,6 +22,13 @@ var FormEditCacheGroupController = function(cacheGroup, $scope, $controller, $ui
     // extends the FormCacheGroupController to inherit common methods
     angular.extend(this, $controller('FormCacheGroupController', { cacheGroup: cacheGroup, $scope: $scope }));
 
+    $scope.cacheGroupName = angular.copy(cacheGroup.name);
+
+    $scope.settings = {
+        isNew: false,
+        saveLabel: 'Update'
+    };
+
     var deleteCacheGroup = function(cacheGroup) {
         cacheGroupService.deleteCacheGroup(cacheGroup.id)
             .then(function() {
@@ -29,11 +36,12 @@ var FormEditCacheGroupController = function(cacheGroup, $scope, $controller, $ui
             });
     };
 
-    $scope.cacheGroupName = angular.copy(cacheGroup.name);
+    var queueServerUpdates = function(cacheGroup, cdnId) {
+        cacheGroupService.queueServerUpdates(cacheGroup.id, cdnId);
+    };
 
-    $scope.settings = {
-        isNew: false,
-        saveLabel: 'Update'
+    var clearServerUpdates = function(cacheGroup, cdnId) {
+        cacheGroupService.clearServerUpdates(cacheGroup.id, cdnId);
     };
 
     $scope.save = function(cacheGroup) {
@@ -66,6 +74,56 @@ var FormEditCacheGroupController = function(cacheGroup, $scope, $controller, $ui
         });
     };
 
+    $scope.confirmQueueServerUpdates = function(cacheGroup) {
+        var params = {
+            title: 'Queue Server Updates: ' + cacheGroup.name,
+            message: "Please select a CDN"
+        };
+        var modalInstance = $uibModal.open({
+            templateUrl: 'common/modules/dialog/select/dialog.select.tpl.html',
+            controller: 'DialogSelectController',
+            size: 'md',
+            resolve: {
+                params: function () {
+                    return params;
+                },
+                collection: function(cdnService) {
+                    return cdnService.getCDNs();
+                }
+            }
+        });
+        modalInstance.result.then(function(cdnId) {
+            queueServerUpdates(cacheGroup, cdnId);
+        }, function () {
+            // do nothing
+        });
+    };
+
+    $scope.confirmClearServerUpdates = function(cacheGroup) {
+        var params = {
+            title: 'Clear Server Updates: ' + cacheGroup.name,
+            message: "Please select a CDN"
+        };
+        var modalInstance = $uibModal.open({
+            templateUrl: 'common/modules/dialog/select/dialog.select.tpl.html',
+            controller: 'DialogSelectController',
+            size: 'md',
+            resolve: {
+                params: function () {
+                    return params;
+                },
+                collection: function(cdnService) {
+                    return cdnService.getCDNs();
+                }
+            }
+        });
+        modalInstance.result.then(function(cdnId) {
+            clearServerUpdates(cacheGroup, cdnId);
+        }, function () {
+            // do nothing
+        });
+    };
+
 };
 
 FormEditCacheGroupController.$inject = ['cacheGroup', '$scope', '$controller', '$uibModal', '$anchorScroll', 'locationUtils', 'cacheGroupService'];

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/4f058cb9/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/form.cacheGroup.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/form.cacheGroup.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/form.cacheGroup.tpl.html
index 7338fa1..5275808 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/form.cacheGroup.tpl.html
+++ b/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/form.cacheGroup.tpl.html
@@ -24,9 +24,8 @@ under the License.
             <li class="active">{{cacheGroupName}}</li>
         </ol>
         <div class="pull-right" ng-show="!settings.isNew">
-            <button class="btn btn-success" ng-click="queueUpdates()">Queue Server Updates &nbsp;&nbsp;<i class="fa fa-flag"></i></button>
-            <button class="btn btn-danger" ng-click="dequeueUpdates()">Dequeue Server Updates &nbsp;&nbsp;<i class="fa fa-times"></i></button>
-            <button class="btn btn-primary" ng-click="viewServers()">View Servers &nbsp;&nbsp;<i class="fa fa-server"></i></button>
+            <button class="btn btn-primary" title="Queue {{cacheGroup.name}} server updates" ng-click="confirmQueueServerUpdates(cacheGroup)"><i class="fa fa-flag"></i></button>
+            <button class="btn btn-primary" title="Clear {{cacheGroup.name}} server updates" ng-click="confirmClearServerUpdates(cacheGroup)"><i class="fa fa-ban"></i></button>
             <div class="btn-group" role="group" uib-dropdown is-open="more.isopen">
                 <button type="button" class="btn btn-default dropdown-toggle" uib-dropdown-toggle aria-haspopup="true" aria-expanded="false">
                     More
@@ -35,6 +34,7 @@ under the License.
                 <ul class="dropdown-menu-right dropdown-menu" uib-dropdown-menu>
                     <li role="menuitem"><a ng-click="viewAsns()">View ASNs</a></li>
                     <li role="menuitem"><a ng-click="viewParams()">View Parameters</a></li>
+                    <li role="menuitem"><a ng-click="viewServers()">View Servers</a></li>
                     <li role="menuitem"><a ng-click="viewStaticDnsEntries()">View Static DNS Entries</a></li>
                 </ul>
             </div>

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/4f058cb9/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupServers/TableCacheGroupServersController.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupServers/TableCacheGroupServersController.js b/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupServers/TableCacheGroupServersController.js
index 3883d30..18740a3 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupServers/TableCacheGroupServersController.js
+++ b/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupServers/TableCacheGroupServersController.js
@@ -17,28 +17,88 @@
  * under the License.
  */
 
-var TableCacheGroupsServersController = function(cacheGroup, servers, $scope, $state, locationUtils) {
+var TableCacheGroupsServersController = function(cacheGroup, servers, $scope, $state, $uibModal, cacheGroupService, locationUtils) {
 
 	$scope.cacheGroup = cacheGroup;
 
 	$scope.servers = servers;
 
-	$scope.editServer = function(id) {
-		locationUtils.navigateToPath('/configure/servers/' + id);
+	var queueServerUpdates = function(cacheGroup, cdnId) {
+		cacheGroupService.queueServerUpdates(cacheGroup.id, cdnId)
+			.then(
+				function() {
+					$scope.refresh();
+				}
+			);
 	};
 
-	$scope.queueUpdates = function() {
-		alert('not hooked up yet: queuing updates for all cachegroup servers');
+	var clearServerUpdates = function(cacheGroup, cdnId) {
+		cacheGroupService.clearServerUpdates(cacheGroup.id, cdnId)
+			.then(
+				function() {
+					$scope.refresh();
+				}
+			);
 	};
 
-	$scope.dequeueUpdates = function() {
-		alert('not hooked up yet: dequeuing updates for all cachegroup servers');
+	$scope.editServer = function(id) {
+		locationUtils.navigateToPath('/configure/servers/' + id);
 	};
 
 	$scope.refresh = function() {
 		$state.reload(); // reloads all the resolves for the view
 	};
 
+	$scope.confirmQueueServerUpdates = function(cacheGroup) {
+		var params = {
+			title: 'Queue Server Updates: ' + cacheGroup.name,
+			message: "Please select a CDN"
+		};
+		var modalInstance = $uibModal.open({
+			templateUrl: 'common/modules/dialog/select/dialog.select.tpl.html',
+			controller: 'DialogSelectController',
+			size: 'md',
+			resolve: {
+				params: function () {
+					return params;
+				},
+				collection: function(cdnService) {
+					return cdnService.getCDNs();
+				}
+			}
+		});
+		modalInstance.result.then(function(cdnId) {
+			queueServerUpdates(cacheGroup, cdnId);
+		}, function () {
+			// do nothing
+		});
+	};
+
+	$scope.confirmClearServerUpdates = function(cacheGroup) {
+		var params = {
+			title: 'Clear Server Updates: ' + cacheGroup.name,
+			message: "Please select a CDN"
+		};
+		var modalInstance = $uibModal.open({
+			templateUrl: 'common/modules/dialog/select/dialog.select.tpl.html',
+			controller: 'DialogSelectController',
+			size: 'md',
+			resolve: {
+				params: function () {
+					return params;
+				},
+				collection: function(cdnService) {
+					return cdnService.getCDNs();
+				}
+			}
+		});
+		modalInstance.result.then(function(cdnId) {
+			clearServerUpdates(cacheGroup, cdnId);
+		}, function () {
+			// do nothing
+		});
+	};
+
 	$scope.navigateToPath = locationUtils.navigateToPath;
 
 	angular.element(document).ready(function () {
@@ -50,5 +110,5 @@ var TableCacheGroupsServersController = function(cacheGroup, servers, $scope, $s
 
 };
 
-TableCacheGroupsServersController.$inject = ['cacheGroup', 'servers', '$scope', '$state', 'locationUtils'];
+TableCacheGroupsServersController.$inject = ['cacheGroup', 'servers', '$scope', '$state', '$uibModal', 'cacheGroupService', 'locationUtils'];
 module.exports = TableCacheGroupsServersController;

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/4f058cb9/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupServers/table.cacheGroupServers.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupServers/table.cacheGroupServers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupServers/table.cacheGroupServers.tpl.html
index 9085987..004ab39 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupServers/table.cacheGroupServers.tpl.html
+++ b/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroupServers/table.cacheGroupServers.tpl.html
@@ -25,9 +25,9 @@ under the License.
             <li class="active">Servers</li>
         </ol>
         <div class="pull-right">
+            <button class="btn btn-primary" title="Queue {{cacheGroup.name}} server updates" ng-click="confirmQueueServerUpdates(cacheGroup)"><i class="fa fa-flag"></i></button>
+            <button class="btn btn-primary" title="Clear {{cacheGroup.name}} server updates" ng-click="confirmClearServerUpdates(cacheGroup)"><i class="fa fa-ban"></i></button>
             <button class="btn btn-default" ng-click="refresh()"><i class="fa fa-refresh"></i></button>
-            <button class="btn btn-success" ng-click="queueUpdates()">Queue Server Updates &nbsp;&nbsp;<i class="fa fa-flag"></i></button>
-            <button class="btn btn-danger" ng-click="dequeueUpdates()">Dequeue Server Updates &nbsp;&nbsp;<i class="fa fa-times"></i></button>
         </div>
         <div class="clearfix"></div>
     </div>
@@ -36,7 +36,7 @@ under the License.
         <table id="serversTable" class="table responsive-utilities jambo_table">
             <thead>
             <tr class="headings">
-                <th>Update?</th>
+                <th></th>
                 <th>hostName</th>
                 <th>domainName</th>
                 <th>cdn</th>
@@ -53,7 +53,7 @@ under the License.
             </thead>
             <tbody>
             <tr ng-click="editServer(server.id)" ng-repeat="server in servers" ng-class="{'active': server.updPending}">
-                <td>{{server.updPending}}</td>
+                <td><i class="fa fa-flag" ng-show="server.updPending"></i></td>
                 <td>{{server.hostName}}</td>
                 <td>{{server.domainName}}</td>
                 <td>{{server.cdnName}}</td>

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/4f058cb9/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroups/table.cacheGroups.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroups/table.cacheGroups.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroups/table.cacheGroups.tpl.html
index 44ee253..327c505 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroups/table.cacheGroups.tpl.html
+++ b/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroups/table.cacheGroups.tpl.html
@@ -23,8 +23,8 @@ under the License.
             <li class="active">Cache Groups</li>
         </ol>
         <div class="pull-right" role="group" ng-show="!settings.isNew">
-            <button class="btn btn-default" ng-click="refresh()"><i class="fa fa-refresh"></i></button>
-            <button class="btn btn-primary" ng-click="createCacheGroup()"><i class="fa fa-plus"></i>&nbsp;&nbsp; Create Cache Group</button>
+            <button class="btn btn-primary" title="Create Cache Group" ng-click="createCacheGroup()"><i class="fa fa-plus"></i></button>
+            <button class="btn btn-default" title="Refresh" ng-click="refresh()"><i class="fa fa-refresh"></i></button>
         </div>
         <div class="clearfix"></div>
     </div>


[2/9] incubator-trafficcontrol git commit: new queue buttons

Posted by de...@apache.org.
new queue buttons


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

Branch: refs/heads/master
Commit: 52511d0fc6580a8db3ffc026b5a7be65edd56ee8
Parents: 4f058cb
Author: Jeremy Mitchell <mi...@gmail.com>
Authored: Thu Feb 16 20:34:45 2017 -0700
Committer: Dewayne Richardson <de...@apache.org>
Committed: Fri Feb 17 08:33:17 2017 -0700

----------------------------------------------------------------------
 .../ui/app/src/common/modules/form/cdn/form.cdn.tpl.html    | 4 ++--
 .../modules/table/cdnServers/table.cdnServers.tpl.html      | 9 +++------
 2 files changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/52511d0f/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/form.cdn.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/form.cdn.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/form.cdn.tpl.html
index 4fd6463..ef2822d 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/form.cdn.tpl.html
+++ b/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/form.cdn.tpl.html
@@ -25,8 +25,8 @@ under the License.
         </ol>
         <div class="pull-right" ng-show="!settings.isNew">
             <button class="btn btn-primary" title="Snapshot {{cdn.name}} config" ng-click="manageSnapshots()"><i class="fa fa-camera"></i></button>
-            <button class="btn btn-danger" title="Queue {{cdn.name}} server updates" ng-click="queueServerUpdates(cdn)"><i class="fa fa-flag"></i></button>
-            <button class="btn btn-success" title="Clear {{cdn.name}} server updates" ng-click="clearServerUpdates(cdn)"><i class="fa fa-check"></i></button>
+            <button class="btn btn-primary" title="Queue {{cdn.name}} server updates" ng-click="queueServerUpdates(cdn)"><i class="fa fa-flag"></i></button>
+            <button class="btn btn-primary" title="Cancel {{cdn.name}} server updates" ng-click="clearServerUpdates(cdn)"><i class="fa fa-ban"></i></button>
             <div class="btn-group" role="group" uib-dropdown is-open="more.isopen">
                 <button type="button" class="btn btn-default dropdown-toggle" uib-dropdown-toggle aria-haspopup="true" aria-expanded="false">
                     More

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/52511d0f/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/table.cdnServers.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/table.cdnServers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/table.cdnServers.tpl.html
index d3c0161..a9925da 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/table.cdnServers.tpl.html
+++ b/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/table.cdnServers.tpl.html
@@ -25,8 +25,8 @@ under the License.
             <li class="active">Servers</li>
         </ol>
         <div class="pull-right">
-            <button class="btn btn-danger" title="Queue {{cdn.name}} server updates" ng-click="queueServerUpdates(cdn)"><i class="fa fa-flag"></i></button>
-            <button class="btn btn-success" title="Clear {{cdn.name}} server updates" ng-click="clearServerUpdates(cdn)"><i class="fa fa-check"></i></button>
+            <button class="btn btn-primary" title="Queue {{cdn.name}} server updates" ng-click="queueServerUpdates(cdn)"><i class="fa fa-flag"></i></button>
+            <button class="btn btn-primary" title="Cancel {{cdn.name}} server updates" ng-click="clearServerUpdates(cdn)"><i class="fa fa-ban"></i></button>
             <button class="btn btn-default" title="Refresh" ng-click="refresh()"><i class="fa fa-refresh"></i></button>
         </div>
         <div class="clearfix"></div>
@@ -53,10 +53,7 @@ under the License.
             </thead>
             <tbody>
             <tr ng-click="editServer(server.id)" ng-repeat="server in servers" ng-class="{'active': server.updPending}">
-                <td>
-                    <i class="fa fa-flag" style="color: #d9534f;" ng-show="server.updPending"></i>
-                    <i class="fa fa-check" style="color: #5cb85c;" ng-show="!server.updPending"></i>
-                </td>
+                <td><i class="fa fa-flag" ng-show="server.updPending"></i></td>
                 <td>{{server.hostName}}</td>
                 <td>{{server.domainName}}</td>
                 <td>{{server.cdnName}}</td>


[7/9] incubator-trafficcontrol git commit: no need to fetch profiles when queuing updates for servers of a cachegroup (for a certain cdn)

Posted by de...@apache.org.
no need to fetch profiles when queuing updates for servers of a cachegroup (for a certain cdn)


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

Branch: refs/heads/master
Commit: a06c20301952127fe050189737d4d08678e67589
Parents: 7b5a66b
Author: Jeremy Mitchell <mi...@gmail.com>
Authored: Thu Feb 16 20:01:38 2017 -0700
Committer: Dewayne Richardson <de...@apache.org>
Committed: Fri Feb 17 08:33:17 2017 -0700

----------------------------------------------------------------------
 traffic_ops/app/lib/API/Cachegroup.pm | 21 ++++++---------------
 1 file changed, 6 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/a06c2030/traffic_ops/app/lib/API/Cachegroup.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/API/Cachegroup.pm b/traffic_ops/app/lib/API/Cachegroup.pm
index 2a4a359..d489369 100644
--- a/traffic_ops/app/lib/API/Cachegroup.pm
+++ b/traffic_ops/app/lib/API/Cachegroup.pm
@@ -409,29 +409,20 @@ sub postupdatequeue {
 		return $self->alert("action should be queue or dequeue.");
 	}
 
-	my @profiles;
-	@profiles = $self->db->resultset('Server')->search(
-		{ 'cdn.name' => $cdn },
-		{
-			prefetch => 'cdn',
-			select   => 'me.profile',
-			distinct => 1
-		}
-	)->get_column('profile')->all();
-	my $update = $self->db->resultset('Server')->search(
+	my $servers = $self->db->resultset('Server')->search(
 		{
 			-and => [
-				cachegroup => $id,
-				profile    => { -in => \@profiles }
+				cachegroup	=> $id,
+				cdn_id		=> $cdn_id
 			]
 		}
 	);
 
 	my $response;
 	my @svrs = ();
-	if ( $update->count() > 0 ) {
-		$update->update( { upd_pending => $setqueue } );
-		my @row = $update->get_column('host_name')->all();
+	if ( $servers->count() > 0 ) {
+		$servers->update( { upd_pending => $setqueue } );
+		my @row = $servers->get_column('host_name')->all();
 		foreach my $svr (@row) {
 			push( @svrs, $svr );
 		}


[4/9] incubator-trafficcontrol git commit: hooks up cdn servers queue/dequeue updates

Posted by de...@apache.org.
hooks up cdn servers queue/dequeue updates


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

Branch: refs/heads/master
Commit: ed73d8557767cf6bed6bfdad016f734f9d254374
Parents: b5a1605
Author: Jeremy Mitchell <mi...@gmail.com>
Authored: Tue Feb 14 21:48:37 2017 -0700
Committer: Dewayne Richardson <de...@apache.org>
Committed: Fri Feb 17 08:33:17 2017 -0700

----------------------------------------------------------------------
 .../ui/app/src/common/api/CDNService.js         | 24 ++++++++++++++++++++
 .../modules/form/cdn/FormCDNController.js       | 10 ++++----
 .../common/modules/form/cdn/form.cdn.tpl.html   |  6 ++---
 .../cdnServers/TableCDNServersController.js     | 22 ++++++++++++++----
 .../table/cdnServers/table.cdnServers.tpl.html  |  9 +++++---
 5 files changed, 56 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/ed73d855/traffic_ops/experimental/ui/app/src/common/api/CDNService.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/api/CDNService.js b/traffic_ops/experimental/ui/app/src/common/api/CDNService.js
index dd5f7dc..47f3606 100644
--- a/traffic_ops/experimental/ui/app/src/common/api/CDNService.js
+++ b/traffic_ops/experimental/ui/app/src/common/api/CDNService.js
@@ -64,6 +64,30 @@ var CDNService = function(Restangular, locationUtils, messageModel) {
             );
     };
 
+    this.queueCDNServers = function(id) {
+        return Restangular.one("cdns", id).customPOST( { action: "queue"}, "queue_update" )
+            .then(
+                function() {
+                    messageModel.setMessages([ { level: 'success', text: 'CDN servers queued' } ], false);
+                },
+                function(fault) {
+                    messageModel.setMessages(fault.data.alerts, false);
+                }
+            );
+    };
+
+    this.dequeueCDNServers = function(id) {
+        return Restangular.one("cdns", id).customPOST( { action: "dequeue"}, "queue_update" )
+            .then(
+                function() {
+                    messageModel.setMessages([ { level: 'success', text: 'CDN servers dequeued' } ], false);
+                },
+                function(fault) {
+                    messageModel.setMessages(fault.data.alerts, false);
+                }
+            );
+    };
+
 };
 
 CDNService.$inject = ['Restangular', 'locationUtils', 'messageModel'];

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/ed73d855/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/FormCDNController.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/FormCDNController.js b/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/FormCDNController.js
index ee1684a..83f260a 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/FormCDNController.js
+++ b/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/FormCDNController.js
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-var FormCDNController = function(cdn, $scope, $location, formUtils, stringUtils, locationUtils) {
+var FormCDNController = function(cdn, $scope, $location, formUtils, stringUtils, locationUtils, cdnService) {
 
     $scope.cdn = cdn;
 
@@ -44,12 +44,12 @@ var FormCDNController = function(cdn, $scope, $location, formUtils, stringUtils,
         alert('not hooked up yet: cachegroupHealth for CDN');
     };
 
-    $scope.queueUpdates = function() {
-        alert('not hooked up yet: queuing updates for all cdn servers');
+    $scope.queueUpdates = function(cdn) {
+        cdnService.queueCDNServers(cdn.id);
     };
 
     $scope.dequeueUpdates = function() {
-        alert('not hooked up yet: dequeuing updates for all cdn servers');
+        cdnService.dequeueCDNServers(cdn.id);
     };
 
     $scope.manageSnapshots = function() {
@@ -72,5 +72,5 @@ var FormCDNController = function(cdn, $scope, $location, formUtils, stringUtils,
 
 };
 
-FormCDNController.$inject = ['cdn', '$scope', '$location', 'formUtils', 'stringUtils', 'locationUtils'];
+FormCDNController.$inject = ['cdn', '$scope', '$location', 'formUtils', 'stringUtils', 'locationUtils', 'cdnService'];
 module.exports = FormCDNController;

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/ed73d855/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/form.cdn.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/form.cdn.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/form.cdn.tpl.html
index e594174..24c8a9e 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/form.cdn.tpl.html
+++ b/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/form.cdn.tpl.html
@@ -24,9 +24,9 @@ under the License.
             <li class="active">{{cdnName}}</li>
         </ol>
         <div class="pull-right" ng-show="!settings.isNew">
-            <button class="btn btn-success" ng-click="queueUpdates()">Queue Server Updates &nbsp;&nbsp;<i class="fa fa-flag"></i></button>
-            <button class="btn btn-danger" ng-click="dequeueUpdates()">Dequeue Server Updates &nbsp;&nbsp;<i class="fa fa-times"></i></button>
-            <button class="btn btn-primary" ng-click="manageSnapshots()">Snapshot CDN Config &nbsp;&nbsp;<i class="fa fa-camera"></i></button>
+            <button class="btn btn-primary" title="Snapshot {{cdn.name}} config" ng-click="manageSnapshots()"><i class="fa fa-camera"></i></button>
+            <button class="btn btn-danger" title="Queue {{cdn.name}} server updates" ng-click="queueUpdates(cdn)"><i class="fa fa-flag"></i></button>
+            <button class="btn btn-info" title="Dequeue {{cdn.name}} server updates" ng-click="dequeueUpdates()"><i class="fa fa-times"></i></button>
             <div class="btn-group" role="group" uib-dropdown is-open="more.isopen">
                 <button type="button" class="btn btn-default dropdown-toggle" uib-dropdown-toggle aria-haspopup="true" aria-expanded="false">
                     More

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/ed73d855/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/TableCDNServersController.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/TableCDNServersController.js b/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/TableCDNServersController.js
index 6398555..487265c 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/TableCDNServersController.js
+++ b/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/TableCDNServersController.js
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-var TableCDNServersController = function(cdn, servers, $scope, $state, locationUtils) {
+var TableCDNServersController = function(cdn, servers, $scope, $state, locationUtils, cdnService) {
 
 	$scope.cdn = cdn;
 
@@ -27,8 +27,22 @@ var TableCDNServersController = function(cdn, servers, $scope, $state, locationU
 		locationUtils.navigateToPath('/configure/servers/' + id);
 	};
 
-	$scope.queueUpdates = function() {
-		alert('not hooked up yet: queuing updates for all cdn servers');
+	$scope.queueUpdates = function(cdn) {
+		cdnService.queueCDNServers(cdn.id)
+			.then(
+				function() {
+					$scope.refresh();
+				}
+			);
+	};
+
+	$scope.dequeueUpdates = function(cdn) {
+		cdnService.dequeueCDNServers(cdn.id)
+			.then(
+				function() {
+					$scope.refresh();
+				}
+			);
 	};
 
 	$scope.refresh = function() {
@@ -46,5 +60,5 @@ var TableCDNServersController = function(cdn, servers, $scope, $state, locationU
 
 };
 
-TableCDNServersController.$inject = ['cdn', 'servers', '$scope', '$state', 'locationUtils'];
+TableCDNServersController.$inject = ['cdn', 'servers', '$scope', '$state', 'locationUtils', 'cdnService'];
 module.exports = TableCDNServersController;

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/ed73d855/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/table.cdnServers.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/table.cdnServers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/table.cdnServers.tpl.html
index 092f3e4..055f1e0 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/table.cdnServers.tpl.html
+++ b/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/table.cdnServers.tpl.html
@@ -25,8 +25,9 @@ under the License.
             <li class="active">Servers</li>
         </ol>
         <div class="pull-right">
-            <button class="btn btn-default" ng-click="refresh()"><i class="fa fa-refresh"></i></button>
-            <button class="btn btn-primary" ng-click="queueUpdates()">Queue Updates &nbsp;&nbsp;<i class="fa fa-flag"></i></button>
+            <button class="btn btn-danger" title="Queue {{cdn.name}} server updates" ng-click="queueUpdates(cdn)"><i class="fa fa-flag"></i></button>
+            <button class="btn btn-info" title="Dequeue {{cdn.name}} server updates" ng-click="dequeueUpdates(cdn)"><i class="fa fa-times"></i></button>
+            <button class="btn btn-default" title="Refresh" ng-click="refresh()"><i class="fa fa-refresh"></i></button>
         </div>
         <div class="clearfix"></div>
     </div>
@@ -35,6 +36,7 @@ under the License.
         <table id="serversTable" class="table responsive-utilities jambo_table">
             <thead>
             <tr class="headings">
+                <th></th>
                 <th>hostName</th>
                 <th>domainName</th>
                 <th>cdn</th>
@@ -50,7 +52,8 @@ under the License.
             </tr>
             </thead>
             <tbody>
-            <tr ng-click="editServer(server.id)" ng-repeat="server in servers">
+            <tr ng-click="editServer(server.id)" ng-repeat="server in servers" ng-class="{'active': server.updPending}">
+                <td><i class="fa fa-flag" style="color: #d9534f;" ng-show="server.updPending"></i></td>
                 <td>{{server.hostName}}</td>
                 <td>{{server.domainName}}</td>
                 <td>{{server.cdnName}}</td>


[8/9] incubator-trafficcontrol git commit: hooks up queue/dequeue single server updates

Posted by de...@apache.org.
hooks  up queue/dequeue single server updates


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

Branch: refs/heads/master
Commit: 9aeb10ac0f3853662730ddac892b141efacdcb84
Parents: 52511d0
Author: Jeremy Mitchell <mi...@gmail.com>
Authored: Thu Feb 16 20:52:16 2017 -0700
Committer: Dewayne Richardson <de...@apache.org>
Committed: Fri Feb 17 08:33:17 2017 -0700

----------------------------------------------------------------------
 .../ui/app/src/common/api/CDNService.js         |  2 +-
 .../ui/app/src/common/api/CacheGroupService.js  |  2 +-
 .../ui/app/src/common/api/ServerService.js      | 23 +++++++++++++++++
 .../modules/form/server/FormServerController.js | 27 ++++++++++++++++++--
 .../modules/form/server/form.server.tpl.html    |  5 ++--
 .../table/servers/table.servers.tpl.html        |  6 ++---
 6 files changed, 55 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/9aeb10ac/traffic_ops/experimental/ui/app/src/common/api/CDNService.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/api/CDNService.js b/traffic_ops/experimental/ui/app/src/common/api/CDNService.js
index d3f562d..2616c80 100644
--- a/traffic_ops/experimental/ui/app/src/common/api/CDNService.js
+++ b/traffic_ops/experimental/ui/app/src/common/api/CDNService.js
@@ -80,7 +80,7 @@ var CDNService = function(Restangular, locationUtils, messageModel) {
         return Restangular.one("cdns", id).customPOST( { action: "dequeue"}, "queue_update" )
             .then(
                 function() {
-                    messageModel.setMessages([ { level: 'success', text: 'Cleared CDN server updates' } ], false);
+                    messageModel.setMessages([ { level: 'success', text: 'Cancelled CDN server updates' } ], false);
                 },
                 function(fault) {
                     messageModel.setMessages(fault.data.alerts, false);

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/9aeb10ac/traffic_ops/experimental/ui/app/src/common/api/CacheGroupService.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/api/CacheGroupService.js b/traffic_ops/experimental/ui/app/src/common/api/CacheGroupService.js
index 5f996e7..2f30df0 100644
--- a/traffic_ops/experimental/ui/app/src/common/api/CacheGroupService.js
+++ b/traffic_ops/experimental/ui/app/src/common/api/CacheGroupService.js
@@ -80,7 +80,7 @@ var CacheGroupService = function(Restangular, locationUtils, messageModel) {
         return Restangular.one("cachegroups", cgId).customPOST( { action: "dequeue", cdnId: cdnId}, "queue_update" )
             .then(
                 function() {
-                    messageModel.setMessages([ { level: 'success', text: 'Cleared cache group server updates' } ], false);
+                    messageModel.setMessages([ { level: 'success', text: 'Cancelled cache group server updates' } ], false);
                 },
                 function(fault) {
                     messageModel.setMessages(fault.data.alerts, false);

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/9aeb10ac/traffic_ops/experimental/ui/app/src/common/api/ServerService.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/api/ServerService.js b/traffic_ops/experimental/ui/app/src/common/api/ServerService.js
index c661e80..e130376 100644
--- a/traffic_ops/experimental/ui/app/src/common/api/ServerService.js
+++ b/traffic_ops/experimental/ui/app/src/common/api/ServerService.js
@@ -68,6 +68,29 @@ var ServerService = function(Restangular, locationUtils, messageModel) {
         return Restangular.one('deliveryservices', dsId).getList('servers');
     };
 
+    this.queueServerUpdates = function(id) {
+        return Restangular.one("servers", id).customPOST( { action: "queue"}, "queue_update" )
+            .then(
+                function() {
+                    messageModel.setMessages([ { level: 'success', text: 'Queued server updates' } ], false);
+                },
+                function(fault) {
+                    messageModel.setMessages(fault.data.alerts, false);
+                }
+            );
+    };
+
+    this.clearServerUpdates = function(id) {
+        return Restangular.one("servers", id).customPOST( { action: "dequeue"}, "queue_update" )
+            .then(
+                function() {
+                    messageModel.setMessages([ { level: 'success', text: 'Cancelled server updates' } ], false);
+                },
+                function(fault) {
+                    messageModel.setMessages(fault.data.alerts, false);
+                }
+            );
+    };
 
 };
 

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/9aeb10ac/traffic_ops/experimental/ui/app/src/common/modules/form/server/FormServerController.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/server/FormServerController.js b/traffic_ops/experimental/ui/app/src/common/modules/form/server/FormServerController.js
index f35759e..49af665 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/form/server/FormServerController.js
+++ b/traffic_ops/experimental/ui/app/src/common/modules/form/server/FormServerController.js
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-var FormServerController = function(server, $scope, $location, formUtils, stringUtils, locationUtils, cacheGroupService, cdnService, physLocationService, profileService, statusService, typeService) {
+var FormServerController = function(server, $scope, $location, $state, formUtils, stringUtils, locationUtils, serverService, cacheGroupService, cdnService, physLocationService, profileService, statusService, typeService) {
 
     var getPhysLocations = function() {
         physLocationService.getPhysLocations()
@@ -61,6 +61,11 @@ var FormServerController = function(server, $scope, $location, formUtils, string
             });
     };
 
+    var refresh = function() {
+        $state.reload(); // reloads all the resolves for the view
+    };
+
+
     // supposedly matches IPv4 and IPv6 formats. but actually need one that matches each. todo.
     var ipRegex = new RegExp(/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$|^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){
 3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/);
 
@@ -101,6 +106,24 @@ var FormServerController = function(server, $scope, $location, formUtils, string
         { value: true, label: 'true' }
     ];
 
+    $scope.queueServerUpdates = function(server) {
+        serverService.queueServerUpdates(server.id)
+            .then(
+                function() {
+                    refresh();
+                }
+            );
+    };
+
+    $scope.clearServerUpdates = function(server) {
+        serverService.clearServerUpdates(server.id)
+            .then(
+                function() {
+                    refresh();
+                }
+            );
+    };
+
     $scope.queueUpdates = function() {
         alert('not hooked up yet: queuing updates for server');
     };
@@ -143,5 +166,5 @@ var FormServerController = function(server, $scope, $location, formUtils, string
 
 };
 
-FormServerController.$inject = ['server', '$scope', '$location', 'formUtils', 'stringUtils', 'locationUtils', 'cacheGroupService', 'cdnService', 'physLocationService', 'profileService', 'statusService', 'typeService'];
+FormServerController.$inject = ['server', '$scope', '$location', '$state', 'formUtils', 'stringUtils', 'locationUtils', 'serverService', 'cacheGroupService', 'cdnService', 'physLocationService', 'profileService', 'statusService', 'typeService'];
 module.exports = FormServerController;

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/9aeb10ac/traffic_ops/experimental/ui/app/src/common/modules/form/server/form.server.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/server/form.server.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/form/server/form.server.tpl.html
index c14b264..b64dad9 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/form/server/form.server.tpl.html
+++ b/traffic_ops/experimental/ui/app/src/common/modules/form/server/form.server.tpl.html
@@ -26,9 +26,8 @@ under the License.
         <div class="pull-right" role="group" ng-show="!settings.isNew">
             <button class="btn btn-danger" ng-click="offlineServer()">Offline Server &nbsp;&nbsp;<i class="fa fa-warning"></i></button>
             <!--<button class="btn btn-success" ng-click="onlineServer()">Online Server</button>-->
-            <button class="btn btn-primary" ng-show="!server.updPending" ng-click="queueUpdates()">Queue Update &nbsp;&nbsp;<i class="fa fa-flag"></i></button>
-            <button class="btn btn-primary" ng-show="server.updPending" ng-click="dequeueUpdates()">Dequeue Update &nbsp;&nbsp;<i class="fa fa-times"></i></button>
-
+            <button class="btn btn-primary" title="Queue {{server.hostName}} updates" ng-show="!server.updPending" ng-click="queueServerUpdates(server)"><i class="fa fa-flag"></i></button>
+            <button class="btn btn-primary" title="Cancel {{server.hostName}} updates" ng-show="server.updPending" ng-click="clearServerUpdates(server)"><i class="fa fa-ban"></i></button>
             <div class="btn-group" role="group" uib-dropdown is-open="more.isopen">
                 <button type="button" class="btn btn-default dropdown-toggle" uib-dropdown-toggle aria-haspopup="true" aria-expanded="false">
                     More

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/9aeb10ac/traffic_ops/experimental/ui/app/src/common/modules/table/servers/table.servers.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/servers/table.servers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/servers/table.servers.tpl.html
index 4b89b47..df95acd 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/table/servers/table.servers.tpl.html
+++ b/traffic_ops/experimental/ui/app/src/common/modules/table/servers/table.servers.tpl.html
@@ -23,8 +23,8 @@ under the License.
             <li class="active">Servers</li>
         </ol>
         <div class="pull-right">
+            <button class="btn btn-primary" title="Create Server" ng-click="createServer()"><i class="fa fa-plus"></i></button>
             <button class="btn btn-default" ng-click="refresh()"><i class="fa fa-refresh"></i></button>
-            <button class="btn btn-primary" ng-click="createServer()"><i class="fa fa-plus"></i>&nbsp;&nbsp; Create Server</button>
             <div class="btn-group" role="group" uib-dropdown is-open="more.isopen">
                 <button type="button" class="btn btn-default dropdown-toggle" uib-dropdown-toggle aria-haspopup="true" aria-expanded="false">
                     More
@@ -42,7 +42,7 @@ under the License.
         <table id="serversTable" class="table responsive-utilities jambo_table">
             <thead>
             <tr class="headings">
-                <th>Update?</th>
+                <th></th>
                 <th>hostName</th>
                 <th>domainName</th>
                 <th>cdn</th>
@@ -59,7 +59,7 @@ under the License.
             </thead>
             <tbody>
             <tr ng-click="editServer(server.id)" ng-repeat="server in servers" ng-class="{'active': server.updPending}">
-                <td>{{server.updPending}}</td>
+                <td><i class="fa fa-flag" ng-show="server.updPending"></i></td>
                 <td>{{server.hostName}}</td>
                 <td>{{server.domainName}}</td>
                 <td>{{server.cdnName}}</td>


[6/9] incubator-trafficcontrol git commit: adds a generic dialog with a dropdown

Posted by de...@apache.org.
adds a generic dialog with a dropdown


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

Branch: refs/heads/master
Commit: 96d134acb14a7b6dfeaa96fc18e2c7d066a55866
Parents: ed73d85
Author: Jeremy Mitchell <mi...@gmail.com>
Authored: Wed Feb 15 22:04:48 2017 -0700
Committer: Dewayne Richardson <de...@apache.org>
Committed: Fri Feb 17 08:33:17 2017 -0700

----------------------------------------------------------------------
 traffic_ops/experimental/ui/app/src/app.js      |  1 +
 .../dialog/select/DialogSelectController.js     | 39 ++++++++++++++++++++
 .../dialog/select/dialog.select.tpl.html        | 35 ++++++++++++++++++
 .../src/common/modules/dialog/select/index.js   | 21 +++++++++++
 4 files changed, 96 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/96d134ac/traffic_ops/experimental/ui/app/src/app.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/app.js b/traffic_ops/experimental/ui/app/src/app.js
index 0c2e50f..2a73e6d 100644
--- a/traffic_ops/experimental/ui/app/src/app.js
+++ b/traffic_ops/experimental/ui/app/src/app.js
@@ -152,6 +152,7 @@ var trafficOps = angular.module('trafficOps', [
         require('./common/modules/dialog/confirm').name,
         require('./common/modules/dialog/delete').name,
         require('./common/modules/dialog/reset').name,
+        require('./common/modules/dialog/select').name,
         require('./common/modules/header').name,
         require('./common/modules/message').name,
         require('./common/modules/navigation').name,

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/96d134ac/traffic_ops/experimental/ui/app/src/common/modules/dialog/select/DialogSelectController.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/dialog/select/DialogSelectController.js b/traffic_ops/experimental/ui/app/src/common/modules/dialog/select/DialogSelectController.js
new file mode 100644
index 0000000..1906be4
--- /dev/null
+++ b/traffic_ops/experimental/ui/app/src/common/modules/dialog/select/DialogSelectController.js
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+var DialogSelectController = function(params, collection, $scope, $uibModalInstance) {
+
+	$scope.params = params;
+
+	$scope.collection = collection;
+
+	$scope.selectedItemId = null;
+
+	$scope.select = function() {
+		$uibModalInstance.close($scope.selectedItemId);
+	};
+
+	$scope.cancel = function () {
+		$uibModalInstance.dismiss('cancel');
+	};
+
+};
+
+DialogSelectController.$inject = ['params', 'collection', '$scope', '$uibModalInstance'];
+module.exports = DialogSelectController;

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/96d134ac/traffic_ops/experimental/ui/app/src/common/modules/dialog/select/dialog.select.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/dialog/select/dialog.select.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/dialog/select/dialog.select.tpl.html
new file mode 100644
index 0000000..98ba8e1
--- /dev/null
+++ b/traffic_ops/experimental/ui/app/src/common/modules/dialog/select/dialog.select.tpl.html
@@ -0,0 +1,35 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<div class="modal-header">
+    <button type="button" class="close" ng-click="cancel()"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
+    <h4 class="modal-title">{{params.title}}</h4>
+</div>
+<div class="modal-body">
+    <p>{{params.message}}</p>
+    <form name="selectForm" novalidate>
+        <select id="cdn" name="cdn" class="form-control" ng-model="selectedItemId" ng-options="item.id as item.name for item in collection" required>
+            <option value="">Select...</option>
+        </select>
+    </form>
+</div>
+<div class="modal-footer">
+    <button class="btn action-btn" ng-click="cancel()">Cancel</button>
+    <button class="btn btn-link" ng-disabled="selectForm.$invalid" ng-click="select()">Submit</button>
+</div>

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/96d134ac/traffic_ops/experimental/ui/app/src/common/modules/dialog/select/index.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/dialog/select/index.js b/traffic_ops/experimental/ui/app/src/common/modules/dialog/select/index.js
new file mode 100644
index 0000000..909ab74
--- /dev/null
+++ b/traffic_ops/experimental/ui/app/src/common/modules/dialog/select/index.js
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+module.exports = angular.module('trafficOps.dialog.select', [])
+	.controller('DialogSelectController', require('./DialogSelectController'));


[5/9] incubator-trafficcontrol git commit: renames some methods associated with queuing updates on cdn servers

Posted by de...@apache.org.
renames some methods associated with queuing updates on cdn servers


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

Branch: refs/heads/master
Commit: 7b5a66bba241b4d76482445de5b2d5c532e40b5e
Parents: 064b26b
Author: Jeremy Mitchell <mi...@gmail.com>
Authored: Thu Feb 16 19:36:28 2017 -0700
Committer: Dewayne Richardson <de...@apache.org>
Committed: Fri Feb 17 08:33:17 2017 -0700

----------------------------------------------------------------------
 .../experimental/ui/app/src/common/api/CDNService.js        | 8 ++++----
 .../ui/app/src/common/modules/form/cdn/FormCDNController.js | 8 ++++----
 .../ui/app/src/common/modules/form/cdn/form.cdn.tpl.html    | 4 ++--
 .../modules/table/cdnServers/TableCDNServersController.js   | 8 ++++----
 .../modules/table/cdnServers/table.cdnServers.tpl.html      | 9 ++++++---
 5 files changed, 20 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/7b5a66bb/traffic_ops/experimental/ui/app/src/common/api/CDNService.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/api/CDNService.js b/traffic_ops/experimental/ui/app/src/common/api/CDNService.js
index 47f3606..d3f562d 100644
--- a/traffic_ops/experimental/ui/app/src/common/api/CDNService.js
+++ b/traffic_ops/experimental/ui/app/src/common/api/CDNService.js
@@ -64,11 +64,11 @@ var CDNService = function(Restangular, locationUtils, messageModel) {
             );
     };
 
-    this.queueCDNServers = function(id) {
+    this.queueServerUpdates = function(id) {
         return Restangular.one("cdns", id).customPOST( { action: "queue"}, "queue_update" )
             .then(
                 function() {
-                    messageModel.setMessages([ { level: 'success', text: 'CDN servers queued' } ], false);
+                    messageModel.setMessages([ { level: 'success', text: 'Queued CDN server updates' } ], false);
                 },
                 function(fault) {
                     messageModel.setMessages(fault.data.alerts, false);
@@ -76,11 +76,11 @@ var CDNService = function(Restangular, locationUtils, messageModel) {
             );
     };
 
-    this.dequeueCDNServers = function(id) {
+    this.clearServerUpdates = function(id) {
         return Restangular.one("cdns", id).customPOST( { action: "dequeue"}, "queue_update" )
             .then(
                 function() {
-                    messageModel.setMessages([ { level: 'success', text: 'CDN servers dequeued' } ], false);
+                    messageModel.setMessages([ { level: 'success', text: 'Cleared CDN server updates' } ], false);
                 },
                 function(fault) {
                     messageModel.setMessages(fault.data.alerts, false);

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/7b5a66bb/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/FormCDNController.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/FormCDNController.js b/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/FormCDNController.js
index 83f260a..d71e8ef 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/FormCDNController.js
+++ b/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/FormCDNController.js
@@ -44,12 +44,12 @@ var FormCDNController = function(cdn, $scope, $location, formUtils, stringUtils,
         alert('not hooked up yet: cachegroupHealth for CDN');
     };
 
-    $scope.queueUpdates = function(cdn) {
-        cdnService.queueCDNServers(cdn.id);
+    $scope.queueServerUpdates = function(cdn) {
+        cdnService.queueServerUpdates(cdn.id);
     };
 
-    $scope.dequeueUpdates = function() {
-        cdnService.dequeueCDNServers(cdn.id);
+    $scope.clearServerUpdates = function(cdn) {
+        cdnService.clearServerUpdates(cdn.id);
     };
 
     $scope.manageSnapshots = function() {

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/7b5a66bb/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/form.cdn.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/form.cdn.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/form.cdn.tpl.html
index 24c8a9e..4fd6463 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/form.cdn.tpl.html
+++ b/traffic_ops/experimental/ui/app/src/common/modules/form/cdn/form.cdn.tpl.html
@@ -25,8 +25,8 @@ under the License.
         </ol>
         <div class="pull-right" ng-show="!settings.isNew">
             <button class="btn btn-primary" title="Snapshot {{cdn.name}} config" ng-click="manageSnapshots()"><i class="fa fa-camera"></i></button>
-            <button class="btn btn-danger" title="Queue {{cdn.name}} server updates" ng-click="queueUpdates(cdn)"><i class="fa fa-flag"></i></button>
-            <button class="btn btn-info" title="Dequeue {{cdn.name}} server updates" ng-click="dequeueUpdates()"><i class="fa fa-times"></i></button>
+            <button class="btn btn-danger" title="Queue {{cdn.name}} server updates" ng-click="queueServerUpdates(cdn)"><i class="fa fa-flag"></i></button>
+            <button class="btn btn-success" title="Clear {{cdn.name}} server updates" ng-click="clearServerUpdates(cdn)"><i class="fa fa-check"></i></button>
             <div class="btn-group" role="group" uib-dropdown is-open="more.isopen">
                 <button type="button" class="btn btn-default dropdown-toggle" uib-dropdown-toggle aria-haspopup="true" aria-expanded="false">
                     More

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/7b5a66bb/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/TableCDNServersController.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/TableCDNServersController.js b/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/TableCDNServersController.js
index 487265c..1c3d1e9 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/TableCDNServersController.js
+++ b/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/TableCDNServersController.js
@@ -27,8 +27,8 @@ var TableCDNServersController = function(cdn, servers, $scope, $state, locationU
 		locationUtils.navigateToPath('/configure/servers/' + id);
 	};
 
-	$scope.queueUpdates = function(cdn) {
-		cdnService.queueCDNServers(cdn.id)
+	$scope.queueServerUpdates = function(cdn) {
+		cdnService.queueServerUpdates(cdn.id)
 			.then(
 				function() {
 					$scope.refresh();
@@ -36,8 +36,8 @@ var TableCDNServersController = function(cdn, servers, $scope, $state, locationU
 			);
 	};
 
-	$scope.dequeueUpdates = function(cdn) {
-		cdnService.dequeueCDNServers(cdn.id)
+	$scope.clearServerUpdates = function(cdn) {
+		cdnService.clearServerUpdates(cdn.id)
 			.then(
 				function() {
 					$scope.refresh();

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/7b5a66bb/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/table.cdnServers.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/table.cdnServers.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/table.cdnServers.tpl.html
index 055f1e0..d3c0161 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/table.cdnServers.tpl.html
+++ b/traffic_ops/experimental/ui/app/src/common/modules/table/cdnServers/table.cdnServers.tpl.html
@@ -25,8 +25,8 @@ under the License.
             <li class="active">Servers</li>
         </ol>
         <div class="pull-right">
-            <button class="btn btn-danger" title="Queue {{cdn.name}} server updates" ng-click="queueUpdates(cdn)"><i class="fa fa-flag"></i></button>
-            <button class="btn btn-info" title="Dequeue {{cdn.name}} server updates" ng-click="dequeueUpdates(cdn)"><i class="fa fa-times"></i></button>
+            <button class="btn btn-danger" title="Queue {{cdn.name}} server updates" ng-click="queueServerUpdates(cdn)"><i class="fa fa-flag"></i></button>
+            <button class="btn btn-success" title="Clear {{cdn.name}} server updates" ng-click="clearServerUpdates(cdn)"><i class="fa fa-check"></i></button>
             <button class="btn btn-default" title="Refresh" ng-click="refresh()"><i class="fa fa-refresh"></i></button>
         </div>
         <div class="clearfix"></div>
@@ -53,7 +53,10 @@ under the License.
             </thead>
             <tbody>
             <tr ng-click="editServer(server.id)" ng-repeat="server in servers" ng-class="{'active': server.updPending}">
-                <td><i class="fa fa-flag" style="color: #d9534f;" ng-show="server.updPending"></i></td>
+                <td>
+                    <i class="fa fa-flag" style="color: #d9534f;" ng-show="server.updPending"></i>
+                    <i class="fa fa-check" style="color: #5cb85c;" ng-show="!server.updPending"></i>
+                </td>
                 <td>{{server.hostName}}</td>
                 <td>{{server.domainName}}</td>
                 <td>{{server.cdnName}}</td>