-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added remove resources option in the form on Retirement tab #629
Conversation
b61a39d
to
85ec1b7
Compare
@@ -59,6 +59,17 @@ | |||
%option{"value" => ""} | |||
= "<#{_('Unassigned')}>" | |||
|
|||
.form-group | |||
%label.col-md-2.control-label{"for" => "catalog_id"} | |||
= _('Would you like to remove associated resources as part of service retirement?') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems odd as the only field text in the form of a question. Maybe this should be: "Retirement: Remove associated resources" with options "Never, Pre-Playbook, Post-Playbook"
@tinaafitz @mkanoor @bzwei Thoughts?
85ec1b7
to
a18de45
Compare
@tinaafitz @bzwei @gmcculloug please review/test |
a18de45
to
c909847
Compare
@@ -69,6 +71,13 @@ ManageIQ.angular.app.controller('catalogItemFormController', ['$scope', 'catalog | |||
} | |||
}; | |||
|
|||
var getRemoveResourcesTypes = function() { | |||
if (angular.isUndefined(vm.catalogItemModel.retirement_playbook_id) || vm.catalogItemModel.retirement_playbook_id === '') | |||
vm.catalogItemModel['remove_resources_types'] = {"No": "no", "Yes": "yes"}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this defines the value passed to the API call? I think we agreed on the values, here will be "no_without_playbook" and "yes_without_playbook"
if (angular.isUndefined(vm.catalogItemModel.retirement_playbook_id) || vm.catalogItemModel.retirement_playbook_id === '') | ||
vm.catalogItemModel['remove_resources_types'] = {"No": "no", "Yes": "yes"}; | ||
else | ||
vm.catalogItemModel['remove_resources_types'] = {"No": "no", "Pre": "pre", "Post": "post"}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with this group the value will be "no_with_playbook", "pre_with_playbook" and "post_with_playbook"
c909847
to
c0099d9
Compare
@bzwei drop down values updated, please re-test. |
@h-kataria The UI changes look good. I'll test again with the new drop down values. I noticed that the save button is disabled unless you select to create a new dialog. |
Added an option to ask user if they want to remove resources as part of service retirement, If playbook is not selected options are "Yes/No", when playbook is selected options are "No/Pre/Post", default is set to "No". Fixed existing JS spec test. https://www.pivotaltracker.com/story/show/141238703
c0099d9
to
ab24a33
Compare
Checked commit h-kataria@ab24a33 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
@h-kataria Retested with the latest changes and it looks great! |
#Added an option to ask user if they want to remove associated resources as part of service retirement, default is set to "none" with options none/pre/post.
https://www.pivotaltracker.com/story/show/141238703
@tinaafitz @bzwei @gmcculloug please review/test.
screenshots:
Remove resources upon service retirement options are Yes/No when user has no playbook selected.
Remove resources upon service retirement options are No/Pre/Post when user has playbook selected.