From b76c2b123930289862f8fe60591c6402483778c5 Mon Sep 17 00:00:00 2001 From: Prachi Goel Date: Fri, 22 Nov 2024 12:45:44 +0530 Subject: [PATCH] mgr/dashboard: Carbonize Icons for Modules (Block, Object, File, Observability, Administration) Fixes: https://tracker.ceph.com/issues/69017 Signed-off-by: Prachi Modules Changed for this: 1. Block( mirroring, NVMe, ICSI, Images) 2. Object RGW (Overview, Bucket, Users, Multi-site, Gateways, NFS, Config) 3. Logs 4. Alerts 5. Services 6. Cluster --- .../src/app/ceph/block/block.module.ts | 14 ++- .../iscsi-target-details.component.html | 5 +- .../iscsi-target-form.component.html | 63 ++++++---- .../iscsi-target-list.component.html | 6 +- .../bootstrap-create-modal.component.html | 3 +- .../overview/overview.component.html | 8 +- .../nvmeof-initiators-form.component.html | 8 +- .../rbd-configuration-form.component.html | 7 +- .../block/rbd-list/rbd-list.component.html | 14 +-- .../src/app/ceph/cluster/cluster.module.ts | 17 ++- .../app/ceph/cluster/logs/logs.component.html | 12 +- ...sd-devices-selection-groups.component.html | 8 +- .../osd/osd-list/osd-list.component.ts | 2 +- .../active-alert-list.component.html | 7 +- .../silence-form/silence-form.component.html | 13 ++- .../service-daemon-list.component.html | 10 +- .../cluster/services/services.component.html | 16 ++- ...ure-code-profile-form-modal.component.html | 5 +- .../pool/pool-form/pool-form.component.html | 43 ++++--- .../frontend/src/app/ceph/pool/pool.module.ts | 13 ++- .../rgw-bucket-form.component.html | 36 +++--- .../rgw-multisite-details.component.html | 29 +++-- .../rgw-multisite-export.component.html | 6 +- ...w-multisite-sync-flow-modal.component.html | 12 +- ...w-multisite-sync-pipe-modal.component.html | 12 +- ...gw-multisite-zonegroup-form.component.html | 5 +- .../rgw-sync-data-info.component.html | 5 +- .../rgw-sync-metadata-info.component.html | 5 +- .../rgw-sync-primary-zone.component.html | 32 ++++-- .../rgw-user-form.component.html | 59 +++++----- .../frontend/src/app/ceph/rgw/rgw.module.ts | 33 +++++- .../src/app/core/error/error.component.html | 5 +- .../src/app/core/error/error.component.ts | 2 + .../components/card/card.component.html | 4 +- .../shared/components/components.module.ts | 6 +- .../copy2clipboard-button.component.html | 17 +-- .../download-button.component.html | 16 ++- .../notifications-sidebar.component.html | 27 +++-- .../select-badges.component.html | 13 ++- .../table-actions.component.html | 6 +- .../datatable/table/table.component.html | 17 ++- .../src/app/shared/enum/icons.enum.ts | 108 +++++++++--------- .../app/shared/models/cd-notification.spec.ts | 6 +- .../prometheus-alert-formatter.spec.ts | 2 +- .../services/prometheus-alert-formatter.ts | 2 +- .../frontend/src/styles/_carbon-defaults.scss | 37 ++++++ .../frontend/src/testing/unit-test-helper.ts | 2 +- 47 files changed, 500 insertions(+), 278 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/block.module.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/block.module.ts index ba930c549865..e3b600bafa90 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/block.module.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/block.module.ts @@ -70,9 +70,11 @@ import { // Icons import ChevronDown from '@carbon/icons/es/chevron--down/16'; import Close from '@carbon/icons/es/close/32'; -import AddFilled from '@carbon/icons/es/add--filled/32'; +import AddFilled from '@carbon/icons/es/add--filled/20'; import SubtractFilled from '@carbon/icons/es/subtract--filled/32'; import Reset from '@carbon/icons/es/reset/32'; +import SubtractAlt from '@carbon/icons/es/subtract--alt/20'; +import ProgressBarRound from '@carbon/icons/es/progress-bar--round/32'; @NgModule({ imports: [ @@ -142,7 +144,15 @@ import Reset from '@carbon/icons/es/reset/32'; }) export class BlockModule { constructor(private iconService: IconService) { - this.iconService.registerAll([ChevronDown, Close, AddFilled, SubtractFilled, Reset]); + this.iconService.registerAll([ + ChevronDown, + Close, + AddFilled, + SubtractFilled, + Reset, + ProgressBarRound, + SubtractAlt + ]); } } diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-details/iscsi-target-details.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-details/iscsi-target-details.component.html index b137051d0ae4..77d1cbc56676 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-details/iscsi-target-details.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-details/iscsi-target-details.component.html @@ -8,7 +8,10 @@ - + {{node?.data?.cdIcon}} + {{ node?.name }}   - + @@ -74,8 +75,9 @@ @@ -87,7 +89,9 @@ [messages]="messages.portals" (selection)="onPortalSelection($event)" elemClass="btn btn-light float-end"> - + Add portal @@ -124,14 +128,16 @@ @@ -166,7 +172,9 @@ [messages]="messages.images" (selection)="onImageSelection($event)" elemClass="btn btn-light float-end"> - + Add image @@ -488,8 +496,9 @@ @@ -504,7 +513,9 @@ [options]="imagesInitiatorSelections[ii]" [messages]="messages.initiatorImage" elemClass="btn btn-light float-end"> - + Add image @@ -522,7 +533,9 @@ @@ -579,8 +592,9 @@ @@ -592,7 +606,9 @@ [messages]="messages.groupInitiator" (selection)="onGroupMemberSelection($event, gi)" elemClass="btn btn-light float-end"> - + Add initiator @@ -618,8 +634,9 @@ @@ -630,7 +647,9 @@ [options]="groupDiskSelections[gi]" [messages]="messages.initiatorImage" elemClass="btn btn-light float-end"> - + Add image @@ -650,7 +669,9 @@ diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-list/iscsi-target-list.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-list/iscsi-target-list.component.html index ef7fa2a178ea..0d6e60f1e77c 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-list/iscsi-target-list.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-list/iscsi-target-list.component.html @@ -38,9 +38,9 @@ diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/bootstrap-create-modal/bootstrap-create-modal.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/bootstrap-create-modal/bootstrap-create-modal.component.html index 7e91980c5a92..706961df83a8 100755 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/bootstrap-create-modal/bootstrap-create-modal.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/bootstrap-create-modal/bootstrap-create-modal.component.html @@ -79,8 +79,7 @@ readonly> - + diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/overview/overview.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/overview/overview.component.html index c0ce32de21ff..0e708ed4354a 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/overview/overview.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/overview/overview.component.html @@ -19,12 +19,12 @@ size="md" (click)="updateSiteName()" [title]="editing ? 'Save' : 'Edit'"> - - diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-initiators-form/nvmeof-initiators-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-initiators-form/nvmeof-initiators-form.component.html index a0a61d7ae480..2bc7b2f994b2 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-initiators-form/nvmeof-initiators-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-initiators-form/nvmeof-initiators-form.component.html @@ -46,14 +46,18 @@ || initiatorForm.get('addHost.addedHosts').controls.length === 32 || (initiatorForm.get('addHost.addedHosts').controls.length !== 1 && initiatorForm.get('addHost.addedHosts').controls.length !== hi+1)" (click)="addHost()"> - + - {{ section.heading }} + {{ section.heading }}  +
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-list/rbd-list.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-list/rbd-list.component.html index b1f36967d70c..76fabd9c817f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-list/rbd-list.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-list/rbd-list.component.html @@ -90,10 +90,9 @@ let-column="data.column" let-value="data.value" let-row="data.row"> - - + {{ value }} ({{ row.cdExecuting }}) - + @@ -132,7 +133,6 @@ decimals="2"> - diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/cluster.module.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/cluster.module.ts index ff1eeb904f2f..7503f5f355c4 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/cluster.module.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/cluster.module.ts @@ -14,9 +14,13 @@ import { ModalModule, TreeviewModule, ListModule, - ToggletipModule + ToggletipModule, + IconModule, + IconService } from 'carbon-components-angular'; - +import Analytics from '@carbon/icons/es/analytics/16'; +import CloseFilled from '@carbon/icons/es/close--filled/16'; +import ProgressBarRoundIcon from '@carbon/icons/es/progress-bar--round/32'; import { NgbActiveModal, NgbDatepickerModule, @@ -110,7 +114,8 @@ import { MultiClusterDetailsComponent } from './multi-cluster/multi-cluster-deta InputModule, ModalModule, ListModule, - ToggletipModule + ToggletipModule, + IconModule ], declarations: [ MonitorComponent, @@ -161,4 +166,8 @@ import { MultiClusterDetailsComponent } from './multi-cluster/multi-cluster-deta ], providers: [NgbActiveModal] }) -export class ClusterModule {} +export class ClusterModule { + constructor(private iconService: IconService) { + this.iconService.registerAll([Analytics, CloseFilled, ProgressBarRoundIcon]); + } +} diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/logs/logs.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/logs/logs.component.html index f92674e50743..d869e15062cb 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/logs/logs.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/logs/logs.component.html @@ -119,7 +119,9 @@ i18n>Keyword:
- + - +
@@ -155,7 +159,9 @@ class="btn btn-light" (click)="clearDate()" title="Clear"> - + diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-devices-selection-groups/osd-devices-selection-groups.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-devices-selection-groups/osd-devices-selection-groups.component.html index 95e51662b769..e790cf0f3d43 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-devices-selection-groups/osd-devices-selection-groups.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-devices-selection-groups/osd-devices-selection-groups.component.html @@ -20,7 +20,9 @@ data-toggle="tooltip" [title]="addButtonTooltip" [disabled]="availDevices.length === 0 || !canSelect || expansionCanSelect"> - + Add
@@ -32,7 +34,9 @@ - + Clear diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.ts index 670163dd909b..386ef6e10813 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.ts @@ -239,7 +239,7 @@ export class OsdListComponent extends ListWithDetails implements OnInit { } ), disable: () => this.isNotSelectedOrInState('up'), - icon: Icons.destroyCircle + icon: Icons.clearFilters }, { name: this.actionLabels.DELETE, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/active-alert-list/active-alert-list.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/active-alert-list/active-alert-list.component.html index c726ea319ed6..e105cae7c903 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/active-alert-list/active-alert-list.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/active-alert-list/active-alert-list.component.html @@ -38,5 +38,10 @@ let-row="data.row" let-value="data.value"> Source + target="_blank"> + + Source +
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-form/silence-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-form/silence-form.component.html index d95d21462851..e7411a05a0a6 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-form/silence-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-form/silence-form.component.html @@ -28,7 +28,10 @@ i18n-ngbTooltip ngbTooltip="Edit" (click)="showMatcherModal(index)"> - + @@ -171,7 +176,9 @@ class="btn btn-light float-end my-3" [ngClass]="{'btn-warning': formDir.submitted && matchers.length === 0 }" (click)="showMatcherModal()"> - + Add matcher diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.html index 7ef576d4626b..582e75028676 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.html @@ -52,12 +52,14 @@ {{ event.created | relativeDate }} - {{ event.subject }}
- + - + {{ event.message }} diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/services.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/services.component.html index 623be9025f4a..042b180d1ba6 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/services.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/services.component.html @@ -32,10 +32,10 @@ {{ value.running }} / {{ value.size }} - - + {{ row.service_name }} - + {{ row.service_name }} - + diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.html index 0d74214cc514..20d4c66cdada 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.html @@ -179,8 +179,9 @@ i18n-ngbTooltip type="button" (click)="toggleDCalc()"> - + - - + Application selection is required! @@ -213,9 +214,7 @@
- CRUSH -
@@ -247,15 +246,17 @@ id="ecp-info-button" type="button" (click)="data.erasureInfo = !data.erasureInfo"> - +
- +
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool.module.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool.module.ts index 3f01b9fd9c56..21c33cbe38e2 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool.module.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool.module.ts @@ -14,6 +14,10 @@ import { ErasureCodeProfileFormModalComponent } from './erasure-code-profile-for import { PoolDetailsComponent } from './pool-details/pool-details.component'; import { PoolFormComponent } from './pool-form/pool-form.component'; import { PoolListComponent } from './pool-list/pool-list.component'; +import { IconModule, IconService } from 'carbon-components-angular'; +import HelpIcon from '@carbon/icons/es/help/16'; +import UnlockedIcon from '@carbon/icons/es/unlocked/16'; +import LockedIcon from '@carbon/icons/es/locked/16'; @NgModule({ imports: [ @@ -24,7 +28,8 @@ import { PoolListComponent } from './pool-list/pool-list.component'; RouterModule, ReactiveFormsModule, NgbTooltipModule, - BlockModule + BlockModule, + IconModule ], exports: [PoolListComponent, PoolFormComponent], declarations: [ @@ -35,7 +40,11 @@ import { PoolListComponent } from './pool-list/pool-list.component'; PoolDetailsComponent ] }) -export class PoolModule {} +export class PoolModule { + constructor(private iconService: IconService) { + this.iconService.registerAll([HelpIcon, UnlockedIcon, LockedIcon]); + } +} const routes: Routes = [ { path: '', component: PoolListComponent }, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.html index 71097b4527c6..05432220722b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.html @@ -384,8 +384,8 @@ [disabled]="tags.length > 19" (click)="showTagModal()"> Add tag - @@ -425,16 +425,16 @@ id="example-generator-button" (click)="openUrl('https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html?icmpid=docs_amazons3_console')" i18n>Policy examples - @@ -445,8 +445,8 @@ id="clear-bucket-policy" (click)="clearTextArea('bucket_policy', '{}')" i18n>Clear - @@ -485,8 +485,8 @@ id="lifecycle-examples-button" (click)="openUrl('https://docs.aws.amazon.com/cli/latest/reference/s3api/put-bucket-lifecycle.html#examples')" i18n>Policy examples - @@ -497,8 +497,8 @@ id="clear-lifecycle" (click)="clearTextArea('lifecycle', '{}')" i18n>Clear - @@ -610,16 +610,16 @@ - + - +
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-details/rgw-multisite-details.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-details/rgw-multisite-details.component.html index 3f9794e26261..40b9202909aa 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-details/rgw-multisite-details.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-details/rgw-multisite-details.component.html @@ -81,12 +81,23 @@ - + - + + + {{ node?.data?.name }} - + @@ -119,7 +132,9 @@ class="btn btn-light ms-1" [disabled]="nodeDeleteData.isDisabled || node?.data?.secondary_zone" (click)="delete(node)"> - + diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-export/rgw-multisite-export.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-export/rgw-multisite-export.component.html index 779884936938..4f2d9cae379d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-export/rgw-multisite-export.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-export/rgw-multisite-export.component.html @@ -8,7 +8,11 @@ [formGroup]="exportTokenForm"> - + + + diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-sync-data-info/rgw-sync-data-info.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-sync-data-info/rgw-sync-data-info.component.html index 970a4d90a403..cbf9b033792a 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-sync-data-info/rgw-sync-data-info.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-sync-data-info/rgw-sync-data-info.component.html @@ -17,8 +17,9 @@
  • Status:
  • - + Error
  • diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-sync-metadata-info/rgw-sync-metadata-info.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-sync-metadata-info/rgw-sync-metadata-info.component.html index 5ec927071f8b..211def32cabf 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-sync-metadata-info/rgw-sync-metadata-info.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-sync-metadata-info/rgw-sync-metadata-info.component.html @@ -25,8 +25,9 @@
  • Status:
  • - + Error
  • diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-sync-primary-zone/rgw-sync-primary-zone.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-sync-primary-zone/rgw-sync-primary-zone.component.html index f0e0457d944d..fe6e074b72df 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-sync-primary-zone/rgw-sync-primary-zone.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-sync-primary-zone/rgw-sync-primary-zone.component.html @@ -1,15 +1,27 @@ diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.html index 58a6fee7eedd..c38780ee32d5 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.html @@ -306,8 +306,8 @@ title="Edit" class="mt-4 tc_showSubuserButton" (click)="showSubuserModal(i)"> - - + > @@ -330,8 +330,8 @@ (click)="showSubuserModal()"> {{ actionLabels.CREATE | titlecase }} {{ subuserLabel | upperFirst }} - @@ -366,10 +366,11 @@ - - @@ -394,8 +395,8 @@ (click)="showS3KeyModal()"> {{ actionLabels.CREATE | titlecase }} {{ s3keyLabel | upperFirst }} - @@ -424,15 +425,17 @@ readonly> - - - + + + + @@ -473,8 +476,8 @@ title="Edit" class="mt-4 tc_editCapButton" (click)="showCapabilityModal(i)"> - - @@ -504,8 +507,8 @@ (click)="showCapabilityModal()"> {{ actionLabels.ADD | titlecase }} {{ capabilityLabel | upperFirst }} - diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw.module.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw.module.ts index 83a0414b000b..e6e09e4c08fe 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw.module.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw.module.ts @@ -83,8 +83,21 @@ import { TagModule, TooltipModule, ComboBoxModule, - ToggletipModule + ToggletipModule, + IconService } from 'carbon-components-angular'; +import EditIcon from '@carbon/icons/es/edit/16'; +import ScalesIcon from '@carbon/icons/es/scales/20'; +import UserIcon from '@carbon/icons/es/user/16'; +import CubeIcon from '@carbon/icons/es/cube/20'; +import ShareIcon from '@carbon/icons/es/share/16'; +import ViewIcon from '@carbon/icons/es/view/16'; +import PasswordIcon from '@carbon/icons/es/password/16'; +import ArrowDownIcon from '@carbon/icons/es/arrow--down/16'; +import ProgressBarRoundIcon from '@carbon/icons/es/progress-bar--round/32'; +import ToolsIcon from '@carbon/icons/es/tools/32'; +import ParentChild from '@carbon/icons/es/parent-child/20'; + import { CephSharedModule } from '../shared/ceph-shared.module'; import { RgwUserAccountsComponent } from './rgw-user-accounts/rgw-user-accounts.component'; import { RgwUserAccountsFormComponent } from './rgw-user-accounts-form/rgw-user-accounts-form.component'; @@ -201,7 +214,23 @@ import { RgwTopicDetailsComponent } from './rgw-topic-details/rgw-topic-details. ], providers: [TitleCasePipe] }) -export class RgwModule {} +export class RgwModule { + constructor(private iconService: IconService) { + this.iconService.registerAll([ + EditIcon, + ScalesIcon, + CubeIcon, + UserIcon, + ShareIcon, + ViewIcon, + PasswordIcon, + ArrowDownIcon, + ProgressBarRoundIcon, + ToolsIcon, + ParentChild + ]); + } +} const routes: Routes = [ { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/error/error.component.html b/src/pybind/mgr/dashboard/frontend/src/app/core/error/error.component.html index d82e122ff0ea..06881a861a29 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/error/error.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/error/error.component.html @@ -6,9 +6,8 @@
    - - +

    {{ header }}

    - + {{ cardTitle }}

    + + @@ -10,8 +13,8 @@ size="md" title="Copy to Clipboard" (click)="onClick()"> - diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/download-button/download-button.component.html b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/download-button/download-button.component.html index a7e476501894..43c1d2d6542b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/download-button/download-button.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/download-button/download-button.component.html @@ -4,20 +4,26 @@ [title]="title" class="btn btn-light dropdown-toggle-split" ngbDropdownToggle> - +  
    diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/notifications-sidebar/notifications-sidebar.component.html b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/notifications-sidebar/notifications-sidebar.component.html index 653b50fa92bf..ba3a57eb1d9f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/notifications-sidebar/notifications-sidebar.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/notifications-sidebar/notifications-sidebar.component.html @@ -4,23 +4,21 @@
    - - - + +
    {{ executingTask.description }}
    -
    -

    {{ executingTask.begin_time | cdDate }} @@ -45,8 +43,9 @@ @@ -69,21 +68,27 @@ title="Remove notification" i18n-title (click)="remove(i); $event.stopPropagation()"> - + diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select-badges/select-badges.component.html b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select-badges/select-badges.component.html index 5351000836f7..331b3004040c 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select-badges/select-badges.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select-badges/select-badges.component.html @@ -7,16 +7,19 @@ [customBadgeValidators]="customBadgeValidators" elemClass="me-2 select-menu-edit" (selection)="selection.emit($event)"> - + {{ dataItem }} - - + + diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-actions/table-actions.component.html b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-actions/table-actions.component.html index 41318cbc8989..0e3f73a0c3e5 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-actions/table-actions.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-actions/table-actions.component.html @@ -20,9 +20,9 @@ [offset]="{ x: -210, y: 65 }" [cdsOverflowMenu]="overflowMenuTpl" data-testid="table-action-btn"> - + diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html index 971bd96a4abf..da5a96d3a6b6 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html @@ -49,9 +49,8 @@

    - +
    - @@ -97,8 +96,8 @@ placement="bottom" [flip]="true" [offset]="{ x: 3, y: 0 }"> - @@ -132,8 +131,8 @@ {{ filter.column.name }}: {{ filter.value.formatted }} diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/enum/icons.enum.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/enum/icons.enum.ts index 74a474730d63..81f5e68ae3bc 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/enum/icons.enum.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/enum/icons.enum.ts @@ -1,80 +1,76 @@ export enum Icons { /* Icons for Symbol */ - add = 'fa fa-plus', // Create, Add - addCircle = 'fa fa-plus-circle', // Plus with Circle - minusCircle = 'fa fa-minus-circle', // Minus with Circle - edit = 'fa fa-pencil', // Edit, Edit Mode, Rename - destroy = 'fa fa-times', // Destroy, Remove, Delete - destroyCircle = 'fa fa-times-circle', // Destroy, Remove, Delete - exchange = 'fa fa-exchange', // Edit-Peer - copy = 'fa fa-copy', // Copy - clipboard = 'fa fa-clipboard', // Clipboard - flatten = 'fa fa-chain-broken', // Flatten, Link broken, Mark Lost - trash = 'fa fa-trash-o', // Move to trash - lock = 'fa fa-lock', // Protect - unlock = 'fa fa-unlock', // Unprotect + add = 'add', // Create, Add + addCircle = 'add--filled', // Plus with Circle + minusCircle = 'subtract--alt', // Minus with Circle + edit = 'edit', // Edit, Edit Mode, Rename + destroy = 'close', // Destroy, Remove, Delete + exchange = 'arrows--horizontal', // Edit-Peer + copy = 'copy', // Copy + clipboard = 'copy--file', // Clipboard + flatten = 'unlink', // Flatten, Link broken, Mark Lost + trash = 'trash-can', // Move to trash + lock = 'locked', // Protect + unlock = 'unlocked', // Unprotect clone = 'fa fa-clone', // clone undo = 'fa fa-undo', // Rollback, Restore - search = 'fa fa-search', // Search + search = 'search', // Search start = 'fa fa-play', // Enable stop = 'fa fa-stop', // Disable analyse = 'fa fa-stethoscope', // Scrub - deepCheck = 'fa fa-cog', // Deep Scrub, Setting, Configuration + deepCheck = 'settings', // Deep Scrub, Setting, Configuration cogs = 'fa fa-cogs', // Multiple Settings, Configurations - reweight = 'fa fa-balance-scale', // Reweight - up = 'fa fa-arrow-up', // Up - left = 'fa fa-arrow-left', // Mark out - right = 'fa fa-arrow-right', // Mark in - down = 'fa fa-arrow-down', // Mark Down + reweight = 'scales', // Reweight + up = 'arrow--up', // Up + left = 'arrow--left', // Mark out + right = 'arrow--right', // Mark in + down = 'arrow--down', // Mark Down erase = 'fa fa-eraser', // Purge color: bd.$white; expand = 'maximize', // Expand cluster - user = 'fa fa-user', // User, Initiators - users = 'fa fa-users', // Users, Groups - share = 'fa fa-share-alt', // share - key = 'fa fa-key-modern', // S3 Keys, Swift Keys, Authentication - warning = 'fa fa-exclamation-triangle', // Notification warning - info = 'fa fa-info', // Notification information - infoCircle = 'fa fa-info-circle', // Info on landing page - questionCircle = 'fa fa-question-circle-o', - danger = 'fa fa-exclamation-circle', - success = 'fa fa-check-circle', - check = 'fa fa-check', // Notification check - show = 'fa fa-eye', // Show + user = 'user', // User, Initiators + users = 'user--multiple', // Users, Groups + share = 'share', // share + key = 'password', // S3 Keys, Swift Keys, Authentication + warning = 'warning--alt--filled', // Notification warning + info = 'information', // Notification information + infoCircle = 'information--filled', // Info on landing page + questionCircle = 'help', + danger = 'warning--filled', + // success = 'fa fa-check-circle', + success = 'checkmark--filled', + check = 'checkmark', // Notification check + show = 'view', // Show paragraph = 'fa fa-paragraph', // Silence Matcher - Attribute name terminal = 'fa fa-terminal', // Silence Matcher - Value magic = 'fa fa-magic', // Silence Matcher - Regex checkbox hourglass = 'fa fa-hourglass-o', // Task filledHourglass = 'fa fa-hourglass', // Task table = 'fa fa-table', // Table, - spinner = 'fa fa-spinner', // spinner, Load - refresh = 'fa fa-refresh', // Refresh + spinner = 'fa fa-spinner', + refresh = 'renew', // Refresh bullseye = 'fa fa-bullseye', // Target disk = 'fa fa-hdd-o', // Hard disk, disks server = 'fa fa-server', // Server, Portal - filter = 'fa fa-filter', // Filter - lineChart = 'fa fa-line-chart', // Line chart + filter = 'filter', // Filter + lineChart = 'analytics', // Line chart signOut = 'fa fa-sign-out', // Sign Out - health = 'fa fa-heartbeat', // Health - circle = 'fa fa-circle', // Circle - bell = 'fa fa-bell', // Notification - mute = 'fa fa-bell-slash', // Mute or silence - tag = 'fa fa-tag', // Tag, Badge - leftArrow = 'fa fa-angle-left', // Left facing angle - rightArrow = 'fa fa-angle-right', // Right facing angle - leftArrowDouble = 'fa fa-angle-double-left', // Left facing Double angle - rightArrowDouble = 'fa fa-angle-double-right', // Left facing Double angle + circle = 'dot-mark', // Circle + bell = 'notification', // Notification + mute = 'notification--off', // Mute or silence + leftArrow = 'caret--left', // Left facing angle + rightArrow = 'caret--right', // Right facing angle + downArrow = 'caret--down', flag = 'fa fa-flag', // OSD configuration - clearFilters = 'fa fa-window-close', // Clear filters, solid x - download = 'fa fa-download', // Download + clearFilters = 'close--filled', // Clear filters, solid x + download = 'download', // Download upload = 'fa fa-upload', // Upload - close = 'fa fa-times', // Close - json = 'fa fa-file-code-o', // JSON file - text = 'fa fa-file-text', // Text file - wrench = 'fa fa-wrench', // Configuration Error + code = 'code', // JSON file + document = 'document', // Text file + wrench = 'tools', // Configuration Error enter = 'fa fa-sign-in', // Enter exit = 'fa fa-sign-out', // Exit restart = 'fa fa-history', // Restart - deploy = 'fa fa-cube', // Deploy, Redeploy + deploy = 'cube', // Deploy, Redeploy cubes = 'fa fa-cubes', // Object storage sitemap = 'fa fa-sitemap', // Cluster, network, connections database = 'fa fa-database', // Database, Block storage @@ -85,8 +81,14 @@ export enum Icons { calendar = 'fa fa-calendar', externalUrl = 'fa fa-external-link', // links to external page nfsExport = 'fa fa-server', // NFS export - + launch = 'launch', + parentChild = 'parent-child', + dataTable = 'data-table', /* Icons for special effect */ + size16 = '16', + size20 = '20', + size24 = '24', + size32 = '32', large = 'fa fa-lg', // icon becomes 33% larger large2x = 'fa fa-2x', // icon becomes 50% larger large3x = 'fa fa-3x', // icon becomes 3 times larger diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/models/cd-notification.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/models/cd-notification.spec.ts index df6e8899bf8b..459677e9d8fd 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/models/cd-notification.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/models/cd-notification.spec.ts @@ -50,7 +50,7 @@ describe('cd-notification classes', () => { expectObject(new CdNotification(), { application: 'Ceph', applicationClass: 'ceph-icon', - iconClass: 'fa fa-info', + iconClass: 'information', message: undefined, options: undefined, textClass: 'text-info', @@ -74,7 +74,7 @@ describe('cd-notification classes', () => { { application: 'Prometheus', applicationClass: 'prometheus-icon', - iconClass: 'fa fa-exclamation-triangle', + iconClass: 'warning--alt--filled', message: 'Something failed', options: undefined, textClass: 'text-danger', @@ -87,7 +87,7 @@ describe('cd-notification classes', () => { it('should expect the right success classes', () => { expectObject(new CdNotification(new CdNotificationConfig(NotificationType.success)), { - iconClass: 'fa fa-check', + iconClass: 'checkmark', textClass: 'text-success' }); }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-alert-formatter.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-alert-formatter.spec.ts index 1384637bbd8b..45f90645ca4c 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-alert-formatter.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-alert-formatter.spec.ts @@ -86,7 +86,7 @@ describe('PrometheusAlertFormatter', () => { NotificationType.error, 'Some alert (active)', 'Some alert is active ' + - '', + '', undefined, 'Prometheus' ) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-alert-formatter.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-alert-formatter.ts index 96ad5f96f71b..1b28078b9ca9 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-alert-formatter.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-alert-formatter.ts @@ -69,6 +69,6 @@ export class PrometheusAlertFormatter { } private appendSourceLink(alert: PrometheusCustomAlert, message: string): string { - return `${message} `; + return `${message} `; } } diff --git a/src/pybind/mgr/dashboard/frontend/src/styles/_carbon-defaults.scss b/src/pybind/mgr/dashboard/frontend/src/styles/_carbon-defaults.scss index 6a474f4948d8..26b06564bd7a 100644 --- a/src/pybind/mgr/dashboard/frontend/src/styles/_carbon-defaults.scss +++ b/src/pybind/mgr/dashboard/frontend/src/styles/_carbon-defaults.scss @@ -149,6 +149,7 @@ cd-dashboard { /****************************************** Code snippet ******************************************/ + .cds--snippet { width: fit-content; } @@ -175,3 +176,39 @@ Tabs .cds--tab-content { background: var(--cds-layer-01); } + +.cds-success-color { + fill: theme.$support-success; +} + +.cds-danger-color { + fill: theme.$support-error; +} + +.cds-info-color { + fill: theme.$support-info; +} + +.cds-warning-color { + fill: theme.$support-caution-major; +} + +.cds-white { + fill: theme.$icon-on-color; +} + +.cds-icon--size-07 { + height: layout.$spacing-07; + width: layout.$spacing-07; +} + +.cds-icon--size-10 { + display: block; + height: layout.$spacing-10; + margin: auto; + width: layout.$spacing-10; +} + +.cds-mb-4 { + margin-bottom: layout.$spacing-02; +} diff --git a/src/pybind/mgr/dashboard/frontend/src/testing/unit-test-helper.ts b/src/pybind/mgr/dashboard/frontend/src/testing/unit-test-helper.ts index fabbe22c7b94..4ce471756ac2 100644 --- a/src/pybind/mgr/dashboard/frontend/src/testing/unit-test-helper.ts +++ b/src/pybind/mgr/dashboard/frontend/src/testing/unit-test-helper.ts @@ -346,7 +346,7 @@ export class PrometheusHelper { } createLink(url: string) { - return ``; + return ``; } } -- 2.47.3