mitchell852 commented on a change in pull request #4394: TP: adds 
configurability (show/hide columns) to the parameters and users tables
URL: https://github.com/apache/trafficcontrol/pull/4394#discussion_r378983632
 
 

 ##########
 File path: 
traffic_portal/app/src/common/modules/table/capabilityUsers/TableCapabilityUsersController.js
 ##########
 @@ -17,11 +17,14 @@
  * under the License.
  */
 
-var TableCapabilityUsersController = function(capability, capUsers, $scope, 
$state, locationUtils) {
+var TableCapabilityUsersController = function(capability, capUsers, 
$controller, $scope, $state, locationUtils) {
 
-       $scope.capability = capability;
+       // extends the TableUsersController to inherit common methods
+       angular.extend(this, $controller('TableUsersController', { users: 
capUsers, $scope: $scope }));
 
-       $scope.capUsers = capUsers;
+       let capUsersTable;
+
+       $scope.capability = capability[0];
 
 Review comment:
   the call to get a capability looked like this:
   
   `GET /api/capabilities?name=foo` which returns an array of 1 so this was a 
bug that i fixed with this PR as you need to fetch it with the index.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to