Project

General

Profile

Actions

Cleanup #44960

closed

mgr/dashboard: replace cdCopy2ClipboardButton Directive with a component

Added by Ernesto Puerta about 4 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Category:
UI
Target version:
-
% 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 #1

Updated by Courtney Caldwell over 3 years ago

  • Assignee set to Courtney Caldwell
Actions #2

Updated by Tatjana Dehler over 3 years ago

  • Pull request ID set to 37676
Actions #3

Updated by Ernesto Puerta over 3 years ago

  • Status changed from New to Resolved
Actions #4

Updated by Ernesto Puerta about 3 years ago

  • Project changed from mgr to Dashboard
  • Category changed from 165 to UI
Actions

Also available in: Atom PDF