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 2016/12/07 23:30:58 UTC

[5/6] incubator-trafficcontrol git commit: adds cg params and profile params page

adds cg params and profile params page


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

Branch: refs/heads/master
Commit: 1d77842148438bb7aaa93a24310ff4490454b568
Parents: e2077da
Author: Jeremy Mitchell <mi...@gmail.com>
Authored: Wed Nov 30 16:16:40 2016 -0700
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Wed Dec 7 16:29:28 2016 -0700

----------------------------------------------------------------------
 traffic_ops/experimental/ui/app/src/app.js      |  2 +
 .../form/cacheGroup/FormCacheGroupController.js |  8 +++-
 .../form/cacheGroup/form.cacheGroup.tpl.html    |  1 +
 .../form/profile/FormProfileController.js       |  8 +++-
 .../modules/form/profile/form.profile.tpl.html  |  3 +-
 .../cacheGroups/TableCacheGroupsController.js   |  2 +-
 .../table/profiles/TableProfilesController.js   |  2 +-
 .../private/admin/profiles/edit/index.js        |  2 +-
 .../private/admin/profiles/parameters/index.js  | 39 ++++++++++++++++++++
 .../private/configure/cacheGroups/edit/index.js |  2 +-
 .../configure/cacheGroups/parameters/index.js   | 39 ++++++++++++++++++++
 11 files changed, 99 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/1d778421/traffic_ops/experimental/ui/app/src/app.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/app.js b/traffic_ops/experimental/ui/app/src/app.js
index 30097cb..d94cf81 100644
--- a/traffic_ops/experimental/ui/app/src/app.js
+++ b/traffic_ops/experimental/ui/app/src/app.js
@@ -77,6 +77,7 @@ var trafficOps = angular.module('trafficOps', [
         require('./modules/private/admin/profiles/edit').name,
         require('./modules/private/admin/profiles/list').name,
         require('./modules/private/admin/profiles/new').name,
+        require('./modules/private/admin/profiles/parameters').name,
         require('./modules/private/admin/regions').name,
         require('./modules/private/admin/regions/edit').name,
         require('./modules/private/admin/regions/list').name,
@@ -104,6 +105,7 @@ var trafficOps = angular.module('trafficOps', [
         require('./modules/private/configure/cacheGroups/edit').name,
         require('./modules/private/configure/cacheGroups/list').name,
         require('./modules/private/configure/cacheGroups/new').name,
+        require('./modules/private/configure/cacheGroups/parameters').name,
         require('./modules/private/configure/deliveryServices').name,
         require('./modules/private/configure/deliveryServices/edit').name,
         require('./modules/private/configure/deliveryServices/list').name,

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/1d778421/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/FormCacheGroupController.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/FormCacheGroupController.js b/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/FormCacheGroupController.js
index d013f03..276e2f7 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/FormCacheGroupController.js
+++ b/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/FormCacheGroupController.js
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-var FormCacheGroupController = function(cacheGroup, $scope, formUtils, locationUtils, cacheGroupService, typeService) {
+var FormCacheGroupController = function(cacheGroup, $scope, $location, formUtils, locationUtils, cacheGroupService, typeService) {
 
     var getCacheGroups = function() {
         cacheGroupService.getCacheGroups()
@@ -39,6 +39,10 @@ var FormCacheGroupController = function(cacheGroup, $scope, formUtils, locationU
         alert('not implemented: queuing updates for all cachegroup servers');
     };
 
+    $scope.viewParams = function() {
+        $location.path($location.path() + '/parameters');
+    };
+
     $scope.navigateToPath = locationUtils.navigateToPath;
 
     $scope.hasError = formUtils.hasError;
@@ -53,5 +57,5 @@ var FormCacheGroupController = function(cacheGroup, $scope, formUtils, locationU
 
 };
 
-FormCacheGroupController.$inject = ['cacheGroup', '$scope', 'formUtils', 'locationUtils', 'cacheGroupService', 'typeService'];
+FormCacheGroupController.$inject = ['cacheGroup', '$scope', '$location', 'formUtils', 'locationUtils', 'cacheGroupService', 'typeService'];
 module.exports = FormCacheGroupController;

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/1d778421/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/form.cacheGroup.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/form.cacheGroup.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/form.cacheGroup.tpl.html
index ab1172d..02ec33c 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/form.cacheGroup.tpl.html
+++ b/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/form.cacheGroup.tpl.html
@@ -23,6 +23,7 @@ under the License.
             <li><a ng-click="navigateToPath('/configure/cache-groups')">Cache Groups</a></li>
             <li class="active">{{cacheGroupName}}</li>
         </ol>
+        <button class="btn btn-default pull-right" ng-show="!settings.isNew" ng-click="viewParams()">View Params</button>
         <button class="btn btn-warning pull-right" ng-show="!settings.isNew" ng-click="queueUpdates()">Queue Server Updates</button>
         <div class="clearfix"></div>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/1d778421/traffic_ops/experimental/ui/app/src/common/modules/form/profile/FormProfileController.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/profile/FormProfileController.js b/traffic_ops/experimental/ui/app/src/common/modules/form/profile/FormProfileController.js
index 6c32f66..7afedbe 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/form/profile/FormProfileController.js
+++ b/traffic_ops/experimental/ui/app/src/common/modules/form/profile/FormProfileController.js
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-var FormProfileController = function(profile, $scope, formUtils, stringUtils, locationUtils) {
+var FormProfileController = function(profile, $scope, $location, formUtils, stringUtils, locationUtils) {
 
     $scope.profile = profile;
 
@@ -27,6 +27,10 @@ var FormProfileController = function(profile, $scope, formUtils, stringUtils, lo
 
     $scope.labelize = stringUtils.labelize;
 
+    $scope.viewParams = function() {
+        $location.path($location.path() + '/parameters');
+    };
+
     $scope.navigateToPath = locationUtils.navigateToPath;
 
     $scope.hasError = formUtils.hasError;
@@ -35,5 +39,5 @@ var FormProfileController = function(profile, $scope, formUtils, stringUtils, lo
 
 };
 
-FormProfileController.$inject = ['profile', '$scope', 'formUtils', 'stringUtils', 'locationUtils'];
+FormProfileController.$inject = ['profile', '$scope', '$location', 'formUtils', 'stringUtils', 'locationUtils'];
 module.exports = FormProfileController;

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/1d778421/traffic_ops/experimental/ui/app/src/common/modules/form/profile/form.profile.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/profile/form.profile.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/form/profile/form.profile.tpl.html
index d42cb3b..d4b35db 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/form/profile/form.profile.tpl.html
+++ b/traffic_ops/experimental/ui/app/src/common/modules/form/profile/form.profile.tpl.html
@@ -19,10 +19,11 @@ under the License.
 
 <div class="x_panel">
     <div class="x_title">
-        <ol class="breadcrumb">
+        <ol class="breadcrumb pull-left">
             <li><a ng-click="navigateToPath('/admin/profiles')">Profiles</a></li>
             <li class="active">{{profileName}}</li>
         </ol>
+        <button class="btn btn-default pull-right" ng-show="!settings.isNew" ng-click="viewParams()">View Params</button>
         <div class="clearfix"></div>
     </div>
     <div class="x_content">

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/1d778421/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroups/TableCacheGroupsController.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroups/TableCacheGroupsController.js b/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroups/TableCacheGroupsController.js
index 6525a04..30597db 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroups/TableCacheGroupsController.js
+++ b/traffic_ops/experimental/ui/app/src/common/modules/table/cacheGroups/TableCacheGroupsController.js
@@ -22,7 +22,7 @@ var TableCacheGroupsController = function(cacheGroups, $scope, locationUtils) {
     $scope.cacheGroups = cacheGroups;
 
     $scope.editCacheGroup = function(id) {
-        locationUtils.navigateToPath('/configure/cache-groups/' + id + '/edit');
+        locationUtils.navigateToPath('/configure/cache-groups/' + id);
     };
 
     $scope.createCacheGroup = function() {

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/1d778421/traffic_ops/experimental/ui/app/src/common/modules/table/profiles/TableProfilesController.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/table/profiles/TableProfilesController.js b/traffic_ops/experimental/ui/app/src/common/modules/table/profiles/TableProfilesController.js
index 660b978..1f267a1 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/table/profiles/TableProfilesController.js
+++ b/traffic_ops/experimental/ui/app/src/common/modules/table/profiles/TableProfilesController.js
@@ -22,7 +22,7 @@ var TableProfilesController = function(profiles, $scope, locationUtils) {
     $scope.profiles = profiles;
 
     $scope.editProfile = function(id) {
-        locationUtils.navigateToPath('/admin/profiles/' + id + '/edit');
+        locationUtils.navigateToPath('/admin/profiles/' + id);
     };
 
     $scope.createProfile = function() {

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/1d778421/traffic_ops/experimental/ui/app/src/modules/private/admin/profiles/edit/index.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/modules/private/admin/profiles/edit/index.js b/traffic_ops/experimental/ui/app/src/modules/private/admin/profiles/edit/index.js
index ad9733b..0662591 100644
--- a/traffic_ops/experimental/ui/app/src/modules/private/admin/profiles/edit/index.js
+++ b/traffic_ops/experimental/ui/app/src/modules/private/admin/profiles/edit/index.js
@@ -21,7 +21,7 @@ module.exports = angular.module('trafficOps.private.admin.profiles.edit', [])
     .config(function($stateProvider, $urlRouterProvider) {
         $stateProvider
             .state('trafficOps.private.admin.profiles.edit', {
-                url: '/{profileId}/edit',
+                url: '/{profileId}',
                 views: {
                     profilesContent: {
                         templateUrl: 'common/modules/form/profile/form.profile.tpl.html',

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/1d778421/traffic_ops/experimental/ui/app/src/modules/private/admin/profiles/parameters/index.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/modules/private/admin/profiles/parameters/index.js b/traffic_ops/experimental/ui/app/src/modules/private/admin/profiles/parameters/index.js
new file mode 100644
index 0000000..72390bf
--- /dev/null
+++ b/traffic_ops/experimental/ui/app/src/modules/private/admin/profiles/parameters/index.js
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+module.exports = angular.module('trafficOps.private.admin.profiles.parameters', [])
+	.config(function($stateProvider, $urlRouterProvider) {
+		$stateProvider
+			.state('trafficOps.private.admin.profiles.parameters', {
+				url: '/{profileId}/parameters',
+				views: {
+					profilesContent: {
+						templateUrl: 'common/modules/table/parameters/table.parameters.tpl.html',
+						controller: 'TableParametersController',
+						resolve: {
+							parameters: function(parameterService) {
+								return parameterService.getParameters();
+							}
+						}
+					}
+				}
+			})
+		;
+		$urlRouterProvider.otherwise('/');
+	});

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/1d778421/traffic_ops/experimental/ui/app/src/modules/private/configure/cacheGroups/edit/index.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/modules/private/configure/cacheGroups/edit/index.js b/traffic_ops/experimental/ui/app/src/modules/private/configure/cacheGroups/edit/index.js
index 2f01f1a..d3dbca7 100644
--- a/traffic_ops/experimental/ui/app/src/modules/private/configure/cacheGroups/edit/index.js
+++ b/traffic_ops/experimental/ui/app/src/modules/private/configure/cacheGroups/edit/index.js
@@ -21,7 +21,7 @@ module.exports = angular.module('trafficOps.private.configure.cacheGroups.edit',
     .config(function($stateProvider, $urlRouterProvider) {
         $stateProvider
             .state('trafficOps.private.configure.cacheGroups.edit', {
-                url: '/{cacheGroupId}/edit',
+                url: '/{cacheGroupId}',
                 views: {
                     cacheGroupsContent: {
                         templateUrl: 'common/modules/form/cacheGroup/form.cacheGroup.tpl.html',

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/1d778421/traffic_ops/experimental/ui/app/src/modules/private/configure/cacheGroups/parameters/index.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/modules/private/configure/cacheGroups/parameters/index.js b/traffic_ops/experimental/ui/app/src/modules/private/configure/cacheGroups/parameters/index.js
new file mode 100644
index 0000000..02b9cee
--- /dev/null
+++ b/traffic_ops/experimental/ui/app/src/modules/private/configure/cacheGroups/parameters/index.js
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+module.exports = angular.module('trafficOps.private.configure.cacheGroups.parameters', [])
+	.config(function($stateProvider, $urlRouterProvider) {
+		$stateProvider
+			.state('trafficOps.private.configure.cacheGroups.parameters', {
+				url: '/{cacheGroupId}/parameters',
+				views: {
+					cacheGroupsContent: {
+						templateUrl: 'common/modules/table/parameters/table.parameters.tpl.html',
+						controller: 'TableParametersController',
+						resolve: {
+							parameters: function(parameterService) {
+								return parameterService.getParameters();
+							}
+						}
+					}
+				}
+			})
+		;
+		$urlRouterProvider.otherwise('/');
+	});