From: Kanika Murarka Date: Thu, 4 Apr 2019 11:42:37 +0000 (+0530) Subject: mgr/dashboard: Separate file for icons for refering and reusing X-Git-Tag: v15.1.0~2323^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a4d7bb29a30800db18fe51eb868a5dd5eaafa6ef;p=ceph.git mgr/dashboard: Separate file for icons for refering and reusing Fixes: http://tracker.ceph.com/issues/39032 Signed-off-by: Kanika Murarka --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-details/iscsi-target-details.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-details/iscsi-target-details.component.spec.ts index 339a3c94e330..bc7a106e7126 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-details/iscsi-target-details.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-details/iscsi-target-details.component.spec.ts @@ -7,6 +7,9 @@ import { CdTableSelection } from '../../../shared/models/cd-table-selection'; import { SharedModule } from '../../../shared/shared.module'; import { IscsiTargetDetailsComponent } from './iscsi-target-details.component'; +import * as _ from 'lodash'; +import { Icons } from '../../../shared/enum/icons.enum'; + describe('IscsiTargetDetailsComponent', () => { let component: IscsiTargetDetailsComponent; let fixture: ComponentFixture; @@ -97,7 +100,10 @@ describe('IscsiTargetDetailsComponent', () => { { children: [{ id: 'disk_rbd_disk_1', value: 'rbd/disk_1' }], settings: { - cssClasses: { expanded: 'fa fa-fw fa-hdd-o fa-lg', leaf: 'fa fa-fw fa-hdd-o' }, + cssClasses: { + expanded: _.join([Icons.width, Icons.large, Icons.disk], ' '), + leaf: _.join([Icons.width, Icons.disk], ' ') + }, selectionAllowed: false }, value: 'Disks' @@ -105,7 +111,10 @@ describe('IscsiTargetDetailsComponent', () => { { children: [{ value: 'node1:192.168.100.201' }], settings: { - cssClasses: { expanded: 'fa fa-fw fa-server fa-lg', leaf: 'fa fa-fw fa-server fa-lg' }, + cssClasses: { + expanded: _.join([Icons.width, Icons.large, Icons.server], ' '), + leaf: _.join([Icons.width, Icons.large, Icons.server], ' ') + }, selectionAllowed: false }, value: 'Portals' @@ -117,7 +126,10 @@ describe('IscsiTargetDetailsComponent', () => { { id: 'disk_rbd_disk_1', settings: { - cssClasses: { expanded: 'fa fa-fw fa-hdd-o fa-lg', leaf: 'fa fa-fw fa-hdd-o' } + cssClasses: { + expanded: _.join([Icons.width, Icons.large, Icons.disk], ' '), + leaf: _.join([Icons.width, Icons.disk], ' ') + } }, value: 'rbd/disk_1' } @@ -127,7 +139,10 @@ describe('IscsiTargetDetailsComponent', () => { } ], settings: { - cssClasses: { expanded: 'fa fa-fw fa-user fa-lg', leaf: 'fa fa-fw fa-user' }, + cssClasses: { + expanded: _.join([Icons.width, Icons.large, Icons.user], ' '), + leaf: _.join([Icons.width, Icons.user], ' ') + }, selectionAllowed: false }, value: 'Initiators' @@ -135,14 +150,20 @@ describe('IscsiTargetDetailsComponent', () => { { children: [], settings: { - cssClasses: { expanded: 'fa fa-fw fa-users fa-lg', leaf: 'fa fa-fw fa-users' }, + cssClasses: { + expanded: _.join([Icons.width, Icons.large, Icons.user], ' '), + leaf: _.join([Icons.width, Icons.user], ' ') + }, selectionAllowed: false }, value: 'Groups' } ], id: 'root', - settings: { cssClasses: { expanded: 'fa fa-fw fa-bullseye fa-lg' }, static: true }, + settings: { + cssClasses: { expanded: _.join([Icons.width, Icons.large, Icons.bullseye], ' ') }, + static: true + }, value: 'iqn.2003-01.com.redhat.iscsi-gw:iscsi-igw' }); }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-details/iscsi-target-details.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-details/iscsi-target-details.component.ts index 588c24b5c248..03a172f0f5fa 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-details/iscsi-target-details.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-details/iscsi-target-details.component.ts @@ -5,6 +5,7 @@ import * as _ from 'lodash'; import { NodeEvent, TreeModel } from 'ng2-tree'; import { TableComponent } from '../../../shared/datatable/table/table.component'; +import { Icons } from '../../../shared/enum/icons.enum'; import { CdTableColumn } from '../../../shared/models/cd-table-column'; import { CdTableSelection } from '../../../shared/models/cd-table-selection'; import { IscsiBackstorePipe } from '../../../shared/pipes/iscsi-backstore.pipe'; @@ -75,26 +76,25 @@ export class IscsiTargetDetailsComponent implements OnChanges, OnInit { private generateTree() { this.metadata = { root: this.selectedItem.target_controls }; - const cssClasses = { target: { - expanded: 'fa fa-fw fa-bullseye fa-lg' + expanded: _.join([Icons.width, Icons.large, Icons.bullseye], ' ') }, initiators: { - expanded: 'fa fa-fw fa-user fa-lg', - leaf: 'fa fa-fw fa-user' + expanded: _.join([Icons.width, Icons.large, Icons.user], ' '), + leaf: _.join([Icons.width, Icons.user], ' ') }, groups: { - expanded: 'fa fa-fw fa-users fa-lg', - leaf: 'fa fa-fw fa-users' + expanded: _.join([Icons.width, Icons.large, Icons.user], ' '), + leaf: _.join([Icons.width, Icons.user], ' ') }, disks: { - expanded: 'fa fa-fw fa-hdd-o fa-lg', - leaf: 'fa fa-fw fa-hdd-o' + expanded: _.join([Icons.width, Icons.large, Icons.disk], ' '), + leaf: _.join([Icons.width, Icons.disk], ' ') }, portals: { - expanded: 'fa fa-fw fa-server fa-lg', - leaf: 'fa fa-fw fa-server fa-lg' + expanded: _.join([Icons.width, Icons.large, Icons.server], ' '), + leaf: _.join([Icons.width, Icons.large, Icons.server], ' ') } }; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-form/iscsi-target-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-form/iscsi-target-form.component.html index 5a7031dd4c0d..e3d56d301a60 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-form/iscsi-target-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-form/iscsi-target-form.component.html @@ -32,7 +32,7 @@ id="ecp-info-button" type="button" (click)="targetSettingsModal()"> - @@ -84,7 +84,7 @@ @@ -102,7 +102,7 @@ [messages]="messages.portals" (selection)="onPortalSelection($event)" elemClass="btn btn-default pull-right"> - + Add portal @@ -129,13 +129,13 @@ @@ -162,7 +162,7 @@ [messages]="messages.images" (selection)="onImageSelection($event)" elemClass="btn btn-default pull-right"> - + Add image @@ -204,7 +204,7 @@
@@ -372,7 +372,7 @@ @@ -389,7 +389,7 @@ [options]="imagesInitiatorSelections[ii]" [messages]="messages.initiatorImage" elemClass="btn btn-default pull-right"> - + Add image
@@ -407,7 +407,7 @@ @@ -434,7 +434,7 @@
@@ -470,7 +470,7 @@ @@ -484,7 +484,7 @@ [messages]="messages.groupInitiator" (selection)="onGroupMemberSelection($event)" elemClass="btn btn-default pull-right"> - + Add initiator
@@ -512,7 +512,7 @@ @@ -525,7 +525,7 @@ [options]="groupDiskSelections[gi]" [messages]="messages.initiatorImage" elemClass="btn btn-default pull-right"> - + Add image @@ -545,7 +545,7 @@ diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-form/iscsi-target-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-form/iscsi-target-form.component.ts index 0703e2e7bc4e..1092c7c49d52 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-form/iscsi-target-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-form/iscsi-target-form.component.ts @@ -12,6 +12,7 @@ import { RbdService } from '../../../shared/api/rbd.service'; import { SelectMessages } from '../../../shared/components/select/select-messages.model'; import { SelectOption } from '../../../shared/components/select/select-option.model'; import { ActionLabelsI18n } from '../../../shared/constants/app.constants'; +import { Icons } from '../../../shared/enum/icons.enum'; import { CdFormGroup } from '../../../shared/forms/cd-form-group'; import { CdValidators } from '../../../shared/forms/cd-validators'; import { FinishedTask } from '../../../shared/models/finished-task'; @@ -35,6 +36,8 @@ export class IscsiTargetFormComponent implements OnInit { unsupported_rbd_features: any; required_rbd_features: any; + icons = Icons; + isEdit = false; target_iqn: string; 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 084182df963c..a99424c6408a 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 @@ -33,7 +33,7 @@ diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-configuration-form/rbd-configuration-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-configuration-form/rbd-configuration-form.component.ts index 072ab6fea35e..c92f2453f92f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-configuration-form/rbd-configuration-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-configuration-form/rbd-configuration-form.component.ts @@ -1,6 +1,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { FormControl, Validators } from '@angular/forms'; +import { Icons } from '../../../shared/enum/icons.enum'; import { CdFormGroup } from '../../../shared/forms/cd-form-group'; import { RbdConfigurationEntry, @@ -25,6 +26,9 @@ export class RbdConfigurationFormComponent implements OnInit { }>; @Output() changes = new EventEmitter(); + + icons = Icons; + ngDataReady = new EventEmitter(); initialData: RbdConfigurationEntry[]; configurationType = RbdConfigurationType; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-list/rbd-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-list/rbd-list.component.ts index de6eca2aa81e..0db9cd86b158 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-list/rbd-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-list/rbd-list.component.ts @@ -10,6 +10,7 @@ import { CriticalConfirmationModalComponent } from '../../../shared/components/c import { ActionLabelsI18n } from '../../../shared/constants/app.constants'; import { TableComponent } from '../../../shared/datatable/table/table.component'; import { CellTemplate } from '../../../shared/enum/cell-template.enum'; +import { Icons } from '../../../shared/enum/icons.enum'; import { ViewCacheStatus } from '../../../shared/enum/view-cache-status.enum'; import { CdTableAction } from '../../../shared/models/cd-table-action'; import { CdTableColumn } from '../../../shared/models/cd-table-column'; @@ -96,20 +97,20 @@ export class RbdListComponent implements OnInit { )}`; const addAction: CdTableAction = { permission: 'create', - icon: 'fa-plus', + icon: Icons.add, routerLink: () => this.urlBuilder.getCreate(), canBePrimary: (selection: CdTableSelection) => !selection.hasSingleSelection, name: this.actionLabels.CREATE }; const editAction: CdTableAction = { permission: 'update', - icon: 'fa-pencil', + icon: Icons.edit, routerLink: () => this.urlBuilder.getEdit(getImageUri()), name: this.actionLabels.EDIT }; const deleteAction: CdTableAction = { permission: 'delete', - icon: 'fa-times', + icon: Icons.destroy, click: () => this.deleteRbdModal(), name: this.actionLabels.DELETE }; @@ -118,7 +119,7 @@ export class RbdListComponent implements OnInit { canBePrimary: (selection: CdTableSelection) => selection.hasSingleSelection, disable: (selection: CdTableSelection) => !selection.hasSingleSelection || selection.first().cdExecuting, - icon: 'fa-copy', + icon: Icons.copy, routerLink: () => `/block/rbd/copy/${getImageUri()}`, name: this.actionLabels.COPY }; @@ -126,13 +127,13 @@ export class RbdListComponent implements OnInit { permission: 'update', disable: (selection: CdTableSelection) => !selection.hasSingleSelection || selection.first().cdExecuting || !selection.first().parent, - icon: 'fa-chain-broken', + icon: Icons.flatten, click: () => this.flattenRbdModal(), name: this.actionLabels.FLATTEN }; const moveAction: CdTableAction = { permission: 'delete', - icon: 'fa-trash-o', + icon: Icons.trash, click: () => this.trashRbdModal(), name: this.actionLabels.TRASH }; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-actions.model.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-actions.model.ts index b3e3a186a3a7..2b7fed607e6e 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-actions.model.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-actions.model.ts @@ -1,6 +1,7 @@ import { I18n } from '@ngx-translate/i18n-polyfill'; import { ActionLabelsI18n } from '../../../shared/constants/app.constants'; +import { Icons } from '../../../shared/enum/icons.enum'; import { CdTableAction } from '../../../shared/models/cd-table-action'; import { CdTableSelection } from '../../../shared/models/cd-table-selection'; @@ -22,24 +23,24 @@ export class RbdSnapshotActionsModel { this.create = { permission: 'create', - icon: 'fa-plus', + icon: Icons.add, name: actionLabels.CREATE }; this.rename = { permission: 'update', - icon: 'fa-pencil', + icon: Icons.edit, name: actionLabels.RENAME }; this.protect = { permission: 'update', - icon: 'fa-lock', + icon: Icons.lock, visible: (selection: CdTableSelection) => selection.hasSingleSelection && !selection.first().is_protected, name: actionLabels.PROTECT }; this.unprotect = { permission: 'update', - icon: 'fa-unlock', + icon: Icons.unlock, visible: (selection: CdTableSelection) => selection.hasSingleSelection && selection.first().is_protected, name: actionLabels.UNPROTECT @@ -49,7 +50,7 @@ export class RbdSnapshotActionsModel { canBePrimary: (selection: CdTableSelection) => selection.hasSingleSelection, disable: (selection: CdTableSelection) => !selection.hasSingleSelection || selection.first().cdExecuting, - icon: 'fa-clone', + icon: Icons.clone, name: actionLabels.CLONE }; this.copy = { @@ -57,17 +58,17 @@ export class RbdSnapshotActionsModel { canBePrimary: (selection: CdTableSelection) => selection.hasSingleSelection, disable: (selection: CdTableSelection) => !selection.hasSingleSelection || selection.first().cdExecuting, - icon: 'fa-copy', + icon: Icons.copy, name: actionLabels.COPY }; this.rollback = { permission: 'update', - icon: 'fa-undo', + icon: Icons.undo, name: actionLabels.ROLLBACK }; this.deleteSnap = { permission: 'delete', - icon: 'fa-times', + icon: Icons.destroy, disable: (selection: CdTableSelection) => { const first = selection.first(); return !selection.hasSingleSelection || first.cdExecuting || first.is_protected; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-list/rbd-trash-list.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-list/rbd-trash-list.component.html index dd72e6623d24..438d5d1aac11 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-list/rbd-trash-list.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-list/rbd-trash-list.component.html @@ -20,7 +20,7 @@ type="button" (click)="purgeModal()" *ngIf="permission.delete"> - Purge Trash diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-list/rbd-trash-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-list/rbd-trash-list.component.ts index f5770ebdddf5..e5d6b433b962 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-list/rbd-trash-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-list/rbd-trash-list.component.ts @@ -10,6 +10,7 @@ import { CriticalConfirmationModalComponent } from '../../../shared/components/c import { ActionLabelsI18n } from '../../../shared/constants/app.constants'; import { TableComponent } from '../../../shared/datatable/table/table.component'; import { CellTemplate } from '../../../shared/enum/cell-template.enum'; +import { Icons } from '../../../shared/enum/icons.enum'; import { ViewCacheStatus } from '../../../shared/enum/view-cache-status.enum'; import { CdTableAction } from '../../../shared/models/cd-table-action'; import { CdTableColumn } from '../../../shared/models/cd-table-column'; @@ -38,6 +39,8 @@ export class RbdTrashListComponent implements OnInit { @ViewChild('deleteTpl') deleteTpl: TemplateRef; + icons = Icons; + columns: CdTableColumn[]; executingTasks: ExecutingTask[] = []; images: any; @@ -59,16 +62,15 @@ export class RbdTrashListComponent implements OnInit { public actionLabels: ActionLabelsI18n ) { this.permission = this.authStorageService.getPermissions().rbdImage; - const restoreAction: CdTableAction = { permission: 'update', - icon: 'fa-undo', + icon: Icons.undo, click: () => this.restoreModal(), name: this.actionLabels.RESTORE }; const deleteAction: CdTableAction = { permission: 'delete', - icon: 'fa-times', + icon: Icons.destroy, click: () => this.deleteModal(), name: this.actionLabels.DELETE }; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration.component.html index 36d280aebb0e..6c0f7d5a7f2d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration.component.html @@ -18,11 +18,11 @@ - - - + + `/configuration/edit/${getConfigOptUri()}`, name: this.actionLabels.EDIT, disable: () => !this.isEditable(this.selection) 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 c455894c1eb1..1a12843a9dac 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 @@ -51,7 +51,7 @@
- + - +
@@ -81,7 +81,7 @@ diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/logs/logs.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/logs/logs.component.ts index 1ffc1610c7d6..ddb8a73a7f77 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/logs/logs.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/logs/logs.component.ts @@ -2,6 +2,7 @@ import { DatePipe } from '@angular/common'; import { Component, OnDestroy, OnInit } from '@angular/core'; import { LogsService } from '../../../shared/api/logs.service'; +import { Icons } from '../../../shared/enum/icons.enum'; @Component({ selector: 'cd-logs', @@ -12,6 +13,7 @@ export class LogsComponent implements OnInit, OnDestroy { contentData: any; clog: Array; audit_log: Array; + icons = Icons; interval: number; bsConfig = { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-list/mgr-module-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-list/mgr-module-list.component.ts index 50a13fd39ff2..e218ef81e78f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-list/mgr-module-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-list/mgr-module-list.component.ts @@ -7,6 +7,7 @@ import { timer as observableTimer } from 'rxjs'; import { MgrModuleService } from '../../../../shared/api/mgr-module.service'; import { TableComponent } from '../../../../shared/datatable/table/table.component'; import { CellTemplate } from '../../../../shared/enum/cell-template.enum'; +import { Icons } from '../../../../shared/enum/icons.enum'; import { CdTableAction } from '../../../../shared/models/cd-table-action'; import { CdTableColumn } from '../../../../shared/models/cd-table-column'; import { CdTableFetchDataContext } from '../../../../shared/models/cd-table-fetch-data-context'; @@ -67,21 +68,21 @@ export class MgrModuleListComponent { return Object.values(this.selection.first().options).length === 0; }, routerLink: () => `/mgr-modules/edit/${getModuleUri()}`, - icon: 'fa-pencil' + icon: Icons.edit }, { name: this.i18n('Enable'), permission: 'update', click: () => this.updateModuleState(), disable: () => this.isTableActionDisabled('enabled'), - icon: 'fa-play' + icon: Icons.start }, { name: this.i18n('Disable'), permission: 'update', click: () => this.updateModuleState(), disable: () => this.isTableActionDisabled('disabled'), - icon: 'fa-stop' + icon: Icons.stop } ]; } 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 d4d5f2945a1d..cf2d25d54e9c 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 @@ -10,6 +10,7 @@ import { CriticalConfirmationModalComponent } from '../../../../shared/component import { ActionLabelsI18n } from '../../../../shared/constants/app.constants'; import { TableComponent } from '../../../../shared/datatable/table/table.component'; import { CellTemplate } from '../../../../shared/enum/cell-template.enum'; +import { Icons } from '../../../../shared/enum/icons.enum'; import { CdTableAction } from '../../../../shared/models/cd-table-action'; import { CdTableColumn } from '../../../../shared/models/cd-table-column'; import { CdTableSelection } from '../../../../shared/models/cd-table-selection'; @@ -48,6 +49,7 @@ export class OsdListComponent implements OnInit { bsModalRef: BsModalRef; columns: CdTableColumn[]; clusterWideActions: CdTableAction[]; + icons = Icons; osds = []; selection = new CdTableSelection(); @@ -69,14 +71,14 @@ export class OsdListComponent implements OnInit { { name: this.actionLabels.SCRUB, permission: 'update', - icon: 'fa-stethoscope', + icon: Icons.analyse, click: () => this.scrubAction(false), disable: () => !this.hasOsdSelected }, { name: this.actionLabels.DEEP_SCRUB, permission: 'update', - icon: 'fa-cog', + icon: Icons.deepCheck, click: () => this.scrubAction(true), disable: () => !this.hasOsdSelected }, @@ -85,28 +87,28 @@ export class OsdListComponent implements OnInit { permission: 'update', click: () => this.reweight(), disable: () => !this.hasOsdSelected, - icon: 'fa-balance-scale' + icon: Icons.reweight }, { name: this.actionLabels.MARK_OUT, permission: 'update', click: () => this.showConfirmationModal(this.i18n('out'), this.osdService.markOut), disable: () => this.isNotSelectedOrInState('out'), - icon: 'fa-arrow-left' + icon: Icons.left }, { name: this.actionLabels.MARK_IN, permission: 'update', click: () => this.showConfirmationModal(this.i18n('in'), this.osdService.markIn), disable: () => this.isNotSelectedOrInState('in'), - icon: 'fa-arrow-right' + icon: Icons.right }, { name: this.actionLabels.MARK_DOWN, permission: 'update', click: () => this.showConfirmationModal(this.i18n('down'), this.osdService.markDown), disable: () => this.isNotSelectedOrInState('down'), - icon: 'fa-arrow-down' + icon: Icons.down }, { name: this.actionLabels.MARK_LOST, @@ -119,7 +121,7 @@ export class OsdListComponent implements OnInit { this.osdService.markLost ), disable: () => this.isNotSelectedOrInState('up'), - icon: 'fa-unlink' + icon: Icons.flatten }, { name: this.actionLabels.PURGE, @@ -132,7 +134,7 @@ export class OsdListComponent implements OnInit { this.osdService.purge ), disable: () => this.isNotSelectedOrInState('up'), - icon: 'fa-eraser' + icon: Icons.erase }, { name: this.actionLabels.DESTROY, @@ -145,7 +147,7 @@ export class OsdListComponent implements OnInit { this.osdService.destroy ), disable: () => this.isNotSelectedOrInState('up'), - icon: 'fa-remove' + icon: Icons.destroy } ]; } @@ -154,21 +156,21 @@ export class OsdListComponent implements OnInit { this.clusterWideActions = [ { name: this.i18n('Flags'), - icon: 'fa-flag', + icon: Icons.flag, click: () => this.configureFlagsAction(), permission: 'read', visible: () => this.permissions.osd.read }, { name: this.i18n('Recovery Priority'), - icon: 'fa-cog', + icon: Icons.deepCheck, click: () => this.configureQosParamsAction(), permission: 'read', visible: () => this.permissions.configOpt.read }, { name: this.i18n('PG scrub'), - icon: 'fa-stethoscope', + icon: Icons.analyse, click: () => this.configurePgScrubAction(), permission: 'read', visible: () => this.permissions.configOpt.read diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/prometheus-list/prometheus-list.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/prometheus-list/prometheus-list.component.html index 50ac7bda711c..94c5930ce901 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/prometheus-list/prometheus-list.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/prometheus-list/prometheus-list.component.html @@ -22,6 +22,5 @@ - Source + Source - diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/prometheus-list/prometheus-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/prometheus-list/prometheus-list.component.ts index 722046e001cf..a2138d8beabb 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/prometheus-list/prometheus-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/prometheus-list/prometheus-list.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core'; import { I18n } from '@ngx-translate/i18n-polyfill'; import { CellTemplate } from '../../../../shared/enum/cell-template.enum'; +import { Icons } from '../../../../shared/enum/icons.enum'; import { CdTableColumn } from '../../../../shared/models/cd-table-column'; import { CdTableSelection } from '../../../../shared/models/cd-table-selection'; import { CdDatePipe } from '../../../../shared/pipes/cd-date.pipe'; @@ -16,6 +17,7 @@ export class PrometheusListComponent implements OnInit { externalLinkTpl: TemplateRef; columns: CdTableColumn[]; selection = new CdTableSelection(); + icons = Icons; customCss = { 'label label-danger': 'active', 'label label-warning': 'unprocessed', diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.html index a2f7244b619c..53d48f888f3e 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.html @@ -260,7 +260,7 @@ + i18n> See Logs for more details.

diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.ts index 6cca3b5cac49..2aa7886d6e04 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.ts @@ -5,6 +5,7 @@ import * as _ from 'lodash'; import { Subscription } from 'rxjs/Subscription'; import { HealthService } from '../../../shared/api/health.service'; +import { Icons } from '../../../shared/enum/icons.enum'; import { Permissions } from '../../../shared/models/permissions'; import { DimlessBinaryPipe } from '../../../shared/pipes/dimless-binary.pipe'; import { DimlessPipe } from '../../../shared/pipes/dimless.pipe'; @@ -27,6 +28,7 @@ export class HealthComponent implements OnInit, OnDestroy { interval = new Subscription(); permissions: Permissions; enabledFeature$: FeatureTogglesMap$; + icons = Icons; rawCapacityChartConfig = { options: { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form-client/nfs-form-client.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form-client/nfs-form-client.component.html index b5a05c75f1c8..bce451316053 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form-client/nfs-form-client.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form-client/nfs-form-client.component.html @@ -95,7 +95,7 @@ diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form-client/nfs-form-client.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form-client/nfs-form-client.component.ts index a549deb0445c..5067f5a2ba74 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form-client/nfs-form-client.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form-client/nfs-form-client.component.ts @@ -5,6 +5,7 @@ import { I18n } from '@ngx-translate/i18n-polyfill'; import * as _ from 'lodash'; import { NfsService } from '../../../shared/api/nfs.service'; +import { Icons } from '../../../shared/enum/icons.enum'; import { CdFormGroup } from '../../../shared/forms/cd-form-group'; @Component({ @@ -18,6 +19,7 @@ export class NfsFormClientComponent { nfsSquash: any[] = this.nfsService.nfsSquash; nfsAccessType: any[] = this.nfsService.nfsAccessType; + icons = Icons; constructor(private nfsService: NfsService, private i18n: I18n) {} diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.html index d1300cb3d417..5057a1faf1d7 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.html @@ -63,7 +63,7 @@ @@ -77,7 +77,7 @@ [messages]="daemonsMessages" (selection)="onDaemonSelection()" elemClass="btn btn-default pull-right"> - + Add daemon diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.ts index 8916d1b7da00..0545e33e44d7 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.ts @@ -12,6 +12,7 @@ import { RgwUserService } from '../../../shared/api/rgw-user.service'; import { SelectMessages } from '../../../shared/components/select/select-messages.model'; import { SelectOption } from '../../../shared/components/select/select-option.model'; import { ActionLabelsI18n } from '../../../shared/constants/app.constants'; +import { Icons } from '../../../shared/enum/icons.enum'; import { CdFormBuilder } from '../../../shared/forms/cd-form-builder'; import { CdFormGroup } from '../../../shared/forms/cd-form-group'; import { CdValidators } from '../../../shared/forms/cd-validators'; @@ -43,6 +44,7 @@ export class NfsFormComponent implements OnInit { allClusters: string[] = null; allDaemons = {}; + icons = Icons; allFsals: any[] = []; allRgwUsers: any[] = []; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-list/nfs-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-list/nfs-list.component.ts index 14cbe2d664b9..3ea15378760d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-list/nfs-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-list/nfs-list.component.ts @@ -10,6 +10,7 @@ import { CriticalConfirmationModalComponent } from '../../../shared/components/c import { ActionLabelsI18n } from '../../../shared/constants/app.constants'; import { TableComponent } from '../../../shared/datatable/table/table.component'; import { CellTemplate } from '../../../shared/enum/cell-template.enum'; +import { Icons } from '../../../shared/enum/icons.enum'; import { ViewCacheStatus } from '../../../shared/enum/view-cache-status.enum'; import { CdTableAction } from '../../../shared/models/cd-table-action'; import { CdTableColumn } from '../../../shared/models/cd-table-column'; @@ -74,7 +75,7 @@ export class NfsListComponent implements OnInit, OnDestroy { const createAction: CdTableAction = { permission: 'create', - icon: 'fa-plus', + icon: Icons.add, routerLink: () => '/nfs/create', canBePrimary: (selection: CdTableSelection) => !selection.hasSingleSelection, name: this.actionLabels.CREATE @@ -82,14 +83,14 @@ export class NfsListComponent implements OnInit, OnDestroy { const editAction: CdTableAction = { permission: 'update', - icon: 'fa-pencil', + icon: Icons.edit, routerLink: () => `/nfs/edit/${getNfsUri()}`, name: this.actionLabels.EDIT }; const deleteAction: CdTableAction = { permission: 'delete', - icon: 'fa-times', + icon: Icons.destroy, click: () => this.deleteNfsModal(), name: this.actionLabels.DELETE }; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.html index ad9dca78e350..f958aaa2a4ea 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.html @@ -1,7 +1,7 @@

- + Loading...

- @@ -229,21 +229,21 @@ id="ecp-info-button" type="button" (click)="data.erasureInfo = !data.erasureInfo"> - diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.ts index b6f57ee9a826..6dc726e03d18 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.ts @@ -11,6 +11,7 @@ import { ErasureCodeProfileService } from '../../../shared/api/erasure-code-prof import { PoolService } from '../../../shared/api/pool.service'; import { CriticalConfirmationModalComponent } from '../../../shared/components/critical-confirmation-modal/critical-confirmation-modal.component'; import { ActionLabelsI18n, URLVerbs } from '../../../shared/constants/app.constants'; +import { Icons } from '../../../shared/enum/icons.enum'; import { CdFormGroup } from '../../../shared/forms/cd-form-group'; import { CdValidators } from '../../../shared/forms/cd-validators'; import { @@ -65,6 +66,7 @@ export class PoolFormComponent implements OnInit { currentConfigurationValues: { [configKey: string]: any } = {}; action: string; resource: string; + icons = Icons; constructor( private dimlessBinaryPipe: DimlessBinaryPipe, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.ts index 78586e69bbd0..2a1f57059ab3 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.ts @@ -10,6 +10,7 @@ import { CriticalConfirmationModalComponent } from '../../../shared/components/c import { ActionLabelsI18n, URLVerbs } from '../../../shared/constants/app.constants'; import { TableComponent } from '../../../shared/datatable/table/table.component'; import { CellTemplate } from '../../../shared/enum/cell-template.enum'; +import { Icons } from '../../../shared/enum/icons.enum'; import { ViewCacheStatus } from '../../../shared/enum/view-cache-status.enum'; import { CdTableAction } from '../../../shared/models/cd-table-action'; import { CdTableColumn } from '../../../shared/models/cd-table-column'; @@ -74,20 +75,20 @@ export class PoolListComponent implements OnInit { this.tableActions = [ { permission: 'create', - icon: 'fa-plus', + icon: Icons.add, routerLink: () => this.urlBuilder.getCreate(), name: this.actionLabels.CREATE }, { permission: 'update', - icon: 'fa-pencil', + icon: Icons.edit, routerLink: () => this.urlBuilder.getEdit(encodeURIComponent(this.selection.first().pool_name)), name: this.actionLabels.EDIT }, { permission: 'delete', - icon: 'fa-trash-o', + icon: Icons.destroy, click: () => this.deletePoolModal(), name: this.actionLabels.DELETE, disable: () => !this.selection.first() || !this.monAllowPoolDelete, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-list/rgw-bucket-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-list/rgw-bucket-list.component.ts index 3923071d7a46..9ecabc9a31d7 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-list/rgw-bucket-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-list/rgw-bucket-list.component.ts @@ -8,6 +8,7 @@ import { RgwBucketService } from '../../../shared/api/rgw-bucket.service'; import { CriticalConfirmationModalComponent } from '../../../shared/components/critical-confirmation-modal/critical-confirmation-modal.component'; import { ActionLabelsI18n } from '../../../shared/constants/app.constants'; import { TableComponent } from '../../../shared/datatable/table/table.component'; +import { Icons } from '../../../shared/enum/icons.enum'; import { CdTableAction } from '../../../shared/models/cd-table-action'; import { CdTableColumn } from '../../../shared/models/cd-table-column'; import { CdTableFetchDataContext } from '../../../shared/models/cd-table-fetch-data-context'; @@ -59,19 +60,19 @@ export class RgwBucketListComponent { this.selection.first() && `${encodeURIComponent(this.selection.first().bid)}`; const addAction: CdTableAction = { permission: 'create', - icon: 'fa-plus', + icon: Icons.add, routerLink: () => this.urlBuilder.getCreate(), name: this.actionLabels.CREATE }; const editAction: CdTableAction = { permission: 'update', - icon: 'fa-pencil', + icon: Icons.edit, routerLink: () => this.urlBuilder.getEdit(getBucketUri()), name: this.actionLabels.EDIT }; const deleteAction: CdTableAction = { permission: 'delete', - icon: 'fa-times', + icon: Icons.destroy, click: () => this.deleteAction(), name: this.actionLabels.DELETE }; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-details/rgw-user-details.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-details/rgw-user-details.component.html index c58445e09508..da3de2e77de8 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-details/rgw-user-details.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-details/rgw-user-details.component.html @@ -152,7 +152,7 @@ class="btn btn-sm btn-primary" [disabled]="!keysSelection.hasSingleSelection" (click)="showKeyModal()"> - + Show
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-details/rgw-user-details.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-details/rgw-user-details.component.ts index daa2ff74eaae..767ddeb6e5d8 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-details/rgw-user-details.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-details/rgw-user-details.component.ts @@ -5,6 +5,7 @@ import * as _ from 'lodash'; import { BsModalService } from 'ngx-bootstrap/modal'; import { RgwUserService } from '../../../shared/api/rgw-user.service'; +import { Icons } from '../../../shared/enum/icons.enum'; import { CdTableColumn } from '../../../shared/models/cd-table-column'; import { CdTableSelection } from '../../../shared/models/cd-table-selection'; import { RgwUserS3Key } from '../models/rgw-user-s3-key'; @@ -34,6 +35,8 @@ export class RgwUserDetailsComponent implements OnChanges, OnInit { keysColumns: CdTableColumn[] = []; keysSelection: CdTableSelection = new CdTableSelection(); + icons = Icons; + constructor( private rgwUserService: RgwUserService, private bsModalService: BsModalService, 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 12dd06c55941..b7dda481c515 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 @@ -215,7 +215,7 @@
- + - + - +
@@ -253,7 +253,7 @@
@@ -277,7 +277,7 @@
- + - +
@@ -307,7 +307,7 @@
@@ -327,7 +327,7 @@
- + - +
@@ -362,7 +362,7 @@
- + - +
@@ -392,7 +392,7 @@
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.ts index 9ecf7eccedc3..aa973270a202 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.ts @@ -9,6 +9,7 @@ import { concat as observableConcat, forkJoin as observableForkJoin, Observable import { RgwUserService } from '../../../shared/api/rgw-user.service'; import { ActionLabelsI18n, URLVerbs } from '../../../shared/constants/app.constants'; +import { Icons } from '../../../shared/enum/icons.enum'; import { NotificationType } from '../../../shared/enum/notification-type.enum'; import { CdFormBuilder } from '../../../shared/forms/cd-form-builder'; import { CdFormGroup } from '../../../shared/forms/cd-form-group'; @@ -35,7 +36,7 @@ export class RgwUserFormComponent implements OnInit { error = false; loading = false; submitObservables: Observable[] = []; - + icons = Icons; subusers: RgwUserSubuser[] = []; s3Keys: RgwUserS3Key[] = []; swiftKeys: RgwUserSwiftKey[] = []; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-list/rgw-user-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-list/rgw-user-list.component.ts index 7a6789f4b896..06fe38571ca4 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-list/rgw-user-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-list/rgw-user-list.component.ts @@ -9,6 +9,7 @@ import { CriticalConfirmationModalComponent } from '../../../shared/components/c import { ActionLabelsI18n } from '../../../shared/constants/app.constants'; import { TableComponent } from '../../../shared/datatable/table/table.component'; import { CellTemplate } from '../../../shared/enum/cell-template.enum'; +import { Icons } from '../../../shared/enum/icons.enum'; import { CdTableAction } from '../../../shared/models/cd-table-action'; import { CdTableColumn } from '../../../shared/models/cd-table-column'; import { CdTableFetchDataContext } from '../../../shared/models/cd-table-fetch-data-context'; @@ -77,19 +78,19 @@ export class RgwUserListComponent { this.selection.first() && `${encodeURIComponent(this.selection.first().uid)}`; const addAction: CdTableAction = { permission: 'create', - icon: 'fa-plus', + icon: Icons.add, routerLink: () => this.urlBuilder.getCreate(), name: this.actionLabels.CREATE }; const editAction: CdTableAction = { permission: 'update', - icon: 'fa-pencil', + icon: Icons.edit, routerLink: () => this.urlBuilder.getEdit(getUserUri()), name: this.actionLabels.EDIT }; const deleteAction: CdTableAction = { permission: 'delete', - icon: 'fa-times', + icon: Icons.destroy, click: () => this.deleteAction(), name: this.actionLabels.DELETE }; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-list/role-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-list/role-list.component.ts index 49b9c2ac468c..7c3e59981506 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-list/role-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-list/role-list.component.ts @@ -9,6 +9,7 @@ import { ScopeService } from '../../../shared/api/scope.service'; import { CriticalConfirmationModalComponent } from '../../../shared/components/critical-confirmation-modal/critical-confirmation-modal.component'; import { ActionLabelsI18n } from '../../../shared/constants/app.constants'; import { CellTemplate } from '../../../shared/enum/cell-template.enum'; +import { Icons } from '../../../shared/enum/icons.enum'; import { NotificationType } from '../../../shared/enum/notification-type.enum'; import { CdTableAction } from '../../../shared/models/cd-table-action'; import { CdTableColumn } from '../../../shared/models/cd-table-column'; @@ -51,13 +52,13 @@ export class RoleListComponent implements OnInit { this.permission = this.authStorageService.getPermissions().user; const addAction: CdTableAction = { permission: 'create', - icon: 'fa-plus', + icon: Icons.add, routerLink: () => this.urlBuilder.getCreate(), name: this.actionLabels.CREATE }; const editAction: CdTableAction = { permission: 'update', - icon: 'fa-pencil', + icon: Icons.edit, disable: () => !this.selection.hasSingleSelection || this.selection.first().system, routerLink: () => this.selection.first() && this.urlBuilder.getEdit(this.selection.first().name), @@ -65,7 +66,7 @@ export class RoleListComponent implements OnInit { }; const deleteAction: CdTableAction = { permission: 'delete', - icon: 'fa-times', + icon: Icons.destroy, disable: () => !this.selection.hasSingleSelection || this.selection.first().system, click: () => this.deleteRoleModal(), name: this.actionLabels.DELETE diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-list/user-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-list/user-list.component.ts index 060b9a90a200..3499dcb2d5f5 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-list/user-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-list/user-list.component.ts @@ -6,6 +6,7 @@ import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal'; import { UserService } from '../../../shared/api/user.service'; import { CriticalConfirmationModalComponent } from '../../../shared/components/critical-confirmation-modal/critical-confirmation-modal.component'; import { ActionLabelsI18n } from '../../../shared/constants/app.constants'; +import { Icons } from '../../../shared/enum/icons.enum'; import { NotificationType } from '../../../shared/enum/notification-type.enum'; import { CdTableAction } from '../../../shared/models/cd-table-action'; import { CdTableColumn } from '../../../shared/models/cd-table-column'; @@ -49,20 +50,20 @@ export class UserListComponent implements OnInit { this.permission = this.authStorageService.getPermissions().user; const addAction: CdTableAction = { permission: 'create', - icon: 'fa-plus', + icon: Icons.add, routerLink: () => this.urlBuilder.getCreate(), name: this.actionLabels.CREATE }; const editAction: CdTableAction = { permission: 'update', - icon: 'fa-pencil', + icon: Icons.edit, routerLink: () => this.selection.first() && this.urlBuilder.getEdit(this.selection.first().username), name: this.actionLabels.EDIT }; const deleteAction: CdTableAction = { permission: 'delete', - icon: 'fa-times', + icon: Icons.destroy, click: () => this.deleteUserModal(), name: this.actionLabels.DELETE }; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/forbidden/forbidden.component.html b/src/pybind/mgr/dashboard/frontend/src/app/core/forbidden/forbidden.component.html index ba06ebe97c31..81ea8c0aaa42 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/forbidden/forbidden.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/forbidden/forbidden.component.html @@ -2,7 +2,7 @@

Forbidden

- +

Sorry, you are not allowed to see what you were looking for.

diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/forbidden/forbidden.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/forbidden/forbidden.component.ts index 8b70d3ee7e52..45bd73c90898 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/forbidden/forbidden.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/forbidden/forbidden.component.ts @@ -1,4 +1,5 @@ import { Component } from '@angular/core'; +import { Icons } from '../../shared/enum/icons.enum'; @Component({ selector: 'cd-forbidden', @@ -6,5 +7,6 @@ import { Component } from '@angular/core'; styleUrls: ['./forbidden.component.scss'] }) export class ForbiddenComponent { + icons = Icons; constructor() {} } diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/administration/administration.component.html b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/administration/administration.component.html index 1dd555563f38..68a9e1085496 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/administration/administration.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/administration/administration.component.html @@ -5,7 +5,7 @@ data-toggle="dropdown" i18n-title title="Dashboard Settings"> - + Dashboard Settings diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/administration/administration.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/administration/administration.component.ts index eacef89848d6..ccb6ec80f215 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/administration/administration.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/administration/administration.component.ts @@ -1,5 +1,6 @@ import { Component, OnInit } from '@angular/core'; +import { Icons } from '../../../shared/enum/icons.enum'; import { Permission } from '../../../shared/models/permissions'; import { AuthStorageService } from '../../../shared/services/auth-storage.service'; @@ -10,6 +11,7 @@ import { AuthStorageService } from '../../../shared/services/auth-storage.servic }) export class AdministrationComponent implements OnInit { userPermission: Permission; + icons = Icons; constructor(private authStorageService: AuthStorageService) { this.userPermission = this.authStorageService.getPermissions().user; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/dashboard-help/dashboard-help.component.html b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/dashboard-help/dashboard-help.component.html index 02c7ad9c8270..0cbfd5f7998b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/dashboard-help/dashboard-help.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/dashboard-help/dashboard-help.component.html @@ -8,7 +8,7 @@ data-toggle="dropdown" i18n-title title="Help"> - + Help diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/dashboard-help/dashboard-help.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/dashboard-help/dashboard-help.component.ts index bf7f1b574e1d..4478508190d8 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/dashboard-help/dashboard-help.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/dashboard-help/dashboard-help.component.ts @@ -2,6 +2,7 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal'; +import { Icons } from '../../../shared/enum/icons.enum'; import { CephReleaseNamePipe } from '../../../shared/pipes/ceph-release-name.pipe'; import { AuthStorageService } from '../../../shared/services/auth-storage.service'; import { SummaryService } from '../../../shared/services/summary.service'; @@ -17,6 +18,7 @@ export class DashboardHelpComponent implements OnInit { docsFormElement; docsUrl: string; modalRef: BsModalRef; + icons = Icons; constructor( private summaryService: SummaryService, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/identity/identity.component.html b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/identity/identity.component.html index ad62aaf38684..1eda7d06f830 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/identity/identity.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/identity/identity.component.html @@ -4,7 +4,7 @@ data-toggle="dropdown" i18n-title title="Logged in user"> - + Logged in user @@ -23,7 +23,7 @@
  • - + Sign out
  • diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/identity/identity.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/identity/identity.component.ts index ccc31cd22c90..54d1a277f0a8 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/identity/identity.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/identity/identity.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { AuthService } from '../../../shared/api/auth.service'; +import { Icons } from '../../../shared/enum/icons.enum'; import { AuthStorageService } from '../../../shared/services/auth-storage.service'; @Component({ @@ -10,6 +11,7 @@ import { AuthStorageService } from '../../../shared/services/auth-storage.servic }) export class IdentityComponent implements OnInit { username: string; + icons = Icons; constructor(private authStorageService: AuthStorageService, private authService: AuthService) {} diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.html b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.html index 67b30c719f92..5ee7508d3712 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.html @@ -30,7 +30,7 @@
  • - Dashboard diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.ts index 5f8d1f5a7e96..85154c3a7afd 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { PrometheusService } from '../../../shared/api/prometheus.service'; +import { Icons } from '../../../shared/enum/icons.enum'; import { Permissions } from '../../../shared/models/permissions'; import { AuthStorageService } from '../../../shared/services/auth-storage.service'; import { @@ -17,6 +18,7 @@ import { SummaryService } from '../../../shared/services/summary.service'; export class NavigationComponent implements OnInit { permissions: Permissions; summaryData: any; + icons = Icons; isCollapsed = true; prometheusConfigured = false; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notifications/notifications.component.html b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notifications/notifications.component.html index 9e73409d9985..43d00cf818bc 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notifications/notifications.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notifications/notifications.component.html @@ -1,7 +1,7 @@
    @@ -10,9 +10,9 @@
    - - - + + + @@ -51,7 +51,7 @@ outsideClick="true" i18n-title title="Recent Notifications"> - + Recent Notifications diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notifications/notifications.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notifications/notifications.component.ts index d3dd47a13ef5..a51882fb905f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notifications/notifications.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notifications/notifications.component.ts @@ -2,6 +2,7 @@ import { Component, NgZone, OnDestroy, OnInit } from '@angular/core'; import * as _ from 'lodash'; +import { Icons } from '../../../shared/enum/icons.enum'; import { CdNotification } from '../../../shared/models/cd-notification'; import { AuthStorageService } from '../../../shared/services/auth-storage.service'; import { NotificationService } from '../../../shared/services/notification.service'; @@ -16,6 +17,7 @@ import { PrometheusNotificationService } from '../../../shared/services/promethe export class NotificationsComponent implements OnInit, OnDestroy { notifications: CdNotification[]; private interval: number; + icons = Icons; constructor( public notificationService: NotificationService, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/task-manager/task-manager.component.html b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/task-manager/task-manager.component.html index dae575808032..987c63c7de1d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/task-manager/task-manager.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/task-manager/task-manager.component.html @@ -7,9 +7,9 @@ @@ -33,15 +33,15 @@ @@ -77,8 +77,7 @@ outsideClick="true" i18n-title title="Background Tasks"> - + Background Tasks ({{ executingTasks.length }}) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/task-manager/task-manager.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/task-manager/task-manager.component.ts index 3eb58985ee67..c23bbcde119c 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/task-manager/task-manager.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/task-manager/task-manager.component.ts @@ -1,5 +1,7 @@ import { Component, OnInit } from '@angular/core'; +import * as _ from 'lodash'; +import { Icons } from '../../../shared/enum/icons.enum'; import { ExecutingTask } from '../../../shared/models/executing-task'; import { FinishedTask } from '../../../shared/models/finished-task'; import { SummaryService } from '../../../shared/services/summary.service'; @@ -14,7 +16,8 @@ export class TaskManagerComponent implements OnInit { executingTasks: ExecutingTask[] = []; finishedTasks: FinishedTask[] = []; - icon = 'fa-hourglass-o'; + icons = Icons; + icon = _.join([this.icons.hourglass], ' '); constructor( private summaryService: SummaryService, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/config-option/config-option.component.html b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/config-option/config-option.component.html index 0db04413d97b..37c4663ec6a2 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/config-option/config-option.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/config-option/config-option.component.html @@ -48,7 +48,7 @@ title="Remove the custom configuration value. The default configuration will be inherited and used instead." (click)="resetValue(option.name)" i18n-title> - diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/config-option/config-option.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/config-option/config-option.component.ts index e9d6a116c9c9..07eaf3362f28 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/config-option/config-option.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/config-option/config-option.component.ts @@ -3,6 +3,7 @@ import { FormControl, NgForm } from '@angular/forms'; import * as _ from 'lodash'; +import { Icons } from '../../../shared/enum/icons.enum'; import { ConfigurationService } from '../../api/configuration.service'; import { CdFormGroup } from '../../forms/cd-form-group'; import { ConfigOptionTypes } from './config-option.types'; @@ -24,6 +25,7 @@ export class ConfigOptionComponent implements OnInit { @Input() optionsFormShowReset = true; + icons: Icons; options: Array = []; optionsFormGroup: CdFormGroup = new CdFormGroup({}); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/error-panel/error-panel.component.html b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/error-panel/error-panel.component.html index 962a0ca264f1..b60ccc3e3068 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/error-panel/error-panel.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/error-panel/error-panel.component.html @@ -3,7 +3,7 @@
    - - - + + + {{ executingTask.description }}
    - - - + + + - - - + + +
    - diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/error-panel/error-panel.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/error-panel/error-panel.component.ts index 85ccef2c43bb..56b322158e45 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/error-panel/error-panel.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/error-panel/error-panel.component.ts @@ -1,4 +1,5 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; +import { Icons } from '../../../shared/enum/icons.enum'; @Component({ selector: 'cd-error-panel', @@ -19,4 +20,6 @@ export class ErrorPanelComponent { */ @Output() backAction = new EventEmitter(); + + icons = Icons; } diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.html b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.html index 61fccbc61616..51ecf44445a9 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.html @@ -34,7 +34,7 @@ i18n-title title="Reset Settings" (click)="reset()"> - +
    diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.ts index 1a2656e00ca3..a813653ee9e7 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.ts @@ -3,6 +3,7 @@ import { DomSanitizer, SafeUrl } from '@angular/platform-browser'; import { I18n } from '@ngx-translate/i18n-polyfill'; +import { Icons } from '../../../shared/enum/icons.enum'; import { CephReleaseNamePipe } from '../../../shared/pipes/ceph-release-name.pipe'; import { SummaryService } from '../../../shared/services/summary.service'; import { SettingsService } from '../../api/settings.service'; @@ -27,6 +28,7 @@ export class GrafanaComponent implements OnInit, OnChanges { dashboardExist = true; time: string; grafanaTimes: any; + icons = Icons; readonly DEFAULT_TIME: string = 'from=now-1h&to=now'; @Input() diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/helper/helper.component.html b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/helper/helper.component.html index 408e47c2aa6a..2d93cb7b2d5f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/helper/helper.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/helper/helper.component.html @@ -2,7 +2,7 @@
    -
    - diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/info-panel/info-panel.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/info-panel/info-panel.component.ts index ce0ef7ffe274..a5427d9f1ed2 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/info-panel/info-panel.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/info-panel/info-panel.component.ts @@ -1,6 +1,7 @@ import { Component, Input } from '@angular/core'; import { I18n } from '@ngx-translate/i18n-polyfill'; +import { Icons } from '../../../shared/enum/icons.enum'; @Component({ selector: 'cd-info-panel', @@ -15,5 +16,7 @@ export class InfoPanelComponent { @Input() title = this.i18n('Information'); + icons = Icons; + constructor(private i18n: I18n) {} } diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.html b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.html index 4aca235703a2..651801c7e554 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.html @@ -1,6 +1,6 @@ - diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.ts index 17d02a764190..3fe95f07f811 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.ts @@ -1,8 +1,11 @@ import { Component } from '@angular/core'; +import { Icons } from '../../../shared/enum/icons.enum'; @Component({ selector: 'cd-loading-panel', templateUrl: './loading-panel.component.html', styleUrls: ['./loading-panel.component.scss'] }) -export class LoadingPanelComponent {} +export class LoadingPanelComponent { + icons = Icons; +} 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 d7f5517955de..02c5458f8144 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,7 +7,7 @@ [customBadgeValidators]="customBadgeValidators" elemClass="margin-right-sm select-menu-edit" (selection)="selection.emit($event)"> - + @@ -15,7 +15,7 @@ {{ dataItem }} - diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select-badges/select-badges.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select-badges/select-badges.component.ts index c275095eaec3..5affcc192323 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select-badges/select-badges.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select-badges/select-badges.component.ts @@ -4,6 +4,7 @@ import { ValidatorFn } from '@angular/forms'; import { I18n } from '@ngx-translate/i18n-polyfill'; import * as _ from 'lodash'; +import { Icons } from '../../../shared/enum/icons.enum'; import { SelectMessages } from '../select/select-messages.model'; import { SelectOption } from '../select/select-option.model'; @@ -32,5 +33,7 @@ export class SelectBadgesComponent { @ViewChild('cdSelect') cdSelect; + icons = Icons; + constructor(private i18n: I18n) {} } diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select/select.component.html b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select/select.component.html index 72682dbd342a..6a58995894ce 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select/select.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select/select.component.html @@ -23,7 +23,7 @@ [ngClass]="{'help-block disabled': (data.length === selectionLimit || !option.enabled) && !option.selected}" (click)="triggerSelection(option)">
    -   @@ -42,7 +42,7 @@ class="select-menu-item" (click)="addCustomOption(filter.value)">
    -  
    diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select/select.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select/select.component.ts index 1728acb5ab6f..ad3a97c09a3c 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select/select.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select/select.component.ts @@ -4,6 +4,7 @@ import { FormControl, ValidatorFn } from '@angular/forms'; import { I18n } from '@ngx-translate/i18n-polyfill'; import * as _ from 'lodash'; +import { Icons } from '../../../shared/enum/icons.enum'; import { CdFormGroup } from '../../forms/cd-form-group'; import { SelectMessages } from './select-messages.model'; import { SelectOption } from './select-option.model'; @@ -36,6 +37,7 @@ export class SelectComponent implements OnInit, OnChanges { filter: FormControl; Object = Object; filteredOptions: Array = []; + icons = Icons; constructor(private i18n: I18n) {} diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/submit-button/submit-button.component.html b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/submit-button/submit-button.component.html index c5750e7276b3..94604fefec11 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/submit-button/submit-button.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/submit-button/submit-button.component.html @@ -4,6 +4,6 @@ (click)="submit($event)"> - + diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/submit-button/submit-button.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/submit-button/submit-button.component.ts index 1b98d67effe4..9e9f75f04f65 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/submit-button/submit-button.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/submit-button/submit-button.component.ts @@ -1,5 +1,6 @@ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { AbstractControl, FormGroup, FormGroupDirective, NgForm } from '@angular/forms'; +import { Icons } from '../../../shared/enum/icons.enum'; import * as _ from 'lodash'; @@ -37,6 +38,7 @@ export class SubmitButtonComponent implements OnInit { disabled = false; loading = false; + icons = Icons; constructor(private elRef: ElementRef) {} diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/warning-panel/warning-panel.component.html b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/warning-panel/warning-panel.component.html index cf9bc8cbe14d..2592112bff03 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/warning-panel/warning-panel.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/warning-panel/warning-panel.component.html @@ -2,7 +2,7 @@
    - diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/warning-panel/warning-panel.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/warning-panel/warning-panel.component.ts index cdbf71f31669..e29e9feebbc0 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/warning-panel/warning-panel.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/warning-panel/warning-panel.component.ts @@ -1,4 +1,5 @@ import { Component, Input } from '@angular/core'; +import { Icons } from '../../../shared/enum/icons.enum'; @Component({ selector: 'cd-warning-panel', @@ -12,4 +13,6 @@ export class WarningPanelComponent { */ @Input() title = 'Warning'; + + icons = Icons; } 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 57761eb1f8f2..89e37e6f948c 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 @@ -6,7 +6,7 @@ [ngClass]="{'disabled': disableSelectionAction(action)}" (click)="useClickAction(action)" [routerLink]="useRouterLink(action)"> - {{ action.name }} + {{ action.name }} @@ -53,7 +53,7 @@ - +