Skip to content

Commit

Permalink
Fix to show "Cloud Credentials" drop down on Retirement tab
Browse files Browse the repository at this point in the history
Both Provisioning & Retirement tabs have Cloud Type drop downs. Fixed cloudTypeChanged method to use prefix variable that is being passed in to determine which cloud type drop down is being edited in UI

https://bugzilla.redhat.com/show_bug.cgi?id=1510407
  • Loading branch information
h-kataria committed Nov 17, 2017
1 parent 387b4ca commit 2f02964
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -215,15 +215,15 @@ function playbookReusableCodeMixin(API, $q, miqService) {
};

var cloudTypeChanged = function(vm, prefix, value) {
var valueChanged = (value !== vm.provisioning_cloud_type);
var valueChanged = (value !== vm[prefix + "_cloud_type"]);
if (value) {
vm.provisioning_cloud_type = value;
vm[prefix + "_cloud_type"] = value;
} else {
vm.provisioning_cloud_type = '';
vm[prefix + "_cloud_type"] = '';
}
if (valueChanged) {
var typ = vm.provisioning_cloud_type;
vm[vm.model].provisioning_cloud_credential_id = '';
var typ = vm[prefix + "_cloud_type"];
vm[vm.model][prefix + "_cloud_credential_id"] = '';
getCloudCredentialsforType(prefix, typ, vm);
}
};
Expand Down

0 comments on commit 2f02964

Please sign in to comment.