ocket8888 commented on a change in pull request #4723: URL: https://github.com/apache/trafficcontrol/pull/4723#discussion_r431401942
########## File path: traffic_portal/app/src/common/modules/table/topologyCacheGroups/TableTopologyCacheGroupsController.js ########## @@ -0,0 +1,67 @@ +/* + * 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 TableTopologyCacheGroupsController = function(topologies, cacheGroups, $controller, $scope) { + + // extends the TableCacheGroupsController to inherit common methods + angular.extend(this, $controller('TableCacheGroupsController', { cacheGroups: cacheGroups, $scope: $scope })); + + let topologyCGsTable; + + $scope.topology = topologies[0]; + + /* + * The parent properties (primary/secondary parent) of a cache group are not + * respected in the context of a topology so they have been removed from view + */ + $scope.columns = [ + { "name": "Name", "visible": true, "searchable": true }, + { "name": "Short Name", "visible": true, "searchable": true }, + { "name": "Type", "visible": true, "searchable": true }, + { "name": "Latitude", "visible": true, "searchable": true }, + { "name": "Longitude", "visible": true, "searchable": true } Review comment: This is really just a style thing - and we don't enforce a TP style guide, so feel free to ignore it - but you don't need the quotes on these object properties. This: ```javascript $scope.columns = [ { name: "Name", visible: true, searchable: true }, { name: "Short Name", visible: true, searchable: true }, { name: "Type", visible: true, searchable: true }, { name: "Latitude", visible: true, searchable: true }, { name: "Longitude", visible: true, searchable: true } ] ``` works just as well, and is a little easier to read ########## File path: traffic_portal/app/src/common/modules/form/topology/form.topology.tpl.html ########## @@ -23,6 +23,10 @@ <li><a ng-click="navigateToPath('/topologies')">Topologies</a></li> <li class="active">{{topologyName}}</li> </ol> + <div class="pull-right" role="group" ng-show="!settings.isNew"> + <button class="btn btn-primary" title="View Cache Groups" ng-click="viewCacheGroups(topology)">View Cache Groups</button> + <button class="btn btn-primary" title="View Delivery Services" ng-click="viewDeliveryServices(topology)">View Delivery Services</button> Review comment: Don't forget `type=button` ########## File path: traffic_portal/app/src/common/modules/table/topologyCacheGroups/table.topologyCacheGroups.tpl.html ########## @@ -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. +--> + +<div class="x_panel"> + <div class="x_title"> + <ol class="breadcrumb pull-left"> + <li><a ng-click="navigateToPath('/topologies')">Topologies</a></li> + <li><a ng-click="navigateToPath('/topologies/edit?name=' + topology.name)">{{::topology.name}}</a></li> + <li class="active">Cache Groups</li> + </ol> + <div class="pull-right"> + <button class="btn btn-default" title="Refresh" ng-click="refresh()"><i class="fa fa-refresh"></i></button> Review comment: Don't forget type=button ########## File path: traffic_portal/app/src/common/modules/table/topologyDeliveryServices/table.topologyDeliveryServices.tpl.html ########## @@ -0,0 +1,173 @@ +<!-- +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('/topologies')">Topologies</a></li> + <li><a ng-click="navigateToPath('/topologies/edit?name=' + topology.name)">{{::topology.name}}</a></li> + <li class="active">Delivery Services</li> + </ol> + <div class="pull-right"> + <button class="btn btn-default" title="Refresh" ng-click="refresh()"><i class="fa fa-refresh"></i></button> Review comment: don't forget type=button ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
