From b29d3d56c75b906038f7e1f050f912f980d97d40 Mon Sep 17 00:00:00 2001 From: Volker Theile Date: Tue, 24 Apr 2018 13:06:47 +0200 Subject: [PATCH] Use bootstrap alert. Signed-off-by: Volker Theile --- .../error-panel/error-panel.component.html | 39 ++++++++----------- .../error-panel/error-panel.component.spec.ts | 5 ++- .../error-panel/error-panel.component.ts | 4 +- 3 files changed, 23 insertions(+), 25 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/error-panel/error-panel.component.html b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/error-panel/error-panel.component.html index 392a5b598715a..7a0e66a4102ee 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/error-panel/error-panel.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/error-panel/error-panel.component.html @@ -1,23 +1,18 @@ -
-
-

- {{ title }} -

-
-
- -
- + + + {{ title }} + + + + +
+
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/error-panel/error-panel.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/error-panel/error-panel.component.spec.ts index 563bf529eca38..d1ed5e80619ef 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/error-panel/error-panel.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/error-panel/error-panel.component.spec.ts @@ -1,5 +1,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { AlertModule } from 'ngx-bootstrap'; + import { ErrorPanelComponent } from './error-panel.component'; describe('ErrorPanelComponent', () => { @@ -8,7 +10,8 @@ describe('ErrorPanelComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ ErrorPanelComponent ] + declarations: [ ErrorPanelComponent ], + imports: [ AlertModule.forRoot() ] }) .compileComponents(); })); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/error-panel/error-panel.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/error-panel/error-panel.component.ts index 497de0397efb8..1d32aa623c520 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/error-panel/error-panel.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/error-panel/error-panel.component.ts @@ -8,10 +8,10 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; export class ErrorPanelComponent { /** - * The title to be displayed. Defaults to 'Error'. + * The title to be displayed. Defaults to 'Error!'. * @type {string} */ - @Input() title = 'Error'; + @Input() title = 'Error!'; /** * The event that is triggered when the 'Back' button is pressed. -- 2.39.5