aboutsummaryrefslogtreecommitdiffstats
path: root/webapp/src/app/app-alert
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/src/app/app-alert')
-rw-r--r--webapp/src/app/app-alert/app-alert.component.spec.ts25
-rw-r--r--webapp/src/app/app-alert/app-alert.component.ts31
2 files changed, 0 insertions, 56 deletions
diff --git a/webapp/src/app/app-alert/app-alert.component.spec.ts b/webapp/src/app/app-alert/app-alert.component.spec.ts
deleted file mode 100644
index 7f343dc..0000000
--- a/webapp/src/app/app-alert/app-alert.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { AppAlertComponent } from './app-alert.component';
-
-describe('AppAlertComponent', () => {
- let component: AppAlertComponent;
- let fixture: ComponentFixture<AppAlertComponent>;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ AppAlertComponent ]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(AppAlertComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/webapp/src/app/app-alert/app-alert.component.ts b/webapp/src/app/app-alert/app-alert.component.ts
deleted file mode 100644
index e6fbd47..0000000
--- a/webapp/src/app/app-alert/app-alert.component.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import { Component, ViewEncapsulation } from '@angular/core';
-import { Observable } from 'rxjs/Observable';
-
-import { AlertService, IAlert } from '../services/alert.service';
-
-@Component({
- selector: 'app-alert',
- template: `
- <div style="width:80%; margin-left:auto; margin-right:auto;"
- *ngFor="let alert of (alerts$ | async)">
- <alert *ngIf="alert.show" [type]="alert.type" [dismissible]="alert.dismissible" [dismissOnTimeout]="alert.dismissTimeout"
- (onClose)="onClose(alert)">
- <div style="text-align:center;" [innerHtml]="alert.msg"></div>
- </alert>
- </div>
-`,
-})
-
-export class AppAlertComponent {
-
- alerts$: Observable<IAlert[]>;
-
- constructor(private alertSvr: AlertService) {
- this.alerts$ = this.alertSvr.alerts;
- }
-
- onClose(al) {
- this.alertSvr.del(al);
- }
-
-}