diff options
author | statta <statta@research.att.com> | 2019-08-16 12:14:10 -0400 |
---|---|---|
committer | statta <statta@research.att.com> | 2019-08-17 00:41:46 -0400 |
commit | 8429bcdf93e653061e972689774bbab3966742e2 (patch) | |
tree | c1487fd5b645f7e7f40300e1639a8c7aec21874f /ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard | |
parent | be21387983164a03a7b15361f4cc02917d9dd888 (diff) |
Migrating screens to Angular 7
Issue-ID: PORTAL-706
Change-Id: Ic3feb4019923040aafe6e9a97a60b41165be8b40
Signed-off-by: statta <statta@research.att.com>
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard')
7 files changed, 137 insertions, 0 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard-routing.module.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard-routing.module.ts new file mode 100644 index 00000000..0b7389d0 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard-routing.module.ts @@ -0,0 +1,16 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import { DashboardComponent } from './dashboard.component'; + +const routes: Routes = [ + { + path: '', component: DashboardComponent + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class DashboardRoutingModule { +} diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard.component.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard.component.html new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard.component.html @@ -0,0 +1 @@ + diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard.component.scss b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard.component.scss new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard.component.scss diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard.component.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard.component.spec.ts new file mode 100644 index 00000000..21423380 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard.component.spec.ts @@ -0,0 +1,32 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { RouterTestingModule } from '@angular/router/testing'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; + +import { DashboardComponent } from './dashboard.component'; +import { DashboardModule } from './dashboard.module'; + +describe('DashboardComponent', () => { + let component: DashboardComponent; + let fixture: ComponentFixture<DashboardComponent>; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + imports: [ + DashboardModule, + RouterTestingModule, + BrowserAnimationsModule, + ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(DashboardComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard.component.ts new file mode 100644 index 00000000..b16cf742 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard.component.ts @@ -0,0 +1,59 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-dashboard', + templateUrl: './dashboard.component.html', + styleUrls: ['./dashboard.component.scss'] +}) +export class DashboardComponent implements OnInit { + public alerts: Array<any> = []; + public sliders: Array<any> = []; + + constructor() { + this.sliders.push( + { + imagePath: 'assets/images/slider1.jpg', + label: 'First slide label', + text: + 'Nulla vitae elit libero, a pharetra augue mollis interdum.' + }, + { + imagePath: 'assets/images/slider2.jpg', + label: 'Second slide label', + text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.' + }, + { + imagePath: 'assets/images/slider3.jpg', + label: 'Third slide label', + text: + 'Praesent commodo cursus magna, vel scelerisque nisl consectetur.' + } + ); + + this.alerts.push( + { + id: 1, + type: 'success', + message: `Lorem ipsum dolor sit amet, consectetur adipisicing elit. + Voluptates est animi quibusdam praesentium quam, et perspiciatis, + consectetur velit culpa molestias dignissimos + voluptatum veritatis quod aliquam! Rerum placeat necessitatibus, vitae dolorum` + }, + { + id: 2, + type: 'warning', + message: `Lorem ipsum dolor sit amet, consectetur adipisicing elit. + Voluptates est animi quibusdam praesentium quam, et perspiciatis, + consectetur velit culpa molestias dignissimos + voluptatum veritatis quod aliquam! Rerum placeat necessitatibus, vitae dolorum` + } + ); + } + + ngOnInit() {} + + public closeAlert(alert: any) { + const index: number = this.alerts.indexOf(alert); + this.alerts.splice(index, 1); + } +} diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard.module.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard.module.spec.ts new file mode 100644 index 00000000..514b3f04 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard.module.spec.ts @@ -0,0 +1,13 @@ +import { DashboardModule } from './dashboard.module'; + +describe('DashboardModule', () => { + let dashboardModule: DashboardModule; + + beforeEach(() => { + dashboardModule = new DashboardModule(); + }); + + it('should create an instance', () => { + expect(dashboardModule).toBeTruthy(); + }); +}); diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard.module.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard.module.ts new file mode 100644 index 00000000..b8511952 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard.module.ts @@ -0,0 +1,16 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { DashboardRoutingModule } from './dashboard-routing.module'; +import { DashboardComponent } from './dashboard.component'; + +@NgModule({ + imports: [ + CommonModule, + DashboardRoutingModule + ], + declarations: [ + DashboardComponent + ] +}) +export class DashboardModule {} |