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.
This commit is contained in:
Jake McDermott 2019-06-06 12:02:15 -04:00 committed by Ryan Petrello
parent 5987aafb82
commit 51d7de296f
No known key found for this signature in database
GPG Key ID: F2AA5F2122351777

View File

@ -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)