You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by mi...@apache.org on 2018/06/18 15:13:11 UTC

[trafficcontrol] 03/04: Origin UI: add ability to list all origins of a DS

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

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

commit a3cf8622cba1c95f8c4349526f399de13292b84e
Author: Rawlin Peters <ra...@comcast.com>
AuthorDate: Tue Jun 12 11:33:49 2018 -0600

    Origin UI: add ability to list all origins of a DS
---
 traffic_portal/app/src/app.js                      |  2 +
 .../app/src/common/api/CoordinateService.js        | 26 +++---
 traffic_portal/app/src/common/api/OriginService.js | 26 +++---
 traffic_portal/app/src/common/api/index.js         | 18 ++--
 .../FormDeliveryServiceController.js               |  6 +-
 .../form.deliveryService.DNS.tpl.html              |  4 +-
 .../form.deliveryService.HTTP.tpl.html             |  6 +-
 .../form/origin/edit/FormEditOriginController.js   | 98 +++++++++++-----------
 .../src/common/modules/form/origin/edit/index.js   |  2 +-
 .../modules/form/origin/form.origin.tpl.html       |  3 +-
 .../form/origin/new/FormNewOriginController.js     | 20 ++---
 .../src/common/modules/form/origin/new/index.js    |  2 +-
 .../TableDeliveryServiceOriginsController.js       | 53 ++++++++++++
 .../edit => table/deliveryServiceOrigins}/index.js |  8 +-
 .../table.deliveryServiceOrigins.tpl.html          | 71 ++++++++++++++++
 .../private/deliveryServices/origins/index.js      | 42 ++++++++++
 16 files changed, 282 insertions(+), 105 deletions(-)

diff --git a/traffic_portal/app/src/app.js b/traffic_portal/app/src/app.js
index f0bc05e..238b2fa 100644
--- a/traffic_portal/app/src/app.js
+++ b/traffic_portal/app/src/app.js
@@ -104,6 +104,7 @@ var trafficPortal = angular.module('trafficPortal', [
         require('./modules/private/deliveryServices/jobs').name,
         require('./modules/private/deliveryServices/jobs/list').name,
         require('./modules/private/deliveryServices/jobs/new').name,
+        require('./modules/private/deliveryServices/origins').name,
         require('./modules/private/deliveryServices/regexes').name,
         require('./modules/private/deliveryServices/regexes/edit').name,
         require('./modules/private/deliveryServices/regexes/list').name,
@@ -319,6 +320,7 @@ var trafficPortal = angular.module('trafficPortal', [
         require('./common/modules/table/coordinates').name,
         require('./common/modules/table/deliveryServices').name,
         require('./common/modules/table/deliveryServiceJobs').name,
+        require('./common/modules/table/deliveryServiceOrigins').name,
         require('./common/modules/table/deliveryServiceRegexes').name,
         require('./common/modules/table/deliveryServiceRequests').name,
         require('./common/modules/table/deliveryServiceRequestComments').name,
diff --git a/traffic_portal/app/src/common/api/CoordinateService.js b/traffic_portal/app/src/common/api/CoordinateService.js
index 3a412bf..7d5882c 100644
--- a/traffic_portal/app/src/common/api/CoordinateService.js
+++ b/traffic_portal/app/src/common/api/CoordinateService.js
@@ -23,24 +23,24 @@ var CoordinateService = function($http, $q, Restangular, locationUtils, messageM
         return Restangular.all('coordinates').getList(queryParams);
     };
 
-	this.createCoordinate = function(coordinate) {
-		var request = $q.defer();
+    this.createCoordinate = function(coordinate) {
+        var request = $q.defer();
 
-		$http.post(ENV.api['root'] + "coordinates", coordinate)
-			.then(
-				function(response) {
+        $http.post(ENV.api['root'] + "coordinates", coordinate)
+            .then(
+                function(response) {
                     messageModel.setMessages(response.data.alerts, true);
                     locationUtils.navigateToPath('/coordinates');
-					request.resolve(response);
-				},
-				function(fault) {
+                    request.resolve(response);
+                },
+                function(fault) {
                     messageModel.setMessages(fault.data.alerts, false)
-					request.reject(fault);
-				}
-			);
+                    request.reject(fault);
+                }
+            );
 
-		return request.promise;
-	};
+        return request.promise;
+    };
 
     this.updateCoordinate = function(id, coordinate) {
         var request = $q.defer();
diff --git a/traffic_portal/app/src/common/api/OriginService.js b/traffic_portal/app/src/common/api/OriginService.js
index d7d4747..2c2a667 100644
--- a/traffic_portal/app/src/common/api/OriginService.js
+++ b/traffic_portal/app/src/common/api/OriginService.js
@@ -23,24 +23,24 @@ var OriginService = function($http, $q, Restangular, locationUtils, messageModel
         return Restangular.all('origins').getList(queryParams);
     };
 
-	this.createOrigin = function(origin) {
-		var request = $q.defer();
+    this.createOrigin = function(origin) {
+        var request = $q.defer();
 
-		$http.post(ENV.api['root'] + "origins", origin)
-			.then(
-				function(response) {
+        $http.post(ENV.api['root'] + "origins", origin)
+            .then(
+                function(response) {
                     messageModel.setMessages(response.data.alerts, true);
                     locationUtils.navigateToPath('/origins');
-					request.resolve(response);
-				},
-				function(fault) {
+                    request.resolve(response);
+                },
+                function(fault) {
                     messageModel.setMessages(fault.data.alerts, false)
-					request.reject(fault);
-				}
-			);
+                    request.reject(fault);
+                }
+            );
 
-		return request.promise;
-	};
+        return request.promise;
+    };
 
     this.updateOrigin = function(id, origin) {
         var request = $q.defer();
diff --git a/traffic_portal/app/src/common/api/index.js b/traffic_portal/app/src/common/api/index.js
index 6040aac..12964aa 100644
--- a/traffic_portal/app/src/common/api/index.js
+++ b/traffic_portal/app/src/common/api/index.js
@@ -22,21 +22,21 @@ module.exports = angular.module('trafficPortal.api', [])
     .service('asnService', require('./ASNService'))
     .service('cacheGroupService', require('./CacheGroupService'))
     .service('cacheGroupParameterService', require('./CacheGroupParameterService'))
-	.service('cacheStatsService', require('./CacheStatsService'))
-	.service('capabilityService', require('./CapabilityService'))
-	.service('cdnService', require('./CDNService'))
+    .service('cacheStatsService', require('./CacheStatsService'))
+    .service('capabilityService', require('./CapabilityService'))
+    .service('cdnService', require('./CDNService'))
     .service('changeLogService', require('./ChangeLogService'))
     .service('coordinateService', require('./CoordinateService'))
     .service('deliveryServiceService', require('./DeliveryServiceService'))
-	.service('deliveryServiceRegexService', require('./DeliveryServiceRegexService'))
-	.service('deliveryServiceRequestService', require('./DeliveryServiceRequestService'))
+    .service('deliveryServiceRegexService', require('./DeliveryServiceRegexService'))
+    .service('deliveryServiceRequestService', require('./DeliveryServiceRequestService'))
     .service('deliveryServiceUrlSigKeysService', require('./DeliveryServiceUrlSigKeysService'))
     .service('deliveryServiceUriSigningKeysService', require('./DeliveryServiceUriSigningKeysService'))
     .service('deliveryServiceSslKeysService', require('./DeliveryServiceSslKeysService'))
-	.service('divisionService', require('./DivisionService'))
-	.service('federationService', require('./FederationService'))
-	.service('endpointService', require('./EndpointService'))
-	.service('federationResolverService', require('./FederationResolverService'))
+    .service('divisionService', require('./DivisionService'))
+    .service('federationService', require('./FederationService'))
+    .service('endpointService', require('./EndpointService'))
+    .service('federationResolverService', require('./FederationResolverService'))
     .service('httpService', require('./HttpService'))
     .service('jobService', require('./JobService'))
     .service('originService', require('./OriginService'))
diff --git a/traffic_portal/app/src/common/modules/form/deliveryService/FormDeliveryServiceController.js b/traffic_portal/app/src/common/modules/form/deliveryService/FormDeliveryServiceController.js
index e6065bd..31dfe13 100644
--- a/traffic_portal/app/src/common/modules/form/deliveryService/FormDeliveryServiceController.js
+++ b/traffic_portal/app/src/common/modules/form/deliveryService/FormDeliveryServiceController.js
@@ -53,7 +53,7 @@ var FormDeliveryServiceController = function(deliveryService, dsCurrent, type, t
 
     $scope.dsRequestsEnabled = propertiesModel.properties.dsRequests.enabled;
 
-	$scope.edgeFQDNs = function(ds) {
+    $scope.edgeFQDNs = function(ds) {
         var urlString = '';
         if (_.isArray(ds.exampleURLs) && ds.exampleURLs.length > 0) {
             for (var i = 0; i < ds.exampleURLs.length; i++) {
@@ -238,6 +238,10 @@ var FormDeliveryServiceController = function(deliveryService, dsCurrent, type, t
         $location.path($location.path() + '/targets');
     };
 
+    $scope.viewOrigins = function() {
+        $location.path($location.path() + '/origins');
+    };
+
     $scope.viewServers = function() {
         $location.path($location.path() + '/servers');
     };
diff --git a/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.DNS.tpl.html b/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.DNS.tpl.html
index 5725970..6f54cd5 100644
--- a/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.DNS.tpl.html
+++ b/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.DNS.tpl.html
@@ -52,6 +52,7 @@ under the License.
                     <li role="menuitem"><a ng-click="manageUrlSigKeys()">Manage URL Sig Keys</a></li>
                     <li role="menuitem"><a ng-click="manageUriSigningKeys()">Manage URI Signing Keys</a></li>
                     <li class="divider"></li>
+                    <li role="menuitem"><a ng-click="viewOrigins()">View Origins</a></li>
                     <li role="menuitem"><a ng-click="viewServers()">View Servers</a></li>
                     <li role="menuitem"><a ng-click="viewRegexes()">View Regexes</a></li>
                     <li role="menuitem"><a ng-click="viewJobs()">View Invalidation Requests</a></li>
@@ -155,6 +156,7 @@ under the License.
                     <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.orgServerFqdn, 'required')">Required</small>
                     <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.orgServerFqdn, 'pattern')">Must start with http:// or https:// and be followed by a valid hostname with an optional port (no trailing slash)</small>
                     <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.orgServerFqdn != dsCurrent.orgServerFqdn">Current Value: [ {{dsCurrent.orgServerFqdn}} ]</small>
+                    <small ng-show="!settings.isNew && deliveryService.orgServerFqdn"><a href="/#!/delivery-services/{{deliveryService.id}}/origins" target="_blank">View Origins&nbsp;&nbsp;<i class="fa fs-xs fa-external-link"></i></a></small>
                     <span ng-show="hasError(deliveryServiceForm.orgServerFqdn)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                 </div>
             </div>
@@ -492,7 +494,7 @@ under the License.
                         <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.fqPacingRate != dsCurrent.fqPacingRate">Current Value: [ {{dsCurrent.fqPacingRate}} ]</small>
                         <span ng-show="hasError(deliveryServiceForm.fqPacingRate)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                     </div>
-                </div>		
+                </div>
 
                 <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.edgeHeaderRewrite), 'has-feedback': hasError(deliveryServiceForm.edgeHeaderRewrite)}">
                     <label class="control-label col-md-2 col-sm-2 col-xs-12">
diff --git a/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.HTTP.tpl.html b/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.HTTP.tpl.html
index 24db8a4..fbe4e38 100644
--- a/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.HTTP.tpl.html
+++ b/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.HTTP.tpl.html
@@ -52,6 +52,7 @@ under the License.
                     <li role="menuitem"><a ng-click="manageUrlSigKeys()">Manage URL Sig Keys</a></li>
                     <li role="menuitem"><a ng-click="manageUriSigningKeys()">Manage URI Signing Keys</a></li>
                     <li class="divider"></li>
+                    <li role="menuitem"><a ng-click="viewOrigins()">View Origins</a></li>
                     <li role="menuitem"><a ng-click="viewServers()">View Servers</a></li>
                     <li role="menuitem"><a ng-click="viewRegexes()">View Regexes</a></li>
                     <li role="menuitem"><a ng-click="viewJobs()">View Invalidation Requests</a></li>
@@ -155,6 +156,7 @@ under the License.
                     <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.orgServerFqdn, 'required')">Required</small>
                     <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.orgServerFqdn, 'pattern')">Must start with http:// or https:// and be followed by a valid hostname with an optional port (no trailing slash)</small>
                     <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.orgServerFqdn != dsCurrent.orgServerFqdn">Current Value: [ {{dsCurrent.orgServerFqdn}} ]</small>
+                    <small ng-show="!settings.isNew && deliveryService.orgServerFqdn"><a href="/#!/delivery-services/{{deliveryService.id}}/origins" target="_blank">View Origins&nbsp;&nbsp;<i class="fa fs-xs fa-external-link"></i></a></small>
                     <span ng-show="hasError(deliveryServiceForm.orgServerFqdn)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                 </div>
             </div>
@@ -498,7 +500,7 @@ under the License.
                     </div>
                 </div>
 
-		<div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.fqPacingRate), 'has-feedback': hasError(deliveryServiceForm.fqPacingRate)}">
+        <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.fqPacingRate), 'has-feedback': hasError(deliveryServiceForm.fqPacingRate)}">
                     <label class="control-label col-md-2 col-sm-2 col-xs-12">
                         <span uib-popover-html="label('fqPacingRate', 'desc')" popover-trigger="click" popover-placement="top" popover-append-to-body="true" popover-class="popover-class">{{label('fqPacingRate', 'title')}}</span>
                     </label>
@@ -508,7 +510,7 @@ under the License.
                         <small class="input-diff" ng-show="settings.isRequest && open() && deliveryService.fqPacingRate != dsCurrent.fqPacingRate">Current Value: [ {{dsCurrent.fqPacingRate}} ]</small>
                         <span ng-show="hasError(deliveryServiceForm.fqPacingRate)" class="form-control-feedback"><i class="fa fa-times"></i></span>
                     </div>
-                </div>				
+                </div>
 
                 <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.edgeHeaderRewrite), 'has-feedback': hasError(deliveryServiceForm.edgeHeaderRewrite)}">
                     <label class="control-label col-md-2 col-sm-2 col-xs-12">
diff --git a/traffic_portal/app/src/common/modules/form/origin/edit/FormEditOriginController.js b/traffic_portal/app/src/common/modules/form/origin/edit/FormEditOriginController.js
index e56213b..398d50b 100644
--- a/traffic_portal/app/src/common/modules/form/origin/edit/FormEditOriginController.js
+++ b/traffic_portal/app/src/common/modules/form/origin/edit/FormEditOriginController.js
@@ -19,60 +19,60 @@
 
 var FormEditOriginController = function(origin, $scope, $state, $controller, $uibModal, $anchorScroll, locationUtils, originService) {
 
-	$scope.origin = origin[0]
+    $scope.origin = origin[0]
 
-	// extends the FormOriginController to inherit common methods
-	angular.extend(this, $controller('FormOriginController', { origin: $scope.origin, $scope: $scope }));
+    // extends the FormOriginController to inherit common methods
+    angular.extend(this, $controller('FormOriginController', { origin: $scope.origin, $scope: $scope }));
 
-	$scope.originName = angular.copy($scope.origin.name);
+    $scope.originName = angular.copy($scope.origin.name);
 
-	$scope.settings = {
-		isNew: false,
-		saveLabel: 'Update',
-		deleteLabel: 'Delete'
-	};
+    $scope.settings = {
+        isNew: false,
+        saveLabel: 'Update',
+        deleteLabel: 'Delete'
+    };
 
-	$scope.save = function(origin) {
-		originService.updateOrigin(origin.id, origin).
-			then(
-				function(result) {
-					$state.reload(); // reloads all the resolves for the view
-				},
-				function(fault) {
-					$anchorScroll(); // scrolls window to top
-				}
-			);
-	};
+    $scope.save = function(origin) {
+        originService.updateOrigin(origin.id, origin).
+            then(
+                function(result) {
+                    $state.reload(); // reloads all the resolves for the view
+                },
+                function(fault) {
+                    $anchorScroll(); // scrolls window to top
+                }
+            );
+    };
 
-	$scope.confirmDelete = function(origin) {
-		var params = {
-			title: 'Delete Origin: ' + origin.name,
-			key: origin.name
-		};
-		var modalInstance = $uibModal.open({
-			templateUrl: 'common/modules/dialog/delete/dialog.delete.tpl.html',
-			controller: 'DialogDeleteController',
-			size: 'md',
-			resolve: {
-				params: function () {
-					return params;
-				}
-			}
-		});
-		modalInstance.result.then(function() {
-			originService.deleteOrigin(origin.id)
-				.then(
-					function(result) {
-						locationUtils.navigateToPath('/origins');
-					},
-					function(fault) {
-						$anchorScroll(); // scrolls window to top
-					}
-				);
-		}, function () {
-			// do nothing
-		});
-	};
+    $scope.confirmDelete = function(origin) {
+        var params = {
+            title: 'Delete Origin: ' + origin.name,
+            key: origin.name
+        };
+        var modalInstance = $uibModal.open({
+            templateUrl: 'common/modules/dialog/delete/dialog.delete.tpl.html',
+            controller: 'DialogDeleteController',
+            size: 'md',
+            resolve: {
+                params: function () {
+                    return params;
+                }
+            }
+        });
+        modalInstance.result.then(function() {
+            originService.deleteOrigin(origin.id)
+                .then(
+                    function(result) {
+                        locationUtils.navigateToPath('/origins');
+                    },
+                    function(fault) {
+                        $anchorScroll(); // scrolls window to top
+                    }
+                );
+        }, function () {
+            // do nothing
+        });
+    };
 
 };
 
diff --git a/traffic_portal/app/src/common/modules/form/origin/edit/index.js b/traffic_portal/app/src/common/modules/form/origin/edit/index.js
index a68c72e..ad0402c 100644
--- a/traffic_portal/app/src/common/modules/form/origin/edit/index.js
+++ b/traffic_portal/app/src/common/modules/form/origin/edit/index.js
@@ -18,4 +18,4 @@
  */
 
 module.exports = angular.module('trafficPortal.form.origin.edit', [])
-	.controller('FormEditOriginController', require('./FormEditOriginController'));
+    .controller('FormEditOriginController', require('./FormEditOriginController'));
diff --git a/traffic_portal/app/src/common/modules/form/origin/form.origin.tpl.html b/traffic_portal/app/src/common/modules/form/origin/form.origin.tpl.html
index c53f937..8dcfbfe 100644
--- a/traffic_portal/app/src/common/modules/form/origin/form.origin.tpl.html
+++ b/traffic_portal/app/src/common/modules/form/origin/form.origin.tpl.html
@@ -47,9 +47,10 @@ under the License.
             <div class="form-group" ng-class="{'has-error': hasError(originForm.tenantId), 'has-feedback': hasError(originForm.tenantId)}">
                 <label class="control-label col-md-2 col-sm-2 col-xs-12">Tenant</label>
                 <div class="col-md-10 col-sm-10 col-xs-12">
-                    <select name="tenantId" class="form-control" ng-model="origin.tenantId" ng-options="tenant.id as tenantLabel(tenant) for tenant in tenants">
+                    <select name="tenantId" class="form-control" ng-model="origin.tenantId" ng-options="tenant.id as tenantLabel(tenant) for tenant in tenants" required>
                         <option value="">Select...</option>
                     </select>
+                    <small class="input-error" ng-show="hasPropertyError(originForm.tenantId, 'required')">Required</small>
                     <small ng-show="origin.tenantId"><a href="/#!/tenants/{{origin.tenantId}}" target="_blank">View Details&nbsp;&nbsp;<i class="fa fs-xs fa-external-link"></i></a></small>
                 </div>
             </div>
diff --git a/traffic_portal/app/src/common/modules/form/origin/new/FormNewOriginController.js b/traffic_portal/app/src/common/modules/form/origin/new/FormNewOriginController.js
index 7cbec6a..b7c0980 100644
--- a/traffic_portal/app/src/common/modules/form/origin/new/FormNewOriginController.js
+++ b/traffic_portal/app/src/common/modules/form/origin/new/FormNewOriginController.js
@@ -19,19 +19,19 @@
 
 var FormNewOriginController = function(origin, $scope, $controller, $anchorScroll, originService) {
 
-	// extends the FormOriginController to inherit common methods
-	angular.extend(this, $controller('FormOriginController', { origin: origin, $scope: $scope }));
+    // extends the FormOriginController to inherit common methods
+    angular.extend(this, $controller('FormOriginController', { origin: origin, $scope: $scope }));
 
-	$scope.originName = 'New';
+    $scope.originName = 'New';
 
-	$scope.settings = {
-		isNew: true,
-		saveLabel: 'Create'
-	};
+    $scope.settings = {
+        isNew: true,
+        saveLabel: 'Create'
+    };
 
-	$scope.save = function(origin) {
-		originService.createOrigin(origin);
-	};
+    $scope.save = function(origin) {
+        originService.createOrigin(origin);
+    };
 
 };
 
diff --git a/traffic_portal/app/src/common/modules/form/origin/new/index.js b/traffic_portal/app/src/common/modules/form/origin/new/index.js
index 3203918..884648c 100644
--- a/traffic_portal/app/src/common/modules/form/origin/new/index.js
+++ b/traffic_portal/app/src/common/modules/form/origin/new/index.js
@@ -18,4 +18,4 @@
  */
 
 module.exports = angular.module('trafficPortal.form.origin.new', [])
-	.controller('FormNewOriginController', require('./FormNewOriginController'));
+    .controller('FormNewOriginController', require('./FormNewOriginController'));
diff --git a/traffic_portal/app/src/common/modules/table/deliveryServiceOrigins/TableDeliveryServiceOriginsController.js b/traffic_portal/app/src/common/modules/table/deliveryServiceOrigins/TableDeliveryServiceOriginsController.js
new file mode 100644
index 0000000..eee379a
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/deliveryServiceOrigins/TableDeliveryServiceOriginsController.js
@@ -0,0 +1,53 @@
+/*
+ * 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 TableDeliveryServiceOriginsController = function(deliveryService, origins, $scope, $state, $location, locationUtils) {
+
+    $scope.createOrigin = function() {
+        var path = '/origins/new';
+        locationUtils.navigateToPath(path);
+    };
+
+    $scope.deliveryService = deliveryService;
+
+    $scope.origins = origins;
+
+    $scope.editOrigin = function(id) {
+        var path = '/origins/' + id;
+        locationUtils.navigateToPath(path);
+    };
+
+    $scope.refresh = function() {
+        $state.reload(); // reloads all the resolves for the view
+    };
+
+    $scope.navigateToPath = locationUtils.navigateToPath;
+
+    angular.element(document).ready(function () {
+        $('#originsTable').dataTable({
+            "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
+            "iDisplayLength": 25,
+            "aaSorting": []
+        });
+    });
+
+};
+
+TableDeliveryServiceOriginsController.$inject = ['deliveryService', 'origins', '$scope', '$state', '$location', 'locationUtils'];
+module.exports = TableDeliveryServiceOriginsController;
diff --git a/traffic_portal/app/src/common/modules/form/origin/edit/index.js b/traffic_portal/app/src/common/modules/table/deliveryServiceOrigins/index.js
similarity index 80%
copy from traffic_portal/app/src/common/modules/form/origin/edit/index.js
copy to traffic_portal/app/src/common/modules/table/deliveryServiceOrigins/index.js
index a68c72e..0b427d0 100644
--- a/traffic_portal/app/src/common/modules/form/origin/edit/index.js
+++ b/traffic_portal/app/src/common/modules/table/deliveryServiceOrigins/index.js
@@ -6,9 +6,9 @@
  * 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
@@ -17,5 +17,5 @@
  * under the License.
  */
 
-module.exports = angular.module('trafficPortal.form.origin.edit', [])
-	.controller('FormEditOriginController', require('./FormEditOriginController'));
+module.exports = angular.module('trafficPortal.table.deliveryServiceOrigins', [])
+    .controller('TableDeliveryServiceOriginsController', require('./TableDeliveryServiceOriginsController'));
diff --git a/traffic_portal/app/src/common/modules/table/deliveryServiceOrigins/table.deliveryServiceOrigins.tpl.html b/traffic_portal/app/src/common/modules/table/deliveryServiceOrigins/table.deliveryServiceOrigins.tpl.html
new file mode 100644
index 0000000..fa33ce5
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/deliveryServiceOrigins/table.deliveryServiceOrigins.tpl.html
@@ -0,0 +1,71 @@
+<!--
+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="x_panel">
+    <div class="x_title">
+        <ol class="breadcrumb pull-left">
+            <li><a ng-click="navigateToPath('/delivery-services')">Delivery Services</a></li>
+            <li><a ng-click="navigateToPath('/delivery-services/' + deliveryService.id + '?type=' + deliveryService.type)">{{::deliveryService.xmlId}}</a></li>
+            <li class="active">Origins</li>
+        </ol>
+        <div class="pull-right" role="group">
+            <button class="btn btn-primary" title="Create Origin" ng-click="createOrigin()"><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>
+    <div class="x_content">
+        <br>
+        <table id="originsTable" class="table responsive-utilities jambo_table">
+            <thead>
+                <tr class="headings">
+                    <th>Name</th>
+                    <th>Tenant</th>
+                    <th>Primary</th>
+                    <th>Delivery Service</th>
+                    <th>FQDN</th>
+                    <th>IPv4 Address</th>
+                    <th>IPv6 Address</th>
+                    <th>Protocol</th>
+                    <th>Port</th>
+                    <th>Coordinate</th>
+                    <th>Cachegroup</th>
+                    <th>Profile</th>
+                </tr>
+            </thead>
+            <tbody>
+                <tr ng-click="editOrigin(o.id)" ng-repeat="o in ::origins">
+                    <td data-search="^{{::o.name}}$">{{::o.name}}</td>
+                    <td data-search="^{{::o.tenant}}$">{{::o.tenant}}</td>
+                    <td data-search="^{{::o.isPrimary}}$">{{::o.isPrimary}}</td>
+                    <td data-search="^{{::o.deliveryService}}$">{{::o.deliveryService}}</td>
+                    <td data-search="^{{::o.fqdn}}$">{{::o.fqdn}}</td>
+                    <td data-search="^{{::o.ipAddress}}$">{{::o.ipAddress}}</td>
+                    <td data-search="^{{::o.ip6Address}}$">{{::o.ip6Address}}</td>
+                    <td data-search="^{{::o.protocol}}$">{{::o.protocol}}</td>
+                    <td data-search="^{{::o.port}}$">{{::o.port}}</td>
+                    <td data-search="^{{::o.coordinate}}$">{{::o.coordinate}}</td>
+                    <td data-search="^{{::o.cachegroup}}$">{{::o.cachegroup}}</td>
+                    <td data-search="^{{::o.profile}}$">{{::o.profile}}</td>
+                </tr>
+            </tbody>
+        </table>
+    </div>
+</div>
+
diff --git a/traffic_portal/app/src/modules/private/deliveryServices/origins/index.js b/traffic_portal/app/src/modules/private/deliveryServices/origins/index.js
new file mode 100644
index 0000000..037350c
--- /dev/null
+++ b/traffic_portal/app/src/modules/private/deliveryServices/origins/index.js
@@ -0,0 +1,42 @@
+/*
+ * 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('trafficPortal.private.deliveryServices.origins', [])
+    .config(function($stateProvider, $urlRouterProvider) {
+        $stateProvider
+            .state('trafficPortal.private.deliveryServices.origins', {
+                url: '/{deliveryServiceId}/origins',
+                views: {
+                    deliveryServicesContent: {
+                        templateUrl: 'common/modules/table/deliveryServiceOrigins/table.deliveryServiceOrigins.tpl.html',
+                        controller: 'TableDeliveryServiceOriginsController',
+                        resolve: {
+                            deliveryService: function($stateParams, deliveryServiceService) {
+                                return deliveryServiceService.getDeliveryService($stateParams.deliveryServiceId);
+                            },
+                            origins: function($stateParams, originService) {
+                                return originService.getOrigins({ deliveryservice: $stateParams.deliveryServiceId });
+                            }
+                        }
+                    }
+                }
+            })
+        ;
+        $urlRouterProvider.otherwise('/');
+    });

-- 
To stop receiving notification emails like this one, please contact
mitchell852@apache.org.