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: disable 'Add Capability' button in rgw user edi… #32610
mgr/dashboard: disable 'Add Capability' button in rgw user edi… #32610
Conversation
What about using a tooltip to display that all capabilities have been added?
|
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.ts
Outdated
Show resolved
Hide resolved
I agree. |
db1009f
to
d615359
Compare
d615359
to
f907a8a
Compare
@@ -414,6 +414,10 @@ | |||
<div class="col-12"> | |||
<button type="button" | |||
class="btn btn-light float-right tc_addCapButton" | |||
[disabled]="hasAllCapabilities()" | |||
i18n-tooltip | |||
tooltip="All capabilities are already added." |
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.
tooltip
seems to not work in a disabled button, in Chrome.
https://getbootstrap.com/docs/4.4/components/tooltips/#disabled-elements
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.
@tspmelo The issue here explained:
https://jakearchibald.com/2017/events-and-disabled-form-fields/
mouse events don't fire when the pointer is over disabled form elements, except in Firefox
As we are using ngx-bootstrap (not plain bootstrap) for tooltips,
it seems appropriate to me to keep tooltip in button and trigger the required events
(tested and it works):
triggers="pointerenter pointerleave"
…ies are added Fixes: https://tracker.ceph.com/issues/43564 Signed-off-by: Alfonso Martínez <almartin@redhat.com>
f907a8a
to
4ef0e2c
Compare
jenkins test docs |
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.
its working now in chrome.
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
Disable 'Add Capability' button when rgw user alreasy has all capabilities added.
Fixes: https://tracker.ceph.com/issues/43564
Signed-off-by: Alfonso Martínez almartin@redhat.com
Checklist
Show available Jenkins commands
jenkins retest this please
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 backend
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox