From d9963b88e86626a2ce693a961cea9dd314852e0a Mon Sep 17 00:00:00 2001 From: Tiago Melo Date: Thu, 28 May 2020 19:12:59 +0000 Subject: [PATCH] mgr/dashboard: Use ng-bootstrap for Progressbar Fixes: https://tracker.ceph.com/issues/45752 Signed-off-by: Tiago Melo --- .../frontend/src/app/ceph/block/block.module.ts | 2 -- .../daemon-list/daemon-list.component.spec.ts | 2 -- .../mirroring/image-list/image-list.component.html | 6 +++--- .../mirroring/image-list/image-list.component.spec.ts | 5 ++--- .../src/app/ceph/block/mirroring/mirroring.module.ts | 5 ++--- .../mirroring/overview/overview.component.spec.ts | 5 ++--- .../mirroring/pool-list/pool-list.component.spec.ts | 2 -- .../frontend/src/app/ceph/cephfs/cephfs.module.ts | 2 -- .../src/app/shared/components/components.module.ts | 10 +++++++--- .../notifications-sidebar.component.html | 11 +++++------ .../notifications-sidebar.component.spec.ts | 4 ++-- 11 files changed, 23 insertions(+), 31 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/block.module.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/block.module.ts index f63bb3d53d63..c1357864d5dc 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/block.module.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/block.module.ts @@ -9,7 +9,6 @@ import { NgBootstrapFormValidationModule } from 'ng-bootstrap-form-validation'; import { BsDatepickerModule } from 'ngx-bootstrap/datepicker'; import { BsDropdownModule } from 'ngx-bootstrap/dropdown'; import { ModalModule } from 'ngx-bootstrap/modal'; -import { ProgressbarModule } from 'ngx-bootstrap/progressbar'; import { ActionLabels, URLVerbs } from '../../shared/constants/app.constants'; import { FeatureTogglesGuardService } from '../../shared/services/feature-toggles-guard.service'; @@ -60,7 +59,6 @@ import { RbdTrashRestoreModalComponent } from './rbd-trash-restore-modal/rbd-tra FormsModule, ReactiveFormsModule, NgbNavModule, - ProgressbarModule.forRoot(), BsDropdownModule.forRoot(), BsDatepickerModule.forRoot(), NgbTooltipModule, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/daemon-list/daemon-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/daemon-list/daemon-list.component.spec.ts index 3bd0d8c899c3..5bfd945963a0 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/daemon-list/daemon-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/daemon-list/daemon-list.component.spec.ts @@ -3,7 +3,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { BsDropdownModule } from 'ngx-bootstrap/dropdown'; -import { ProgressbarModule } from 'ngx-bootstrap/progressbar'; import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper'; import { SharedModule } from '../../../../shared/shared.module'; @@ -20,7 +19,6 @@ describe('DaemonListComponent', () => { BrowserAnimationsModule, SharedModule, BsDropdownModule.forRoot(), - ProgressbarModule.forRoot(), HttpClientTestingModule ], providers: i18nProviders diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/image-list/image-list.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/image-list/image-list.component.html index 51f82e647afc..584a09a9ad71 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/image-list/image-list.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/image-list/image-list.component.html @@ -54,7 +54,7 @@ - - + diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/image-list/image-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/image-list/image-list.component.spec.ts index 786c98949f5e..207d148682f1 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/image-list/image-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/image-list/image-list.component.spec.ts @@ -2,9 +2,8 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; -import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; +import { NgbNavModule, NgbProgressbarModule } from '@ng-bootstrap/ng-bootstrap'; import { BsDropdownModule } from 'ngx-bootstrap/dropdown'; -import { ProgressbarModule } from 'ngx-bootstrap/progressbar'; import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper'; import { SharedModule } from '../../../../shared/shared.module'; @@ -22,7 +21,7 @@ describe('ImageListComponent', () => { SharedModule, BsDropdownModule.forRoot(), NgbNavModule, - ProgressbarModule.forRoot(), + NgbProgressbarModule, HttpClientTestingModule ], providers: i18nProviders diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/mirroring.module.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/mirroring.module.ts index ecbf6c41ada9..917de076da08 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/mirroring.module.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/mirroring.module.ts @@ -3,11 +3,10 @@ import { NgModule } from '@angular/core'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { RouterModule } from '@angular/router'; -import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; +import { NgbNavModule, NgbProgressbarModule } from '@ng-bootstrap/ng-bootstrap'; import { NgBootstrapFormValidationModule } from 'ng-bootstrap-form-validation'; import { BsDropdownModule } from 'ngx-bootstrap/dropdown'; import { ModalModule } from 'ngx-bootstrap/modal'; -import { ProgressbarModule } from 'ngx-bootstrap/progressbar'; import { SharedModule } from '../../../shared/shared.module'; @@ -38,7 +37,7 @@ import { PoolListComponent } from './pool-list/pool-list.component'; RouterModule, FormsModule, ReactiveFormsModule, - ProgressbarModule.forRoot(), + NgbProgressbarModule, BsDropdownModule.forRoot(), ModalModule.forRoot(), NgBootstrapFormValidationModule diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/overview/overview.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/overview/overview.component.spec.ts index d3e06ecb3e37..128a8c811956 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/overview/overview.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/overview/overview.component.spec.ts @@ -3,9 +3,8 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; -import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; +import { NgbNavModule, NgbProgressbarModule } from '@ng-bootstrap/ng-bootstrap'; import { BsDropdownModule } from 'ngx-bootstrap/dropdown'; -import { ProgressbarModule } from 'ngx-bootstrap/progressbar'; import { ToastrModule } from 'ngx-toastr'; import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper'; @@ -33,7 +32,7 @@ describe('OverviewComponent', () => { SharedModule, BsDropdownModule.forRoot(), NgbNavModule, - ProgressbarModule.forRoot(), + NgbProgressbarModule, HttpClientTestingModule, RouterTestingModule, ToastrModule.forRoot() diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/pool-list/pool-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/pool-list/pool-list.component.spec.ts index a9be82b7633f..5978425b8203 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/pool-list/pool-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/pool-list/pool-list.component.spec.ts @@ -4,7 +4,6 @@ import { RouterTestingModule } from '@angular/router/testing'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { BsDropdownModule } from 'ngx-bootstrap/dropdown'; -import { ProgressbarModule } from 'ngx-bootstrap/progressbar'; import { ToastrModule } from 'ngx-toastr'; import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper'; @@ -22,7 +21,6 @@ describe('PoolListComponent', () => { BrowserAnimationsModule, SharedModule, BsDropdownModule.forRoot(), - ProgressbarModule.forRoot(), HttpClientTestingModule, RouterTestingModule, ToastrModule.forRoot() diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs.module.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs.module.ts index 24a1cd983408..d09dd252c50b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs.module.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs.module.ts @@ -4,7 +4,6 @@ import { NgModule } from '@angular/core'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; import { TreeModule } from 'angular-tree-component'; import { ChartsModule } from 'ng2-charts'; -import { ProgressbarModule } from 'ngx-bootstrap/progressbar'; import { AppRoutingModule } from '../../app-routing.module'; import { SharedModule } from '../../shared/shared.module'; @@ -22,7 +21,6 @@ import { CephfsTabsComponent } from './cephfs-tabs/cephfs-tabs.component'; AppRoutingModule, ChartsModule, TreeModule.forRoot(), - ProgressbarModule.forRoot(), NgbNavModule ], declarations: [ diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/components.module.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/components.module.ts index c9f851e7f211..2368cb1e2319 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/components.module.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/components.module.ts @@ -3,13 +3,17 @@ import { NgModule } from '@angular/core'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { RouterModule } from '@angular/router'; -import { NgbAlertModule, NgbPopoverModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; +import { + NgbAlertModule, + NgbPopoverModule, + NgbProgressbarModule, + NgbTooltipModule +} from '@ng-bootstrap/ng-bootstrap'; import { NgBootstrapFormValidationModule } from 'ng-bootstrap-form-validation'; import { ClickOutsideModule } from 'ng-click-outside'; import { ChartsModule } from 'ng2-charts'; import { BsDropdownModule } from 'ngx-bootstrap/dropdown'; import { ModalModule } from 'ngx-bootstrap/modal'; -import { ProgressbarModule } from 'ngx-bootstrap/progressbar'; import { SimplebarAngularModule } from 'simplebar-angular'; import { DirectivesModule } from '../directives/directives.module'; @@ -44,7 +48,7 @@ import { ViewCacheComponent } from './view-cache/view-cache.component'; ReactiveFormsModule, NgbAlertModule, NgbPopoverModule, - ProgressbarModule.forRoot(), + NgbProgressbarModule, NgbTooltipModule, ChartsModule, ReactiveFormsModule, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/notifications-sidebar/notifications-sidebar.component.html b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/notifications-sidebar/notifications-sidebar.component.html index 16771427f3dc..6fdb46bd776f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/notifications-sidebar/notifications-sidebar.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/notifications-sidebar/notifications-sidebar.component.html @@ -14,12 +14,11 @@
{{ executingTask.description }}
-
- +
+

diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/notifications-sidebar/notifications-sidebar.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/notifications-sidebar/notifications-sidebar.component.spec.ts index 9bc198d34a91..f75b00f99da1 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/notifications-sidebar/notifications-sidebar.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/notifications-sidebar/notifications-sidebar.component.spec.ts @@ -2,8 +2,8 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; +import { NgbProgressbarModule } from '@ng-bootstrap/ng-bootstrap'; import { ClickOutsideModule } from 'ng-click-outside'; -import { ProgressbarModule } from 'ngx-bootstrap/progressbar'; import { ToastrModule } from 'ngx-toastr'; import { SimplebarAngularModule } from 'simplebar-angular'; @@ -31,7 +31,7 @@ describe('NotificationsSidebarComponent', () => { imports: [ HttpClientTestingModule, PipesModule, - ProgressbarModule.forRoot(), + NgbProgressbarModule, RouterTestingModule, ToastrModule.forRoot(), NoopAnimationsModule, -- 2.47.3