You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by da...@apache.org on 2017/06/30 22:41:44 UTC
[14/52] [partial] incubator-trafficcontrol git commit: promotes TO
experimental UI to the new Traffic Portal
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/deliveryServiceRegexes/table.deliveryServiceRegexes.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/deliveryServiceRegexes/table.deliveryServiceRegexes.tpl.html b/traffic_portal/app/src/common/modules/table/deliveryServiceRegexes/table.deliveryServiceRegexes.tpl.html
new file mode 100644
index 0000000..62ee3c5
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/deliveryServiceRegexes/table.deliveryServiceRegexes.tpl.html
@@ -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.
+-->
+
+<div class="x_panel">
+ <div class="x_title">
+ <ol class="breadcrumb pull-left">
+ <li><a ng-click="navigateToPath('/configure/delivery-services')">Delivery Services</a></li>
+ <li><a ng-click="navigateToPath('/configure/delivery-services/' + deliveryService.id + '?type=' + deliveryService.type)">{{::deliveryService.displayName}}</a></li>
+ <li class="active">Regexes</li>
+ </ol>
+ <div class="pull-right">
+ <button class="btn btn-primary" title="Create Delivery Service Regex" ng-click="createRegex(deliveryService.id)"><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="regexesTable" class="table responsive-utilities jambo_table">
+ <thead>
+ <tr class="headings">
+ <th>type</th>
+ <th>pattern</th>
+ <th>order</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr ng-click="editRegex(deliveryService.id, regex.id)" ng-repeat="regex in ::regexes | orderBy:['setNumber']">
+ <td>{{::regex.typeName}}</td>
+ <td>{{::regex.pattern}}</td>
+ <td>{{::regex.setNumber}}</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+</div>
+
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/deliveryServiceServers/TableDSServersUnassignedController.js
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/deliveryServiceServers/TableDSServersUnassignedController.js b/traffic_portal/app/src/common/modules/table/deliveryServiceServers/TableDSServersUnassignedController.js
new file mode 100644
index 0000000..ac7c42f
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/deliveryServiceServers/TableDSServersUnassignedController.js
@@ -0,0 +1,107 @@
+/*
+ * 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 TableDSServersUnassignedController = function(deliveryService, eligibleServers, assignedServers, $scope, $uibModalInstance) {
+
+ var selectedServerIds = [];
+
+ var addServer = function(serverId) {
+ if (_.indexOf(selectedServerIds, serverId) == -1) {
+ selectedServerIds.push(serverId);
+ }
+ };
+
+ var removeServer = function(serverId) {
+ selectedServerIds = _.without(selectedServerIds, serverId);
+ };
+
+ var addAll = function() {
+ markServers(true);
+ selectedServerIds = _.pluck(eligibleServers, 'id');
+ };
+
+ var removeAll = function() {
+ markServers(false);
+ selectedServerIds = [];
+ };
+
+ var markServers = function(selected) {
+ $scope.selectedServers = _.map(eligibleServers, function(server) {
+ server['selected'] = selected;
+ return server;
+ });
+ };
+
+ $scope.deliveryService = deliveryService;
+
+ $scope.selectedServers = _.map(eligibleServers, function(eligibleServer) {
+ var isAssigned = _.find(assignedServers, function(assignedServer) { return assignedServer.id == eligibleServer.id });
+ if (isAssigned) {
+ eligibleServer['selected'] = true; // so the checkbox will be checked
+ selectedServerIds.push(eligibleServer.id); // so the server is added to selected servers
+ }
+ return eligibleServer;
+ });
+
+ $scope.allSelected = function() {
+ return eligibleServers.length == selectedServerIds.length;
+ };
+
+ $scope.selectAll = function($event) {
+ var checkbox = $event.target;
+ if (checkbox.checked) {
+ addAll();
+ } else {
+ removeAll();
+ }
+ };
+
+ $scope.updateServers = function($event, serverId) {
+ var checkbox = $event.target;
+ if (checkbox.checked) {
+ addServer(serverId);
+ } else {
+ removeServer(serverId);
+ }
+ };
+
+ $scope.submit = function() {
+ $uibModalInstance.close(selectedServerIds);
+ };
+
+ $scope.cancel = function () {
+ $uibModalInstance.dismiss('cancel');
+ };
+
+ angular.element(document).ready(function () {
+ $('#dsServersUnassignedTable').dataTable({
+ "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
+ "iDisplayLength": 25,
+ "order": [[ 1, 'asc' ]],
+ "columnDefs": [
+ { 'orderable': false, 'targets': 0 },
+ { "width": "5%", "targets": 0 }
+ ]
+ });
+ });
+
+};
+
+TableDSServersUnassignedController.$inject = ['deliveryService', 'eligibleServers', 'assignedServers', '$scope', '$uibModalInstance'];
+module.exports = TableDSServersUnassignedController;
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/deliveryServiceServers/TableDeliveryServiceServersController.js
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/deliveryServiceServers/TableDeliveryServiceServersController.js b/traffic_portal/app/src/common/modules/table/deliveryServiceServers/TableDeliveryServiceServersController.js
new file mode 100644
index 0000000..f27aaad
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/deliveryServiceServers/TableDeliveryServiceServersController.js
@@ -0,0 +1,86 @@
+/*
+ * 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 TableDeliveryServiceServersController = function(deliveryService, servers, $scope, $state, $uibModal, locationUtils, serverUtils, deliveryServiceService) {
+
+ $scope.deliveryService = deliveryService;
+
+ $scope.servers = servers;
+
+ $scope.removeServer = function(dsId, serverId) {
+ deliveryServiceService.deleteDeliveryServiceServer(dsId, serverId)
+ .then(
+ function() {
+ $scope.refresh();
+ }
+ );
+ };
+
+ $scope.refresh = function() {
+ $state.reload(); // reloads all the resolves for the view
+ };
+
+ $scope.selectServers = function() {
+ var modalInstance = $uibModal.open({
+ templateUrl: 'common/modules/table/deliveryServiceServers/table.dsServersUnassigned.tpl.html',
+ controller: 'TableDSServersUnassignedController',
+ size: 'lg',
+ resolve: {
+ deliveryService: function() {
+ return deliveryService;
+ },
+ eligibleServers: function(serverService) {
+ return serverService.getEligibleDeliveryServiceServers(deliveryService.id);
+ },
+ assignedServers: function() {
+ return servers;
+ }
+ }
+ });
+ modalInstance.result.then(function(selectedServerIds) {
+ deliveryServiceService.assignDeliveryServiceServers(deliveryService.id, selectedServerIds)
+ .then(
+ function() {
+ $scope.refresh();
+ }
+ );
+ }, function () {
+ // do nothing
+ });
+ };
+
+
+ $scope.isOffline = serverUtils.isOffline;
+
+ $scope.offlineReason = serverUtils.offlineReason;
+
+ $scope.navigateToPath = locationUtils.navigateToPath;
+
+ angular.element(document).ready(function () {
+ $('#serversTable').dataTable({
+ "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
+ "iDisplayLength": 25,
+ "aaSorting": []
+ });
+ });
+
+};
+
+TableDeliveryServiceServersController.$inject = ['deliveryService', 'servers', '$scope', '$state', '$uibModal', 'locationUtils', 'serverUtils', 'deliveryServiceService'];
+module.exports = TableDeliveryServiceServersController;
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/deliveryServiceServers/index.js
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/deliveryServiceServers/index.js b/traffic_portal/app/src/common/modules/table/deliveryServiceServers/index.js
new file mode 100644
index 0000000..029d37b
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/deliveryServiceServers/index.js
@@ -0,0 +1,22 @@
+/*
+ * 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.table.deliveryServiceServers', [])
+ .controller('TableDeliveryServiceServersController', require('./TableDeliveryServiceServersController'))
+ .controller('TableDSServersUnassignedController', require('./TableDSServersUnassignedController'));
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/deliveryServiceServers/table.deliveryServiceServers.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/deliveryServiceServers/table.deliveryServiceServers.tpl.html b/traffic_portal/app/src/common/modules/table/deliveryServiceServers/table.deliveryServiceServers.tpl.html
new file mode 100644
index 0000000..b93bb32
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/deliveryServiceServers/table.deliveryServiceServers.tpl.html
@@ -0,0 +1,78 @@
+<!--
+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('/configure/delivery-services')">Delivery Services</a></li>
+ <li><a ng-click="navigateToPath('/configure/delivery-services/' + deliveryService.id + '?type=' + deliveryService.type)">{{::deliveryService.displayName}}</a></li>
+ <li class="active">Servers</li>
+ </ol>
+ <div class="pull-right">
+ <button class="btn btn-primary" title="Link Servers to Delivery Service" ng-click="selectServers()"><i class="fa fa-link"></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="serversTable" class="table responsive-utilities jambo_table">
+ <thead>
+ <tr class="headings">
+ <th>Update?</th>
+ <th>hostName</th>
+ <th>domainName</th>
+ <th>ipAddress</th>
+ <th>ip6Address</th>
+ <th>status</th>
+ <th>type</th>
+ <th>profile</th>
+ <th>cdn</th>
+ <th>cachegroup</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr ng-repeat="server in ::servers" ng-class="::{'active': server.updPending}">
+ <td class="update-column">
+ <i class="fa fa-flag" ng-if="server.updPending"></i>
+ <i class="fa fa-ban" ng-if="!server.updPending"></i>
+ </td>
+ <td>{{::server.hostName}}</td>
+ <td>{{::server.domainName}}</td>
+ <td>{{::server.ipAddress}}</td>
+ <td>{{::server.ip6Address}}</td>
+ <td>
+ <span ng-if="!isOffline(server.status)">{{::server.status}}</span>
+ <span ng-if="isOffline(server.status)" uib-popover="{{::offlineReason(server)}}" popover-title="Offline Reason" popover-trigger="mouseenter" popover-placement="bottom" popover-append-to-body="true">{{::server.status}}</span>
+ </td>
+ <td>{{::server.type}}</td>
+ <td>{{::server.profile}}</td>
+ <td>{{::server.cdnName}}</td>
+ <td>{{::server.cachegroup}}</td>
+ <td><button type="button" class="btn btn-link" title="Unlink Server from Delivery Service" ng-click="removeServer(deliveryService.id, server.id)"><i class="fa fa-chain-broken"></i></button></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+</div>
+
+
+
+
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/deliveryServiceServers/table.dsServersUnassigned.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/deliveryServiceServers/table.dsServersUnassigned.tpl.html b/traffic_portal/app/src/common/modules/table/deliveryServiceServers/table.dsServersUnassigned.tpl.html
new file mode 100644
index 0000000..7c15cf1
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/deliveryServiceServers/table.dsServersUnassigned.tpl.html
@@ -0,0 +1,49 @@
+<!--
+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">×</span><span class="sr-only">Close</span></button>
+ <h3 class="modal-title">Assign Servers to {{::deliveryService.xmlId}}</h3>
+</div>
+<div class="modal-body">
+ <table id="dsServersUnassignedTable" class="table responsive-utilities jambo_table" style="table-layout:fixed; width:100%;">
+ <thead>
+ <tr class="headings">
+ <th style="padding-left: 10px;"><input type="checkbox" ng-click="selectAll($event)" ng-checked="allSelected()"></th>
+ <th>hostName</th>
+ <th>cachegroup</th>
+ <th>profile</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr ng-repeat="server in ::selectedServers">
+ <td><input type="checkbox" ng-click="updateServers($event, server.id)" ng-checked="server.selected"></td>
+ <td>{{::server.hostName}}</td>
+ <td>{{::server.cachegroup}}</td>
+ <td>{{::server.profile}}</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+<div class="modal-footer">
+ <button class="btn btn-link" ng-click="cancel()">cancel</button>
+ <button class="btn btn-primary" ng-click="submit()">Submit</button>
+</div>
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/deliveryServiceStaticDnsEntries/TableDeliveryServiceStaticDnsEntriesController.js
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/deliveryServiceStaticDnsEntries/TableDeliveryServiceStaticDnsEntriesController.js b/traffic_portal/app/src/common/modules/table/deliveryServiceStaticDnsEntries/TableDeliveryServiceStaticDnsEntriesController.js
new file mode 100644
index 0000000..99f191d
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/deliveryServiceStaticDnsEntries/TableDeliveryServiceStaticDnsEntriesController.js
@@ -0,0 +1,43 @@
+/*
+ * 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 TableDeliveryServiceStaticDnsEntriesController = function(deliveryService, staticDnsEntries, $scope, $state, locationUtils) {
+
+ $scope.deliveryService = deliveryService;
+
+ $scope.staticDnsEntries = staticDnsEntries;
+
+ $scope.refresh = function() {
+ $state.reload(); // reloads all the resolves for the view
+ };
+
+ $scope.navigateToPath = locationUtils.navigateToPath;
+
+ angular.element(document).ready(function () {
+ $('#staticDnsEntriesTable').dataTable({
+ "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
+ "iDisplayLength": 25,
+ "aaSorting": []
+ });
+ });
+
+};
+
+TableDeliveryServiceStaticDnsEntriesController.$inject = ['deliveryService', 'staticDnsEntries', '$scope', '$state', 'locationUtils'];
+module.exports = TableDeliveryServiceStaticDnsEntriesController;
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/deliveryServiceStaticDnsEntries/index.js
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/deliveryServiceStaticDnsEntries/index.js b/traffic_portal/app/src/common/modules/table/deliveryServiceStaticDnsEntries/index.js
new file mode 100644
index 0000000..8de9a14
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/deliveryServiceStaticDnsEntries/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('trafficPortal.table.deliveryServiceStaticDnsEntries', [])
+ .controller('TableDeliveryServiceStaticDnsEntriesController', require('./TableDeliveryServiceStaticDnsEntriesController'));
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/deliveryServiceStaticDnsEntries/table.deliveryServiceStaticDnsEntries.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/deliveryServiceStaticDnsEntries/table.deliveryServiceStaticDnsEntries.tpl.html b/traffic_portal/app/src/common/modules/table/deliveryServiceStaticDnsEntries/table.deliveryServiceStaticDnsEntries.tpl.html
new file mode 100644
index 0000000..1396158
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/deliveryServiceStaticDnsEntries/table.deliveryServiceStaticDnsEntries.tpl.html
@@ -0,0 +1,58 @@
+<!--
+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('/configure/delivery-services')">Delivery Services</a></li>
+ <li><a ng-click="navigateToPath('/configure/delivery-services/' + deliveryService.id + '?type=' + deliveryService.type)">{{::deliveryService.displayName}}</a></li>
+ <li class="active">Static DNS Entries</li>
+ </ol>
+ <div class="pull-right">
+ <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="staticDnsEntriesTable" class="table responsive-utilities jambo_table">
+ <thead>
+ <tr class="headings">
+ <th>host</th>
+ <th>address</th>
+ <th>type</th>
+ <th>ttl</th>
+ <th>deliveryservice</th>
+ <th>cachegroup</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr ng-repeat="staticDnsEntry in ::staticDnsEntries">
+ <td>{{::staticDnsEntry.host}}</td>
+ <td>{{::staticDnsEntry.address}}</td>
+ <td>{{::staticDnsEntry.type}}</td>
+ <td>{{::staticDnsEntry.ttl}}</td>
+ <td>{{::staticDnsEntry.deliveryservice}}</td>
+ <td>{{::staticDnsEntry.cachegroup}}</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+</div>
+
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/deliveryServiceUsers/TableDeliveryServiceUsersController.js
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/deliveryServiceUsers/TableDeliveryServiceUsersController.js b/traffic_portal/app/src/common/modules/table/deliveryServiceUsers/TableDeliveryServiceUsersController.js
new file mode 100644
index 0000000..f16131f
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/deliveryServiceUsers/TableDeliveryServiceUsersController.js
@@ -0,0 +1,55 @@
+/*
+ * 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 TableDeliveryServiceUsersController = function(deliveryService, users, $scope, $state, locationUtils) {
+
+ $scope.deliveryService = deliveryService;
+
+ $scope.users = users;
+
+ $scope.addUser = function() {
+ alert('not hooked up yet: addUser to ds');
+ };
+
+ $scope.removeUser = function() {
+ alert('not hooked up yet: removeUser from ds');
+ };
+
+ $scope.isAdmin = function(user) {
+ return user.role == 4;
+ };
+
+ $scope.refresh = function() {
+ $state.reload(); // reloads all the resolves for the view
+ };
+
+ $scope.navigateToPath = locationUtils.navigateToPath;
+
+ angular.element(document).ready(function () {
+ $('#usersTable').dataTable({
+ "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
+ "iDisplayLength": 25,
+ "aaSorting": []
+ });
+ });
+
+};
+
+TableDeliveryServiceUsersController.$inject = ['deliveryService', 'users', '$scope', '$state', 'locationUtils'];
+module.exports = TableDeliveryServiceUsersController;
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/deliveryServiceUsers/index.js
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/deliveryServiceUsers/index.js b/traffic_portal/app/src/common/modules/table/deliveryServiceUsers/index.js
new file mode 100644
index 0000000..6cf5b1e
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/deliveryServiceUsers/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('trafficPortal.table.deliveryServiceUsers', [])
+ .controller('TableDeliveryServiceUsersController', require('./TableDeliveryServiceUsersController'));
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/deliveryServiceUsers/table.deliveryServiceUsers.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/deliveryServiceUsers/table.deliveryServiceUsers.tpl.html b/traffic_portal/app/src/common/modules/table/deliveryServiceUsers/table.deliveryServiceUsers.tpl.html
new file mode 100644
index 0000000..2e9a21e
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/deliveryServiceUsers/table.deliveryServiceUsers.tpl.html
@@ -0,0 +1,60 @@
+<!--
+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('/configure/delivery-services')">Delivery Services</a></li>
+ <li><a ng-click="navigateToPath('/configure/delivery-services/' + deliveryService.id + '?type=' + deliveryService.type)">{{::deliveryService.displayName}}</a></li>
+ <li class="active">Users</li>
+ </ol>
+ <div class="pull-right">
+ <button class="btn btn-default" title="Refresh" ng-click="refresh()"><i class="fa fa-refresh"></i></button>
+ <button class="btn btn-primary" ng-click="addUser()">Add</button>
+ </div>
+ <div class="clearfix"></div>
+ </div>
+ <div class="x_content">
+ <br>
+ <table id="usersTable" class="table responsive-utilities jambo_table">
+ <thead>
+ <tr class="headings">
+ <th>Full Name</th>
+ <th>Username</th>
+ <th>Email</th>
+ <th>Role</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr ng-click="editUser(user.id)" ng-repeat="user in ::users">
+ <td>{{::user.fullName}}</td>
+ <td>{{::user.username}}</td>
+ <td>{{::user.email}}</td>
+ <td>{{::user.rolename}}</td>
+ <td><button type="button" class="btn btn-link" title="Remove from Delivery Service" ng-click="removeUser()" ng-hide="isAdmin(user)"><i class="fa fa-trash-o"></i></button></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+</div>
+
+
+
+
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/deliveryServices/TableDeliveryServicesController.js
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/deliveryServices/TableDeliveryServicesController.js b/traffic_portal/app/src/common/modules/table/deliveryServices/TableDeliveryServicesController.js
new file mode 100644
index 0000000..44d82f8
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/deliveryServices/TableDeliveryServicesController.js
@@ -0,0 +1,74 @@
+/*
+ * 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 TableDeliveryServicesController = function(deliveryServices, $scope, $state, $uibModal, locationUtils) {
+
+ $scope.deliveryServices = deliveryServices;
+
+ $scope.editDeliveryService = function(ds) {
+ var path = '/configure/delivery-services/' + ds.id + '?type=' + ds.type;
+ locationUtils.navigateToPath(path);
+ };
+
+ var createDeliveryService = function(typeName) {
+ var path = '/configure/delivery-services/new?type=' + typeName;
+ locationUtils.navigateToPath(path);
+ };
+
+ $scope.refresh = function() {
+ $state.reload(); // reloads all the resolves for the view
+ };
+
+ $scope.selectDSType = function() {
+ var params = {
+ title: 'Create Delivery Service',
+ message: "Please select a content routing type"
+ };
+ var modalInstance = $uibModal.open({
+ templateUrl: 'common/modules/dialog/select/dialog.select.tpl.html',
+ controller: 'DialogSelectController',
+ size: 'md',
+ resolve: {
+ params: function () {
+ return params;
+ },
+ collection: function(typeService) {
+ return typeService.getTypes( { useInTable: 'deliveryservice'} );
+ }
+ }
+ });
+ modalInstance.result.then(function(type) {
+ createDeliveryService(type.name);
+ }, function () {
+ // do nothing
+ });
+ };
+
+ angular.element(document).ready(function () {
+ $('#deliveryServicesTable').dataTable({
+ "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
+ "iDisplayLength": 25,
+ "aaSorting": []
+ });
+ });
+
+};
+
+TableDeliveryServicesController.$inject = ['deliveryServices', '$scope', '$state', '$uibModal', 'locationUtils'];
+module.exports = TableDeliveryServicesController;
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/deliveryServices/index.js
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/deliveryServices/index.js b/traffic_portal/app/src/common/modules/table/deliveryServices/index.js
new file mode 100644
index 0000000..9e75882
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/deliveryServices/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('trafficPortal.table.deliveryServices', [])
+ .controller('TableDeliveryServicesController', require('./TableDeliveryServicesController'));
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/deliveryServices/table.deliveryServices.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/deliveryServices/table.deliveryServices.tpl.html b/traffic_portal/app/src/common/modules/table/deliveryServices/table.deliveryServices.tpl.html
new file mode 100644
index 0000000..3b97e89
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/deliveryServices/table.deliveryServices.tpl.html
@@ -0,0 +1,65 @@
+<!--
+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 class="active">Delivery Services</li>
+ </ol>
+ <div class="pull-right" role="group" ng-if="!settings.isNew">
+ <button class="btn btn-primary" title="Create Delivery Service" ng-click="selectDSType()"><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="deliveryServicesTable" class="table responsive-utilities jambo_table">
+ <thead>
+ <tr class="headings">
+ <th>xmlId</th>
+ <th>orgServerFqdn</th>
+ <th>active</th>
+ <th>type</th>
+ <th>protocol</th>
+ <th>cdn</th>
+ <th>ipv6RoutingEnabled</th>
+ <th>dscp</th>
+ <th>signed</th>
+ <th>qstringIgnore</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr ng-click="editDeliveryService(deliveryService)" ng-repeat="deliveryService in ::deliveryServices">
+ <td>{{::deliveryService.xmlId}}</td>
+ <td>{{::deliveryService.orgServerFqdn}}</td>
+ <td>{{::deliveryService.active}}</td>
+ <td>{{::deliveryService.type}}</td>
+ <td>{{::deliveryService.protocol}}</td>
+ <td>{{::deliveryService.cdnName}}</td>
+ <td>{{::deliveryService.ipv6RoutingEnabled}}</td>
+ <td>{{::deliveryService.dscp}}</td>
+ <td>{{::deliveryService.signed}}</td>
+ <td>{{::deliveryService.qstringIgnore}}</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+</div>
+
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/divisionRegions/TableDivisionRegionsController.js
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/divisionRegions/TableDivisionRegionsController.js b/traffic_portal/app/src/common/modules/table/divisionRegions/TableDivisionRegionsController.js
new file mode 100644
index 0000000..e953251
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/divisionRegions/TableDivisionRegionsController.js
@@ -0,0 +1,47 @@
+/*
+ * 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 TableDivisionRegionsController = function(division, divisionRegions, $scope, $state, locationUtils) {
+
+ $scope.division = division;
+
+ $scope.divisionRegions = divisionRegions;
+
+ $scope.editRegion = function(id) {
+ locationUtils.navigateToPath('/admin/regions/' + id);
+ };
+
+ $scope.refresh = function() {
+ $state.reload(); // reloads all the resolves for the view
+ };
+
+ $scope.navigateToPath = locationUtils.navigateToPath;
+
+ angular.element(document).ready(function () {
+ $('#regionsTable').dataTable({
+ "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
+ "iDisplayLength": 25,
+ "aaSorting": []
+ });
+ });
+
+};
+
+TableDivisionRegionsController.$inject = ['division', 'divisionRegions', '$scope', '$state', 'locationUtils'];
+module.exports = TableDivisionRegionsController;
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/divisionRegions/index.js
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/divisionRegions/index.js b/traffic_portal/app/src/common/modules/table/divisionRegions/index.js
new file mode 100644
index 0000000..785d4e9
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/divisionRegions/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('trafficPortal.table.divisionRegions', [])
+ .controller('TableDivisionRegionsController', require('./TableDivisionRegionsController'));
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/divisionRegions/table.divisionRegions.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/divisionRegions/table.divisionRegions.tpl.html b/traffic_portal/app/src/common/modules/table/divisionRegions/table.divisionRegions.tpl.html
new file mode 100644
index 0000000..6f9ad6c
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/divisionRegions/table.divisionRegions.tpl.html
@@ -0,0 +1,52 @@
+<!--
+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('/admin/divisions')">Divisions</a></li>
+ <li><a ng-click="navigateToPath('/admin/divisions/' + division.id)">{{::division.name}}</a></li>
+ <li class="active">Regions</li>
+ </ol>
+ <div class="pull-right">
+ <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="regionsTable" class="table responsive-utilities jambo_table">
+ <thead>
+ <tr class="headings">
+ <th>name</th>
+ <th>division</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr ng-click="editRegion(region.id)" ng-repeat="region in ::divisionRegions">
+ <td>{{::region.name}}</td>
+ <td>{{::region.divisionName}}</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+</div>
+
+
+
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/divisions/TableDivisionsController.js
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/divisions/TableDivisionsController.js b/traffic_portal/app/src/common/modules/table/divisions/TableDivisionsController.js
new file mode 100644
index 0000000..b4e5831
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/divisions/TableDivisionsController.js
@@ -0,0 +1,47 @@
+/*
+ * 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 TableDivisionsController = function(divisions, $scope, $state, locationUtils) {
+
+ $scope.divisions = divisions;
+
+ $scope.editDivision = function(id) {
+ locationUtils.navigateToPath('/admin/divisions/' + id);
+ };
+
+ $scope.createDivision = function() {
+ locationUtils.navigateToPath('/admin/divisions/new');
+ };
+
+ $scope.refresh = function() {
+ $state.reload(); // reloads all the resolves for the view
+ };
+
+ angular.element(document).ready(function () {
+ $('#divisionsTable').dataTable({
+ "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
+ "iDisplayLength": 25,
+ "aaSorting": []
+ });
+ });
+
+};
+
+TableDivisionsController.$inject = ['divisions', '$scope', '$state', 'locationUtils'];
+module.exports = TableDivisionsController;
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/divisions/index.js
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/divisions/index.js b/traffic_portal/app/src/common/modules/table/divisions/index.js
new file mode 100644
index 0000000..946f6b4
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/divisions/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('trafficPortal.table.divisions', [])
+ .controller('TableDivisionsController', require('./TableDivisionsController'));
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/divisions/table.divisions.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/divisions/table.divisions.tpl.html b/traffic_portal/app/src/common/modules/table/divisions/table.divisions.tpl.html
new file mode 100644
index 0000000..47e1e4b
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/divisions/table.divisions.tpl.html
@@ -0,0 +1,47 @@
+<!--
+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 class="active">Divisions</li>
+ </ol>
+ <div class="pull-right">
+ <button class="btn btn-primary" title="Create Division" ng-click="createDivision()"><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="divisionsTable" class="table responsive-utilities jambo_table">
+ <thead>
+ <tr class="headings">
+ <th>name</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr ng-click="editDivision(division.id)" ng-repeat="division in ::divisions">
+ <td>{{::division.name}}</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+</div>
+
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/jobs/TableJobsController.js
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/jobs/TableJobsController.js b/traffic_portal/app/src/common/modules/table/jobs/TableJobsController.js
new file mode 100644
index 0000000..4b708d4
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/jobs/TableJobsController.js
@@ -0,0 +1,43 @@
+/*
+ * 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 TableJobsController = function(jobs, $scope, $state, locationUtils) {
+
+ $scope.jobs = jobs;
+
+ $scope.createJob = function() {
+ locationUtils.navigateToPath('/admin/jobs/new');
+ };
+
+ $scope.refresh = function() {
+ $state.reload(); // reloads all the resolves for the view
+ };
+
+ angular.element(document).ready(function () {
+ $('#jobsTable').dataTable({
+ "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
+ "iDisplayLength": 25,
+ "aaSorting": []
+ });
+ });
+
+};
+
+TableJobsController.$inject = ['jobs', '$scope', '$state', 'locationUtils'];
+module.exports = TableJobsController;
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/jobs/index.js
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/jobs/index.js b/traffic_portal/app/src/common/modules/table/jobs/index.js
new file mode 100644
index 0000000..65cc604
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/jobs/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('trafficPortal.table.jobs', [])
+ .controller('TableJobsController', require('./TableJobsController'));
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/jobs/table.jobs.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/jobs/table.jobs.tpl.html b/traffic_portal/app/src/common/modules/table/jobs/table.jobs.tpl.html
new file mode 100644
index 0000000..e7de6fc
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/jobs/table.jobs.tpl.html
@@ -0,0 +1,55 @@
+<!--
+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 class="active">Invalidate Content Jobs</li>
+ </ol>
+ <div class="pull-right" role="group" ng-show="!settings.isNew">
+ <button class="btn btn-primary" title="Create Invalidate Content Job" ng-click="createJob()"><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="jobsTable" class="table responsive-utilities jambo_table">
+ <thead>
+ <tr class="headings">
+ <th>deliveryService</th>
+ <th>assetUrl</th>
+ <th>parameters</th>
+ <th>start</th>
+ <th>createdBy</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr ng-repeat="job in ::jobs">
+ <td>{{::job.deliveryService}}</td>
+ <td>{{::job.assetUrl}}</td>
+ <td>{{::job.parameters}}</td>
+ <td>{{::job.startTime}}</td>
+ <td>{{::job.createdBy}}</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+</div>
+
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/parameterCacheGroups/TableParameterCacheGroupsController.js
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/parameterCacheGroups/TableParameterCacheGroupsController.js b/traffic_portal/app/src/common/modules/table/parameterCacheGroups/TableParameterCacheGroupsController.js
new file mode 100644
index 0000000..fc3dbea
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/parameterCacheGroups/TableParameterCacheGroupsController.js
@@ -0,0 +1,51 @@
+/*
+ * 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 TableParameterCacheGroupsController = function(parameter, cacheGroups, $scope, $state, locationUtils) {
+
+ $scope.parameter = parameter;
+
+ $scope.cacheGroups = cacheGroups;
+
+ $scope.addCacheGroup = function() {
+ alert('not hooked up yet: add cg to parameter');
+ };
+
+ $scope.removeCacheGroup = function() {
+ alert('not hooked up yet: remove cg from parameter');
+ };
+
+ $scope.refresh = function() {
+ $state.reload(); // reloads all the resolves for the view
+ };
+
+ $scope.navigateToPath = locationUtils.navigateToPath;
+
+ angular.element(document).ready(function () {
+ $('#cacheGroupsTable').dataTable({
+ "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
+ "iDisplayLength": 25,
+ "aaSorting": []
+ });
+ });
+
+};
+
+TableParameterCacheGroupsController.$inject = ['parameter', 'cacheGroups', '$scope', '$state', 'locationUtils'];
+module.exports = TableParameterCacheGroupsController;
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/parameterCacheGroups/index.js
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/parameterCacheGroups/index.js b/traffic_portal/app/src/common/modules/table/parameterCacheGroups/index.js
new file mode 100644
index 0000000..69f34a9
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/parameterCacheGroups/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('trafficPortal.table.parameterCacheGroups', [])
+ .controller('TableParameterCacheGroupsController', require('./TableParameterCacheGroupsController'));
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/parameterCacheGroups/table.parameterCacheGroups.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/parameterCacheGroups/table.parameterCacheGroups.tpl.html b/traffic_portal/app/src/common/modules/table/parameterCacheGroups/table.parameterCacheGroups.tpl.html
new file mode 100644
index 0000000..575b75b
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/parameterCacheGroups/table.parameterCacheGroups.tpl.html
@@ -0,0 +1,59 @@
+<!--
+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('/admin/parameters')">Parameters</a></li>
+ <li><a ng-click="navigateToPath('/admin/parameters/' + parameter.id)">{{::parameter.name}}</a></li>
+ <li class="active">Cache Groups</li>
+ </ol>
+ <div class="pull-right">
+ <button class="btn btn-primary" title="Add Cache Group" ng-click="addCacheGroup()"><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="cacheGroupsTable" class="table responsive-utilities jambo_table">
+ <thead>
+ <tr class="headings">
+ <th>name</th>
+ <th>shortName</th>
+ <th>type</th>
+ <th>latitude</th>
+ <th>longitude</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr ng-repeat="cacheGroup in ::cacheGroups">
+ <td>{{::cacheGroup.name}}</td>
+ <td>{{::cacheGroup.shortName}}</td>
+ <td>{{::cacheGroup.typeName}}</td>
+ <td>{{::cacheGroup.latitude}}</td>
+ <td>{{::cacheGroup.longitude}}</td>
+ <td><button type="button" class="btn btn-link" title="Remove Cache Group" ng-click="removeCacheGroup()"><i class="fa fa-trash-o"></i></button></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+</div>
+
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/parameterProfiles/TableParamProfilesUnassignedController.js
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/parameterProfiles/TableParamProfilesUnassignedController.js b/traffic_portal/app/src/common/modules/table/parameterProfiles/TableParamProfilesUnassignedController.js
new file mode 100644
index 0000000..2aa585b
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/parameterProfiles/TableParamProfilesUnassignedController.js
@@ -0,0 +1,69 @@
+/*
+ * 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 TableParamProfilesUnassignedController = function(parameter, profiles, $scope, $uibModalInstance) {
+
+ var selectedProfiles = [];
+
+ $scope.parameter = parameter;
+
+ $scope.unassignedProfiles = profiles;
+
+ var addProfile = function(profileId) {
+ if (_.indexOf(selectedProfiles, profileId) == -1) {
+ selectedProfiles.push(profileId);
+ }
+ };
+
+ var removeProfile = function(profileId) {
+ selectedProfiles = _.without(selectedProfiles, profileId);
+ };
+
+ $scope.updateProfiles = function($event, profileId) {
+ var checkbox = $event.target;
+ if (checkbox.checked) {
+ addProfile(profileId);
+ } else {
+ removeProfile(profileId);
+ }
+ };
+
+ $scope.submit = function() {
+ $uibModalInstance.close(selectedProfiles);
+ };
+
+ $scope.cancel = function () {
+ $uibModalInstance.dismiss('cancel');
+ };
+
+ angular.element(document).ready(function () {
+ $('#paramProfilesUnassignedTable').dataTable({
+ "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
+ "iDisplayLength": 25,
+ "order": [[ 1, 'asc' ]],
+ "columnDefs": [
+ { "width": "5%", "targets": 0 }
+ ]
+ });
+ });
+
+};
+
+TableParamProfilesUnassignedController.$inject = ['parameter', 'profiles', '$scope', '$uibModalInstance'];
+module.exports = TableParamProfilesUnassignedController;
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/parameterProfiles/TableParameterProfilesController.js
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/parameterProfiles/TableParameterProfilesController.js b/traffic_portal/app/src/common/modules/table/parameterProfiles/TableParameterProfilesController.js
new file mode 100644
index 0000000..3fb44f6
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/parameterProfiles/TableParameterProfilesController.js
@@ -0,0 +1,87 @@
+/*
+ * 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 TableParameterProfilesController = function(parameter, parameterProfiles, $scope, $state, $uibModal, locationUtils, profileParameterService) {
+
+ $scope.parameter = parameter;
+
+ $scope.parameterProfiles = parameterProfiles;
+
+ $scope.addProfile = function() {
+ alert('not hooked up yet: add profile to parameter');
+ };
+
+ $scope.removeProfile = function(profileId) {
+ profileParameterService.unlinkProfileParameter(profileId, parameter.id)
+ .then(
+ function() {
+ $scope.refresh();
+ }
+ );
+ };
+
+ $scope.refresh = function() {
+ $state.reload(); // reloads all the resolves for the view
+ };
+
+ $scope.selectProfiles = function() {
+ var modalInstance = $uibModal.open({
+ templateUrl: 'common/modules/table/parameterProfiles/table.paramProfilesUnassigned.tpl.html',
+ controller: 'TableParamProfilesUnassignedController',
+ size: 'lg',
+ resolve: {
+ parameter: function() {
+ return parameter;
+ },
+ profiles: function(profileService) {
+ return profileService.getParamUnassignedProfiles(parameter.id);
+ }
+ }
+ });
+ modalInstance.result.then(function(selectedProfiles) {
+ var massagedArray = [];
+ for (i = 0; i < selectedProfiles.length; i++) {
+ massagedArray.push( { parameterId: parameter.id, profileId: selectedProfiles[i] } );
+ }
+ profileParameterService.linkProfileParameters(massagedArray)
+ .then(
+ function() {
+ $scope.refresh();
+ }
+ );
+ }, function () {
+ // do nothing
+ });
+ };
+
+
+ $scope.navigateToPath = locationUtils.navigateToPath;
+
+ angular.element(document).ready(function () {
+ $('#parameterProfilesTable').dataTable({
+ "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
+ "iDisplayLength": 25,
+ "aaSorting": []
+ });
+ });
+
+};
+
+TableParameterProfilesController.$inject = ['parameter', 'parameterProfiles', '$scope', '$state', '$uibModal', 'locationUtils', 'profileParameterService'];
+module.exports = TableParameterProfilesController;
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/parameterProfiles/index.js
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/parameterProfiles/index.js b/traffic_portal/app/src/common/modules/table/parameterProfiles/index.js
new file mode 100644
index 0000000..88cf42b
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/parameterProfiles/index.js
@@ -0,0 +1,22 @@
+/*
+ * 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.table.parameterProfiles', [])
+ .controller('TableParameterProfilesController', require('./TableParameterProfilesController'))
+ .controller('TableParamProfilesUnassignedController', require('./TableParamProfilesUnassignedController'));
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/parameterProfiles/table.paramProfilesUnassigned.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/parameterProfiles/table.paramProfilesUnassigned.tpl.html b/traffic_portal/app/src/common/modules/table/parameterProfiles/table.paramProfilesUnassigned.tpl.html
new file mode 100644
index 0000000..f24e240
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/parameterProfiles/table.paramProfilesUnassigned.tpl.html
@@ -0,0 +1,51 @@
+<!--
+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">×</span><span class="sr-only">Close</span></button>
+ <h3 class="modal-title">Link Profiles to {{::parameter.name}}</h3>
+</div>
+<div class="modal-body">
+ <table id="paramProfilesUnassignedTable" class="table responsive-utilities jambo_table" style="table-layout:fixed; width:100%;">
+ <thead>
+ <tr class="headings">
+ <th></th>
+ <th>name</th>
+ <th>description</th>
+ <th>type</th>
+ <th>cdn</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr ng-repeat="profile in ::unassignedProfiles">
+ <td><input type="checkbox" ng-click="updateProfiles($event, profile.id)"></td>
+ <td>{{::profile.name}}</td>
+ <td>{{::profile.description}}</td>
+ <td>{{::profile.type}}</td>
+ <td>{{::profile.cdnName}}</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+<div class="modal-footer">
+ <button class="btn btn-link" ng-click="cancel()">cancel</button>
+ <button class="btn btn-primary" ng-click="submit()">Submit</button>
+</div>
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/parameterProfiles/table.parameterProfiles.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/parameterProfiles/table.parameterProfiles.tpl.html b/traffic_portal/app/src/common/modules/table/parameterProfiles/table.parameterProfiles.tpl.html
new file mode 100644
index 0000000..61fd49a
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/parameterProfiles/table.parameterProfiles.tpl.html
@@ -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.
+-->
+
+<div class="x_panel">
+ <div class="x_title">
+ <ol class="breadcrumb pull-left">
+ <li><a ng-click="navigateToPath('/admin/parameters')">Parameters</a></li>
+ <li><a ng-click="navigateToPath('/admin/parameters/' + parameter.id)">{{::parameter.name}}</a></li>
+ <li class="active">Profiles</li>
+ </ol>
+ <div class="pull-right">
+ <button class="btn btn-primary" title="Link Profiles to Parameter" ng-click="selectProfiles()"><i class="fa fa-link"></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="parameterProfilesTable" class="table responsive-utilities jambo_table">
+ <thead>
+ <tr class="headings">
+ <th>name</th>
+ <th>description</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr ng-repeat="parameterProfile in ::parameterProfiles">
+ <td>{{::parameterProfile.name}}</td>
+ <td>{{::parameterProfile.description}}</td>
+ <td><button type="button" class="btn btn-link" title="Unlink Profile from Parameter" ng-click="removeProfile(parameterProfile.id)"><i class="fa fa-chain-broken"></i></button></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+</div>
+
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/parameters/TableParametersController.js
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/parameters/TableParametersController.js b/traffic_portal/app/src/common/modules/table/parameters/TableParametersController.js
new file mode 100644
index 0000000..4ed957c
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/parameters/TableParametersController.js
@@ -0,0 +1,47 @@
+/*
+ * 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 TableParametersController = function(parameters, $scope, $state, locationUtils) {
+
+ $scope.parameters = parameters;
+
+ $scope.editParameter = function(id) {
+ locationUtils.navigateToPath('/admin/parameters/' + id);
+ };
+
+ $scope.createParameter = function() {
+ locationUtils.navigateToPath('/admin/parameters/new');
+ };
+
+ $scope.refresh = function() {
+ $state.reload(); // reloads all the resolves for the view
+ };
+
+ angular.element(document).ready(function () {
+ $('#parametersTable').dataTable({
+ "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
+ "iDisplayLength": 25,
+ "aaSorting": []
+ });
+ });
+
+};
+
+TableParametersController.$inject = ['parameters', '$scope', '$state', 'locationUtils'];
+module.exports = TableParametersController;
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/parameters/index.js
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/parameters/index.js b/traffic_portal/app/src/common/modules/table/parameters/index.js
new file mode 100644
index 0000000..f9e9fca
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/parameters/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('trafficPortal.table.parameters', [])
+ .controller('TableParametersController', require('./TableParametersController'));
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/parameters/table.parameters.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/parameters/table.parameters.tpl.html b/traffic_portal/app/src/common/modules/table/parameters/table.parameters.tpl.html
new file mode 100644
index 0000000..3c61a00
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/parameters/table.parameters.tpl.html
@@ -0,0 +1,51 @@
+<!--
+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 class="active">Parameters</li>
+ </ol>
+ <div class="pull-right">
+ <button class="btn btn-primary" title="Create Parameter" ng-click="createParameter()"><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="parametersTable" class="table responsive-utilities jambo_table" >
+ <thead>
+ <tr class="headings">
+ <th>name</th>
+ <th>configFile</th>
+ <th>value</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr ng-click="editParameter(parameter.id)" ng-repeat="parameter in ::parameters">
+ <td>{{::parameter.name}}</td>
+ <td>{{::parameter.configFile}}</td>
+ <td>{{::parameter.value}}</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+</div>
+
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3195e0cc/traffic_portal/app/src/common/modules/table/physLocationServers/TablePhysLocationServersController.js
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/table/physLocationServers/TablePhysLocationServersController.js b/traffic_portal/app/src/common/modules/table/physLocationServers/TablePhysLocationServersController.js
new file mode 100644
index 0000000..c7f69fc
--- /dev/null
+++ b/traffic_portal/app/src/common/modules/table/physLocationServers/TablePhysLocationServersController.js
@@ -0,0 +1,51 @@
+/*
+ * 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 TablePhysLocationServersController = function(physLocation, servers, $scope, $state, locationUtils, serverUtils) {
+
+ $scope.physLocation = physLocation;
+
+ $scope.servers = servers;
+
+ $scope.editServer = function(id) {
+ locationUtils.navigateToPath('/configure/servers/' + id);
+ };
+
+ $scope.refresh = function() {
+ $state.reload(); // reloads all the resolves for the view
+ };
+
+ $scope.isOffline = serverUtils.isOffline;
+
+ $scope.offlineReason = serverUtils.offlineReason;
+
+ $scope.navigateToPath = locationUtils.navigateToPath;
+
+ angular.element(document).ready(function () {
+ $('#serversTable').dataTable({
+ "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
+ "iDisplayLength": 25,
+ "aaSorting": []
+ });
+ });
+
+};
+
+TablePhysLocationServersController.$inject = ['physLocation', 'servers', '$scope', '$state', 'locationUtils', 'serverUtils'];
+module.exports = TablePhysLocationServersController;