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
More automate methods #5295
More automate methods #5295
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
9c93036
to
9ac6163
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
37d1b39
to
f8e096a
Compare
This comment has been minimized.
This comment has been minimized.
bf18882
to
c2887e3
Compare
Further missing (not in the issues but needed):
I assume these parts are also needed, @tinaafitz, @Flu. Any idea what icons should be used for the 2 new types? |
Hi @martinpovolny It looks great. Thanks for all of your hard work. |
I think "pficon-template" for template and "ff-load-balancer" would probably be fine for workflow: Ok, @martinpovolny ? |
This hopefully adds the iconc ManageIQ/manageiq-decorators#3 |
@lfu : can you, please, help me with testing this? You are the one who knows what this should be doing... Thx! |
@h-kataria : I see that the form is used on one more place. Through here:
So that's somewhere in services. Seems you are the one who created that part. Can you, please, tell me, how I reach that code? I'd like to make sure that I am not breaking that area by my changes in this area. |
@h-kataria : Seems you are one of the people who where the last ones to touch this area. Would you, please, find some time to check this PR? |
Added a commit adressing this comment: #5287 (comment) |
8707879
to
1b346f4
Compare
This pull request is not mergeable. Please rebase and repush. |
2beb427
to
232b8af
Compare
232b8af
to
ff7bc9d
Compare
@h-kataria : Thank you for your testing! Please, check once again. I did changes to fix the crashes that you encountered but I am not sure I reproduced the "... details screen it does not show ...." properly. Anyway I cannot get it NOT display the provider now. Regarding the second issue, I did fix the crashes. However as you write:
That is correct, because I am not saving the provider at all, just the template ID. Therefor w/o a template ID I have nothing to save. However it did not have to crash. Now it does not, so, please, retest and see the 2 last commits. |
Checked commits martinpovolny/manageiq-ui-classic@ea9cce8~...d7e78d3 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 **
app/controllers/miq_ae_class_controller.rb
|
@martinpovolny it is still not saving Provider info when adding/editing methods when Job/Workflow template is not selected, is that an expected behaviour? Wondering if selecting template should be a required field, @tinaafitz cc |
Tested adding new method types in the PR, working fine now, If we decide that Workflow/Job template field should be a required field, validation should be added for that in backend code. UI changes LGTM |
yes
I think it should be a validation on the model level. Adding it at model level will also work through the API. On the other side, if I add a validation here that would be on the UI side in a controller and that is IMO new tech debt. |
@martinpovolny I'm now seeing:
|
Automate --> Automate --> Explorer --> Select some "Methods" in the left tree --> Swith to "Methods" Tab in the content area --> Click "Add a new Method" in the toolbar.
Closes #5288
Closes #5287
Requires ManageIQ/manageiq#18160
Problems:
The form is used on one other place. Make sure it still works when this is done.(it does)editing does not workat allfrom the "detail view"(fixed)Notes
Forms are partly server side and partly Angular
Entry for the server-side is
app/views/miq_ae_class/_method_form.html.haml
Entry for the angular part is
app/views/miq_ae_class/_angular_method_form.html.haml
Choice between server-side and angular is done in
app/controllers/miq_ae_class_controller.rb
, based onlocation
(e.g.@ae_method.location
). The value is what is presented to the user asthe "Main Info / Type" from the screenshots.I am introducing helper
written_in_angular
playbook_style_location?
to limit the spread of similar conditions....data for the Angular controller come from
#method_form_fields
which currently only works forlocation = "playbook"
-- need to extend that.Angular controller (javascript) lives in
app/assets/javascripts/controllers/miq_ae_class/ae_method_form_controller.js
list of AnsibleTower providers ...Provider.where(...)
ManageIQ::Providers::AnsibleTower::AutomationManager::ConfigurationScript
....?ManageIQ::Providers::AnsibleTower::AutomationManager::ConfigurationWorkflow
relation to provider via
.manager_id
?I
foundfixed some missing feature checking and also this:This shows that the Angular part of the editor fires each API request 2x.
I will need to investigate and fix this too.(fixed)The commit "Automate method: don't call formOptions() 2x. 4 extra API calls." fixes that. Thx @himdel