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
mgr/dashboard: Fix for form inside form closing issue #43639
Conversation
2932fc8
to
bad0347
Compare
@@ -55,12 +55,15 @@ export class NfsFormClientComponent implements OnInit { | |||
return $localize`-- Select what kind of user id squashing is performed --`; | |||
} | |||
|
|||
get clientsFormArray() { |
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 we make this globally available maybe? Like this
get FormArray(param: string) { .... }
?
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.
Are we using this anywhere else? @avanthakkar
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.
I think we can make this globally available from cd-forms component or a similar one.
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.
get clientsFormArray() { | |
private get clientsFormArray() { |
The recommended practice is to make vars/methods private by default (unless you need more visibility). Check information hiding section of OOD.
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.
If I make it private
will I be able to access it from html? I tried yesterday but it was giving me errors so I thought it might be because of the private
@alfonsomthd
@@ -55,12 +55,15 @@ export class NfsFormClientComponent implements OnInit { | |||
return $localize`-- Select what kind of user id squashing is performed --`; | |||
} | |||
|
|||
get clientsFormArray() { |
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.
get clientsFormArray() { | |
private get clientsFormArray() { |
The recommended practice is to make vars/methods private by default (unless you need more visibility). Check information hiding section of OOD.
@nizamial09 Can you add some unit test or maybe extend the existing should create a nfs-export with RGW backend e2e test by adding the client addition step? |
@alfonsomthd I'll add the e2e there. I think e2e would be more understandable here. Thanks |
After the angular 11 upgrade the form in form behaviour got broken when one tries to close that "embedded" form. This commit is to fix that behaviour. Fixes: https://tracker.ceph.com/issues/53020 Signed-off-by: Nizamudeen A <nia@redhat.com>
bad0347
to
b4ebca2
Compare
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.
LGTM! Thanks @nizamial09
@@ -28,6 +28,11 @@ export class NFSPageHelper extends PageHelper { | |||
cy.get('button[name=add_client]').click({ force: true }); | |||
cy.get('input[name=addresses]').type(client['addresses']); | |||
|
|||
// Check if we can remove clients and add it again | |||
cy.get('span[name=remove_client]').click({ force: 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 can be addressed in a follow-up refactoring PR: remember that the team agreement is to use either data-testid
or aria-label
(where it applies) for element selection.
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.
Yes, I'll stick to either of those two in the future.
After the angular 11 upgrade the form in form behavior got broken when
one tries to close that "embedded" form. This commit is to fix that
behavior. It fixes in the nfs form as well as the iscsi-target form.
Fixes: https://tracker.ceph.com/issues/53020
Signed-off-by: Nizamudeen A nia@redhat.com
Checklist
Show available Jenkins commands
jenkins retest this please
jenkins test classic perf
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test dashboard cephadm
jenkins test api
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox