-
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 input field for max playbook_ttl value #1742
Added input field for max playbook_ttl value #1742
Conversation
baca664
to
b898178
Compare
@@ -247,6 +251,8 @@ ManageIQ.angular.app.controller('catalogItemFormController', ['$scope', 'catalog | |||
} | |||
} | |||
} | |||
if (vm.catalogItemModel.provisioning_playbook_ttl !== undefined) |
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.
Can the value be undefined
for vm.catalogItemModel.provisioning_playbook_ttl
?
I guess that depends on the .rb code below? -
playbook_details[:provisioning][:playbook_ttl] = provision[:playbook_ttl]
If you don't expect the value to be undefined
, then you can skip this conditional.
(Also preferred syntax for if
per the styling guide is -
if (condition) {
// code below
...
...
}
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.
@AparnaKarve it can be undefined when editing existing records, and when the value for the textbox is not provided
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.
@h-kataria Ok, thanks.
@@ -271,6 +277,8 @@ ManageIQ.angular.app.controller('catalogItemFormController', ['$scope', 'catalog | |||
retirement['credential_id'] = configData.retirement_machine_credential_id; | |||
} | |||
if (vm.catalogItemModel.retirement_playbook_id !== undefined && configData.retirement_playbook_id !== '') { | |||
if (vm.catalogItemModel.retirement_playbook_ttl !== undefined) |
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.
Above comment is applicable here as well.
@@ -123,6 +125,7 @@ ManageIQ.angular.app.controller('catalogItemFormController', ['$scope', 'catalog | |||
vm.catalogItemModel.provisioning_machine_credential_id = configData.provision.credential_id; | |||
vm.catalogItemModel.provisioning_network_credential_id = configData.provision.network_credential_id; | |||
vm.catalogItemModel.provisioning_cloud_credential_id = setIfDefined(configData.provision.cloud_credential_id); | |||
vm.catalogItemModel.provisioning_playbook_ttl = configData.provision.playbook_ttl; | |||
vm.catalogItemModel.provisioning_inventory = configData.provision.hosts; | |||
vm.catalogItemModel.provisioning_dialog_existing = configData.provision.dialog_id ? "existing" : "create"; | |||
vm.catalogItemModel.provisioning_dialog_id = configData.provision.dialog_id; |
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.
One of the TODO refactoring items is to use Object.assign
instead of copying the items individually.
For e.g. -
Object.assign(vm.catalogItemModel, configData.provision);
(Just a FYI, and can be done later in a separate refactoring PR)
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.
@AparnaKarve i will address that in a follow up PR.
b898178
to
2039b84
Compare
Added new input field on both Provisioning & retirement tabs to allow user to enter maximum playbook_ttl numeric value. https://www.pivotaltracker.com/story/show/147956383
2039b84
to
152605c
Compare
1066c8d
to
fe47123
Compare
Checked commits h-kataria/manageiq-ui-classic@152605c~...fe47123 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
Added input field for max playbook_ttl value (cherry picked from commit 41cef52) https://bugzilla.redhat.com/show_bug.cgi?id=1479407
Fine backport details:
|
Added new input field on both Provisioning & retirement tabs to allow user to enter maximum playbook_ttl numeric value.
https://www.pivotaltracker.com/story/show/147956383
https://bugzilla.redhat.com/show_bug.cgi?id=1459735
screenshots:
![max_ttl_numeric_value](https://user-images.githubusercontent.com/3450808/28532742-ad77aa8c-7068-11e7-87ad-08d392baaf91.png)
@tinaafitz please test.