-
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
Convert the subnet form to DDF #7734
Convert the subnet form to DDF #7734
Conversation
if (!!recordId && appendState.initialValues.type === 'ManageIQ::Providers::Openstack::NetworkManager::CloudSubnet') { | ||
Object.assign(fields[0], {isDisabled: true}); | ||
Object.assign(fields[1], {isDisabled: true}); | ||
Object.assign(fields[4], {isDisabled: true}); |
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 is needed since these fields are coming from the provider. There's also a chance that other providers may need similar treatment but I can't test those at the moment.
values.enable_dhcp = values.dhcp_enabled; | ||
delete values.dhcp_enabled; | ||
delete Object.assign(values, values.extra_attributes).extra_attributes; |
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.
Both of these changes are to alter the values being submitted by the form so that the cloud subnet is created correctly (renaming dchp_enabled
to enabled_dhcp
and removing the extra_attributes
object while moving its contents back directly into values
).
The alternative to this is to change the form schema in the provider and the API to match what the back-end is expecting.
5047b72
to
61f092e
Compare
@miq-bot assign @kavyanekkalapu As far as I can tell the form seems to be working now, but I haven't been able to test the form with any non-openstack providers so there could be issues there. I also left a couple of comments in different areas where I'm not thrilled with the solutions and I was hoping someone could take a look and maybe suggest alternatives, in particular ways that some of these changes could happen in the provider repos |
@DavidResende0 i checked functionality, it is working as expected, found one minor issue, edit form is loading slow, has delay of approximately 5 sec, it is just showing blank page until that time, it would be nice to show loading symbol until data is loaded.., please check if that is possible. |
77fb874
to
4e145f1
Compare
@kavyanekkalapu, I looked into the loading issue for the edit form and I haven't been able to reproduce it but if I wanted to add a loading symbol, what would I do. |
4f420f0
to
3b005ba
Compare
3b005ba
to
c299bf2
Compare
c299bf2
to
9f53567
Compare
Checked commit DavidResende0@9f53567 with ruby 2.6.3, rubocop 1.13.0, haml-lint 0.35.0, and yamllint app/views/cloud_subnet/edit.html.haml
app/views/cloud_subnet/new.html.haml
|
@DavidResende0 A conflict occurred during the backport of this pull request to If this pull request is based on another pull request that has not been marked for backport, add the appropriate labels to the other pull request. Otherwise, please create a new pull request direct to the Conflict details: diff --cc app/javascript/packs/component-definitions-common.js
index e5a2d8456d,018ff163d7..0000000000
--- a/app/javascript/packs/component-definitions-common.js
+++ b/app/javascript/packs/component-definitions-common.js
@@@ -41,8 -46,10 +41,9 @@@ import ReportChartWidget from '../compo
import ReportDataTable from '../components/report-data-table';
import RetirementForm from '../components/retirement-form';
import ServiceDialogFromForm from '../components/service-dialog-from-form/service-dialog-from';
+ import SubnetForm from '../components/subnet-form';
import EditServiceForm from '../components/edit-service-form';
import SetOwnershipForm from '../components/set-ownership-form';
-import ServersDataChart from '../components/provider-dashboard-charts/servers-pie-chart';
import TableListViewWrapper from '../react/table_list_view_wrapper';
import TaggingWrapperConnected from '../components/taggingWrapper';
import { TagView } from '../tagging';
@@@ -104,6 -119,8 +105,11 @@@ ManageIQ.component.addReact('Retirement
ManageIQ.component.addReact('ServiceDialogFromForm', ServiceDialogFromForm);
ManageIQ.component.addReact('EditServiceForm', EditServiceForm);
ManageIQ.component.addReact('SetOwnershipForm', SetOwnershipForm);
++<<<<<<< HEAD
++=======
+ ManageIQ.component.addReact('ServersDataChart', ServersDataChart);
+ ManageIQ.component.addReact('SubnetForm', SubnetForm);
++>>>>>>> 745801e296... Merge pull request #7734 from DavidResende0/react-cloud-subnet
ManageIQ.component.addReact('TableListView', TableListView);
ManageIQ.component.addReact('TableListViewWrapper', TableListViewWrapper);
ManageIQ.component.addReact('TagGroup', props => <TagGroup {...props} />); |
Convert the subnet form to DDF (cherry picked from commit 745801e)
Backported to
|
Continuation of: #7632
Resolves: #6861
Depends On: ManageIQ/manageiq-providers-openstack#712
Before:
After: