-
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
Edit VM Form - react #6748
Comments
The current logic for available parents:
= select_tag("chosen_parent",
options_for_select(parent_choices_with_no_parent_choice, @edit[:new][:parent]), |
The logic for children: Child VMs...
Available VMs...
|
@himdel I assume that these ruby code examples from your two comments are what are available in Correct? |
What So, available parents currently doesn't care if the VM is also in children, So, to keep the existing logic, we only need:
|
@NickLaMuro exactly the point .. I think we already have everything, iff I'm reading that right and if we want to keep the logic as is. (Can you double check my logic please? :)) |
Yup, no problem. Just saw this come in and wanted to make sure I understood what was being referenced here, since @skateman pinged me about this earlier today. Will be looking into this a bit more this evening, and will report back here then. 👍 |
Perfect, thanks! :) |
Assuming my logic works, there are only 2 problems:
(And one note - archived/orphaned VMs should have that part disabled, no ems_id.) |
Okay, sounds feasible if it isn't already. I admit it takes me a while to find what is and isn't already in the API, so it might take me a "hot minute" to determine what is available. |
Yeah, me too, especially for custom-implemented things.. Such as this case :) ... |
@NickLaMuro but I think the current code may be wrong...
There's no |
@himdel it should, but I would have to check... pretty sure all attributes in the API are Let me look into it. |
@himdel Okay... As a quick primer, the attributes from your query above are accessible in the controller thanks to these two methods: https://github.com/ManageIQ/manageiq-api/blob/cd849c1/lib/api/request_adapter.rb#L36-L38 And the part that filters it is from the https://github.com/ManageIQ/manageiq-api/blob/cd849c1/app/controllers/api/base_controller/renderer.rb#L79 So I think we should be good, assuming the
Edit: Oh, nevermind, these are straight up https://github.com/ManageIQ/manageiq/blob/a59c2aa/app/models/vm_or_template.rb#L164 So these will definitely be picked up by this: |
Aah, thanks! Yeah I see it now :) So, TLDR: we're good on API side (assuming everything works as described) |
Current state - Explorers: Compute > Infrastructure > Virtual Machines... Vm: Template: Compute > Clouds > Instances... Instance: Image: (added green border to show |
Current state - non-explorers: Compute > Infrastructure > Providers VM: Template: Compute > Clouds > Providers Instance: Image: |
"Ride Of The Valkyries" eh. 😏 |
well, nothing beats the classics :) |
Converting Edit VM Form to React so that we can add authentications..
And also fix #6617.
API endpoint for editing: ManageIQ/manageiq#14623
The text was updated successfully, but these errors were encountered: