]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/dashboard: use SASS colors in TypeScript
authorAlfonso Martínez <almartin@redhat.com>
Wed, 19 Aug 2020 14:39:53 +0000 (16:39 +0200)
committerAlfonso Martínez <almartin@redhat.com>
Wed, 19 Aug 2020 14:46:21 +0000 (16:46 +0200)
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 <almartin@redhat.com>
154 files changed:
src/pybind/mgr/dashboard/frontend/.stylelintrc
src/pybind/mgr/dashboard/frontend/package-lock.json
src/pybind/mgr/dashboard/frontend/package.json
src/pybind/mgr/dashboard/frontend/src/app/app-routing.module.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-details/iscsi-target-details.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-details/iscsi-target-details.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-form/iscsi-target-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-image-settings-modal/iscsi-target-image-settings-modal.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-iqn-settings-modal/iscsi-target-iqn-settings-modal.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-list/iscsi-target-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/bootstrap-create-modal/bootstrap-create-modal.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/bootstrap-import-modal/bootstrap-import-modal.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-form/rbd-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-list/rbd-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-list/rbd-namespace-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-actions.model.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-list/rbd-trash-list.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-list/rbd-trash-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-move-modal/rbd-trash-move-modal.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-move-modal/rbd-trash-move-modal.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-chart/cephfs-chart.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-detail/cephfs-detail.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-tabs/cephfs-tabs.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-tabs/cephfs-tabs.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration-details/configuration-details.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration-form/configuration-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/inventory/inventory-devices/inventory-devices.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/inventory/inventory-devices/inventory-devices.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-form/mgr-module-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/monitor/monitor.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-creation-preview-modal/osd-creation-preview-modal.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-details/osd-details.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-devices-selection-groups/osd-devices-selection-groups.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-devices-selection-modal/osd-devices-selection-modal.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-flags-modal/osd-flags-modal.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-flags-modal/osd-flags-modal.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-form/drive-group.model.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-form/osd-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-performance-histogram/osd-performance-histogram.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-recv-speed-modal/osd-recv-speed-modal.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-recv-speed-modal/osd-recv-speed-modal.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-form/silence-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-form/silence-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-matcher-modal/silence-matcher-modal.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-matcher-modal/silence-matcher-modal.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-daemon-list/service-daemon-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/telemetry/telemetry.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/telemetry/telemetry.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health-pie/health-pie.component.scss
src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health-pie/health-pie.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health-pie/health-pie.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/mds-summary.pipe.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/mgr-summary.pipe.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/osd-summary.pipe.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-details/nfs-details.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form-client/nfs-form-client.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-list/nfs-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/crush-rule-form-modal/crush-rule-form-modal.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-details/pool-details.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-list/rgw-bucket-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-daemon-details/rgw-daemon-details.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-capability-modal/rgw-user-capability-modal.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-details/rgw-user-details.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-s3-key-modal/rgw-user-s3-key-modal.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-subuser-modal/rgw-user-subuser-modal.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/pg-category.service.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/smart-list/smart-list.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/smart-list/smart-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-details/role-details.component.ts
src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-form/role-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-password-form/user-password-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/ceph-service.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/cephfs.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/orchestrator.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/osd.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/rbd.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-bucket.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-user.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/settings.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/classes/crush.node.selection.class.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/classes/crush.node.selection.class.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/config-option/config-option.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/config-option/config-option.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/config-option/config-option.types.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/date-time-picker/date-time-picker.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/form-modal/form-modal.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/language-selector/language-selector.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/notifications-sidebar/notifications-sidebar.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/select/select-messages.model.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/select/select.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/submit-button/submit-button.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-actions/table-actions.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-key-value/table-key-value.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/decorators/cd-encode.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/directives/autofocus.directive.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/directives/dimless-binary-per-second.directive.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/directives/dimless-binary.directive.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/directives/trim.directive.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/enum/color.enum.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/forms/cd-validators.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/array.pipe.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/cd-date.pipe.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/duration.pipe.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/duration.pipe.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/empty.pipe.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/health-color.pipe.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/map.pipe.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/relative-date.pipe.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/relative-date.pipe.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/round.pipe.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/truncate.pipe.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/upper-first.pipe.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/api-interceptor.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/device.service.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/device.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/formatter.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/notification.service.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/notification.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/password-policy.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-alert-formatter.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-alert.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-notification.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-silence-matcher.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/summary.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/task-manager.service.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/task-manager.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/task-message.service.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/time-diff.service.ts
src/pybind/mgr/dashboard/frontend/src/styles.scss
src/pybind/mgr/dashboard/frontend/src/styles.scss.d.ts [new file with mode: 0644]
src/pybind/mgr/dashboard/frontend/src/styles/defaults/_bootstrap-defaults.scss
src/pybind/mgr/dashboard/frontend/tsconfig.base.json

index 244a8f22cdfc55835b5f72c84285382ccfe3c44f..c48d66dca19ba5e2922a797e5e0789e923ec3352 100644 (file)
@@ -2,7 +2,7 @@
   "extends": "stylelint-config-sass-guidelines",
   "plugins": [
     "stylelint-declaration-use-variable"
-  ],  
+  ],
   "rules": {
     "function-parentheses-space-inside": null,
     "indentation": null,
           ]
         }
       ]
+    ],
+    "property-no-unknown": [
+      true,
+      {
+        "ignoreSelectors": [":export"]
+      }
     ]
-  }  
+  }
 }
index 48a6487d083dc7cebecbbc5db2420ff18d4033f7..c5a44ce9284e99b4ff3065bbcbfe7a9a323f312d 100644 (file)
       "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",
       "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",
         "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",
           }
         },
         "fsevents": {
-          "dev": true,
-          "optional": true,
           "version": "2.1.3"
         },
         "glob-parent": {
           }
         },
         "fsevents": {
-          "dev": true,
-          "optional": true,
           "version": "2.1.3"
         },
         "glob-parent": {
           }
         },
         "fsevents": {
-          "dev": true,
-          "optional": true,
           "version": "2.1.3"
         },
         "glob-parent": {
index 48c21d82914721f837489eb5a236ed0345fbf3e0..16b7f29c3a6b1b9b3c78d1820f70480cbdf51446 100644 (file)
@@ -42,6 +42,9 @@
   },
   "private": true,
   "jest": {
+    "moduleNameMapper": {
+      "\\.scss$": "identity-obj-proxy"
+    },
     "preset": "jest-preset-angular",
     "setupFilesAfterEnv": [
       "<rootDir>/src/setupJest.ts"
     "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",
index 12330c96b319fab45cc23ed21ffacfb3405092ed..ad65a07834785e5278778470ff115afb4d870915 100644 (file)
@@ -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';
index e0cef596b6a320bed29e7a1b986cbba8fd660075..f671da3807d5a8619f8a8f5ea0304483c11f651b 100644 (file)
@@ -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';
index 983efd4580c597c3d8658a4204e1065376839fc8..f6bc232e27de0599cab1348af6b97c7c68f47f65 100644 (file)
@@ -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';
index 41d67ca87b249d652bc564a1798edf689c8ec973..eefb0bca28fa9f1a7b98355ed1f08983d2a992e1 100644 (file)
@@ -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';
index 36d2e70f0d579359045301ad2c8c04aff7fbebef..e78194b642925aedbda2e7b6e45d8ccf44fb8d4b 100644 (file)
@@ -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';
index dcb7a754c409bc34d6f5040400bcb1ecea190577..fae1142d2965aa83fab020d1fefff1b7dda32d73 100644 (file)
@@ -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';
index 1d7559f7285780dcea63702465d39ef5268b27d8..a6c82055ac253a5d5387a0710d8733ea73b368a4 100644 (file)
@@ -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';
index 16c52e7d36f5145e737b701492b038d59a9b2b5f..fba654f366e62f059340caa87ce8c2e06e55ca18 100644 (file)
@@ -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';
 
index e534596d107a2da929a79be5b58c9dc7c8134f37..ee58c3657869e55c91f24a0d62eded81bd036160 100644 (file)
@@ -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';
 
index f1ae327307198b480257430db220d31fa40ba1b8..c4146a088e2052cf2e4bb386353be7b65aea8859 100644 (file)
@@ -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';
 
index 3bc1bcc8af9367186473aecd82e8a7acd34cc456..70be703fdf4398131e188f56dd053d8ec6823d23 100644 (file)
@@ -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';
index cd66c7cf9c476a082b234001321870fc9f97389a..706a91be580d2c8daa703b077ea36e80d9f4d55c 100644 (file)
@@ -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';
index c966c52974bb904c19294ac82e7b9015812b22bc..396bd45eb0c5a2993eb2370d02db0762ace97bb2 100644 (file)
@@ -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';
index 1559a9854f9e1f2f8724b27100b6f2febefca972..d2d7378a8f5869fe04da82b8666cd00f89d57b51 100644 (file)
@@ -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';
index d975a1c4128940d6a264ffd2a9430e111f2b957f..52192d79f51d4b8664a32f75f00d3366b1b96def 100644 (file)
@@ -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';
 
index f6743c6607e72ba2dde2b7f904bb7fa1bd4ff7c3..cdd39f37845a2d17048c0f2e7b6b71940ad7a342 100644 (file)
@@ -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';
index 22fc800585ceee53bbf7c0c57c86a13c02f69eb9..8f9291f229c023175682fa99ae788614841cd18a 100644 (file)
@@ -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';
index ba1ccbed0c6577631b4b6c7f45bad364156875a9..f7c4912386814c55137242cb98d4a50195ea44f1 100644 (file)
@@ -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';
index 61dbc974fe1f81265f6b3a193211297bafc669fa..286982f8f2e16d9f40d7730dce354749c8e829f6 100644 (file)
@@ -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';
 
index 655aefa18b1fcf451f0d0714cfafb018d2853a2c..bbf63f4107c80e66b179b1c9660c9237aca0e482 100644 (file)
@@ -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';
index 13c9c87e164f44388e665798e5632a527b1008e1..78f5d1a84f6942e11107b625f7ea75d02a4433cd 100644 (file)
@@ -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';
index b02cc9673b9a2a00dca95d69bfe5a070298ab84d..c01d9dd7d2d8670d80d1c349eabb32f2fc44f3be 100644 (file)
@@ -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';
 
index 64449b3919fae430eeb364bd75142f057a73503f..0d313010c19f206a1e115a06725f89e780bc23f3 100644 (file)
@@ -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';
index df0e6d162610241d7b1be559bf701c531ce77525..0d4b67d43fe38c3580ed999362b24bfa8c8a8520 100755 (executable)
@@ -1,6 +1,6 @@
 import { Component, Input, OnChanges } from '@angular/core';
 
-import * as _ from 'lodash';
+import _ from 'lodash';
 
 @Component({
   selector: 'cd-configuration-details',
index aa9ab7b839cac45e0f6a924ccce5f1628773cd45..6bb71597e5013defad76543c6c47559af1e9df3e 100644 (file)
@@ -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';
index 391d87f7a0c9413209779c69967c36ceda2ede53..861ae203123ba3a548bc2cb78244999815ab6b37 100644 (file)
@@ -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';
 
index a095f6c6b77bb23ad346fcbdbeedec939853c348..9848545014dcb1c532c643a2d588766256666ebe 100644 (file)
@@ -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';
index b05f37af3199b25dea63b533bea58f01a883a85e..8bc8f8c9ad70dd8d4f260a01193893fb89674165 100644 (file)
@@ -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';
index d6ec52e680eaa485e6e57cd13124f39c2db58351..e19ad08879ee3323dc948d01012f2844dd22cbad 100644 (file)
@@ -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';
index 715ee5035c81dc6fd18fa496544b05b96c01e27f..2fdb9aced61beb2a372fc3a1291b80872d00b6f1 100644 (file)
@@ -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';
index 82d765dac5b9101f48f8607145346d2511a81434..841634d71bcb41e7f6cfcf3c54b6f052fc7d5c7c 100644 (file)
@@ -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';
index 61b86cad2e7e7d9d42b788d6ef04ebdfb212bce6..5a6a08fcc5fee7434b79703ed31ef21011b18442 100644 (file)
@@ -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';
index 2ed5e0fe1f76cf9e2c1b7a38a2ef952d2463029a..21f63d2bb743ca738fb8452cc87629e9ca6b6973 100644 (file)
@@ -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';
index 3693bc558cca794be18db0915e5b74e75568cfb5..cd23f8ce1e01c8e6fe94cb21a932695314326c76 100644 (file)
@@ -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';
index 4f677ac147dcdc7d8ee2e76e0c1ed40f5b4af7ec..217f471a8e82ec4ae38edff55c0fa0caf3a74427 100644 (file)
@@ -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';
index 78d472da16a36e253bf2b4f7b5fcc30ac1fe3f07..e91c9534e96555a94457c9473064050bfdc5ad2d 100644 (file)
@@ -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';
index 78ca001ce7a89a5f21e57fbfecd011910866bfcc..2245c69c60059ce8446fa96d9c14037715a7b46f 100644 (file)
@@ -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';
index dd5d3b0b13ed8239499aee1313c5a7956dffe969..53e370dde2249fb2f222e2747f1e5e3a39ee69ae 100644 (file)
@@ -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';
index 651ae814ffaef55481feff3600488e6960365b43..74d8b89f11f450ea78c6cce20fb790d9308280c9 100644 (file)
@@ -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';
index 52ccec23622fa1fcc72220e7385d831e75d343ae..3b921789415530bd5d5bc700f220e64f8e5511e3 100644 (file)
@@ -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';
 
index ef9483aab25c0e1451c3e56c554b04e7a86fc5a3..f42e9f15842bf8c84b4c4e3c90c049913674c6db 100644 (file)
@@ -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';
index f7024f7238770679c96b1cfc7e1ede60c846c759..44a2f3e05ffb2d5fa3a13f9727900b25be212858 100644 (file)
@@ -1,6 +1,6 @@
 import { Component, Input, OnChanges } from '@angular/core';
 
-import * as _ from 'lodash';
+import _ from 'lodash';
 
 @Component({
   selector: 'cd-osd-performance-histogram',
index c6351ea8a723875d72c56381f0c70007177f571b..368c9692496c6e89ed4d7845dea0049b2e424a9c 100755 (executable)
@@ -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';
 
index f4b165b2eea8880976ec0f906ed18edb29a59b1a..b96f84ddcff717759b71a89630f3909a8f76af0c 100755 (executable)
@@ -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';
index ee3d5e956e36410d82cbc6c2e0d2d5e3ad0f2cc1..69c0306f403e299a881dced135d7351b7649e456 100644 (file)
@@ -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';
 
index 0212ac0ebf299d9dab46928a41ce28fda80593f4..77a03102827ec7871a8de2e25fc6f18605c6d72f 100644 (file)
@@ -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 {
index c888fb5bb60a1b223625bd0bc0e15ba9704ebe96..f20dd4676931b287b8f49741cb58781d1840cd32 100644 (file)
@@ -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 {
index e0afaa805bd556ea0905b70626256294d6692acb..62eccd640e4c410240cba1f8c99ad2be0d7baea7 100644 (file)
@@ -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';
 
index 23fe095088956cbfd4b7ce24df8adcb0dd4a87b1..f37b9477184681a05f01a70b0b02e75af0db3292 100644 (file)
@@ -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';
index 16c23f3b5790f4467f473d1ce1f21b04303f01db..e0df084e2990eb4a2d9680a0e3ddb8be859a3b28 100644 (file)
@@ -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';
index 50d76cca905d6f65d9a7487a96e8663783571675..b224aaa22f740d0405d55d27649fc65879c89b7a 100644 (file)
@@ -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';
index 4bf6d36143a166467112e88d8c7ef633848053cc..10071d71c9e7ecdef234748c9c4db9663fc2a3f9 100644 (file)
@@ -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';
 
index 5ffb046cf16aaea210d35f30e75ecfa7d54be3c7..a655a635aba6d71f361788504bcbc26824a84752 100644 (file)
@@ -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';
 
index 2abbade4847ebf89a57a83eed1252fd2348e7994..d2c4c894459a09a17201d09e1e8763ceb8b9197a 100644 (file)
@@ -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';
index acbba504fee6c0be055f11cd0ff49928e569ecf7..23560b00427cf12bc2b4d6c9d2f6ca40b9aea222 100644 (file)
@@ -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;
index 96331ff0a5beec2d2ea07fae6ee7a5549d18fab0..25782502ca55b8d8fdd042a45ddda84c0d2bb29c 100644 (file)
@@ -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'];
 
index 0c08973da8a4fae9de950d8cb9a948a20e1abbf3..67ef99df1b9dab4dc9f89fc56b2e3960748440c6 100644 (file)
@@ -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(': ');
 
index df6222fd1c59a4c6ab13c66ed551c6a236a06239..bc54ff4a162c4910d404a28697ef5f56bd7e39b2 100644 (file)
@@ -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';
index c11fba7aab6151766777207028a4b863f9912fd3..717a113c8adea638e9a8839178ab1bf345bd640e 100644 (file)
@@ -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]
       }
     ]
   };
index 68853cb0bee04b8a07800987dbef28a12c350536..9cc72ac96ad7501cb48bd685f8f9e665f42c3228 100644 (file)
@@ -1,6 +1,6 @@
 import { Pipe, PipeTransform } from '@angular/core';
 
-import * as _ from 'lodash';
+import _ from 'lodash';
 
 @Pipe({
   name: 'mdsSummary'
index 286d5dd337f6adb4963e9e8aafcf647b1d2daa2b..ffdee7300991daa08a22ea2e531423fa2a364478 100644 (file)
@@ -1,6 +1,6 @@
 import { Pipe, PipeTransform } from '@angular/core';
 
-import * as _ from 'lodash';
+import _ from 'lodash';
 
 @Pipe({
   name: 'mgrSummary'
index 05fc7ad7f80c62458c90e4b69d16715f7c9edd31..72bea4a0aeaa7e56b869995f70b220237a859bc1 100644 (file)
@@ -1,6 +1,6 @@
 import { Pipe, PipeTransform } from '@angular/core';
 
-import * as _ from 'lodash';
+import _ from 'lodash';
 
 @Pipe({
   name: 'osdSummary'
index 2411aa22efff2e12c53f886182517b94b4013969..2c2e5e189af489a77d713902ee295fdc5e7b67a2 100644 (file)
@@ -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';
index 3ed39cff7c2cba8424ec56d74fb59ecec92584e9..a35b514eec3d213115f9ed05b00e0cfbdcd82c49 100644 (file)
@@ -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';
index 9987512859f6989b4b2b11fcabcae22420810f79..b07ecf4a6d34bccb4451cd073c2387ee1f6be43d 100644 (file)
@@ -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';
 
index 6cebd9f1ebecf9fd3c9815249b60c88145854249..817533ad30ced5f0400151aca7aae6ddae367581 100644 (file)
@@ -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';
index be4f85e0290d25fdc8087b15b616b0a8cccbedfa..ef3f38fb77477a8317da454c4f33d22e4aa6fddc 100644 (file)
@@ -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';
index 74242d9ec2a6dcd8050c578b8f32e73f2df2d8a3..8c9278216d8eaac496b08b15a4c666ea4d1c1a5b 100644 (file)
@@ -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';
index 0ca5df70d8cc19c61d8b688d509c240591fcf3b5..cfb42ecd9b839a596b519427599b45892322ea6f 100644 (file)
@@ -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';
index 7691b5e494ba7e089b3d00b02d6c1962361af3f4..b590e8b82d7a1f2cdcc53f7e130a3209a255b69a 100644 (file)
@@ -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';
index 06506f196146e345ff21d80ac23e6abb585bf8db..e4c216f68a332490af54da62caad9a552c42519e 100644 (file)
@@ -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';
 
index 6501d4ea7fc3401855bd43abc6c78f151416757a..97340f1452eaf8dc73b690153e7cb20596245897 100644 (file)
@@ -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';
index 5a9e3e221ad59676e5f9381abadb168f5e6fafd2..ad84c1a52f9fd00caa6602b1d568d2927a586b6e 100644 (file)
@@ -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';
 
index 484a2bf0a0fbfea00fc1c25a067371439b761403..658d6fcb559d8cb17237d47252ef9b0d53d9c4d8 100644 (file)
@@ -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';
index 2cc2601488c5076044f6d23a2cbc29352c6da052..5593c324b925b561c4a815c4850343b4716bc2da 100644 (file)
@@ -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';
index e338572aae378faa1ce3bec15f74a9f24dc354fc..eba47aa722b51aa9ce4ae6844adcd852275dfc54 100644 (file)
@@ -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';
index 3b1ce3fc81c37a31855840e5696915e1534cf08e..bc1e5a449f904e3621e92d2ff276a39dbb779689 100644 (file)
@@ -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';
index 276950c8d6ebc5812e504b8395db414cfa9e0466..7a2d998a86123eb57cabd0d8802a5beb3638714b 100644 (file)
@@ -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';
index 8055daf029a05976a8f4903127571c8e6c79e353..1aceb55f2742b598abe32560b3033f9cc1df9215 100644 (file)
@@ -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';
index c06129d39fc5118ea679302d5b15d0429401dc62..c1323c5f045e4af0eb40192c23fa04b2654f974e 100644 (file)
@@ -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';
index 3a5344970017c9a673a3e82d0d10e0889502e348..b7b239b62a16140204ab7b465509d122a054f60c 100644 (file)
@@ -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';
index cf77649502a59b64687334a2642a120d88d48a20..d9c90e8b24e9066425ee0cc1c41351ba0dd13973 100644 (file)
@@ -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';
index ac79d93fff7ff7167c61cbd0baffc4b566e6905b..7570528aba625610131e6414ece0e775d729a2b5 100644 (file)
@@ -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';
index f02a537c08c6db6164112aef1a0c2c7c5fed24e0..ee9c729813e4c8e356724ccfff6df74cd590007c 100644 (file)
@@ -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';
index 8470836fbcde4ffb0506f7f0443ab0a7d0c145d9..2479cb736ed5d358cb42960a81b513ae5e299c2a 100644 (file)
@@ -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';
index 08d8f463b028132c8cb837d18eded37d42200cd5..8a455e0ebcd74939f6c0184541595cae6fbbf349 100644 (file)
@@ -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';
index c3e1b22777942def645339039cb33aec65b4f5b1..627766ac2fe7e598e26c658f109ada636a059453 100644 (file)
@@ -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));
index e7ef06c15a5082f609ee2349ba1baab5672dd2db..7d6f9127e4cdb4f5e5797caefba0ca26ead25a7a 100644 (file)
@@ -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';
index 367a081f6f1a8e647bd8c649937d144c99b5583e..07bd4deb9cb1f06f1d4e38eb834e56d2212fe713 100644 (file)
@@ -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';
index 7f071900ec25a82a40c4aa8b250fafcf018af439..e5c53b74195acf9071166895b1f1003480557d48 100644 (file)
@@ -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';
index 0fe9883f9e3da2764773065b2528085eadd43ede..89a23393b90026201d9d6b435c2f2489cde60889 100644 (file)
@@ -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';
 
index cc088d0e95f602e53b9acdebf53020fc2dab7e39..b68aaf1c19351d697e30336ca79ee0550d00c549 100644 (file)
@@ -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';
index 38c02bd0557bdd13cbde120c07a6d37245861088..d65c2356f56900caf439405720da0f7217236ebf 100644 (file)
@@ -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';
index f939a55c104dd6cd9dc66eb2e0443e9925df12a2..4c8654d4cb954353a6b3de64f65c60a54d6dce90 100644 (file)
@@ -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';
 
index 6adc55dda4a82832770656237700764700f1b749..e4b9b597adee3110bb768f46a88c8e1e903d05e2 100644 (file)
@@ -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';
 
index 52433a8a419d055a65d32e8f7405da3ae6ca2be1..1e53fa064930e018ebce8a79275b2173e8a2db76 100644 (file)
@@ -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';
 
index fd67cdec30c0f888ab7b5e6233654dbdd4e074fb..d3bd7306b383a307be21a9f29276e0431f9cd214 100644 (file)
@@ -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';
index e1cf4b0ec3caf85b564f0fdab3c6d84f79ccb781..34cebbcc8773e4faddcc31778d47430a48e58678 100644 (file)
@@ -1,6 +1,6 @@
 import { AbstractControl } from '@angular/forms';
 
-import * as _ from 'lodash';
+import _ from 'lodash';
 
 import { CrushNode } from '../models/crush-node';
 
index be2db94354241e65b83fff49241821c9385558ea..6be0df05377437cecb21854d7c32e55fd7b796e2 100644 (file)
@@ -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';
index 7778deccb3cc5c06fc01eb6a11a3ba60acb7f00d..a8bdf44e081bb767de8b6f88f2c6c8dcb1e0399c 100644 (file)
@@ -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';
index eb1bce5748d221500387a67a6e05194d723d028a..73e006fee7aadf2ca11d5fe9c3a3f190a82e75d0 100644 (file)
@@ -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';
index c3ff2a7ff717e5c1ddd3b38438b6cce7545b497d..390edbfd84a4cdc7b058ee7e6a4c3dca32866aff 100644 (file)
@@ -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({
index b8dad67a46b5d567ddd763da7a174cd0efcb2927..dec43d33b63db8a577321e6355cbcbdb858dd5e9 100755 (executable)
@@ -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';
index 6f18afffd7f60a91f4a7d73f006fd608158b227f..49fc02f9146c6ea3f52779560a6a68a0bd7809ed 100644 (file)
@@ -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';
index 5a0f9b603e9e82044a03a436bd4bf0be84d9e350..a334b8b77fc43e8b3d53daf3678c625637c10485 100644 (file)
@@ -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';
index 6362b4e26cb564d4cc4481a895f66d8f12d48105..7a28ffb5e8059131ec8f8a8c910b4dd32c864dc3 100644 (file)
@@ -1,4 +1,4 @@
-import * as _ from 'lodash';
+import _ from 'lodash';
 
 export class SelectMessages {
   empty: string;
index e4b780fcdf956ca38163ede2c84a188288cf889b..b303af4c138d2675aa4367f67cb99030f1c956fd 100644 (file)
@@ -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';
index 0d4d0e770b10c96371f4b1f1cb0bcdcaa1d5382d..ad4d6094affa031ac12f3436f320c4dec2a5c780 100644 (file)
@@ -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';
 
index fb11b64a68f93797731a28c6f913b6491c0e2bc9..a6f30a066d3f54a701478bc5f4dcb6d63dcdeef0 100644 (file)
@@ -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';
index 38bd942b20ae4f4b18aa05be5c4c6d2533ddced9..dd48a431bedd4ac46a3e971a48868132d2fcb617 100644 (file)
@@ -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';
index baf3505cc1572730c26e34ba8c37bb2fecb5bca4..774c754b3a0cc4fdd350037b7040c259537afe54 100644 (file)
@@ -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';
index 51259b27b16f24d6f86244e37e3f0bb6ee61123f..25f4b95cf15e6ac66aa7b95f6f642d7410d8c761 100644 (file)
@@ -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';
index d201d53b7bd23b53042f02d7b224e1579c7e0f82..afff2ec6d380f7b0d6e336ce1d5034e48dd88d30 100644 (file)
@@ -1,4 +1,4 @@
-import * as _ from 'lodash';
+import _ from 'lodash';
 
 /**
  * This decorator can be used in a class or method.
index 169571f3d09252c7f2a548e874a5a752f4d8c9d2..dc34b9f3c30bc21288826fb7c8b8491ee2f8a7d4 100644 (file)
@@ -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
index 011439248fa618f890f67d33f7a7e332de67e8be..a90e2b8f8aba91859f84ce08991e34e52b2047a9 100644 (file)
@@ -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';
index cda47925cc862b741605a89410843c7c2e266c6e..1c27ae1cecf42c5b3f888f2d9270383839e4ada9 100644 (file)
@@ -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';
index 7731721dd902eeeaa4f2422b2c4c2ebb8cc62303..4b3604e430962232423ffcd3d3163b7cbf1f7dc6 100644 (file)
@@ -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]'
index 0378827b2863bdc5293d3eb87543b22f8de16ccb..881cc012f3508ea5bd1bd28e33cb0a96eed9e8ae 100644 (file)
@@ -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;
 }
index d72bcdc7c1ef30860d32cd90c890305a20ab9281..3541c2ba22b3d89de5bab2b073ad6407db671248 100644 (file)
@@ -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';
 
index b61b0b023e70eb89a705dd9d421d155d8368c302..f82e35316ab924b6a796a720ca6469eb4b784954 100755 (executable)
@@ -1,6 +1,6 @@
 import { Pipe, PipeTransform } from '@angular/core';
 
-import * as _ from 'lodash';
+import _ from 'lodash';
 
 /**
  * Convert the given value to an array.
index 08212b2687ae316fd48f598794ed47c425663603..b67ed62c8a6c7c60017571e11fa8eb0039ec304f 100644 (file)
@@ -1,6 +1,6 @@
 import { DatePipe } from '@angular/common';
 
-import * as moment from 'moment';
+import moment from 'moment';
 
 import { CdDatePipe } from './cd-date.pipe';
 
index 7241812e56047e6f4b0ed0f7f0f75c1cd61a2a44..a97f8a751666b921fa68896c1785eca101b8ef03 100644 (file)
@@ -1,4 +1,4 @@
-import * as moment from 'moment';
+import moment from 'moment';
 
 import { DurationPipe } from './duration.pipe';
 
index c2b874ac4570c8feb4b75da449dbcf7a7ac0b867..407de929154e89c39cf282d130a368fade962ae7 100644 (file)
@@ -1,6 +1,6 @@
 import { Pipe, PipeTransform } from '@angular/core';
 
-import * as moment from 'moment';
+import moment from 'moment';
 
 @Pipe({
   name: 'duration',
index 7ee51b63bb2e98ec3fedcd38a443e2b4b7f28ab5..fb753e8d9ac48e3c66cffdc11dad185738359c44 100644 (file)
@@ -1,6 +1,6 @@
 import { Pipe, PipeTransform } from '@angular/core';
 
-import * as _ from 'lodash';
+import _ from 'lodash';
 
 @Pipe({
   name: 'empty'
index 2293dd9aca78d1fc4f6d77909b899751a74ca6fa..471a877031b11713b7604317b32676552d11ffb7 100644 (file)
@@ -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', () => {
index 9242bb4ebe24e11bf311e7f14bec13c8e18499af..1c0839d080b20454f03b6e8e456fff098d12680e 100644 (file)
@@ -1,6 +1,6 @@
 import { Pipe, PipeTransform } from '@angular/core';
 
-import * as _ from 'lodash';
+import _ from 'lodash';
 
 @Pipe({
   name: 'map'
index b3cf64c459bdc1f6ecb9ff333035374149746aab..97859d10646218b79d793710a0930b0b66484555 100644 (file)
@@ -1,4 +1,4 @@
-import * as moment from 'moment';
+import moment from 'moment';
 
 import { RelativeDatePipe } from './relative-date.pipe';
 
index c9e536c903434d006d77aeca184c256a328d837e..1718ee258b30d6b6c70345bbe2be7b9a2728b9be 100644 (file)
@@ -1,6 +1,6 @@
 import { Pipe, PipeTransform } from '@angular/core';
 
-import * as moment from 'moment';
+import moment from 'moment';
 
 @Pipe({
   name: 'relativeDate'
index 1365ddeffa2bbbdf7082565c66eb61f8bcf209d9..077831ac296628096dbe2782f254e6e703bea89b 100644 (file)
@@ -1,6 +1,6 @@
 import { Pipe, PipeTransform } from '@angular/core';
 
-import * as _ from 'lodash';
+import _ from 'lodash';
 
 @Pipe({
   name: 'round'
index d825832f5e6332d3fbd334b82b0e53d8615f53c2..ff49c63860cf61ecc572b3a26143cbe4f85190a6 100644 (file)
@@ -1,6 +1,6 @@
 import { Pipe, PipeTransform } from '@angular/core';
 
-import * as _ from 'lodash';
+import _ from 'lodash';
 
 @Pipe({
   name: 'truncate'
index 11d7fc97abeb8d59d04fe1883a2c5c860a819477..b73b1bc20998c88643ac2604705187ceb6d828ea 100644 (file)
@@ -1,6 +1,6 @@
 import { Pipe, PipeTransform } from '@angular/core';
 
-import * as _ from 'lodash';
+import _ from 'lodash';
 
 @Pipe({
   name: 'upperFirst'
index 7384b527de106d56486c3861e88043c5e1e84b88..5f025118c058a4a8efc68c2b7dce1cdf0135e656 100644 (file)
@@ -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';
 
index e9b41b1a9f308ba3d7c2583213e1e2eaf83559a0..00524317efc00a32035701e64fb4f10a68f3ae76 100644 (file)
@@ -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';
index f81467f3825a0abfba5668de1d8000b956ab2ff1..b433f235bffd94fc139a2d292fe3bbf284d82426 100644 (file)
@@ -1,6 +1,6 @@
 import { Injectable } from '@angular/core';
 
-import * as moment from 'moment';
+import moment from 'moment';
 
 import { CdDevice } from '../models/devices';
 
index 1377dcdd2c220fdf1565886c560fd82f973e3053..a4b6d427b012ff7d15900c0a325cd74a318f235c 100644 (file)
@@ -1,6 +1,6 @@
 import { Injectable } from '@angular/core';
 
-import * as _ from 'lodash';
+import _ from 'lodash';
 
 @Injectable({
   providedIn: 'root'
index 226fa4712fcd7cbe895ad6688580d10d4f34377a..52700dab7dee171018fe0fd0abe520306e2aaff9 100644 (file)
@@ -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';
index fddc55f52f8c9a7f284874abf85ec08610a9c416..c05dbce0f571fb7ea173f64e095c84407a632d8c 100644 (file)
@@ -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';
 
index c768a36aa94fd1da0917ab530ee0b0acce50b76b..295420c27dc030f336197363fce8ca645f7565ad 100644 (file)
@@ -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';
 
index 58c084bb0cd33f298e2317ad356a60dbf967f0a9..f7dbd1e564e1a89831ec1f8d19de9d371ce706f3 100644 (file)
@@ -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';
index dc1731b92665796168dc31f6acba908040295e8e..0e47306a6bc6350c4a2056b1530047fb8cba7e66 100644 (file)
@@ -1,6 +1,6 @@
 import { Injectable } from '@angular/core';
 
-import * as _ from 'lodash';
+import _ from 'lodash';
 
 import { PrometheusService } from '../api/prometheus.service';
 import {
index 422c0b262ed99f88dfc855e55eb847290447791f..ab94c686e1b5bfcb3ee95a51b75b703f71355c7b 100644 (file)
@@ -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';
index c819a16f426faef62dda07b6e8cf579a9bf4e265..7aec6d1d37ccc362e99fed2d28f8e7106b3f7ec2 100644 (file)
@@ -1,6 +1,6 @@
 import { Injectable } from '@angular/core';
 
-import * as _ from 'lodash';
+import _ from 'lodash';
 
 import {
   AlertmanagerSilenceMatcher,
index a0783402773751cd8056019723a949a9a33a60d7..f8282ae9758de265cf526df01be6a0f3322468d1 100644 (file)
@@ -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';
 
index 9a951169d639b036ed922b91791da74bde49f0ee..675b037b1cf1282792b4426f91689e7e831ea797 100644 (file)
@@ -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';
index 7e99e5aad9000327797b76912b354ab68394d38d..0310a78263a540bf877ad2802e53ff58c24ee1b6 100644 (file)
@@ -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';
index 920d79dd73ab3b0949528f2d3d9cb3211be00081..282ef649a77df3d68634097b3631624742580db9 100644 (file)
@@ -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';
index 16fd45a4a49e0bdaf4904411482455f5debab99f..37477658ce9603d790940e3e5f0fcf31d15a07da 100644 (file)
@@ -1,6 +1,6 @@
 import { Injectable } from '@angular/core';
 
-import * as _ from 'lodash';
+import _ from 'lodash';
 
 @Injectable({
   providedIn: 'root'
index 2fc5c504a692f04aeec04afcd768eae3281e5489..9cff9458ed52cffaa00efaebca7bfe7971bb0fb3 100644 (file)
@@ -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 (file)
index 0000000..f805807
--- /dev/null
@@ -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;
index 7c41fd080f71056ab5b28d9339ebf4c0b7d83507..b00aaa0195cea5a6138fa858b673d11148319802 100644 (file)
@@ -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;
index 5458df815180c9acf631542fab35ddde5fb6d106..29443d44f4b3d694e824d95621a08d95fea49b44 100644 (file)
@@ -2,6 +2,7 @@
   "compileOnSave": false,
   "compilerOptions": {
     "downlevelIteration": true,
+    "esModuleInterop": true,
     "importHelpers": true,
     "module": "es2020",
     "outDir": "./dist/out-tsc",