From a66b6024261d9e8cb598b727bab757f9716aaf7d Mon Sep 17 00:00:00 2001 From: Milan Zazrivec Date: Tue, 28 Mar 2017 10:55:36 +0200 Subject: [PATCH] Remove unneeded code from ansible credentials controller The code is not needed since https://github.com/ManageIQ/manageiq/pull/14483 has been merged. --- .../ansible_credentials_form_controller.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/app/assets/javascripts/controllers/ansible_credentials/ansible_credentials_form_controller.js b/app/assets/javascripts/controllers/ansible_credentials/ansible_credentials_form_controller.js index 8d728d0d1c37..73b97dc44bc3 100644 --- a/app/assets/javascripts/controllers/ansible_credentials/ansible_credentials_form_controller.js +++ b/app/assets/javascripts/controllers/ansible_credentials/ansible_credentials_form_controller.js @@ -30,9 +30,6 @@ ManageIQ.angular.app.controller('ansibleCredentialsFormController', ['$window', .catch(miqService.handleFailure); } else { vm.select_options.push({'label':__(''), 'value': ''}); - // FIXME: this should go away once https://github.com/ManageIQ/manageiq/pull/14483 is merged - vm.credentialModel.organization = 1; // work-around, organization id needs to be filled in automatically by the backend - // credential creation requires manager_resource API.get('/api/providers?collection_class=ManageIQ::Providers::EmbeddedAutomationManager') .then(setManagerResource) @@ -65,7 +62,6 @@ ManageIQ.angular.app.controller('ansibleCredentialsFormController', ['$window', }; vm.addClicked = function(angularForm) { - addCredentialKind(); API.post('/api/authentications/', vm.credentialModel) .then(getBack(sprintf(__("Add of Credential \"%s\" has been successfully queued."), vm.credentialModel.name))) .catch(miqService.handleFailure); @@ -117,11 +113,5 @@ ManageIQ.angular.app.controller('ansibleCredentialsFormController', ['$window', vm.credentialModel.manager_resource = { "href": response.resources[0].href }; } - // FIXME: this should go away once https://github.com/ManageIQ/manageiq/pull/14483 is merged - // For creation, we need to send json like: {"kind": "scm", "type": "ManageIQ::Providers::EmbeddedAnsible::AutomationManager::ScmCredential"} - function addCredentialKind() { - vm.credentialModel.kind = vm.credential_options[vm.credentialModel.type].type; - } - init(); }]);