From a4bc4ff574e0a00b1300d33692f8a01431c13a49 Mon Sep 17 00:00:00 2001 From: Volker Theile Date: Tue, 24 Apr 2018 13:30:41 +0200 Subject: [PATCH] mgr/dashboard: Introduce 'cd-loading-panel' component Signed-off-by: Volker Theile --- .../shared/components/components.module.ts | 5 +++- .../loading-panel.component.html | 7 +++++ .../loading-panel.component.scss | 0 .../loading-panel.component.spec.ts | 28 +++++++++++++++++++ .../loading-panel/loading-panel.component.ts | 9 ++++++ 5 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.html create mode 100644 src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.scss create mode 100644 src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.spec.ts create mode 100644 src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.ts 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 2a7c42c149749..1c0c10ffcb3e2 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 @@ -8,6 +8,7 @@ import { AlertModule, ModalModule, PopoverModule, TooltipModule } from 'ngx-boot import { PipesModule } from '../pipes/pipes.module'; import { DeletionModalComponent } from './deletion-modal/deletion-modal.component'; import { HelperComponent } from './helper/helper.component'; +import { LoadingPanelComponent } from './loading-panel/loading-panel.component'; import { ModalComponent } from './modal/modal.component'; import { SparklineComponent } from './sparkline/sparkline.component'; import { SubmitButtonComponent } from './submit-button/submit-button.component'; @@ -33,6 +34,7 @@ import { ViewCacheComponent } from './view-cache/view-cache.component'; HelperComponent, SubmitButtonComponent, UsageBarComponent, + LoadingPanelComponent, ModalComponent, DeletionModalComponent ], @@ -42,7 +44,8 @@ import { ViewCacheComponent } from './view-cache/view-cache.component'; SparklineComponent, HelperComponent, SubmitButtonComponent, - UsageBarComponent, + LoadingPanelComponent, + UsageBarComponent ], entryComponents: [ ModalComponent, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.html b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.html new file mode 100644 index 0000000000000..4aca235703a22 --- /dev/null +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.html @@ -0,0 +1,7 @@ + + + + + + diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.scss b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.scss new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.spec.ts new file mode 100644 index 0000000000000..3cecda75b95e4 --- /dev/null +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.spec.ts @@ -0,0 +1,28 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AlertModule } from 'ngx-bootstrap'; + +import { LoadingPanelComponent } from './loading-panel.component'; + +describe('LoadingPanelComponent', () => { + let component: LoadingPanelComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ LoadingPanelComponent ], + imports: [ AlertModule.forRoot() ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(LoadingPanelComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.ts new file mode 100644 index 0000000000000..47e7bd1b892e6 --- /dev/null +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'cd-loading-panel', + templateUrl: './loading-panel.component.html', + styleUrls: ['./loading-panel.component.scss'] +}) +export class LoadingPanelComponent { +} -- 2.39.5