Actions
Cleanup #44960
closedmgr/dashboard: replace cdCopy2ClipboardButton Directive with a component
% Done:
0%
Tags:
low-hanging-fruit
Backport:
Reviewed:
Affected Versions:
Pull request ID:
Description
cdCopy2ClipboardButton
(a Directive despite its name) is always used in the same way (x12 times):
ceph/rgw/rgw-user-subuser-modal/rgw-user-subuser-modal.component.html- <button type="button"
ceph/rgw/rgw-user-subuser-modal/rgw-user-subuser-modal.component.html- class="btn btn-light"
ceph/rgw/rgw-user-subuser-modal/rgw-user-subuser-modal.component.html: cdCopy2ClipboardButton="secret_key">
ceph/rgw/rgw-user-subuser-modal/rgw-user-subuser-modal.component.html- </button>
ceph/rgw/rgw-user-form/rgw-user-form.component.html- <button type="button"
ceph/rgw/rgw-user-form/rgw-user-form.component.html- class="btn btn-light"
ceph/rgw/rgw-user-form/rgw-user-form.component.html: cdCopy2ClipboardButton="access_key">
ceph/rgw/rgw-user-form/rgw-user-form.component.html- </button>
ceph/block/iscsi-target-form/iscsi-target-form.component.html- <button type="button"
ceph/block/iscsi-target-form/iscsi-target-form.component.html- class="btn btn-light"
ceph/block/iscsi-target-form/iscsi-target-form.component.html: cdCopy2ClipboardButton="target_password">
ceph/block/iscsi-target-form/iscsi-target-form.component.html- </button>
So an easy refactoring would be to simply replace all the boilerplate button tags and style and use a component instead:
<cdCopy2ClipboardButton source="secret_key"></cdCopy2ClipboardButton>
Actions