]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Introduce 'cd-loading-panel' component 21618/head
authorVolker Theile <vtheile@suse.com>
Tue, 24 Apr 2018 11:30:41 +0000 (13:30 +0200)
committerVolker Theile <vtheile@suse.com>
Tue, 24 Apr 2018 16:42:38 +0000 (18:42 +0200)
Signed-off-by: Volker Theile <vtheile@suse.com>
src/pybind/mgr/dashboard/frontend/src/app/shared/components/components.module.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.html [new file with mode: 0644]
src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.scss [new file with mode: 0644]
src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.spec.ts [new file with mode: 0644]
src/pybind/mgr/dashboard/frontend/src/app/shared/components/loading-panel/loading-panel.component.ts [new file with mode: 0644]

index 2a7c42c149749d9f747236eb8dfc5bd01c674a8c..1c0c10ffcb3e20aeef11c6553a78ab4f32139cbd 100644 (file)
@@ -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 (file)
index 0000000..4aca235
--- /dev/null
@@ -0,0 +1,7 @@
+<alert type="info">
+  <strong>
+    <i class="fa fa-spinner fa-spin fa-fw"
+       aria-hidden="true"></i>
+  </strong>
+  <ng-content></ng-content>
+</alert>
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 (file)
index 0000000..e69de29
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 (file)
index 0000000..3cecda7
--- /dev/null
@@ -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<LoadingPanelComponent>;
+
+  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 (file)
index 0000000..47e7bd1
--- /dev/null
@@ -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 {
+}