From 51d7de296f0367f42e982b965da2fe2e6dfc452d Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Thu, 6 Jun 2019 12:02:15 -0400 Subject: [PATCH] remove dead code related to v1 kind field Currently, the credentials list doesn't seem to be returning any options data for 'kind' so this code wasn't being reached. In the future api updates, we'll also be removing the 'kind' field from credentials in general. --- .../list/credentials-list.controller.js | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/awx/ui/client/src/credentials/list/credentials-list.controller.js b/awx/ui/client/src/credentials/list/credentials-list.controller.js index 8fad7b7a71..5fedf2f711 100644 --- a/awx/ui/client/src/credentials/list/credentials-list.controller.js +++ b/awx/ui/client/src/credentials/list/credentials-list.controller.js @@ -36,11 +36,6 @@ export default ['$scope', 'Rest', 'CredentialList', 'Prompt', 'ProcessErrors', ' $scope.$on(`${list.iterator}_options`, function(event, data){ $scope.options = data.data.actions.GET; - optionsRequestDataProcessing(); - }); - - $scope.$watchCollection(`${$scope.list.name}`, function() { - optionsRequestDataProcessing(); }); function assignCredentialKinds () { @@ -69,26 +64,6 @@ export default ['$scope', 'Rest', 'CredentialList', 'Prompt', 'ProcessErrors', ' }); } - // iterate over the list and add fields like type label, after the - // OPTIONS request returns, or the list is sorted/paginated/searched - function optionsRequestDataProcessing(){ - if ($scope[list.name] !== undefined) { - $scope[list.name].forEach(function(item, item_idx) { - var itm = $scope[list.name][item_idx]; - - // Set the item type label - if (list.fields.kind && $scope.options && - $scope.options.hasOwnProperty('kind')) { - $scope.options.kind.choices.forEach(function(choice) { - if (choice[0] === item.kind) { - itm.kind_label = choice[1]; - } - }); - } - }); - } - } - $scope.copyCredential = credential => { Wait('start'); new Credential('get', credential.id)