]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Switch ng2-toastr for ngx-toastr 29050/head
authorTiago Melo <tmelo@suse.com>
Tue, 2 Apr 2019 14:39:05 +0000 (14:39 +0000)
committerErnesto Puerta <epuertat@redhat.com>
Wed, 17 Jul 2019 15:12:23 +0000 (17:12 +0200)
Fixes: https://tracker.ceph.com/issues/40768
Signed-off-by: Tiago Melo <tmelo@suse.com>
(cherry picked from commit 67f5e5b18b71ccabcaa8d9e35c57630d17395b06)
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
Required manual (trivial) fixing of the following files:
Conflicts:
      src/pybind/mgr/dashboard/frontend/package.json
      src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/alert-list/alert-list.component.spec.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-list/silence-list.component.spec.ts
      src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.spec.ts
      src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-notification.service.spec.ts

54 files changed:
src/pybind/mgr/dashboard/HACKING.rst
src/pybind/mgr/dashboard/frontend/angular.json
src/pybind/mgr/dashboard/frontend/package-lock.json
src/pybind/mgr/dashboard/frontend/package.json
src/pybind/mgr/dashboard/frontend/src/app/app.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/app.component.ts
src/pybind/mgr/dashboard/frontend/src/app/app.module.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-discovery-modal/iscsi-target-discovery-modal.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-form/iscsi-target-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-list/iscsi-target-list.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/overview/overview.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/pool-edit-mode-modal/pool-edit-mode-modal.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/pool-edit-peer-modal/pool-edit-peer-modal.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/pool-list/pool-list.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-form/rbd-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-images/rbd-images.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-list/rbd-list.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.spec.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-move-modal/rbd-trash-move-modal.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-purge-modal/rbd-trash-purge-modal.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-restore-modal/rbd-trash-restore-modal.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration-form/configuration-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-form/mgr-module-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-list/mgr-module-list.component.spec.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-pg-scrub-modal/osd-pg-scrub-modal.component.spec.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/prometheus/prometheus-list/prometheus-list.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-list/nfs-list.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form.component.spec.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-list/pool-list.component.spec.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-user-form/rgw-user-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-swift-key-modal/rgw-user-swift-key-modal.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-details/role-details.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-form/role-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-list/role-list.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-list/user-list.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-tabs/user-tabs.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notifications/notifications.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/directives/copy2clipboard-button.directive.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/models/cd-notification.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/api-interceptor.service.spec.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/prometheus-alert-formatter.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-alert.service.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-notification.service.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/task-wrapper.service.spec.ts

index 55894e03e2b3ff8c756569b4c7fde56d65644eb7..9c2050da01e62953e880cb122f50baec23c4fe35 100644 (file)
@@ -214,7 +214,7 @@ Example:
     import { Component } from '@angular/core';
     import { Router } from '@angular/router';
 
-    import { ToastsManager } from 'ng2-toastr';
+    import { ToastrManager } from 'ngx-toastr';
 
     import { Credentials } from '../../../shared/models/credentials.model';
     import { HostService } from './services/host.service';
@@ -257,7 +257,7 @@ or removed to/from a set of items (e.g.: 'Add permission' to a user vs. 'Create
 
 In order to enforce the use of this wording, a service ``ActionLabelsI18n`` has
 been created, which provides translated labels for use in UI elements.
-    
+
 Frontend branding
 ~~~~~~~~~~~~~~~~~
 
@@ -1462,7 +1462,7 @@ decorators that can be used to add more information:
 
 * ``@EndpointDoc()`` for documentation of endpoints. It has four optional arguments
   (explained below): ``description``, ``group``, ``parameters`` and``responses``.
-* ``@ControllerDoc()`` for documentation of controller or group associated with 
+* ``@ControllerDoc()`` for documentation of controller or group associated with
   the endpoints. It only takes the two first arguments: ``description`` and``group``.
 
 
@@ -1471,7 +1471,7 @@ decorators that can be used to add more information:
 
 ``group``: By default, an endpoint is grouped together with other endpoints
 within the same controller class. ``group`` is a string that can be used to
-assign an endpoint or all endpoints in a class to another controller or a 
+assign an endpoint or all endpoints in a class to another controller or a
 conceived group name.
 
 
@@ -1505,7 +1505,7 @@ for nested parameters).
       'item2': (str, 'Description of item2', True),  # item2 is optional
       'item3': (str, 'Description of item3', True, 'foo'),  # item3 is optional with 'foo' as default value
   }, 'Description of my_dictionary')})
+
 If the parameter is a ``list`` of primitive types, the type should be
 surrounded with square brackets.
 
index 068aa101dfcccd7a6bec698d56997845607b6801..b64f58a32a6acfa48679ddf0d13d2f12aa8d4a5d 100644 (file)
@@ -21,8 +21,8 @@
               "src/favicon.ico"
             ],
             "styles": [
+              "node_modules/ngx-toastr/toastr.css",
               "node_modules/bootstrap/dist/css/bootstrap.css",
-              "node_modules/ng2-toastr/bundles/ng2-toastr.min.css",
               "node_modules/fork-awesome/css/fork-awesome.css",
               "node_modules/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css",
               "node_modules/ngx-bootstrap/datepicker/bs-datepicker.css",
index ed5fec69af010b83ddf8309866ba33a4c349921f..46ec0cb622374924ffb6514581502798ad5e0a70 100644 (file)
         "chart.js": "^2.6.0"
       }
     },
-    "ng2-toastr": {
-      "version": "github:zzakir/ng2-toastr#0eafd72f1581058113ca338218d77f5c27f5b630",
-      "from": "github:zzakir/ng2-toastr#0eafd72"
-    },
     "ng2-tree": {
       "version": "2.0.0-rc.11",
       "resolved": "https://registry.npmjs.org/ng2-tree/-/ng2-tree-2.0.0-rc.11.tgz",
       "resolved": "https://registry.npmjs.org/ngx-bootstrap/-/ngx-bootstrap-3.2.0.tgz",
       "integrity": "sha512-oLSLIWZgRiIfcuxyXLMZUOhX3wZtg6lpuMbdo/0UzMDg2bSOe1XPskcKZ/iuOa3FOlU9rjuYMzswHYYV5f/QCA=="
     },
+    "ngx-toastr": {
+      "version": "10.0.2",
+      "resolved": "https://registry.npmjs.org/ngx-toastr/-/ngx-toastr-10.0.2.tgz",
+      "integrity": "sha512-sHlVAzRnuGYPR24l/C8+ftgWQuAJQ7XFNY55xCrPzSK8+jPg4ZViY6xSEQ5Aw0OXmjsa5aeBqWwAg5CVb1t7cg==",
+      "requires": {
+        "tslib": "^1.9.0"
+      }
+    },
     "nice-try": {
       "version": "1.0.5",
       "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
index 89adcc19e5565aac642f550c85d61c5e0fb9c9a5..938767f1188c0b8ae2f50ab298368410c90636be 100644 (file)
@@ -77,9 +77,9 @@
     "moment": "2.24.0",
     "ng-block-ui": "2.1.1",
     "ng2-charts": "1.6.0",
-    "ng2-toastr": "zzakir/ng2-toastr#0eafd72",
     "ng2-tree": "2.0.0-rc.11",
     "ngx-bootstrap": "3.2.0",
+    "ngx-toastr": "10.0.2",
     "rxjs": "6.4.0",
     "rxjs-compat": "6.4.0",
     "tslib": "1.9.3",
index a157a44eb3fb4ddebc10c5ab9ed5ecd3587b1854..16fb5adb2e457f616acbc2a823ef1da2bcb1808d 100644 (file)
@@ -2,8 +2,6 @@ import { NO_ERRORS_SCHEMA } from '@angular/core';
 import { ComponentFixture, TestBed } from '@angular/core/testing';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
-
 import { configureTestBed } from '../testing/unit-test-helper';
 import { AppComponent } from './app.component';
 import { AuthStorageService } from './shared/services/auth-storage.service';
@@ -13,7 +11,7 @@ describe('AppComponent', () => {
   let fixture: ComponentFixture<AppComponent>;
 
   configureTestBed({
-    imports: [RouterTestingModule, ToastModule.forRoot()],
+    imports: [RouterTestingModule],
     declarations: [AppComponent],
     schemas: [NO_ERRORS_SCHEMA],
     providers: [AuthStorageService]
index 938449dde251b2db2d1ee4558a200e85bccf3850..363a213d214c296e655606f82e2c4c55a6338c63 100644 (file)
@@ -1,7 +1,6 @@
-import { Component, ViewContainerRef } from '@angular/core';
+import { Component } from '@angular/core';
 import { Router } from '@angular/router';
 
-import { ToastsManager } from 'ng2-toastr';
 import { TooltipConfig } from 'ngx-bootstrap/tooltip';
 
 import { AuthStorageService } from './shared/services/auth-storage.service';
@@ -23,14 +22,7 @@ import { AuthStorageService } from './shared/services/auth-storage.service';
 export class AppComponent {
   title = 'cd';
 
-  constructor(
-    private authStorageService: AuthStorageService,
-    private router: Router,
-    public toastr: ToastsManager,
-    private vcr: ViewContainerRef
-  ) {
-    this.toastr.setRootViewContainerRef(this.vcr);
-  }
+  constructor(private authStorageService: AuthStorageService, private router: Router) {}
 
   isLoginActive() {
     return this.router.url === '/login' || !this.authStorageService.isLoggedIn();
index 920069ab0bf3a9b00a2cc0a4e3295d947ad6a75f..3da5eada655f13679149c058d6ec51c8037d3c03 100644 (file)
@@ -7,10 +7,10 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
 import { JwtModule } from '@auth0/angular-jwt';
 import { I18n } from '@ngx-translate/i18n-polyfill';
 import { BlockUIModule } from 'ng-block-ui';
-import { ToastModule, ToastOptions } from 'ng2-toastr/ng2-toastr';
 import { AccordionModule } from 'ngx-bootstrap/accordion';
 import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
 import { TabsModule } from 'ngx-bootstrap/tabs';
+import { ToastrModule } from 'ngx-toastr';
 
 import { AppRoutingModule } from './app-routing.module';
 import { AppComponent } from './app.component';
@@ -21,13 +21,6 @@ import { ApiInterceptorService } from './shared/services/api-interceptor.service
 import { JsErrorHandler } from './shared/services/js-error-handler.service';
 import { SharedModule } from './shared/shared.module';
 
-export class CustomOption extends ToastOptions {
-  animate = 'flyRight';
-  newestOnTop = true;
-  showCloseButton = true;
-  enableHTML = true;
-}
-
 export function jwtTokenGetter() {
   return localStorage.getItem('access_token');
 }
@@ -41,7 +34,11 @@ registerLocaleData(LocaleHelper.getLocaleData(), LocaleHelper.getLocale());
     BlockUIModule.forRoot(),
     BrowserModule,
     BrowserAnimationsModule,
-    ToastModule.forRoot(),
+    ToastrModule.forRoot({
+      positionClass: 'toast-top-right',
+      preventDuplicates: true,
+      enableHtml: true
+    }),
     AppRoutingModule,
     CoreModule,
     SharedModule,
@@ -66,10 +63,6 @@ registerLocaleData(LocaleHelper.getLocaleData(), LocaleHelper.getLocale());
       useClass: ApiInterceptorService,
       multi: true
     },
-    {
-      provide: ToastOptions,
-      useClass: CustomOption
-    },
     i18nProviders,
     I18n
   ],
index 69b59047cf78c2a1dd7a3c21d8e056efddc89484..f6236e707f070cfe41243c3c556ed84887458690 100644 (file)
@@ -8,8 +8,8 @@ import { ReactiveFormsModule } from '@angular/forms';
 import { By } from '@angular/platform-browser';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
 import { BsModalRef } from 'ngx-bootstrap/modal';
+import { ToastrModule } from 'ngx-toastr';
 
 import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
 import { Permission } from '../../../shared/models/permissions';
@@ -31,7 +31,7 @@ describe('IscsiTargetDiscoveryModalComponent', () => {
       HttpClientTestingModule,
       ReactiveFormsModule,
       SharedModule,
-      ToastModule.forRoot(),
+      ToastrModule.forRoot(),
       RouterTestingModule
     ],
     providers: [i18nProviders, BsModalRef]
index 3b3ffd9243f20dd87287d7f6cb22a5e2640d3a4d..c4eb15dd40b8332c692fc09a6d82492c2dee168c 100644 (file)
@@ -4,7 +4,7 @@ import { ReactiveFormsModule } from '@angular/forms';
 import { ActivatedRoute } from '@angular/router';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
+import { ToastrModule } from 'ngx-toastr';
 
 import { ActivatedRouteStub } from '../../../../testing/activated-route-stub';
 import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
@@ -130,7 +130,7 @@ describe('IscsiTargetFormComponent', () => {
         ReactiveFormsModule,
         HttpClientTestingModule,
         RouterTestingModule,
-        ToastModule.forRoot()
+        ToastrModule.forRoot()
       ],
       providers: [
         i18nProviders,
index 7a48d2ab6bf22fc24ddab198c0df1332ce8fc957..2f93c86a63ea2bb5f3ca8220939a1eec3ae958e3 100644 (file)
@@ -3,9 +3,9 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
 import { By } from '@angular/platform-browser';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
 import { TreeModule } from 'ng2-tree';
 import { TabsModule } from 'ngx-bootstrap/tabs';
+import { ToastrModule } from 'ngx-toastr';
 import { BehaviorSubject, of } from 'rxjs';
 
 import {
@@ -40,7 +40,7 @@ describe('IscsiTargetListComponent', () => {
       SharedModule,
       TabsModule.forRoot(),
       TreeModule,
-      ToastModule.forRoot()
+      ToastrModule.forRoot()
     ],
     declarations: [IscsiTargetListComponent, IscsiTabsComponent, IscsiTargetDetailsComponent],
     providers: [TaskListService, i18nProviders]
index 417733f11ca63d6c769995b2b6ee416d8c65892e..a7a0aa4a72b9438144f1ac7892f343096654a7a7 100644 (file)
@@ -2,10 +2,10 @@ import { HttpClientTestingModule } from '@angular/common/http/testing';
 import { ComponentFixture, TestBed } from '@angular/core/testing';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
 import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
 import { ProgressbarModule } from 'ngx-bootstrap/progressbar';
 import { TabsModule } from 'ngx-bootstrap/tabs';
+import { ToastrModule } from 'ngx-toastr';
 
 import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
 import { SharedModule } from '../../../../shared/shared.module';
@@ -34,7 +34,7 @@ describe('OverviewComponent', () => {
       ProgressbarModule.forRoot(),
       HttpClientTestingModule,
       RouterTestingModule,
-      ToastModule.forRoot()
+      ToastrModule.forRoot()
     ],
     providers: i18nProviders
   });
index efa9281cf28664d258e484c65630b209404e014a..5d3af10a417a24ee2fca6ab26f9962ed1ba45a31 100644 (file)
@@ -3,8 +3,8 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
 import { ReactiveFormsModule } from '@angular/forms';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
 import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal';
+import { ToastrModule } from 'ngx-toastr';
 import { of } from 'rxjs';
 
 import {
@@ -31,7 +31,7 @@ describe('PoolEditModeModalComponent', () => {
       ReactiveFormsModule,
       RouterTestingModule,
       SharedModule,
-      ToastModule.forRoot()
+      ToastrModule.forRoot()
     ],
     providers: [BsModalRef, BsModalService, i18nProviders]
   });
index 99f199a924ec43d36991b2386fcebf3120a184b5..6353ce89765b4781181a5013a460be02efb70479 100644 (file)
@@ -3,8 +3,8 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
 import { ReactiveFormsModule } from '@angular/forms';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
 import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal';
+import { ToastrModule } from 'ngx-toastr';
 import { of } from 'rxjs';
 
 import {
@@ -32,7 +32,7 @@ describe('PoolEditPeerModalComponent', () => {
       ReactiveFormsModule,
       RouterTestingModule,
       SharedModule,
-      ToastModule.forRoot()
+      ToastrModule.forRoot()
     ],
     providers: [BsModalRef, BsModalService, i18nProviders]
   });
index 819aa0e7beae1cced98179ac5dfd91bb0852534e..129dd7c2a1b836ae6a9d3a9c89c6bd4811af281c 100644 (file)
@@ -2,10 +2,10 @@ import { HttpClientTestingModule } from '@angular/common/http/testing';
 import { ComponentFixture, TestBed } from '@angular/core/testing';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
 import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
 import { ProgressbarModule } from 'ngx-bootstrap/progressbar';
 import { TabsModule } from 'ngx-bootstrap/tabs';
+import { ToastrModule } from 'ngx-toastr';
 
 import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
 import { SharedModule } from '../../../../shared/shared.module';
@@ -25,7 +25,7 @@ describe('PoolListComponent', () => {
       ProgressbarModule.forRoot(),
       HttpClientTestingModule,
       RouterTestingModule,
-      ToastModule.forRoot()
+      ToastrModule.forRoot()
     ],
     providers: i18nProviders
   });
index 9d15d10cfe69f95b9259deda36f8304f7f316403..46b5ac21b61dbb2f011538082bd78de064fac12f 100644 (file)
@@ -5,7 +5,7 @@ import { ActivatedRoute } from '@angular/router';
 import { RouterTestingModule } from '@angular/router/testing';
 import { TooltipModule } from 'ngx-bootstrap/tooltip';
 
-import { ToastModule } from 'ng2-toastr';
+import { ToastrModule } from 'ngx-toastr';
 
 import { By } from '@angular/platform-browser';
 import { ActivatedRouteStub } from '../../../../testing/activated-route-stub';
@@ -26,7 +26,7 @@ describe('RbdFormComponent', () => {
       HttpClientTestingModule,
       ReactiveFormsModule,
       RouterTestingModule,
-      ToastModule.forRoot(),
+      ToastrModule.forRoot(),
       SharedModule,
       TooltipModule
     ],
index 8faade1e5ded5af91c89e1067ece232c57fb701e..e1fda888a4697761dffd794a00502987b41dc04e 100644 (file)
@@ -2,9 +2,9 @@ import { HttpClientTestingModule } from '@angular/common/http/testing';
 import { ComponentFixture, TestBed } from '@angular/core/testing';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
 import { TabsModule } from 'ngx-bootstrap/tabs';
 import { TooltipModule } from 'ngx-bootstrap/tooltip';
+import { ToastrModule } from 'ngx-toastr';
 
 import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
 import { TaskListService } from '../../../shared/services/task-list.service';
@@ -34,7 +34,7 @@ describe('RbdImagesComponent', () => {
       RouterTestingModule,
       SharedModule,
       TabsModule.forRoot(),
-      ToastModule.forRoot(),
+      ToastrModule.forRoot(),
       TooltipModule.forRoot()
     ],
     providers: [TaskListService, i18nProviders]
index 346a6bd65067866d7ee10b29ae68fc225c6e1fff..1a418fe83ec4cf01ed3f359d6733195b2f8d3092 100644 (file)
@@ -3,12 +3,12 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
 import { By } from '@angular/platform-browser';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
 import { AlertModule } from 'ngx-bootstrap/alert';
 import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
 import { ModalModule } from 'ngx-bootstrap/modal';
 import { TabsModule } from 'ngx-bootstrap/tabs';
 import { TooltipModule } from 'ngx-bootstrap/tooltip';
+import { ToastrModule } from 'ngx-toastr';
 import { BehaviorSubject, of } from 'rxjs';
 
 import {
@@ -47,7 +47,7 @@ describe('RbdListComponent', () => {
       TabsModule.forRoot(),
       ModalModule.forRoot(),
       TooltipModule.forRoot(),
-      ToastModule.forRoot(),
+      ToastrModule.forRoot(),
       AlertModule.forRoot(),
       RouterTestingModule,
       HttpClientTestingModule
index fe292c50a766528b5786aa52dd5ca1ba2cf7729b..1002b82f4d8dbba011c79d12a513f40e66d38893 100644 (file)
@@ -3,8 +3,8 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
 import { ReactiveFormsModule } from '@angular/forms';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
 import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal';
+import { ToastrModule } from 'ngx-toastr';
 
 import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
 import { ApiModule } from '../../../shared/api/api.module';
@@ -22,7 +22,7 @@ describe('RbdSnapshotFormComponent', () => {
       ComponentsModule,
       HttpClientTestingModule,
       ApiModule,
-      ToastModule.forRoot(),
+      ToastrModule.forRoot(),
       RouterTestingModule
     ],
     declarations: [RbdSnapshotFormComponent],
index e925a86f42e775cf156f9bc5b4fd35f791871c8a..414ba70acffe5c745340c462d2538015fdeeb0ac 100644 (file)
@@ -4,8 +4,8 @@ import { By } from '@angular/platform-browser';
 import { RouterTestingModule } from '@angular/router/testing';
 
 import { I18n } from '@ngx-translate/i18n-polyfill';
-import { ToastModule } from 'ng2-toastr';
 import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal';
+import { ToastrModule } from 'ngx-toastr';
 import { Subject, throwError as observableThrowError } from 'rxjs';
 
 import {
@@ -47,7 +47,7 @@ describe('RbdSnapshotListComponent', () => {
     imports: [
       DataTableModule,
       ComponentsModule,
-      ToastModule.forRoot(),
+      ToastrModule.forRoot(),
       ApiModule,
       HttpClientTestingModule,
       RouterTestingModule,
index 5f8126aa428f83ef388108953d0ee24f3c1e4bd0..403341c8a42143d1e034bebf37e66e0df0510bf5 100644 (file)
@@ -2,7 +2,7 @@ import { HttpClientTestingModule } from '@angular/common/http/testing';
 import { ComponentFixture, TestBed } from '@angular/core/testing';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
+import { ToastrModule } from 'ngx-toastr';
 import { of } from 'rxjs';
 
 import { By } from '@angular/platform-browser';
@@ -23,7 +23,7 @@ describe('RbdTrashListComponent', () => {
 
   configureTestBed({
     declarations: [RbdTrashListComponent],
-    imports: [SharedModule, HttpClientTestingModule, RouterTestingModule, ToastModule.forRoot()],
+    imports: [SharedModule, HttpClientTestingModule, RouterTestingModule, ToastrModule.forRoot()],
     providers: [TaskListService, i18nProviders]
   });
 
index 737d6b5b66225dce64b47750e3232dc13f401eb0..1c77198e8d969698d3c5c7e2352e23b984069596 100644 (file)
@@ -4,9 +4,9 @@ import { ReactiveFormsModule } from '@angular/forms';
 import { RouterTestingModule } from '@angular/router/testing';
 
 import * as moment from 'moment';
-import { ToastModule } from 'ng2-toastr';
 import { BsDatepickerModule } from 'ngx-bootstrap/datepicker';
 import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal';
+import { ToastrModule } from 'ngx-toastr';
 
 import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
 import { NotificationService } from '../../../shared/services/notification.service';
@@ -24,7 +24,7 @@ describe('RbdTrashMoveModalComponent', () => {
       HttpClientTestingModule,
       RouterTestingModule,
       SharedModule,
-      ToastModule.forRoot(),
+      ToastrModule.forRoot(),
       BsDatepickerModule.forRoot()
     ],
     declarations: [RbdTrashMoveModalComponent],
index 749236c0da0632d9ea9719526235cae986278973..32969f10d7c5e48406c839711e274a7dcd28effa 100644 (file)
@@ -3,8 +3,8 @@ import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testin
 import { ReactiveFormsModule } from '@angular/forms';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
 import { BsModalRef } from 'ngx-bootstrap/modal';
+import { ToastrModule } from 'ngx-toastr';
 
 import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
 import { Permission } from '../../../shared/models/permissions';
@@ -22,7 +22,7 @@ describe('RbdTrashPurgeModalComponent', () => {
       HttpClientTestingModule,
       ReactiveFormsModule,
       SharedModule,
-      ToastModule.forRoot(),
+      ToastrModule.forRoot(),
       RouterTestingModule
     ],
     declarations: [RbdTrashPurgeModalComponent],
index 3689b2a18cbb86004af6135eb0e5616920701d26..caa6cf945eb3e32ac4b73bd155851593a7a4f36d 100644 (file)
@@ -3,8 +3,8 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
 import { ReactiveFormsModule } from '@angular/forms';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
 import { BsModalRef } from 'ngx-bootstrap/modal';
+import { ToastrModule } from 'ngx-toastr';
 
 import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
 import { NotificationService } from '../../../shared/services/notification.service';
@@ -20,7 +20,7 @@ describe('RbdTrashRestoreModalComponent', () => {
     imports: [
       ReactiveFormsModule,
       HttpClientTestingModule,
-      ToastModule.forRoot(),
+      ToastrModule.forRoot(),
       SharedModule,
       RouterTestingModule
     ],
index 1c73c559c07ebaffe904c95e9478eb497b991835..070455fbb45bcd613abd04cd964212228efa3a06 100644 (file)
@@ -4,7 +4,7 @@ import { ReactiveFormsModule } from '@angular/forms';
 import { ActivatedRoute } from '@angular/router';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
+import { ToastrModule } from 'ngx-toastr';
 
 import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
 import { ConfigFormModel } from '../../../../shared/components/config-option/config-option.model';
@@ -20,7 +20,7 @@ describe('ConfigurationFormComponent', () => {
       HttpClientTestingModule,
       ReactiveFormsModule,
       RouterTestingModule,
-      ToastModule.forRoot(),
+      ToastrModule.forRoot(),
       SharedModule
     ],
     declarations: [ConfigurationFormComponent],
index 1021482f8445932aefe5d6990bfa7959baf39b17..1832ccd8c3af5e9ae50db0558671aeefca0c688d 100644 (file)
@@ -3,7 +3,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
 import { ReactiveFormsModule } from '@angular/forms';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
+import { ToastrModule } from 'ngx-toastr';
 
 import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
 import { SharedModule } from '../../../../shared/shared.module';
@@ -20,7 +20,7 @@ describe('MgrModuleFormComponent', () => {
       ReactiveFormsModule,
       RouterTestingModule,
       SharedModule,
-      ToastModule.forRoot()
+      ToastrModule.forRoot()
     ],
     providers: i18nProviders
   });
index 93b1498896925ba9a2516eb6d9cfa26b9e32740c..252bd67e2085a40563d4c2335356631fc2eb9a0e 100644 (file)
@@ -3,8 +3,8 @@ import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testin
 import { By } from '@angular/platform-browser';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
 import { TabsModule } from 'ngx-bootstrap/tabs';
+import { ToastrModule } from 'ngx-toastr';
 import { of as observableOf, throwError as observableThrowError } from 'rxjs';
 
 import {
@@ -33,7 +33,7 @@ describe('MgrModuleListComponent', () => {
       SharedModule,
       HttpClientTestingModule,
       TabsModule.forRoot(),
-      ToastModule.forRoot()
+      ToastrModule.forRoot()
     ],
     providers: [MgrModuleService, NotificationService, i18nProviders]
   });
index 00583a014e87796f1eafb72c2f5ab747bb6f890f..ae4bafec4c2c96337d97dde4ef17e62e1ff6e805 100644 (file)
@@ -4,8 +4,8 @@ import { ReactiveFormsModule } from '@angular/forms';
 import { RouterTestingModule } from '@angular/router/testing';
 
 import * as _ from 'lodash';
-import { ToastModule } from 'ng2-toastr';
 import { BsModalRef, ModalModule } from 'ngx-bootstrap/modal';
+import { ToastrModule } from 'ngx-toastr';
 
 import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
 import { NotificationType } from '../../../../shared/enum/notification-type.enum';
@@ -32,7 +32,7 @@ describe('OsdFlagsModalComponent', () => {
       SharedModule,
       HttpClientTestingModule,
       RouterTestingModule,
-      ToastModule.forRoot()
+      ToastrModule.forRoot()
     ],
     declarations: [OsdFlagsModalComponent],
     providers: [BsModalRef, i18nProviders]
index beda0bd02671304e76ff19bd485652b25ed77212..3fb4ee792e27e00b0b1fc979fce4a951e3976b85 100644 (file)
@@ -4,8 +4,8 @@ import { ReactiveFormsModule } from '@angular/forms';
 import { Router } from '@angular/router';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
 import { BsModalRef, ModalModule } from 'ngx-bootstrap/modal';
+import { ToastrModule } from 'ngx-toastr';
 import { of as observableOf } from 'rxjs';
 
 import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
@@ -27,7 +27,7 @@ describe('OsdPgScrubModalComponent', () => {
       ReactiveFormsModule,
       RouterTestingModule,
       SharedModule,
-      ToastModule.forRoot()
+      ToastrModule.forRoot()
     ],
     declarations: [OsdPgScrubModalComponent],
     providers: [BsModalRef, i18nProviders]
index b373629132751c833281cfff7b5523185ee8e2f2..57855adbddcbd37059d9e76dc33a18823a308ef3 100755 (executable)
@@ -4,8 +4,8 @@ import { ReactiveFormsModule } from '@angular/forms';
 import { RouterTestingModule } from '@angular/router/testing';
 
 import * as _ from 'lodash';
-import { ToastModule } from 'ng2-toastr';
 import { BsModalRef, ModalModule } from 'ngx-bootstrap/modal';
+import { ToastrModule } from 'ngx-toastr';
 import { of as observableOf } from 'rxjs';
 
 import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
@@ -25,7 +25,7 @@ describe('OsdRecvSpeedModalComponent', () => {
       ReactiveFormsModule,
       RouterTestingModule,
       SharedModule,
-      ToastModule.forRoot()
+      ToastrModule.forRoot()
     ],
     declarations: [OsdRecvSpeedModalComponent],
     providers: [BsModalRef, i18nProviders]
index 7901a05cb33f91cd4eb624498c2fc6951c39d5ba..acf76ed801b5f25154faa5c8db53fa55eea691bc 100644 (file)
@@ -1,8 +1,8 @@
 import { HttpClientTestingModule } from '@angular/common/http/testing';
 import { ComponentFixture, TestBed } from '@angular/core/testing';
 
-import { ToastModule } from 'ng2-toastr';
 import { TabsModule } from 'ngx-bootstrap/tabs';
+import { ToastrModule } from 'ngx-toastr';
 
 import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
 import { SharedModule } from '../../../../shared/shared.module';
@@ -13,7 +13,7 @@ describe('PrometheusListComponent', () => {
   let fixture: ComponentFixture<PrometheusListComponent>;
 
   configureTestBed({
-    imports: [HttpClientTestingModule, TabsModule.forRoot(), ToastModule.forRoot(), SharedModule],
+    imports: [HttpClientTestingModule, TabsModule.forRoot(), ToastrModule.forRoot(), SharedModule],
     declarations: [PrometheusListComponent],
     providers: [i18nProviders]
   });
index ec3a11e906d3a4adbf716d1e06e06636d6b259f3..cd9f3299caee9d21f6fb67631223d67c465d467d 100644 (file)
@@ -4,8 +4,8 @@ import { ReactiveFormsModule } from '@angular/forms';
 import { ActivatedRoute } from '@angular/router';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
 import { TypeaheadModule } from 'ngx-bootstrap/typeahead';
+import { ToastrModule } from 'ngx-toastr';
 
 import { ActivatedRouteStub } from '../../../../testing/activated-route-stub';
 import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
@@ -28,7 +28,7 @@ describe('NfsFormComponent', () => {
         ReactiveFormsModule,
         RouterTestingModule,
         SharedModule,
-        ToastModule.forRoot(),
+        ToastrModule.forRoot(),
         TypeaheadModule.forRoot()
       ],
       providers: [
index 056e6b45b053c769bb74c846095047022f10d5a7..bb1b882ba53b90e4f86c10b2d6d25a940ff4a541 100644 (file)
@@ -3,8 +3,8 @@ import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testin
 import { By } from '@angular/platform-browser';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
 import { TabsModule } from 'ngx-bootstrap/tabs';
+import { ToastrModule } from 'ngx-toastr';
 import { BehaviorSubject, of } from 'rxjs';
 
 import {
@@ -39,7 +39,7 @@ describe('NfsListComponent', () => {
         HttpClientTestingModule,
         RouterTestingModule,
         SharedModule,
-        ToastModule.forRoot(),
+        ToastrModule.forRoot(),
         TabsModule.forRoot()
       ],
       providers: [TaskListService, i18nProviders]
index 66c69ee65ddd183b8827c8a8343660600bf5ca51..9db51d4d5849bbfb4160e3aa4086dcfe09e7c096 100644 (file)
@@ -3,8 +3,8 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
 import { By } from '@angular/platform-browser';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
 import { BsModalRef } from 'ngx-bootstrap/modal';
+import { ToastrModule } from 'ngx-toastr';
 import { of } from 'rxjs';
 
 import {
@@ -28,7 +28,7 @@ describe('ErasureCodeProfileFormComponent', () => {
   let data: {};
 
   configureTestBed({
-    imports: [HttpClientTestingModule, RouterTestingModule, ToastModule.forRoot(), PoolModule],
+    imports: [HttpClientTestingModule, RouterTestingModule, ToastrModule.forRoot(), PoolModule],
     providers: [ErasureCodeProfileService, BsModalRef, i18nProviders]
   });
 
index 7f78a0ef4f054e7cc646d7bd3965caf05869c043..297c75622a57dfb8a3b9de3ca8c71e563e7dd24c 100644 (file)
@@ -5,9 +5,9 @@ import { By } from '@angular/platform-browser';
 import { ActivatedRoute, Router, Routes } from '@angular/router';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
 import { BsModalService } from 'ngx-bootstrap/modal';
 import { TabsModule } from 'ngx-bootstrap/tabs';
+import { ToastrModule } from 'ngx-toastr';
 import { of } from 'rxjs';
 
 import {
@@ -136,7 +136,7 @@ describe('PoolFormComponent', () => {
     imports: [
       HttpClientTestingModule,
       RouterTestingModule.withRoutes(routes),
-      ToastModule.forRoot(),
+      ToastrModule.forRoot(),
       TabsModule.forRoot(),
       PoolModule
     ],
index 21e553ba14721bdb0a0dd6e891e948d990c47c37..80ee99ce0e70f4dd61499be7e14351961da778b3 100644 (file)
@@ -2,9 +2,9 @@ import { HttpClientTestingModule } from '@angular/common/http/testing';
 import { ComponentFixture, TestBed } from '@angular/core/testing';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
 import { BsModalService } from 'ngx-bootstrap/modal';
 import { TabsModule } from 'ngx-bootstrap/tabs';
+import { ToastrModule } from 'ngx-toastr';
 import { of } from 'rxjs';
 
 import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
@@ -43,7 +43,7 @@ describe('PoolListComponent', () => {
     declarations: [PoolListComponent, PoolDetailsComponent, RbdConfigurationListComponent],
     imports: [
       SharedModule,
-      ToastModule.forRoot(),
+      ToastrModule.forRoot(),
       RouterTestingModule,
       TabsModule.forRoot(),
       HttpClientTestingModule
index 22d9710604d4c30b61069e81d4583c5335baa860..dfebff4b6ea81c18ee3a57d47136dfba173e487e 100644 (file)
@@ -4,7 +4,7 @@ import { FormControl, ReactiveFormsModule } from '@angular/forms';
 import { Router } from '@angular/router';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
+import { ToastrModule } from 'ngx-toastr';
 import { of as observableOf } from 'rxjs';
 
 import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
@@ -26,7 +26,7 @@ describe('RgwBucketFormComponent', () => {
       ReactiveFormsModule,
       RouterTestingModule,
       SharedModule,
-      ToastModule.forRoot()
+      ToastrModule.forRoot()
     ],
     providers: [i18nProviders]
   });
index a4d5038dff6ab4597f404440763b940b102dfc7c..38f74ced342a5505848128da730db036bd52bba2 100644 (file)
@@ -4,8 +4,8 @@ import { FormControl, ReactiveFormsModule } from '@angular/forms';
 import { Router } from '@angular/router';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
 import { BsModalService } from 'ngx-bootstrap/modal';
+import { ToastrModule } from 'ngx-toastr';
 import { of as observableOf } from 'rxjs';
 
 import { configureTestBed, FormHelper, i18nProviders } from '../../../../testing/unit-test-helper';
@@ -29,7 +29,7 @@ describe('RgwUserFormComponent', () => {
       ReactiveFormsModule,
       RouterTestingModule,
       SharedModule,
-      ToastModule.forRoot()
+      ToastrModule.forRoot()
     ],
     providers: [BsModalService, i18nProviders]
   });
index 8850fc71f93cf6f0c9a8627d8d8ec4f69b76739b..38d9bde31a3ef9b61267feefca5649b68f97e0c3 100644 (file)
@@ -2,8 +2,8 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
 import { FormsModule } from '@angular/forms';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
 import { BsModalRef } from 'ngx-bootstrap/modal';
+import { ToastrModule } from 'ngx-toastr';
 
 import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
 import { SharedModule } from '../../../shared/shared.module';
@@ -15,7 +15,7 @@ describe('RgwUserSwiftKeyModalComponent', () => {
 
   configureTestBed({
     declarations: [RgwUserSwiftKeyModalComponent],
-    imports: [ToastModule.forRoot(), FormsModule, SharedModule, RouterTestingModule],
+    imports: [ToastrModule.forRoot(), FormsModule, SharedModule, RouterTestingModule],
     providers: [BsModalRef, i18nProviders]
   });
 
index 71ec6fbf7e13c539b1f251f1807ba93b3e035631..e14cbb63e66a5023785b80d12d239a3c3781a270 100644 (file)
@@ -2,7 +2,6 @@ import { HttpClientTestingModule } from '@angular/common/http/testing';
 import { ComponentFixture, TestBed } from '@angular/core/testing';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
 import { TabsModule } from 'ngx-bootstrap/tabs';
 
 import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
@@ -15,13 +14,7 @@ describe('RoleDetailsComponent', () => {
   let fixture: ComponentFixture<RoleDetailsComponent>;
 
   configureTestBed({
-    imports: [
-      SharedModule,
-      ToastModule.forRoot(),
-      TabsModule.forRoot(),
-      RouterTestingModule,
-      HttpClientTestingModule
-    ],
+    imports: [SharedModule, TabsModule.forRoot(), RouterTestingModule, HttpClientTestingModule],
     declarations: [RoleDetailsComponent],
     providers: i18nProviders
   });
index 639fa915018678c1647b4021ca36042a14d33831..b5d36b5861e21832512af9186cb9e70011126533 100644 (file)
@@ -5,7 +5,7 @@ import { ReactiveFormsModule } from '@angular/forms';
 import { Router, Routes } from '@angular/router';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
+import { ToastrModule } from 'ngx-toastr';
 import { of } from 'rxjs';
 
 import { configureTestBed, FormHelper, i18nProviders } from '../../../../testing/unit-test-helper';
@@ -37,7 +37,7 @@ describe('RoleFormComponent', () => {
         RouterTestingModule.withRoutes(routes),
         HttpClientTestingModule,
         ReactiveFormsModule,
-        ToastModule.forRoot(),
+        ToastrModule.forRoot(),
         SharedModule
       ],
       declarations: [RoleFormComponent, FakeComponent],
index 30048cf9bf7a6ee23ea760eb2e0239035373edcf..7274125f04dc162a67e1a291bf6ec67425b35641 100644 (file)
@@ -3,8 +3,8 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
 import { By } from '@angular/platform-browser';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
 import { TabsModule } from 'ngx-bootstrap/tabs';
+import { ToastrModule } from 'ngx-toastr';
 
 import {
   configureTestBed,
@@ -26,7 +26,7 @@ describe('RoleListComponent', () => {
     declarations: [RoleListComponent, RoleDetailsComponent, UserTabsComponent],
     imports: [
       SharedModule,
-      ToastModule.forRoot(),
+      ToastrModule.forRoot(),
       TabsModule.forRoot(),
       RouterTestingModule,
       HttpClientTestingModule
index 9d0cfb72b89afb54614c502a453d802e459fa5c4..b91a71fd3a6d54974c4bbd4e1e08c43ece759954 100644 (file)
@@ -5,8 +5,8 @@ import { ReactiveFormsModule } from '@angular/forms';
 import { Router, Routes } from '@angular/router';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
 import { BsModalService } from 'ngx-bootstrap/modal';
+import { ToastrModule } from 'ngx-toastr';
 import { of } from 'rxjs';
 
 import { configureTestBed, FormHelper, i18nProviders } from '../../../../testing/unit-test-helper';
@@ -47,7 +47,7 @@ describe('UserFormComponent', () => {
         HttpClientTestingModule,
         ReactiveFormsModule,
         ComponentsModule,
-        ToastModule.forRoot(),
+        ToastrModule.forRoot(),
         SharedModule
       ],
       declarations: [UserFormComponent, FakeComponent],
index f1604a13d46c3991ca06c71f8fb05da4d8a65356..1a34a2f6b7d667f53681218dd4fadc50b3422b0f 100644 (file)
@@ -3,8 +3,8 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
 import { By } from '@angular/platform-browser';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
 import { TabsModule } from 'ngx-bootstrap/tabs';
+import { ToastrModule } from 'ngx-toastr';
 
 import {
   configureTestBed,
@@ -24,7 +24,7 @@ describe('UserListComponent', () => {
   configureTestBed({
     imports: [
       SharedModule,
-      ToastModule.forRoot(),
+      ToastrModule.forRoot(),
       TabsModule.forRoot(),
       RouterTestingModule,
       HttpClientTestingModule
index 4071d25fbaef2a7aa705bb03dc5cd20ed13b3949..d73395141d031578c51ece1f9002b3c17cdad3a5 100644 (file)
@@ -2,7 +2,6 @@ import { HttpClientTestingModule } from '@angular/common/http/testing';
 import { ComponentFixture, TestBed } from '@angular/core/testing';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
 import { TabsModule } from 'ngx-bootstrap/tabs';
 
 import { configureTestBed } from '../../../../testing/unit-test-helper';
@@ -14,13 +13,7 @@ describe('UserTabsComponent', () => {
   let fixture: ComponentFixture<UserTabsComponent>;
 
   configureTestBed({
-    imports: [
-      SharedModule,
-      ToastModule.forRoot(),
-      TabsModule.forRoot(),
-      RouterTestingModule,
-      HttpClientTestingModule
-    ],
+    imports: [SharedModule, TabsModule.forRoot(), RouterTestingModule, HttpClientTestingModule],
     declarations: [UserTabsComponent]
   });
 
index a11be2b8c68dfae7a49529ef34c241ef9d7a3eb6..6ce6241ff6036a3fa8665cd6b2636a311f533e2e 100644 (file)
@@ -1,8 +1,8 @@
 import { HttpClientTestingModule } from '@angular/common/http/testing';
 import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
 
-import { ToastModule } from 'ng2-toastr';
 import { PopoverModule } from 'ngx-bootstrap/popover';
+import { ToastrModule } from 'ngx-toastr';
 
 import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
 import { PrometheusService } from '../../../shared/api/prometheus.service';
@@ -21,7 +21,7 @@ describe('NotificationsComponent', () => {
       HttpClientTestingModule,
       PopoverModule.forRoot(),
       SharedModule,
-      ToastModule.forRoot()
+      ToastrModule.forRoot()
     ],
     declarations: [NotificationsComponent],
     providers: i18nProviders
index 23aa4c12c8a86c0ea82d295dc1ea0c01e86a389f..55efbaabdbef54e7a8f6cb36fc91047a1cf1d95c 100644 (file)
@@ -1,6 +1,6 @@
 import { Directive, ElementRef, HostListener, Input, OnInit, Renderer2 } from '@angular/core';
 
-import { ToastsManager } from 'ng2-toastr';
+import { ToastrService } from 'ngx-toastr';
 
 @Directive({
   selector: '[cdCopy2ClipboardButton]'
@@ -12,7 +12,7 @@ export class Copy2ClipboardButtonDirective implements OnInit {
   constructor(
     private elementRef: ElementRef,
     private renderer: Renderer2,
-    private toastr: ToastsManager
+    private toastr: ToastrService
   ) {}
 
   ngOnInit() {
index cc0bebfcf6f878f6c28d8d2ce71d9d30695cf5ea..1acbba1a5e4ea69932d4703d50b813eff146669c 100644 (file)
@@ -1,4 +1,4 @@
-import { ToastOptions } from 'ng2-toastr';
+import { IndividualConfig } from 'ngx-toastr';
 import { NotificationType } from '../enum/notification-type.enum';
 
 export class CdNotificationConfig {
@@ -13,7 +13,7 @@ export class CdNotificationConfig {
     public type: NotificationType = NotificationType.info,
     public title?: string,
     public message?: string, // Use this for additional information only
-    public options?: any | ToastOptions,
+    public options?: any | IndividualConfig,
     public application: string = 'Ceph'
   ) {
     this.applicationClass = this.classes[this.application];
index a8fcb4e81a8fd13e11fa252c090e7badb9fa9ffe..744f2137b5a5faa0269b598d576bebf1ad64f364 100644 (file)
@@ -3,7 +3,7 @@ import { HttpClientTestingModule, HttpTestingController } from '@angular/common/
 import { fakeAsync, TestBed, tick } from '@angular/core/testing';
 import { Router } from '@angular/router';
 
-import { ToastsManager } from 'ng2-toastr';
+import { ToastrService } from 'ngx-toastr';
 
 import { configureTestBed, i18nProviders } from '../../../testing/unit-test-helper';
 import { AppModule } from '../../app.module';
@@ -53,7 +53,7 @@ describe('ApiInterceptorService', () => {
       NotificationService,
       i18nProviders,
       {
-        provide: ToastsManager,
+        provide: ToastrService,
         useValue: {
           error: () => true
         }
index e6fd703491d6608fc74a07a6850e6abd2a77d702..09578f42138248b40aa54d7375a2190080f7bf7b 100644 (file)
@@ -2,7 +2,7 @@ import { DatePipe } from '@angular/common';
 import { fakeAsync, TestBed, tick } from '@angular/core/testing';
 
 import * as _ from 'lodash';
-import { ToastsManager } from 'ng2-toastr';
+import { ToastrService } from 'ngx-toastr';
 
 import { configureTestBed, i18nProviders } from '../../../testing/unit-test-helper';
 import { NotificationType } from '../enum/notification-type.enum';
@@ -26,7 +26,7 @@ describe('NotificationService', () => {
       DatePipe,
       NotificationService,
       TaskMessageService,
-      { provide: ToastsManager, useValue: toastFakeService },
+      { provide: ToastrService, useValue: toastFakeService },
       { provide: CdDatePipe, useValue: { transform: (d) => d } },
       i18nProviders
     ]
@@ -201,7 +201,7 @@ describe('NotificationService', () => {
   });
 
   describe('showToasty', () => {
-    let toastr: ToastsManager;
+    let toastr: ToastrService;
     const time = '2022-02-22T00:00:00.000Z';
 
     beforeEach(() => {
@@ -209,7 +209,7 @@ describe('NotificationService', () => {
       spyOn(global, 'Date').and.returnValue(baseTime);
       spyOn(window, 'setTimeout').and.callFake((fn) => fn());
 
-      toastr = TestBed.get(ToastsManager);
+      toastr = TestBed.get(ToastrService);
       // spyOn needs to know the methods before spying and can't read the array for clarification
       ['error', 'info', 'success'].forEach((method: 'error' | 'info' | 'success') =>
         spyOn(toastr, method).and.stub()
index 7dcb01392b06754841e4f9cd3b49a30fb9c9fbcc..217acf2648d097f9307ae66d154a46bf9f031f28 100644 (file)
@@ -1,7 +1,7 @@
 import { Injectable } from '@angular/core';
 
 import * as _ from 'lodash';
-import { ToastOptions, ToastsManager } from 'ng2-toastr';
+import { IndividualConfig, ToastrService } from 'ngx-toastr';
 import { BehaviorSubject } from 'rxjs';
 
 import { NotificationType } from '../enum/notification-type.enum';
@@ -27,7 +27,7 @@ export class NotificationService {
   KEY = 'cdNotifications';
 
   constructor(
-    public toastr: ToastsManager,
+    public toastr: ToastrService,
     private taskMessageService: TaskMessageService,
     private cdDatePipe: CdDatePipe
   ) {
@@ -81,7 +81,7 @@ export class NotificationService {
     type: NotificationType,
     title: string,
     message?: string,
-    options?: any | ToastOptions,
+    options?: any | IndividualConfig,
     application?: string
   ): number;
   show(config: CdNotificationConfig | (() => CdNotificationConfig)): number;
@@ -89,7 +89,7 @@ export class NotificationService {
     arg: NotificationType | CdNotificationConfig | (() => CdNotificationConfig),
     title?: string,
     message?: string,
-    options?: any | ToastOptions,
+    options?: any | IndividualConfig,
     application?: string
   ): number {
     return window.setTimeout(() => {
index 2b865a400caf27b6587f98071557b30f0c6c93d0..0b0190553aaf522b20582fdf7b3ea4cbea4a3e4e 100644 (file)
@@ -1,6 +1,6 @@
 import { TestBed } from '@angular/core/testing';
 
-import { ToastModule } from 'ng2-toastr';
+import { ToastrModule } from 'ngx-toastr';
 
 import {
   configureTestBed,
@@ -20,7 +20,7 @@ describe('PrometheusAlertFormatter', () => {
   let prometheus: PrometheusHelper;
 
   configureTestBed({
-    imports: [ToastModule.forRoot(), SharedModule],
+    imports: [ToastrModule.forRoot(), SharedModule],
     providers: [PrometheusAlertFormatter, i18nProviders]
   });
 
index 294ac37f884bee591468f07248d3c71238e2822d..4412b46e0d829e67b8f02881106fdb0c8351b435 100644 (file)
@@ -1,7 +1,7 @@
 import { HttpClientTestingModule } from '@angular/common/http/testing';
 import { TestBed } from '@angular/core/testing';
 
-import { ToastModule } from 'ng2-toastr';
+import { ToastrModule } from 'ngx-toastr';
 import { of } from 'rxjs';
 
 import {
@@ -26,7 +26,7 @@ describe('PrometheusAlertService', () => {
   let prometheus: PrometheusHelper;
 
   configureTestBed({
-    imports: [ToastModule.forRoot(), SharedModule, HttpClientTestingModule],
+    imports: [ToastrModule.forRoot(), SharedModule, HttpClientTestingModule],
     providers: [PrometheusAlertService, PrometheusAlertFormatter, i18nProviders]
   });
 
index c5ced809559df47a75f73b864044f5c3b808dff7..f34a616d7d7904adb7f87d11d20ae493c19fa3bb 100644 (file)
@@ -1,7 +1,7 @@
 import { HttpClientTestingModule } from '@angular/common/http/testing';
 import { fakeAsync, TestBed, tick } from '@angular/core/testing';
 
-import { ToastModule, ToastsManager } from 'ng2-toastr';
+import { ToastrModule, ToastrService } from 'ngx-toastr';
 import { of } from 'rxjs';
 
 import {
@@ -33,12 +33,12 @@ describe('PrometheusNotificationService', () => {
   };
 
   configureTestBed({
-    imports: [ToastModule.forRoot(), SharedModule, HttpClientTestingModule],
+    imports: [ToastrModule.forRoot(), SharedModule, HttpClientTestingModule],
     providers: [
       PrometheusNotificationService,
       PrometheusAlertFormatter,
       i18nProviders,
-      { provide: ToastsManager, useValue: toastFakeService }
+      { provide: ToastrService, useValue: toastFakeService }
     ]
   });
 
index 1dda8afc226c649768bc409012524fc720574a96..747964e1c7eb2315a4383664fc2d56b79cfcc209 100644 (file)
@@ -2,7 +2,7 @@ import { HttpClientTestingModule } from '@angular/common/http/testing';
 import { inject, TestBed } from '@angular/core/testing';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ToastModule } from 'ng2-toastr';
+import { ToastrModule } from 'ngx-toastr';
 import { Observable } from 'rxjs';
 
 import { configureTestBed, i18nProviders } from '../../../testing/unit-test-helper';
@@ -17,7 +17,7 @@ describe('TaskWrapperService', () => {
   let service: TaskWrapperService;
 
   configureTestBed({
-    imports: [HttpClientTestingModule, ToastModule.forRoot(), SharedModule, RouterTestingModule],
+    imports: [HttpClientTestingModule, ToastrModule.forRoot(), SharedModule, RouterTestingModule],
     providers: [TaskWrapperService, i18nProviders]
   });