From 673f6961cfb67161b7e678abee798d21d552d42c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alfonso=20Mart=C3=ADnez?= Date: Wed, 19 Aug 2020 16:39:53 +0200 Subject: [PATCH] mgr/dashboard: use SASS colors in TypeScript MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit NOTE: Enabled TS compiler option esModuleInterop for the unit tests to pass, which is also highly recommended: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-7.html#support-for-import-d-from-cjs-from-commonjs-modules-with---esmoduleinterop This implied updating lodash & momentjs imports (unneeded ones have been removed). Fixes: https://tracker.ceph.com/issues/47036 Signed-off-by: Alfonso Martínez --- .../mgr/dashboard/frontend/.stylelintrc | 10 ++++- .../mgr/dashboard/frontend/package-lock.json | 26 +++++++----- .../mgr/dashboard/frontend/package.json | 4 ++ .../frontend/src/app/app-routing.module.ts | 2 +- .../iscsi-target-details.component.spec.ts | 1 - .../iscsi-target-details.component.ts | 2 +- .../iscsi-target-form.component.ts | 2 +- ...i-target-image-settings-modal.component.ts | 2 +- ...csi-target-iqn-settings-modal.component.ts | 2 +- .../iscsi-target-list.component.ts | 2 +- .../bootstrap-create-modal.component.ts | 2 +- .../bootstrap-import-modal.component.ts | 2 +- .../ceph/block/rbd-form/rbd-form.component.ts | 2 +- .../ceph/block/rbd-list/rbd-list.component.ts | 2 +- .../rbd-namespace-list.component.ts | 1 - .../rbd-snapshot-actions.model.ts | 2 - .../rbd-snapshot-list.component.ts | 2 +- .../rbd-trash-list.component.spec.ts | 2 +- .../rbd-trash-list.component.ts | 4 +- .../rbd-trash-move-modal.component.spec.ts | 2 +- .../rbd-trash-move-modal.component.ts | 2 +- .../cephfs-chart/cephfs-chart.component.ts | 4 +- .../cephfs-detail/cephfs-detail.component.ts | 2 - .../cephfs-directories.component.ts | 4 +- .../cephfs-tabs/cephfs-tabs.component.spec.ts | 2 +- .../cephfs-tabs/cephfs-tabs.component.ts | 2 +- .../configuration-details.component.ts | 2 +- .../configuration-form.component.ts | 2 +- .../cluster/hosts/hosts.component.spec.ts | 1 - .../app/ceph/cluster/hosts/hosts.component.ts | 2 +- .../inventory-devices.component.spec.ts | 1 - .../inventory-devices.component.ts | 2 +- .../mgr-module-form.component.ts | 2 +- .../ceph/cluster/monitor/monitor.component.ts | 2 +- .../osd-creation-preview-modal.component.ts | 2 +- .../osd/osd-details/osd-details.component.ts | 2 +- .../osd-devices-selection-groups.component.ts | 2 +- .../osd-devices-selection-modal.component.ts | 2 +- .../osd-flags-modal.component.spec.ts | 2 +- .../osd-flags-modal.component.ts | 2 +- .../cluster/osd/osd-form/drive-group.model.ts | 2 +- .../osd/osd-form/osd-form.component.ts | 2 +- .../osd/osd-list/osd-list.component.spec.ts | 2 +- .../osd/osd-list/osd-list.component.ts | 2 +- .../osd-performance-histogram.component.ts | 2 +- .../osd-recv-speed-modal.component.spec.ts | 2 +- .../osd-recv-speed-modal.component.ts | 2 +- .../silence-form.component.spec.ts | 4 +- .../silence-form/silence-form.component.ts | 4 +- .../silence-matcher-modal.component.spec.ts | 2 +- .../silence-matcher-modal.component.ts | 2 +- .../service-daemon-list.component.spec.ts | 2 +- .../service-daemon-list.component.ts | 2 +- .../service-form.component.spec.ts | 2 +- .../service-form/service-form.component.ts | 2 +- .../telemetry/telemetry.component.spec.ts | 2 +- .../cluster/telemetry/telemetry.component.ts | 2 +- .../health-pie/health-pie.component.scss | 4 -- .../health-pie/health-pie.component.spec.ts | 10 ----- .../health-pie/health-pie.component.ts | 41 +++++-------------- .../dashboard/health/health.component.spec.ts | 2 +- .../ceph/dashboard/health/health.component.ts | 7 ++-- .../app/ceph/dashboard/mds-summary.pipe.ts | 2 +- .../app/ceph/dashboard/mgr-summary.pipe.ts | 2 +- .../app/ceph/dashboard/osd-summary.pipe.ts | 2 +- .../nfs-details/nfs-details.component.spec.ts | 2 +- .../nfs-form-client.component.ts | 2 +- .../ceph/nfs/nfs-form/nfs-form.component.ts | 2 +- .../ceph/nfs/nfs-list/nfs-list.component.ts | 2 +- .../crush-rule-form-modal.component.ts | 2 +- .../pool-details/pool-details.component.ts | 2 +- .../pool-form/pool-form.component.spec.ts | 2 +- .../pool/pool-form/pool-form.component.ts | 2 +- .../pool-list/pool-list.component.spec.ts | 2 +- .../pool/pool-list/pool-list.component.ts | 2 +- .../rgw-bucket-form.component.spec.ts | 2 +- .../rgw-bucket-form.component.ts | 2 +- .../rgw-bucket-list.component.ts | 2 +- .../rgw-daemon-details.component.ts | 2 +- .../rgw-user-capability-modal.component.ts | 2 +- .../rgw-user-details.component.ts | 2 +- .../rgw-user-form/rgw-user-form.component.ts | 2 +- .../rgw-user-s3-key-modal.component.ts | 2 +- .../rgw-user-subuser-modal.component.ts | 2 +- .../app/ceph/shared/pg-category.service.ts | 2 +- .../smart-list/smart-list.component.spec.ts | 2 +- .../shared/smart-list/smart-list.component.ts | 2 +- .../role-details/role-details.component.ts | 2 +- .../auth/role-form/role-form.component.ts | 2 +- .../auth/user-form/user-form.component.ts | 7 +--- .../user-password-form.component.ts | 2 +- .../app/shared/api/ceph-service.service.ts | 1 - .../src/app/shared/api/cephfs.service.ts | 2 +- .../app/shared/api/orchestrator.service.ts | 2 +- .../src/app/shared/api/osd.service.ts | 2 +- .../src/app/shared/api/rbd.service.ts | 2 +- .../src/app/shared/api/rgw-bucket.service.ts | 2 +- .../src/app/shared/api/rgw-user.service.ts | 2 +- .../src/app/shared/api/settings.service.ts | 2 +- .../crush.node.selection.class.spec.ts | 2 +- .../classes/crush.node.selection.class.ts | 2 +- .../config-option.component.spec.ts | 2 +- .../config-option/config-option.component.ts | 2 +- .../config-option/config-option.types.ts | 2 +- .../date-time-picker.component.ts | 2 +- .../form-modal/form-modal.component.ts | 2 +- .../language-selector.component.ts | 2 +- .../notifications-sidebar.component.ts | 4 +- .../select/select-messages.model.ts | 2 +- .../components/select/select.component.ts | 2 +- .../submit-button/submit-button.component.ts | 2 +- .../table-actions/table-actions.component.ts | 2 +- .../table-key-value.component.ts | 2 +- .../datatable/table/table.component.spec.ts | 2 +- .../shared/datatable/table/table.component.ts | 2 +- .../src/app/shared/decorators/cd-encode.ts | 2 +- .../shared/directives/autofocus.directive.ts | 2 +- .../dimless-binary-per-second.directive.ts | 2 +- .../directives/dimless-binary.directive.ts | 2 +- .../app/shared/directives/trim.directive.ts | 2 +- .../src/app/shared/enum/color.enum.ts | 10 +++-- .../src/app/shared/forms/cd-validators.ts | 2 +- .../src/app/shared/pipes/array.pipe.ts | 2 +- .../src/app/shared/pipes/cd-date.pipe.spec.ts | 2 +- .../app/shared/pipes/duration.pipe.spec.ts | 2 +- .../src/app/shared/pipes/duration.pipe.ts | 2 +- .../src/app/shared/pipes/empty.pipe.ts | 2 +- .../shared/pipes/health-color.pipe.spec.ts | 7 ++-- .../frontend/src/app/shared/pipes/map.pipe.ts | 2 +- .../shared/pipes/relative-date.pipe.spec.ts | 2 +- .../app/shared/pipes/relative-date.pipe.ts | 2 +- .../src/app/shared/pipes/round.pipe.ts | 2 +- .../src/app/shared/pipes/truncate.pipe.ts | 2 +- .../src/app/shared/pipes/upper-first.pipe.ts | 2 +- .../services/api-interceptor.service.ts | 2 +- .../shared/services/device.service.spec.ts | 2 +- .../src/app/shared/services/device.service.ts | 2 +- .../app/shared/services/formatter.service.ts | 2 +- .../services/notification.service.spec.ts | 2 +- .../shared/services/notification.service.ts | 2 +- .../services/password-policy.service.ts | 2 +- .../services/prometheus-alert-formatter.ts | 2 +- .../services/prometheus-alert.service.ts | 2 +- .../prometheus-notification.service.ts | 2 +- .../prometheus-silence-matcher.service.ts | 2 +- .../app/shared/services/summary.service.ts | 2 +- .../services/task-manager.service.spec.ts | 2 +- .../shared/services/task-manager.service.ts | 2 +- .../services/task-message.service.spec.ts | 2 +- .../app/shared/services/time-diff.service.ts | 2 +- .../mgr/dashboard/frontend/src/styles.scss | 21 ++++++++++ .../dashboard/frontend/src/styles.scss.d.ts | 25 +++++++++++ .../styles/defaults/_bootstrap-defaults.scss | 14 ------- .../mgr/dashboard/frontend/tsconfig.base.json | 1 + 154 files changed, 239 insertions(+), 235 deletions(-) create mode 100644 src/pybind/mgr/dashboard/frontend/src/styles.scss.d.ts diff --git a/src/pybind/mgr/dashboard/frontend/.stylelintrc b/src/pybind/mgr/dashboard/frontend/.stylelintrc index 244a8f22cdfc..c48d66dca19b 100644 --- a/src/pybind/mgr/dashboard/frontend/.stylelintrc +++ b/src/pybind/mgr/dashboard/frontend/.stylelintrc @@ -2,7 +2,7 @@ "extends": "stylelint-config-sass-guidelines", "plugins": [ "stylelint-declaration-use-variable" - ], + ], "rules": { "function-parentheses-space-inside": null, "indentation": null, @@ -32,6 +32,12 @@ ] } ] + ], + "property-no-unknown": [ + true, + { + "ignoreSelectors": [":export"] + } ] - } + } } diff --git a/src/pybind/mgr/dashboard/frontend/package-lock.json b/src/pybind/mgr/dashboard/frontend/package-lock.json index 48a6487d083d..c5a44ce9284e 100644 --- a/src/pybind/mgr/dashboard/frontend/package-lock.json +++ b/src/pybind/mgr/dashboard/frontend/package-lock.json @@ -8508,11 +8508,6 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, - "fsevents": { - "dev": true, - "optional": true, - "version": "2.1.3" - }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -8751,6 +8746,12 @@ "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", "dev": true }, + "harmony-reflect": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/harmony-reflect/-/harmony-reflect-1.6.1.tgz", + "integrity": "sha512-WJTeyp0JzGtHcuMsi7rw2VwtkvLa+JyfEKJCFyfcS0+CDkjQ5lHPu7zEhFZP+PDSRrEgXa5Ah0l1MbgbE41XjA==", + "dev": true + }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -9528,6 +9529,15 @@ "postcss": "^7.0.14" } }, + "identity-obj-proxy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/identity-obj-proxy/-/identity-obj-proxy-3.0.0.tgz", + "integrity": "sha1-lNK9qWCERT7zb7xarsN+D3nx/BQ=", + "dev": true, + "requires": { + "harmony-reflect": "^1.4.6" + } + }, "ieee754": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", @@ -13684,8 +13694,6 @@ } }, "fsevents": { - "dev": true, - "optional": true, "version": "2.1.3" }, "glob-parent": { @@ -22438,8 +22446,6 @@ } }, "fsevents": { - "dev": true, - "optional": true, "version": "2.1.3" }, "glob-parent": { @@ -23081,8 +23087,6 @@ } }, "fsevents": { - "dev": true, - "optional": true, "version": "2.1.3" }, "glob-parent": { diff --git a/src/pybind/mgr/dashboard/frontend/package.json b/src/pybind/mgr/dashboard/frontend/package.json index 48c21d829147..16b7f29c3a6b 100644 --- a/src/pybind/mgr/dashboard/frontend/package.json +++ b/src/pybind/mgr/dashboard/frontend/package.json @@ -42,6 +42,9 @@ }, "private": true, "jest": { + "moduleNameMapper": { + "\\.scss$": "identity-obj-proxy" + }, "preset": "jest-preset-angular", "setupFilesAfterEnv": [ "/src/setupJest.ts" @@ -117,6 +120,7 @@ "cypress": "4.12.1", "html-linter": "1.1.1", "htmllint-cli": "0.0.7", + "identity-obj-proxy": "3.0.0", "jest": "26.3.0", "jest-canvas-mock": "2.2.0", "jest-preset-angular": "8.2.1", diff --git a/src/pybind/mgr/dashboard/frontend/src/app/app-routing.module.ts b/src/pybind/mgr/dashboard/frontend/src/app/app-routing.module.ts index 12330c96b319..ad65a0783478 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/app-routing.module.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/app-routing.module.ts @@ -1,7 +1,7 @@ import { Injectable, NgModule } from '@angular/core'; import { ActivatedRouteSnapshot, PreloadAllModules, RouterModule, Routes } from '@angular/router'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { CephfsListComponent } from './ceph/cephfs/cephfs-list/cephfs-list.component'; import { ConfigurationFormComponent } from './ceph/cluster/configuration/configuration-form/configuration-form.component'; 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 e0cef596b6a3..f671da3807d5 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 @@ -2,7 +2,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { TreeModel, TreeModule } from 'angular-tree-component'; -import * as _ from 'lodash'; import { configureTestBed } from '../../../../testing/unit-test-helper'; import { SharedModule } from '../../../shared/shared.module'; 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 983efd4580c5..f6bc232e27de 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 @@ -7,7 +7,7 @@ import { TreeNode, TREE_ACTIONS } from 'angular-tree-component'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { TableComponent } from '../../../shared/datatable/table/table.component'; import { Icons } from '../../../shared/enum/icons.enum'; 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 41d67ca87b24..eefb0bca28fa 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 @@ -3,7 +3,7 @@ import { FormArray, FormControl, Validators } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { forkJoin } from 'rxjs'; import { IscsiService } from '../../../shared/api/iscsi.service'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-image-settings-modal/iscsi-target-image-settings-modal.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-image-settings-modal/iscsi-target-image-settings-modal.component.ts index 36d2e70f0d57..e78194b64292 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-image-settings-modal/iscsi-target-image-settings-modal.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-image-settings-modal/iscsi-target-image-settings-modal.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { AbstractControl, FormControl } from '@angular/forms'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { IscsiService } from '../../../shared/api/iscsi.service'; import { CdFormGroup } from '../../../shared/forms/cd-form-group'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-iqn-settings-modal/iscsi-target-iqn-settings-modal.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-iqn-settings-modal/iscsi-target-iqn-settings-modal.component.ts index dcb7a754c409..fae1142d2965 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-iqn-settings-modal/iscsi-target-iqn-settings-modal.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-iqn-settings-modal/iscsi-target-iqn-settings-modal.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { FormControl } from '@angular/forms'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { IscsiService } from '../../../shared/api/iscsi.service'; import { CdFormGroup } from '../../../shared/forms/cd-form-group'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-list/iscsi-target-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-list/iscsi-target-list.component.ts index 1d7559f72857..a6c82055ac25 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-list/iscsi-target-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-list/iscsi-target-list.component.ts @@ -1,7 +1,7 @@ import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core'; import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { Subscription } from 'rxjs'; import { IscsiService } from '../../../shared/api/iscsi.service'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/bootstrap-create-modal/bootstrap-create-modal.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/bootstrap-create-modal/bootstrap-create-modal.component.ts index 16c52e7d36f5..fba654f366e6 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/bootstrap-create-modal/bootstrap-create-modal.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/bootstrap-create-modal/bootstrap-create-modal.component.ts @@ -2,7 +2,7 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { concat, forkJoin, Subscription } from 'rxjs'; import { last, tap } from 'rxjs/operators'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/bootstrap-import-modal/bootstrap-import-modal.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/bootstrap-import-modal/bootstrap-import-modal.component.ts index e534596d107a..ee58c3657869 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/bootstrap-import-modal/bootstrap-import-modal.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/bootstrap-import-modal/bootstrap-import-modal.component.ts @@ -2,7 +2,7 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { concat, forkJoin, Observable, Subscription } from 'rxjs'; import { last } from 'rxjs/operators'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-form/rbd-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-form/rbd-form.component.ts index f1ae32730719..c4146a088e20 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-form/rbd-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-form/rbd-form.component.ts @@ -2,7 +2,7 @@ import { Component, EventEmitter, OnInit } from '@angular/core'; import { FormControl, ValidatorFn, Validators } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { forkJoin, Observable, ReplaySubject } from 'rxjs'; import { first, switchMap } from 'rxjs/operators'; 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 3bc1bcc8af93..70be703fdf43 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 @@ -1,7 +1,7 @@ import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core'; import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { RbdService } from '../../../shared/api/rbd.service'; import { ListWithDetails } from '../../../shared/classes/list-with-details.class'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-list/rbd-namespace-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-list/rbd-namespace-list.component.ts index cd66c7cf9c47..706a91be580d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-list/rbd-namespace-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-list/rbd-namespace-list.component.ts @@ -1,7 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; import { forkJoin, Observable } from 'rxjs'; import { PoolService } from '../../../shared/api/pool.service'; 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 c966c52974bb..396bd45eb0c5 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,5 +1,3 @@ -import * as _ from 'lodash'; - import { ActionLabelsI18n } from '../../../shared/constants/app.constants'; import { Icons } from '../../../shared/enum/icons.enum'; import { CdTableAction } from '../../../shared/models/cd-table-action'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.ts index 1559a9854f9e..d2d7378a8f58 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.ts @@ -1,7 +1,7 @@ import { Component, Input, OnChanges, OnInit, TemplateRef, ViewChild } from '@angular/core'; import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; -import * as moment from 'moment'; +import moment from 'moment'; import { of } from 'rxjs'; import { RbdService } from '../../../shared/api/rbd.service'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-list/rbd-trash-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-list/rbd-trash-list.component.spec.ts index d975a1c41289..52192d79f51d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-list/rbd-trash-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-list/rbd-trash-list.component.spec.ts @@ -5,7 +5,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; -import * as moment from 'moment'; +import moment from 'moment'; import { ToastrModule } from 'ngx-toastr'; import { of } from 'rxjs'; 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 f6743c6607e7..cdd39f37845a 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 @@ -1,8 +1,8 @@ import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core'; import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; -import * as moment from 'moment'; +import _ from 'lodash'; +import moment from 'moment'; import { RbdService } from '../../../shared/api/rbd.service'; import { TableStatusViewCache } from '../../../shared/classes/table-status-view-cache'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-move-modal/rbd-trash-move-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-move-modal/rbd-trash-move-modal.component.spec.ts index 22fc800585ce..8f9291f229c0 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-move-modal/rbd-trash-move-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-move-modal/rbd-trash-move-modal.component.spec.ts @@ -4,7 +4,7 @@ import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal, NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap'; -import * as moment from 'moment'; +import moment from 'moment'; import { ToastrModule } from 'ngx-toastr'; import { configureTestBed } from '../../../../testing/unit-test-helper'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-move-modal/rbd-trash-move-modal.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-move-modal/rbd-trash-move-modal.component.ts index ba1ccbed0c65..f7c491238681 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-move-modal/rbd-trash-move-modal.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-move-modal/rbd-trash-move-modal.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import * as moment from 'moment'; +import moment from 'moment'; import { RbdService } from '../../../shared/api/rbd.service'; import { CdFormBuilder } from '../../../shared/forms/cd-form-builder'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-chart/cephfs-chart.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-chart/cephfs-chart.component.ts index 61dbc974fe1f..286982f8f2e1 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-chart/cephfs-chart.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-chart/cephfs-chart.component.ts @@ -1,8 +1,8 @@ import { Component, ElementRef, Input, OnChanges, OnInit, ViewChild } from '@angular/core'; import { ChartDataSets, ChartOptions, ChartPoint, ChartType } from 'chart.js'; -import * as _ from 'lodash'; -import * as moment from 'moment'; +import _ from 'lodash'; +import moment from 'moment'; import { ChartTooltip } from '../../../shared/models/chart-tooltip'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-detail/cephfs-detail.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-detail/cephfs-detail.component.ts index 655aefa18b1f..bbf63f4107c8 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-detail/cephfs-detail.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-detail/cephfs-detail.component.ts @@ -1,7 +1,5 @@ import { Component, Input, OnChanges, OnInit, TemplateRef, ViewChild } from '@angular/core'; -import * as _ from 'lodash'; - import { CdTableColumn } from '../../../shared/models/cd-table-column'; import { DimlessBinaryPipe } from '../../../shared/pipes/dimless-binary.pipe'; import { DimlessPipe } from '../../../shared/pipes/dimless.pipe'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.ts index 13c9c87e164f..78f5d1a84f69 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.ts @@ -9,8 +9,8 @@ import { TreeNode, TREE_ACTIONS } from 'angular-tree-component'; -import * as _ from 'lodash'; -import * as moment from 'moment'; +import _ from 'lodash'; +import moment from 'moment'; import { CephfsService } from '../../../shared/api/cephfs.service'; import { ConfirmationModalComponent } from '../../../shared/components/confirmation-modal/confirmation-modal.component'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-tabs/cephfs-tabs.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-tabs/cephfs-tabs.component.spec.ts index b02cc9673b9a..c01d9dd7d2d8 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-tabs/cephfs-tabs.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-tabs/cephfs-tabs.component.spec.ts @@ -4,7 +4,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; import { TreeModule } from 'angular-tree-component'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { ToastrModule } from 'ngx-toastr'; import { of } from 'rxjs'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-tabs/cephfs-tabs.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-tabs/cephfs-tabs.component.ts index 64449b3919fa..0d313010c19f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-tabs/cephfs-tabs.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-tabs/cephfs-tabs.component.ts @@ -1,6 +1,6 @@ import { Component, Input, NgZone, OnChanges, OnDestroy } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { Subscription, timer } from 'rxjs'; import { CephfsService } from '../../../shared/api/cephfs.service'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration-details/configuration-details.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration-details/configuration-details.component.ts index df0e6d162610..0d4b67d43fe3 100755 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration-details/configuration-details.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration-details/configuration-details.component.ts @@ -1,6 +1,6 @@ import { Component, Input, OnChanges } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; @Component({ selector: 'cd-configuration-details', diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration-form/configuration-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration-form/configuration-form.component.ts index aa9ab7b839ca..6bb71597e501 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration-form/configuration-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration-form/configuration-form.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { FormControl, FormGroup, ValidatorFn } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { ConfigurationService } from '../../../../shared/api/configuration.service'; import { ConfigFormModel } from '../../../../shared/components/config-option/config-option.model'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.spec.ts index 391d87f7a0c9..861ae203123b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.spec.ts @@ -3,7 +3,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; -import * as _ from 'lodash'; import { ToastrModule } from 'ngx-toastr'; import { of } from 'rxjs'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.ts index a095f6c6b77b..9848545014dc 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { HostService } from '../../../shared/api/host.service'; import { OrchestratorService } from '../../../shared/api/orchestrator.service'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/inventory/inventory-devices/inventory-devices.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/inventory/inventory-devices/inventory-devices.component.spec.ts index b05f37af3199..8bc8f8c9ad70 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/inventory/inventory-devices/inventory-devices.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/inventory/inventory-devices/inventory-devices.component.spec.ts @@ -5,7 +5,6 @@ import { By } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; -import * as _ from 'lodash'; import { ToastrModule } from 'ngx-toastr'; import { configureTestBed } from '../../../../../testing/unit-test-helper'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/inventory/inventory-devices/inventory-devices.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/inventory/inventory-devices/inventory-devices.component.ts index d6ec52e680ea..e19ad08879ee 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/inventory/inventory-devices/inventory-devices.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/inventory/inventory-devices/inventory-devices.component.ts @@ -8,7 +8,7 @@ import { ViewChild } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { Subscription } from 'rxjs'; import { OrchestratorService } from '../../../../shared/api/orchestrator.service'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-form/mgr-module-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-form/mgr-module-form.component.ts index 715ee5035c81..2fdb9aced61b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-form/mgr-module-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-form/mgr-module-form.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { ValidatorFn, Validators } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { forkJoin as observableForkJoin } from 'rxjs'; import { MgrModuleService } from '../../../../shared/api/mgr-module.service'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/monitor/monitor.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/monitor/monitor.component.ts index 82d765dac5b9..841634d71bcb 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/monitor/monitor.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/monitor/monitor.component.ts @@ -1,6 +1,6 @@ import { Component } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { MonitorService } from '../../../shared/api/monitor.service'; import { CellTemplate } from '../../../shared/enum/cell-template.enum'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-creation-preview-modal/osd-creation-preview-modal.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-creation-preview-modal/osd-creation-preview-modal.component.ts index 61b86cad2e7e..5a6a08fcc5fe 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-creation-preview-modal/osd-creation-preview-modal.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-creation-preview-modal/osd-creation-preview-modal.component.ts @@ -1,7 +1,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { OsdService } from '../../../../shared/api/osd.service'; import { ActionLabelsI18n, URLVerbs } from '../../../../shared/constants/app.constants'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-details/osd-details.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-details/osd-details.component.ts index 2ed5e0fe1f76..21f63d2bb743 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-details/osd-details.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-details/osd-details.component.ts @@ -1,6 +1,6 @@ import { Component, Input, OnChanges } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { OsdService } from '../../../../shared/api/osd.service'; import { Permission } from '../../../../shared/models/permissions'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-devices-selection-groups/osd-devices-selection-groups.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-devices-selection-groups/osd-devices-selection-groups.component.ts index 3693bc558cca..cd23f8ce1e01 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-devices-selection-groups/osd-devices-selection-groups.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-devices-selection-groups/osd-devices-selection-groups.component.ts @@ -1,6 +1,6 @@ import { Component, EventEmitter, Input, OnChanges, OnInit, Output } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { Icons } from '../../../../shared/enum/icons.enum'; import { CdTableColumnFiltersChange } from '../../../../shared/models/cd-table-column-filters-change'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-devices-selection-modal/osd-devices-selection-modal.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-devices-selection-modal/osd-devices-selection-modal.component.ts index 4f677ac147dc..217f471a8e82 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-devices-selection-modal/osd-devices-selection-modal.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-devices-selection-modal/osd-devices-selection-modal.component.ts @@ -2,7 +2,7 @@ import { AfterViewInit, Component, EventEmitter, Output, ViewChild } from '@angu import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { TableColumnProp } from '@swimlane/ngx-datatable'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { ActionLabelsI18n } from '../../../../shared/constants/app.constants'; import { Icons } from '../../../../shared/enum/icons.enum'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-flags-modal/osd-flags-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-flags-modal/osd-flags-modal.component.spec.ts index 78d472da16a3..e91c9534e965 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-flags-modal/osd-flags-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-flags-modal/osd-flags-modal.component.spec.ts @@ -4,7 +4,7 @@ import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { ToastrModule } from 'ngx-toastr'; import { configureTestBed } from '../../../../../testing/unit-test-helper'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-flags-modal/osd-flags-modal.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-flags-modal/osd-flags-modal.component.ts index 78ca001ce7a8..2245c69c6005 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-flags-modal/osd-flags-modal.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-flags-modal/osd-flags-modal.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { FormGroup } from '@angular/forms'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { OsdService } from '../../../../shared/api/osd.service'; import { NotificationType } from '../../../../shared/enum/notification-type.enum'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-form/drive-group.model.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-form/drive-group.model.ts index dd5d3b0b13ed..53e370dde224 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-form/drive-group.model.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-form/drive-group.model.ts @@ -1,4 +1,4 @@ -import * as _ from 'lodash'; +import _ from 'lodash'; import { CdTableColumnFiltersChange } from '../../../../shared/models/cd-table-column-filters-change'; import { FormatterService } from '../../../../shared/services/formatter.service'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-form/osd-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-form/osd-form.component.ts index 651ae814ffae..74d8b89f11f4 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-form/osd-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-form/osd-form.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { FormControl, Validators } from '@angular/forms'; import { Router } from '@angular/router'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { OrchestratorService } from '../../../../shared/api/orchestrator.service'; import { SubmitButtonComponent } from '../../../../shared/components/submit-button/submit-button.component'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.spec.ts index 52ccec23622f..3b9217894155 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.spec.ts @@ -6,7 +6,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { ToastrModule } from 'ngx-toastr'; import { EMPTY, of } from 'rxjs'; 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 ef9483aab25c..f42e9f15842b 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 @@ -3,7 +3,7 @@ import { FormControl } from '@angular/forms'; import { Router } from '@angular/router'; import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { forkJoin as observableForkJoin, Observable } from 'rxjs'; import { OrchestratorService } from '../../../../shared/api/orchestrator.service'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-performance-histogram/osd-performance-histogram.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-performance-histogram/osd-performance-histogram.component.ts index f7024f723877..44a2f3e05ffb 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-performance-histogram/osd-performance-histogram.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-performance-histogram/osd-performance-histogram.component.ts @@ -1,6 +1,6 @@ import { Component, Input, OnChanges } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; @Component({ selector: 'cd-osd-performance-histogram', diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-recv-speed-modal/osd-recv-speed-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-recv-speed-modal/osd-recv-speed-modal.component.spec.ts index c6351ea8a723..368c9692496c 100755 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-recv-speed-modal/osd-recv-speed-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-recv-speed-modal/osd-recv-speed-modal.component.spec.ts @@ -4,7 +4,7 @@ import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { ToastrModule } from 'ngx-toastr'; import { of as observableOf } from 'rxjs'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-recv-speed-modal/osd-recv-speed-modal.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-recv-speed-modal/osd-recv-speed-modal.component.ts index f4b165b2eea8..b96f84ddcff7 100755 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-recv-speed-modal/osd-recv-speed-modal.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-recv-speed-modal/osd-recv-speed-modal.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { FormControl, Validators } from '@angular/forms'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { ConfigurationService } from '../../../../shared/api/configuration.service'; import { OsdService } from '../../../../shared/api/osd.service'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-form/silence-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-form/silence-form.component.spec.ts index ee3d5e956e36..69c0306f403e 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-form/silence-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-form/silence-form.component.spec.ts @@ -5,8 +5,8 @@ import { ActivatedRoute, Router, Routes } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbPopoverModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; -import * as moment from 'moment'; +import _ from 'lodash'; +import moment from 'moment'; import { ToastrModule } from 'ngx-toastr'; import { of, throwError } from 'rxjs'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-form/silence-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-form/silence-form.component.ts index 0212ac0ebf29..77a03102827e 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-form/silence-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-form/silence-form.component.ts @@ -2,8 +2,8 @@ import { Component } from '@angular/core'; import { Validators } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; -import * as _ from 'lodash'; -import * as moment from 'moment'; +import _ from 'lodash'; +import moment from 'moment'; import { PrometheusService } from '../../../../shared/api/prometheus.service'; import { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-matcher-modal/silence-matcher-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-matcher-modal/silence-matcher-modal.component.spec.ts index c888fb5bb60a..f20dd4676931 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-matcher-modal/silence-matcher-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-matcher-modal/silence-matcher-modal.component.spec.ts @@ -4,7 +4,7 @@ import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbActiveModal, NgbTypeaheadModule } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { of } from 'rxjs'; import { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-matcher-modal/silence-matcher-modal.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-matcher-modal/silence-matcher-modal.component.ts index e0afaa805bd5..62eccd640e4c 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-matcher-modal/silence-matcher-modal.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-matcher-modal/silence-matcher-modal.component.ts @@ -2,7 +2,7 @@ import { Component, EventEmitter, Output, ViewChild } from '@angular/core'; import { FormControl, Validators } from '@angular/forms'; import { NgbActiveModal, NgbTypeahead } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { merge, Observable, Subject } from 'rxjs'; import { debounceTime, distinctUntilChanged, filter, map } from 'rxjs/operators'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.spec.ts index 23fe09508895..f37b94771846 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.spec.ts @@ -1,7 +1,7 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { of } from 'rxjs'; import { configureTestBed } from '../../../../../testing/unit-test-helper'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.ts index 16c23f3b5790..e0df084e2990 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.ts @@ -11,7 +11,7 @@ import { ViewChildren } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { Observable, Subscription } from 'rxjs'; import { CephServiceService } from '../../../../shared/api/ceph-service.service'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.spec.ts index 50d76cca905d..b224aaa22f74 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.spec.ts @@ -4,7 +4,7 @@ import { ReactiveFormsModule } from '@angular/forms'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbTypeaheadModule } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { ToastrModule } from 'ngx-toastr'; import { configureTestBed, FormHelper } from '../../../../../testing/unit-test-helper'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.ts index 4bf6d36143a1..10071d71c9e7 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.ts @@ -3,7 +3,7 @@ import { AbstractControl, Validators } from '@angular/forms'; import { Router } from '@angular/router'; import { NgbTypeahead } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { merge, Observable, Subject } from 'rxjs'; import { debounceTime, distinctUntilChanged, filter, map } from 'rxjs/operators'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/telemetry/telemetry.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/telemetry/telemetry.component.spec.ts index 5ffb046cf16a..a655a635aba6 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/telemetry/telemetry.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/telemetry/telemetry.component.spec.ts @@ -4,7 +4,7 @@ import { ReactiveFormsModule } from '@angular/forms'; import { Router } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { ToastrModule } from 'ngx-toastr'; import { of as observableOf } from 'rxjs'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/telemetry/telemetry.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/telemetry/telemetry.component.ts index 2abbade4847e..d2c4c894459a 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/telemetry/telemetry.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/telemetry/telemetry.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { ValidatorFn, Validators } from '@angular/forms'; import { Router } from '@angular/router'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { forkJoin as observableForkJoin } from 'rxjs'; import { MgrModuleService } from '../../../shared/api/mgr-module.service'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health-pie/health-pie.component.scss b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health-pie/health-pie.component.scss index acbba504fee6..23560b00427c 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health-pie/health-pie.component.scss +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health-pie/health-pie.component.scss @@ -5,10 +5,6 @@ $canvas-width: 100%; $canvas-height: 100%; .chart-container { - @each $key_name, $value in bd.$health-chart-colors { - --color-#{$key_name}: #{$value}; - } - height: $canvas-height; margin-left: auto; margin-right: auto; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health-pie/health-pie.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health-pie/health-pie.component.spec.ts index 96331ff0a5be..25782502ca55 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health-pie/health-pie.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health-pie/health-pie.component.spec.ts @@ -55,16 +55,6 @@ describe('HealthPieComponent', () => { expect(component.chartConfig.dataset[0].data).toEqual(initialData); }); - it('should set colors from css variables', () => { - const cssVar = '--my-color'; - const cssVarColor = '#73c5c5'; - component['getCssVar'] = (name: string) => (name === cssVar ? cssVarColor : ''); - component.chartConfig.colors[0].backgroundColor = [cssVar, '#ffffff']; - fixture.detectChanges(); - - expect(component.chartConfig.colors[0].backgroundColor).toEqual([cssVarColor, '#ffffff']); - }); - describe('tooltip body', () => { const tooltipBody = ['text: 10000']; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health-pie/health-pie.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health-pie/health-pie.component.ts index 0c08973da8a4..67ef99df1b9d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health-pie/health-pie.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health-pie/health-pie.component.ts @@ -10,9 +10,10 @@ import { } from '@angular/core'; import * as Chart from 'chart.js'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { PluginServiceGlobalRegistrationAndOptions } from 'ng2-charts'; +import styles from '../../../../styles.scss'; import { ChartTooltip } from '../../../shared/models/chart-tooltip'; import { DimlessBinaryPipe } from '../../../shared/pipes/dimless-binary.pipe'; import { DimlessPipe } from '../../../shared/pipes/dimless.pipe'; @@ -52,11 +53,11 @@ export class HealthPieComponent implements OnChanges, OnInit { colors: [ { backgroundColor: [ - '--color-green', - '--color-yellow', - '--color-orange', - '--color-red', - '--color-blue' + styles.chartHealthColorGreen, + styles.chartHealthColorYellow, + styles.chartHealthColorOrange, + styles.chartHealthColorRed, + styles.chartHealthColorBlue ] } ], @@ -77,7 +78,7 @@ export class HealthPieComponent implements OnChanges, OnInit { tooltips: { enabled: true, displayColors: false, - backgroundColor: 'rgba(0,0,0,0.8)', + backgroundColor: styles.chartHealthTootlipBgColor, cornerRadius: 0, bodyFontSize: 14, bodyFontStyle: '600', @@ -104,8 +105,6 @@ export class HealthPieComponent implements OnChanges, OnInit { { id: 'center_text', beforeDraw(chart: Chart) { - const defaultFontColorA = '#151515'; - const defaultFontColorB = '#72767B'; const defaultFontFamily = 'Helvetica Neue, Helvetica, Arial, sans-serif'; Chart.defaults.global.defaultFontFamily = defaultFontFamily; const ctx = chart.ctx; @@ -122,12 +121,12 @@ export class HealthPieComponent implements OnChanges, OnInit { ctx.textBaseline = 'middle'; ctx.font = `24px ${defaultFontFamily}`; - ctx.fillStyle = defaultFontColorA; + ctx.fillStyle = styles.chartHealthCenterTextColor; ctx.fillText(label[0], centerX, centerY - 10); if (label.length > 1) { ctx.font = `14px ${defaultFontFamily}`; - ctx.fillStyle = defaultFontColorB; + ctx.fillStyle = styles.chartHealthCenterTextDescriptionColor; ctx.fillText(label[1], centerX, centerY + 10); } ctx.restore(); @@ -159,8 +158,6 @@ export class HealthPieComponent implements OnChanges, OnInit { _.merge(this.chartConfig, this.config); - this.setColorsFromCssVars(); - this.prepareFn.emit([this.chartConfig, this.data]); } @@ -169,24 +166,6 @@ export class HealthPieComponent implements OnChanges, OnInit { this.setChartSliceBorderWidth(); } - private setColorsFromCssVars() { - this.chartConfig.colors.forEach( - (colorEl: { backgroundColor: string[] }, colorIndex: number) => { - colorEl.backgroundColor.forEach((bgColor: string, bgColorIndex: number) => { - if (bgColor.startsWith('--')) { - this.chartConfig.colors[colorIndex].backgroundColor[bgColorIndex] = this.getCssVar( - bgColor - ); - } - }); - } - ); - } - - private getCssVar(name: string): string { - return getComputedStyle(document.querySelector('.chart-container')).getPropertyValue(name); - } - private getChartTooltipBody(body: string[]) { const bodySplit = body[0].split(': '); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.spec.ts index df6222fd1c59..bc54ff4a162c 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.spec.ts @@ -3,7 +3,7 @@ import { NO_ERRORS_SCHEMA } from '@angular/core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { of } from 'rxjs'; import { configureTestBed } from '../../../../testing/unit-test-helper'; 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 c11fba7aab61..717a113c8ade 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 @@ -1,8 +1,9 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { Subscription } from 'rxjs'; +import styles from '../../../../styles.scss'; import { HealthService } from '../../../shared/api/health.service'; import { Icons } from '../../../shared/enum/icons.enum'; import { Permissions } from '../../../shared/models/permissions'; @@ -31,7 +32,7 @@ export class HealthComponent implements OnInit, OnDestroy { clientStatsConfig = { colors: [ { - backgroundColor: ['--color-cyan', '--color-purple'] + backgroundColor: [styles.chartHealthColorCyan, styles.chartHealthColorPurple] } ] }; @@ -39,7 +40,7 @@ export class HealthComponent implements OnInit, OnDestroy { rawCapacityChartConfig = { colors: [ { - backgroundColor: ['--color-blue', '--color-gray'] + backgroundColor: [styles.chartHealthColorBlue, styles.chartHealthColorGray] } ] }; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/mds-summary.pipe.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/mds-summary.pipe.ts index 68853cb0bee0..9cc72ac96ad7 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/mds-summary.pipe.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/mds-summary.pipe.ts @@ -1,6 +1,6 @@ import { Pipe, PipeTransform } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; @Pipe({ name: 'mdsSummary' diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/mgr-summary.pipe.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/mgr-summary.pipe.ts index 286d5dd337f6..ffdee7300991 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/mgr-summary.pipe.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/mgr-summary.pipe.ts @@ -1,6 +1,6 @@ import { Pipe, PipeTransform } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; @Pipe({ name: 'mgrSummary' diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/osd-summary.pipe.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/osd-summary.pipe.ts index 05fc7ad7f80c..72bea4a0aeaa 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/osd-summary.pipe.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/osd-summary.pipe.ts @@ -1,6 +1,6 @@ import { Pipe, PipeTransform } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; @Pipe({ name: 'osdSummary' diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-details/nfs-details.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-details/nfs-details.component.spec.ts index 2411aa22efff..2c2e5e189af4 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-details/nfs-details.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-details/nfs-details.component.spec.ts @@ -4,7 +4,7 @@ import { By } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { configureTestBed } from '../../../../testing/unit-test-helper'; import { SharedModule } from '../../../shared/shared.module'; 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 3ed39cff7c2c..a35b514eec3d 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 @@ -1,7 +1,7 @@ import { Component, Input, OnInit } from '@angular/core'; import { FormArray, FormControl, NgForm, Validators } from '@angular/forms'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { NfsService } from '../../../shared/api/nfs.service'; import { Icons } from '../../../shared/enum/icons.enum'; 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 9987512859f6..b07ecf4a6d34 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 @@ -2,7 +2,7 @@ import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core'; import { FormControl, Validators } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { forkJoin, Observable, of } from 'rxjs'; import { debounceTime, distinctUntilChanged, map, mergeMap } from 'rxjs/operators'; 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 6cebd9f1ebec..817533ad30ce 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 @@ -1,7 +1,7 @@ import { Component, OnDestroy, OnInit, TemplateRef, ViewChild } from '@angular/core'; import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { Subscription } from 'rxjs'; import { NfsService } from '../../../shared/api/nfs.service'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/crush-rule-form-modal/crush-rule-form-modal.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/crush-rule-form-modal/crush-rule-form-modal.component.ts index be4f85e0290d..ef3f38fb7747 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/crush-rule-form-modal/crush-rule-form-modal.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/crush-rule-form-modal/crush-rule-form-modal.component.ts @@ -2,7 +2,7 @@ import { Component, EventEmitter, OnInit, Output } from '@angular/core'; import { Validators } from '@angular/forms'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { CrushRuleService } from '../../../shared/api/crush-rule.service'; import { CrushNodeSelectionClass } from '../../../shared/classes/crush.node.selection.class'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-details/pool-details.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-details/pool-details.component.ts index 74242d9ec2a6..8c9278216d8e 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-details/pool-details.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-details/pool-details.component.ts @@ -1,6 +1,6 @@ import { Component, Input, OnChanges } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { PoolService } from '../../../shared/api/pool.service'; import { CdTableColumn } from '../../../shared/models/cd-table-column'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.spec.ts index 0ca5df70d8cc..cfb42ecd9b83 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.spec.ts @@ -12,7 +12,7 @@ import { NgbModalRef, NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { NgBootstrapFormValidationModule } from 'ng-bootstrap-form-validation'; import { ToastrModule } from 'ngx-toastr'; import { of } from 'rxjs'; 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 7691b5e494ba..b590e8b82d7a 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 @@ -3,7 +3,7 @@ import { FormControl, Validators } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; import { NgbNav, NgbTooltip } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { Observable, Subscription } from 'rxjs'; import { CrushRuleService } from '../../../shared/api/crush-rule.service'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.spec.ts index 06506f196146..e4c216f68a33 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.spec.ts @@ -4,7 +4,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { ToastrModule } from 'ngx-toastr'; import { of } from 'rxjs'; 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 6501d4ea7fc3..97340f1452ea 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 @@ -1,7 +1,7 @@ import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core'; import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { ConfigurationService } from '../../../shared/api/configuration.service'; import { PoolService } from '../../../shared/api/pool.service'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.spec.ts index 5a9e3e221ad5..ad84c1a52f9f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.spec.ts @@ -4,7 +4,7 @@ import { FormControl, ReactiveFormsModule } from '@angular/forms'; import { Router } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { ToastrModule } from 'ngx-toastr'; import { of as observableOf } from 'rxjs'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.ts index 484a2bf0a0fb..658d6fcb559d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { AbstractControl, AsyncValidatorFn, ValidationErrors, Validators } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { forkJoin } from 'rxjs'; import { RgwBucketService } from '../../../shared/api/rgw-bucket.service'; 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 2cc2601488c5..5593c324b925 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 @@ -7,7 +7,7 @@ import { ViewChild } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { forkJoin as observableForkJoin, Observable, Subscriber } from 'rxjs'; import { RgwBucketService } from '../../../shared/api/rgw-bucket.service'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-daemon-details/rgw-daemon-details.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-daemon-details/rgw-daemon-details.component.ts index e338572aae37..eba47aa722b5 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-daemon-details/rgw-daemon-details.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-daemon-details/rgw-daemon-details.component.ts @@ -1,6 +1,6 @@ import { Component, Input, OnChanges } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { RgwDaemonService } from '../../../shared/api/rgw-daemon.service'; import { Permission } from '../../../shared/models/permissions'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-capability-modal/rgw-user-capability-modal.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-capability-modal/rgw-user-capability-modal.component.ts index 3b1ce3fc81c3..bc1e5a449f90 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-capability-modal/rgw-user-capability-modal.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-capability-modal/rgw-user-capability-modal.component.ts @@ -2,7 +2,7 @@ import { Component, EventEmitter, Output } from '@angular/core'; import { Validators } from '@angular/forms'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { ActionLabelsI18n } from '../../../shared/constants/app.constants'; import { CdFormBuilder } from '../../../shared/forms/cd-form-builder'; 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 276950c8d6eb..7a2d998a8612 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 @@ -1,6 +1,6 @@ import { Component, Input, OnChanges, OnInit, TemplateRef, ViewChild } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { RgwUserService } from '../../../shared/api/rgw-user.service'; import { Icons } from '../../../shared/enum/icons.enum'; 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 8055daf029a0..1aceb55f2742 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 @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { AbstractControl, ValidationErrors, Validators } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { concat as observableConcat, forkJoin as observableForkJoin, Observable } from 'rxjs'; import { RgwUserService } from '../../../shared/api/rgw-user.service'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-s3-key-modal/rgw-user-s3-key-modal.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-s3-key-modal/rgw-user-s3-key-modal.component.ts index c06129d39fc5..c1323c5f045e 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-s3-key-modal/rgw-user-s3-key-modal.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-s3-key-modal/rgw-user-s3-key-modal.component.ts @@ -2,7 +2,7 @@ import { Component, EventEmitter, Output } from '@angular/core'; import { Validators } from '@angular/forms'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { ActionLabelsI18n } from '../../../shared/constants/app.constants'; import { CdFormBuilder } from '../../../shared/forms/cd-form-builder'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-subuser-modal/rgw-user-subuser-modal.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-subuser-modal/rgw-user-subuser-modal.component.ts index 3a5344970017..b7b239b62a16 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-subuser-modal/rgw-user-subuser-modal.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-subuser-modal/rgw-user-subuser-modal.component.ts @@ -2,7 +2,7 @@ import { Component, EventEmitter, Output } from '@angular/core'; import { AbstractControl, ValidationErrors, ValidatorFn, Validators } from '@angular/forms'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { ActionLabelsI18n } from '../../../shared/constants/app.constants'; import { CdFormBuilder } from '../../../shared/forms/cd-form-builder'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/pg-category.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/pg-category.service.ts index cf77649502a5..d9c90e8b24e9 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/pg-category.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/pg-category.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { CephSharedModule } from './ceph-shared.module'; import { PgCategory } from './pg-category.model'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/smart-list/smart-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/smart-list/smart-list.component.spec.ts index ac79d93fff7f..7570528aba62 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/smart-list/smart-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/smart-list/smart-list.component.spec.ts @@ -5,7 +5,7 @@ import { By } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { of } from 'rxjs'; import { configureTestBed } from '../../../../testing/unit-test-helper'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/smart-list/smart-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/smart-list/smart-list.component.ts index f02a537c08c6..ee9c729813e4 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/smart-list/smart-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/smart-list/smart-list.component.ts @@ -1,6 +1,6 @@ import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { HostService } from '../../../shared/api/host.service'; import { OsdService } from '../../../shared/api/osd.service'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-details/role-details.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-details/role-details.component.ts index 8470836fbcde..2479cb736ed5 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-details/role-details.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-details/role-details.component.ts @@ -1,6 +1,6 @@ import { Component, Input, OnChanges, OnInit } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { CellTemplate } from '../../../shared/enum/cell-template.enum'; import { CdTableColumn } from '../../../shared/models/cd-table-column'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-form/role-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-form/role-form.component.ts index 08d8f463b028..8a455e0ebcd7 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-form/role-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-form/role-form.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core'; import { FormControl, Validators } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { forkJoin as observableForkJoin } from 'rxjs'; import { RoleService } from '../../../shared/api/role.service'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.ts index c3e1b2277794..627766ac2fe7 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.ts @@ -3,8 +3,8 @@ import { Validators } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; -import * as moment from 'moment'; +import _ from 'lodash'; +import moment from 'moment'; import { forkJoin as observableForkJoin } from 'rxjs'; import { AuthService } from '../../../shared/api/auth.service'; @@ -174,9 +174,6 @@ export class UserFormComponent extends CdForm implements OnInit { ); const expirationDate = response['pwdExpirationDate']; if (expirationDate) { - const mom = moment(expirationDate * 1000); - console.log(this.pwdExpirationFormat, mom.format(this.pwdExpirationFormat)); - this.userForm .get('pwdExpirationDate') .setValue(moment(expirationDate * 1000).format(this.pwdExpirationFormat)); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-password-form/user-password-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-password-form/user-password-form.component.ts index e7ef06c15a50..7d6f9127e4cd 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-password-form/user-password-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-password-form/user-password-form.component.ts @@ -2,7 +2,7 @@ import { Component } from '@angular/core'; import { Validators } from '@angular/forms'; import { Router } from '@angular/router'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { UserService } from '../../../shared/api/user.service'; import { ActionLabelsI18n } from '../../../shared/constants/app.constants'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/ceph-service.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/ceph-service.service.ts index 367a081f6f1a..07bd4deb9cb1 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/ceph-service.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/ceph-service.service.ts @@ -1,7 +1,6 @@ import { HttpClient, HttpParams } from '@angular/common/http'; import { Injectable } from '@angular/core'; -import * as _ from 'lodash'; import { Observable } from 'rxjs'; import { Daemon } from '../models/daemon.interface'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/cephfs.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/cephfs.service.ts index 7f071900ec25..e5c53b74195a 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/cephfs.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/cephfs.service.ts @@ -1,7 +1,7 @@ import { HttpClient, HttpParams } from '@angular/common/http'; import { Injectable } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { Observable } from 'rxjs'; import { cdEncode } from '../decorators/cd-encode'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/orchestrator.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/orchestrator.service.ts index 0fe9883f9e3d..89a23393b900 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/orchestrator.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/orchestrator.service.ts @@ -1,7 +1,7 @@ import { HttpClient, HttpParams } from '@angular/common/http'; import { Injectable } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { Observable, of as observableOf } from 'rxjs'; import { mergeMap } from 'rxjs/operators'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/osd.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/osd.service.ts index cc088d0e95f6..b68aaf1c1935 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/osd.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/osd.service.ts @@ -1,7 +1,7 @@ import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { map } from 'rxjs/operators'; import { CdDevice } from '../models/devices'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rbd.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rbd.service.ts index 38c02bd0557b..d65c2356f569 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rbd.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rbd.service.ts @@ -1,7 +1,7 @@ import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { map } from 'rxjs/operators'; import { cdEncode, cdEncodeNot } from '../decorators/cd-encode'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-bucket.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-bucket.service.ts index f939a55c104d..4c8654d4cb95 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-bucket.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-bucket.service.ts @@ -1,7 +1,7 @@ import { HttpClient, HttpParams } from '@angular/common/http'; import { Injectable } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { forkJoin as observableForkJoin, of as observableOf } from 'rxjs'; import { mergeMap } from 'rxjs/operators'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-user.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-user.service.ts index 6adc55dda4a8..e4b9b597adee 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-user.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-user.service.ts @@ -1,7 +1,7 @@ import { HttpClient, HttpParams } from '@angular/common/http'; import { Injectable } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { forkJoin as observableForkJoin, Observable, of as observableOf } from 'rxjs'; import { mergeMap } from 'rxjs/operators'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/settings.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/settings.service.ts index 52433a8a419d..1e53fa064930 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/settings.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/settings.service.ts @@ -1,7 +1,7 @@ import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/classes/crush.node.selection.class.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/classes/crush.node.selection.class.spec.ts index fd67cdec30c0..d3bd7306b383 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/classes/crush.node.selection.class.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/classes/crush.node.selection.class.spec.ts @@ -1,6 +1,6 @@ import { FormControl } from '@angular/forms'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { configureTestBed, Mocks } from '../../../testing/unit-test-helper'; import { CrushNode } from '../models/crush-node'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/classes/crush.node.selection.class.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/classes/crush.node.selection.class.ts index e1cf4b0ec3ca..34cebbcc8773 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/classes/crush.node.selection.class.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/classes/crush.node.selection.class.ts @@ -1,6 +1,6 @@ import { AbstractControl } from '@angular/forms'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { CrushNode } from '../models/crush-node'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/config-option/config-option.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/config-option/config-option.component.spec.ts index be2db9435424..6be0df053774 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/config-option/config-option.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/config-option/config-option.component.spec.ts @@ -3,7 +3,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ReactiveFormsModule } from '@angular/forms'; import { NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { of as observableOf } from 'rxjs'; import { configureTestBed } from '../../../../testing/unit-test-helper'; 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 7778deccb3cc..a8bdf44e081b 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 @@ -1,7 +1,7 @@ import { Component, Input, OnInit } from '@angular/core'; import { FormControl, NgForm } from '@angular/forms'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { Icons } from '../../../shared/enum/icons.enum'; import { ConfigurationService } from '../../api/configuration.service'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/config-option/config-option.types.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/config-option/config-option.types.ts index eb1bce5748d2..73e006fee7aa 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/config-option/config-option.types.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/config-option/config-option.types.ts @@ -1,6 +1,6 @@ import { Validators } from '@angular/forms'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { CdValidators } from '../../forms/cd-validators'; import { ConfigFormModel } from './config-option.model'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/date-time-picker/date-time-picker.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/date-time-picker/date-time-picker.component.ts index c3ff2a7ff717..390edbfd84a4 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/date-time-picker/date-time-picker.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/date-time-picker/date-time-picker.component.ts @@ -2,7 +2,7 @@ import { Component, Input, OnInit } from '@angular/core'; import { FormControl } from '@angular/forms'; import { NgbCalendar, NgbDateStruct, NgbTimeStruct } from '@ng-bootstrap/ng-bootstrap'; -import * as moment from 'moment'; +import moment from 'moment'; import { Subscription } from 'rxjs'; @Component({ diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/form-modal/form-modal.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/form-modal/form-modal.component.ts index b8dad67a46b5..dec43d33b63d 100755 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/form-modal/form-modal.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/form-modal/form-modal.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { FormControl, ValidatorFn, Validators } from '@angular/forms'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { CdFormBuilder } from '../../forms/cd-form-builder'; import { CdFormGroup } from '../../forms/cd-form-group'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/language-selector/language-selector.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/language-selector/language-selector.component.ts index 6f18afffd7f6..49fc02f9146c 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/language-selector/language-selector.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/language-selector/language-selector.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { LanguageService } from '../../services/language.service'; import { SupportedLanguages } from './supported-languages.enum'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/notifications-sidebar/notifications-sidebar.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/notifications-sidebar/notifications-sidebar.component.ts index 5a0f9b603e9e..a334b8b77fc4 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/notifications-sidebar/notifications-sidebar.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/notifications-sidebar/notifications-sidebar.component.ts @@ -9,8 +9,8 @@ import { } from '@angular/core'; import { Mutex } from 'async-mutex'; -import * as _ from 'lodash'; -import * as moment from 'moment'; +import _ from 'lodash'; +import moment from 'moment'; import { Subscription } from 'rxjs'; import { Icons } from '../../enum/icons.enum'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select/select-messages.model.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select/select-messages.model.ts index 6362b4e26cb5..7a28ffb5e805 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select/select-messages.model.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/select/select-messages.model.ts @@ -1,4 +1,4 @@ -import * as _ from 'lodash'; +import _ from 'lodash'; export class SelectMessages { empty: string; 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 e4b780fcdf95..b303af4c138d 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 @@ -1,7 +1,7 @@ import { Component, EventEmitter, Input, OnChanges, OnInit, Output } from '@angular/core'; import { FormControl, ValidatorFn } from '@angular/forms'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { Icons } from '../../../shared/enum/icons.enum'; import { CdFormGroup } from '../../forms/cd-form-group'; 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 0d4d0e770b10..ad4d6094affa 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,7 +1,7 @@ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { AbstractControl, FormGroup, FormGroupDirective, NgForm } from '@angular/forms'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { Icons } from '../../../shared/enum/icons.enum'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-actions/table-actions.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-actions/table-actions.component.ts index fb11b64a68f9..a6f30a066d3f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-actions/table-actions.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-actions/table-actions.component.ts @@ -1,6 +1,6 @@ import { Component, Input, OnInit } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { Icons } from '../../../shared/enum/icons.enum'; import { CdTableAction } from '../../models/cd-table-action'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-key-value/table-key-value.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-key-value/table-key-value.component.ts index 38bd942b20ae..dd48a431bedd 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-key-value/table-key-value.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-key-value/table-key-value.component.ts @@ -8,7 +8,7 @@ import { ViewChild } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { CellTemplate } from '../../enum/cell-template.enum'; import { CdTableColumn } from '../../models/cd-table-column'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.spec.ts index baf3505cc157..774c754b3a0c 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.spec.ts @@ -5,7 +5,7 @@ import { RouterTestingModule } from '@angular/router/testing'; import { NgbDropdownModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; import { NgxDatatableModule } from '@swimlane/ngx-datatable'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { configureTestBed } from '../../../../testing/unit-test-helper'; import { ComponentsModule } from '../../components/components.module'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts index 51259b27b16f..25f4b95cf15e 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts @@ -22,7 +22,7 @@ import { SortPropDir, TableColumnProp } from '@swimlane/ngx-datatable'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { Observable, Subject, Subscription, timer as observableTimer } from 'rxjs'; import { TableStatus } from '../../../shared/classes/table-status'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/decorators/cd-encode.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/decorators/cd-encode.ts index d201d53b7bd2..afff2ec6d380 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/decorators/cd-encode.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/decorators/cd-encode.ts @@ -1,4 +1,4 @@ -import * as _ from 'lodash'; +import _ from 'lodash'; /** * This decorator can be used in a class or method. diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/autofocus.directive.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/autofocus.directive.ts index 169571f3d092..dc34b9f3c30b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/autofocus.directive.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/autofocus.directive.ts @@ -1,6 +1,6 @@ import { AfterViewInit, Directive, ElementRef, Input } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; @Directive({ selector: '[autofocus]' // tslint:disable-line diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/dimless-binary-per-second.directive.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/dimless-binary-per-second.directive.ts index 011439248fa6..a90e2b8f8aba 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/dimless-binary-per-second.directive.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/dimless-binary-per-second.directive.ts @@ -9,7 +9,7 @@ import { } from '@angular/core'; import { NgControl } from '@angular/forms'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { DimlessBinaryPerSecondPipe } from '../pipes/dimless-binary-per-second.pipe'; import { FormatterService } from '../services/formatter.service'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/dimless-binary.directive.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/dimless-binary.directive.ts index cda47925cc86..1c27ae1cecf4 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/dimless-binary.directive.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/dimless-binary.directive.ts @@ -9,7 +9,7 @@ import { } from '@angular/core'; import { NgControl } from '@angular/forms'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { DimlessBinaryPipe } from '../pipes/dimless-binary.pipe'; import { FormatterService } from '../services/formatter.service'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/trim.directive.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/trim.directive.ts index 7731721dd902..4b3604e43096 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/trim.directive.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/directives/trim.directive.ts @@ -1,7 +1,7 @@ import { Directive, HostListener } from '@angular/core'; import { NgControl } from '@angular/forms'; -import * as _ from 'lodash'; +import _ from 'lodash'; @Directive({ selector: '[cdTrim]' diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/enum/color.enum.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/enum/color.enum.ts index 0378827b2863..881cc012f350 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/enum/color.enum.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/enum/color.enum.ts @@ -1,6 +1,8 @@ -export enum Color { +import styles from '../../../styles.scss'; + +export class Color { // HEALTH - HEALTH_ERR = '#ff0000', - HEALTH_WARN = '#ffa500', - HEALTH_OK = '#00bb00' + static HEALTH_ERR = styles.healthColorError; + static HEALTH_WARN = styles.healthColorWarning; + static HEALTH_OK = styles.healthColorHealthy; } diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/cd-validators.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/cd-validators.ts index d72bcdc7c1ef..3541c2ba22b3 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/cd-validators.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/cd-validators.ts @@ -6,7 +6,7 @@ import { Validators } from '@angular/forms'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { Observable, of as observableOf, timer as observableTimer } from 'rxjs'; import { map, switchMapTo, take } from 'rxjs/operators'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/array.pipe.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/array.pipe.ts index b61b0b023e70..f82e35316ab9 100755 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/array.pipe.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/array.pipe.ts @@ -1,6 +1,6 @@ import { Pipe, PipeTransform } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; /** * Convert the given value to an array. diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/cd-date.pipe.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/cd-date.pipe.spec.ts index 08212b2687ae..b67ed62c8a6c 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/cd-date.pipe.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/cd-date.pipe.spec.ts @@ -1,6 +1,6 @@ import { DatePipe } from '@angular/common'; -import * as moment from 'moment'; +import moment from 'moment'; import { CdDatePipe } from './cd-date.pipe'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/duration.pipe.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/duration.pipe.spec.ts index 7241812e5604..a97f8a751666 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/duration.pipe.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/duration.pipe.spec.ts @@ -1,4 +1,4 @@ -import * as moment from 'moment'; +import moment from 'moment'; import { DurationPipe } from './duration.pipe'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/duration.pipe.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/duration.pipe.ts index c2b874ac4570..407de929154e 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/duration.pipe.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/duration.pipe.ts @@ -1,6 +1,6 @@ import { Pipe, PipeTransform } from '@angular/core'; -import * as moment from 'moment'; +import moment from 'moment'; @Pipe({ name: 'duration', diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/empty.pipe.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/empty.pipe.ts index 7ee51b63bb2e..fb753e8d9ac4 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/empty.pipe.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/empty.pipe.ts @@ -1,6 +1,6 @@ import { Pipe, PipeTransform } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; @Pipe({ name: 'empty' diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/health-color.pipe.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/health-color.pipe.spec.ts index 2293dd9aca78..471a877031b1 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/health-color.pipe.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/health-color.pipe.spec.ts @@ -1,3 +1,4 @@ +import styles from '../../../styles.scss'; import { HealthColorPipe } from './health-color.pipe'; describe('HealthColorPipe', () => { @@ -8,15 +9,15 @@ describe('HealthColorPipe', () => { }); it('transforms "HEALTH_OK"', () => { - expect(pipe.transform('HEALTH_OK')).toEqual({ color: '#00bb00' }); + expect(pipe.transform('HEALTH_OK')).toEqual({ color: styles.healthColorHealthy }); }); it('transforms "HEALTH_WARN"', () => { - expect(pipe.transform('HEALTH_WARN')).toEqual({ color: '#ffa500' }); + expect(pipe.transform('HEALTH_WARN')).toEqual({ color: styles.healthColorWarning }); }); it('transforms "HEALTH_ERR"', () => { - expect(pipe.transform('HEALTH_ERR')).toEqual({ color: '#ff0000' }); + expect(pipe.transform('HEALTH_ERR')).toEqual({ color: styles.healthColorError }); }); it('transforms others', () => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/map.pipe.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/map.pipe.ts index 9242bb4ebe24..1c0839d080b2 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/map.pipe.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/map.pipe.ts @@ -1,6 +1,6 @@ import { Pipe, PipeTransform } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; @Pipe({ name: 'map' diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/relative-date.pipe.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/relative-date.pipe.spec.ts index b3cf64c459bd..97859d106462 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/relative-date.pipe.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/relative-date.pipe.spec.ts @@ -1,4 +1,4 @@ -import * as moment from 'moment'; +import moment from 'moment'; import { RelativeDatePipe } from './relative-date.pipe'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/relative-date.pipe.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/relative-date.pipe.ts index c9e536c90343..1718ee258b30 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/relative-date.pipe.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/relative-date.pipe.ts @@ -1,6 +1,6 @@ import { Pipe, PipeTransform } from '@angular/core'; -import * as moment from 'moment'; +import moment from 'moment'; @Pipe({ name: 'relativeDate' diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/round.pipe.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/round.pipe.ts index 1365ddeffa2b..077831ac2966 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/round.pipe.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/round.pipe.ts @@ -1,6 +1,6 @@ import { Pipe, PipeTransform } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; @Pipe({ name: 'round' diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/truncate.pipe.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/truncate.pipe.ts index d825832f5e63..ff49c63860cf 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/truncate.pipe.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/truncate.pipe.ts @@ -1,6 +1,6 @@ import { Pipe, PipeTransform } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; @Pipe({ name: 'truncate' diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/upper-first.pipe.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/upper-first.pipe.ts index 11d7fc97abeb..b73b1bc20998 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/upper-first.pipe.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/upper-first.pipe.ts @@ -1,6 +1,6 @@ import { Pipe, PipeTransform } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; @Pipe({ name: 'upperFirst' diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/api-interceptor.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/api-interceptor.service.ts index 7384b527de10..5f025118c058 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/api-interceptor.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/api-interceptor.service.ts @@ -8,7 +8,7 @@ import { import { Injectable } from '@angular/core'; import { Router } from '@angular/router'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { Observable, throwError as observableThrowError } from 'rxjs'; import { catchError } from 'rxjs/operators'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/device.service.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/device.service.spec.ts index e9b41b1a9f30..00524317efc0 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/device.service.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/device.service.spec.ts @@ -1,6 +1,6 @@ import { TestBed } from '@angular/core/testing'; -import * as moment from 'moment'; +import moment from 'moment'; import { CdDevice } from '../models/devices'; import { DeviceService } from './device.service'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/device.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/device.service.ts index f81467f3825a..b433f235bffd 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/device.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/device.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -import * as moment from 'moment'; +import moment from 'moment'; import { CdDevice } from '../models/devices'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/formatter.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/formatter.service.ts index 1377dcdd2c22..a4b6d427b012 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/formatter.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/formatter.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; @Injectable({ providedIn: 'root' diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/notification.service.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/notification.service.spec.ts index 226fa4712fcd..52700dab7dee 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/notification.service.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/notification.service.spec.ts @@ -1,7 +1,7 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { fakeAsync, TestBed, tick } from '@angular/core/testing'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { ToastrService } from 'ngx-toastr'; import { configureTestBed } from '../../../testing/unit-test-helper'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/notification.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/notification.service.ts index fddc55f52f8c..c05dbce0f571 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/notification.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/notification.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { IndividualConfig, ToastrService } from 'ngx-toastr'; import { BehaviorSubject, Subject } from 'rxjs'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/password-policy.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/password-policy.service.ts index c768a36aa94f..295420c27dc0 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/password-policy.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/password-policy.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; 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 58c084bb0cd3..f7dbd1e564e1 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 @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { Icons } from '../../shared/enum/icons.enum'; import { NotificationType } from '../enum/notification-type.enum'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-alert.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-alert.service.ts index dc1731b92665..0e47306a6bc6 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-alert.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-alert.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { PrometheusService } from '../api/prometheus.service'; import { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-notification.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-notification.service.ts index 422c0b262ed9..ab94c686e1b5 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-notification.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-notification.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { PrometheusService } from '../api/prometheus.service'; import { CdNotificationConfig } from '../models/cd-notification'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-silence-matcher.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-silence-matcher.service.ts index c819a16f426f..7aec6d1d37cc 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-silence-matcher.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-silence-matcher.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { AlertmanagerSilenceMatcher, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/summary.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/summary.service.ts index a07834027737..f8282ae9758d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/summary.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/summary.service.ts @@ -1,7 +1,7 @@ import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { BehaviorSubject, Observable, Subscription } from 'rxjs'; import { filter, first } from 'rxjs/operators'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/task-manager.service.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/task-manager.service.spec.ts index 9a951169d639..675b037b1cf1 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/task-manager.service.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/task-manager.service.spec.ts @@ -1,6 +1,6 @@ import { fakeAsync, TestBed, tick } from '@angular/core/testing'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { BehaviorSubject } from 'rxjs'; import { configureTestBed } from '../../../testing/unit-test-helper'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/task-manager.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/task-manager.service.ts index 7e99e5aad900..0310a78263a5 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/task-manager.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/task-manager.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { ExecutingTask } from '../models/executing-task'; import { FinishedTask } from '../models/finished-task'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/task-message.service.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/task-message.service.spec.ts index 920d79dd73ab..282ef649a77d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/task-message.service.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/task-message.service.spec.ts @@ -1,7 +1,7 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { TestBed } from '@angular/core/testing'; -import * as _ from 'lodash'; +import _ from 'lodash'; import { configureTestBed } from '../../../testing/unit-test-helper'; import { RbdService } from '../api/rbd.service'; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/time-diff.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/time-diff.service.ts index 16fd45a4a49e..37477658ce96 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/time-diff.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/time-diff.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -import * as _ from 'lodash'; +import _ from 'lodash'; @Injectable({ providedIn: 'root' diff --git a/src/pybind/mgr/dashboard/frontend/src/styles.scss b/src/pybind/mgr/dashboard/frontend/src/styles.scss index 2fc5c504a692..9cff9458ed52 100644 --- a/src/pybind/mgr/dashboard/frontend/src/styles.scss +++ b/src/pybind/mgr/dashboard/frontend/src/styles.scss @@ -133,3 +133,24 @@ tags-input .tags { a { cursor: pointer; } + +:export { + chartHealthCenterTextColor: #151515; + chartHealthCenterTextDescriptionColor: #72767b; + chartHealthColorBlue: #06c; + chartHealthColorCyan: #73c5c5; + chartHealthColorGray: #ededed; + chartHealthColorGreen: #7cc674; + chartHealthColorLightBlue: #519de9; + chartHealthColorLightYellow: #f9e0a2; + chartHealthColorMagenta: #009596; + chartHealthColorOrange: #ef9234; + chartHealthColorPurple: #3c3d99; + chartHealthColorRed: #c9190b; + chartHealthColorYellow: #f6d173; + chartHealthTootlipBgColor: #000; + + healthColorError: #f00; + healthColorHealthy: #0b0; + healthColorWarning: #ffa500; +} diff --git a/src/pybind/mgr/dashboard/frontend/src/styles.scss.d.ts b/src/pybind/mgr/dashboard/frontend/src/styles.scss.d.ts new file mode 100644 index 000000000000..f805807c86c7 --- /dev/null +++ b/src/pybind/mgr/dashboard/frontend/src/styles.scss.d.ts @@ -0,0 +1,25 @@ +export interface Styles { + chartHealthColorRed: string; + chartHealthColorBlue: string; + chartHealthColorOrange: string; + chartHealthColorYellow: string; + chartHealthColorMagenta: string; + chartHealthColorGreen: string; + chartHealthColorGray: string; + chartHealthColorLightBlue: string; + chartHealthColorLightYellow: string; + chartHealthColorCyan: string; + chartHealthColorPurple: string; + + chartHealthCenterTextColor: string; + chartHealthCenterTextDescriptionColor: string; + chartHealthTootlipBgColor: string; + + healthColorError: string; + healthColorWarning: string; + healthColorHealthy: string; +} + +export const styles: Styles; + +export default styles; diff --git a/src/pybind/mgr/dashboard/frontend/src/styles/defaults/_bootstrap-defaults.scss b/src/pybind/mgr/dashboard/frontend/src/styles/defaults/_bootstrap-defaults.scss index 7c41fd080f71..b00aaa0195ce 100644 --- a/src/pybind/mgr/dashboard/frontend/src/styles/defaults/_bootstrap-defaults.scss +++ b/src/pybind/mgr/dashboard/frontend/src/styles/defaults/_bootstrap-defaults.scss @@ -25,20 +25,6 @@ $green: #0b0; $teal: #20c997 !default; $cyan: #17a2b8 !default; -$health-chart-colors: ( - 'red': #c9190b, - 'blue': #06c, - 'orange': #ef9234, - 'yellow': #f6d173, - 'magenta': #009596, - 'green': #7cc674, - 'gray': #ededed, - 'light-blue': #519de9, - 'light-yellow': #f9e0a2, - 'cyan': #73c5c5, - 'purple': #3c3d99 -); - $primary: #2b99a8; $secondary: #374249; $success: $green; diff --git a/src/pybind/mgr/dashboard/frontend/tsconfig.base.json b/src/pybind/mgr/dashboard/frontend/tsconfig.base.json index 5458df815180..29443d44f4b3 100644 --- a/src/pybind/mgr/dashboard/frontend/tsconfig.base.json +++ b/src/pybind/mgr/dashboard/frontend/tsconfig.base.json @@ -2,6 +2,7 @@ "compileOnSave": false, "compilerOptions": { "downlevelIteration": true, + "esModuleInterop": true, "importHelpers": true, "module": "es2020", "outDir": "./dist/out-tsc", -- 2.47.3