diff options
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src')
39 files changed, 1008 insertions, 0 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/admin/admin-routing.module.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/admin/admin-routing.module.ts new file mode 100644 index 00000000..5b0a501f --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/admin/admin-routing.module.ts @@ -0,0 +1,10 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +const routes: Routes = []; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class AdminRoutingModule { } diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/admin/admin.module.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/admin/admin.module.spec.ts new file mode 100644 index 00000000..ee0b4037 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/admin/admin.module.spec.ts @@ -0,0 +1,13 @@ +import { AdminModule } from './admin.module'; + +describe('AdminModule', () => { + let adminModule: AdminModule; + + beforeEach(() => { + adminModule = new AdminModule(); + }); + + it('should create an instance', () => { + expect(adminModule).toBeTruthy(); + }); +}); diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/admin/admin.module.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/admin/admin.module.ts new file mode 100644 index 00000000..ab443337 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/admin/admin.module.ts @@ -0,0 +1,77 @@ + +import { CommonModule } from '@angular/common'; +import { BrowserModule } from '@angular/platform-browser'; +import { NgModule } from '@angular/core'; +import { AppRoutingModule } from '../app-routing.module'; + +import { UpgradeModule, downgradeComponent} from '@angular/upgrade/static'; +import { HttpClientModule } from '@angular/common/http'; +import { RouterModule, UrlHandlingStrategy } from '@angular/router'; +import { APP_BASE_HREF } from '@angular/common'; + +export class CustomHandlingStrategy implements UrlHandlingStrategy { + shouldProcessUrl(url) { + console.log('url --->>> ' + url.toString()); + var str = "ng6"; + if (url.toString().search(str) == -1 ) + return false; + else + return true; + } + + extract(url) { return url; } + merge(url, whole) { return url; } +} + + +//declare var angular: any; + +/* +declare var angular: angular.IAngularStatic; + +angular.module('abs') + .directive( + 'appusage', + downgradeComponent({component: UsageComponent}) as angular.IDirectiveFactory +); + +angular.module('abs') + .directive( + 'app-hello', + downgradeComponent({component: HelloComponent}) as angular.IDirectiveFactory +); +*/ + +@NgModule({ + declarations: [ + ], + imports: [ + CommonModule, + BrowserModule, + AppRoutingModule, + UpgradeModule, + HttpClientModule, + RouterModule, + /* + RouterModule.forRoot([ + { + path: 'ng6/usage_list', + component: UsageComponent + } + ], + { + useHash: true, + enableTracing: true + } + )*/ + ], + + entryComponents: [ + ], + providers: [ + { provide: UrlHandlingStrategy, useClass: CustomHandlingStrategy }, + { provide: APP_BASE_HREF, useValue: '/' + (window.location.pathname.split('/')[1] || '') } + ] +}) + +export class AdminModule { }
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/app-routing.module.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/app-routing.module.ts new file mode 100644 index 00000000..e3dafc36 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/app-routing.module.ts @@ -0,0 +1,29 @@ +/* + * Copyright © 2017 AT&T Intellectual Property. + * + * Copyright © 2018 IBM + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +const routes: Routes = []; + +@NgModule({ + imports: [RouterModule.forRoot(routes)], + exports: [RouterModule] +}) +export class AppRoutingModule { } diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/app.component.css b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/app.component.css new file mode 100644 index 00000000..1aa77fb8 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/app.component.css @@ -0,0 +1,17 @@ +/* + * Copyright © 2017 AT&T Intellectual Property. + * + * Copyright © 2018 IBM + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/app.component.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/app.component.html new file mode 100644 index 00000000..adc96ffd --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/app.component.html @@ -0,0 +1,24 @@ +<!--The content below is only a placeholder and can be replaced.--> + +<!-- +<div style="text-align:center"> + <h1> + Welcome to {{ title }}! + </h1> + <img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg=="> +</div> +<h2>Here are some links to help you start: </h2> +<ul> + <li> + <h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">Tour of Heroes</a></h2> + </li> + <li> + <h2><a target="_blank" rel="noopener" href="https://github.com/angular/angular-cli/wiki">CLI Documentation</a></h2> + </li> + <li> + <h2><a target="_blank" rel="noopener" href="https://blog.angular.io/">Angular blog</a></h2> + </li> +</ul> +--> + +<router-outlet></router-outlet>
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/app.component.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/app.component.spec.ts new file mode 100644 index 00000000..aca0180f --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/app.component.spec.ts @@ -0,0 +1,49 @@ +/* + * Copyright © 2017 AT&T Intellectual Property. + * + * Copyright © 2018 IBM + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { TestBed, async } from '@angular/core/testing'; +import { RouterTestingModule } from '@angular/router/testing'; +import { AppComponent } from './app.component'; +describe('AppComponent', () => { + beforeEach(async(() => { + TestBed.configureTestingModule({ + imports: [ + RouterTestingModule + ], + declarations: [ + AppComponent + ], + }).compileComponents(); + })); + it('should create the app', async(() => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.debugElement.componentInstance; + expect(app).toBeTruthy(); + })); + it(`should have as title 'ngapp'`, async(() => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.debugElement.componentInstance; + expect(app.title).toEqual('ngapp'); + })); + it('should render title in a h1 tag', async(() => { + const fixture = TestBed.createComponent(AppComponent); + fixture.detectChanges(); + const compiled = fixture.debugElement.nativeElement; + expect(compiled.querySelector('h1').textContent).toContain('Welcome to ngapp!'); + })); +}); diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/app.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/app.component.ts new file mode 100644 index 00000000..05aa60b5 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/app.component.ts @@ -0,0 +1,37 @@ +/* + * Copyright © 2017 AT&T Intellectual Property. + * + * Copyright © 2018 IBM + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Component } from '@angular/core'; +import { UpgradeModule } from "@angular/upgrade/static"; + +@Component({ + selector: 'app-root', + templateUrl: './app.component.html', + styleUrls: ['./app.component.css'] +}) +export class AppComponent { + title = 'ngapp'; + + constructor(private upgrade: UpgradeModule) { + console.log('base href ==>> ' + window.location.pathname.split('/')[1]); + } + + ngOnInit() { + this.upgrade.bootstrap(document.body, ['abs']); + } +} diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/app.module.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/app.module.ts new file mode 100644 index 00000000..5c57be3f --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/app.module.ts @@ -0,0 +1,106 @@ +/* + * Copyright © 2017 AT&T Intellectual Property. + * + * Copyright © 2018 IBM + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { BrowserModule } from '@angular/platform-browser'; +import { NgModule } from '@angular/core'; +import { AppRoutingModule } from './app-routing.module'; +import { AppComponent} from './app.component'; +import { UpgradeModule, downgradeComponent} from '@angular/upgrade/static'; +import { RouterModule, UrlHandlingStrategy } from '@angular/router'; +import { APP_BASE_HREF } from '@angular/common'; +import { AdminModule } from './admin/admin.module'; +import { ProfileModule } from './profile/profile.module'; + +import { SharedModule } from './shared/shared.module'; +import { SamplepageModule } from './samplepage/samplepage.module'; +import { ReportModule } from './report/report.module'; +import { CoreModule } from './core/core.module' + + +export class CustomHandlingStrategy implements UrlHandlingStrategy { + shouldProcessUrl(url) { + console.log('url --->>> ' + url.toString()); + var str = "ng6"; + if (url.toString().search(str) == -1 ) + return false; + else + return true; + } + + extract(url) { return url; } + merge(url, whole) { return url; } +} + + +//declare var angular: any; + +/* +declare var angular: angular.IAngularStatic; + +angular.module('abs') + .directive( + 'appusage', + downgradeComponent({component: UsageComponent}) as angular.IDirectiveFactory +); + +angular.module('abs') + .directive( + 'app-hello', + downgradeComponent({component: HelloComponent}) as angular.IDirectiveFactory +); +*/ + +@NgModule({ + declarations: [ + AppComponent + ], + imports: [ + BrowserModule, + AppRoutingModule, + UpgradeModule, + RouterModule, + /* + RouterModule.forRoot([ + { + path: 'ng6/usage_list', + component: UsageComponent + } + ], + { + useHash: true, + enableTracing: true + } + ),*/ + AdminModule, + ProfileModule, + ReportModule, + SharedModule, + SamplepageModule, + ReportModule, + CoreModule + ], + + entryComponents: [ + ], + providers: [ + { provide: UrlHandlingStrategy, useClass: CustomHandlingStrategy }, + { provide: APP_BASE_HREF, useValue: '/' + (window.location.pathname.split('/')[1] || '') } + ], + bootstrap: [AppComponent] +}) +export class AppModule { } diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/core/core-routing.module.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/core/core-routing.module.ts new file mode 100644 index 00000000..405e5a0f --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/core/core-routing.module.ts @@ -0,0 +1,10 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +const routes: Routes = []; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class CoreRoutingModule { } diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/core/core.module.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/core/core.module.spec.ts new file mode 100644 index 00000000..d8fcf7e3 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/core/core.module.spec.ts @@ -0,0 +1,13 @@ +import { CoreModule } from './core.module'; + +describe('CoreModule', () => { + let coreModule: CoreModule; + + beforeEach(() => { + coreModule = new CoreModule(); + }); + + it('should create an instance', () => { + expect(coreModule).toBeTruthy(); + }); +}); diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/core/core.module.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/core/core.module.ts new file mode 100644 index 00000000..41729d40 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/core/core.module.ts @@ -0,0 +1,13 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { CoreRoutingModule } from './core-routing.module'; + +@NgModule({ + imports: [ + CommonModule, + CoreRoutingModule + ], + declarations: [] +}) +export class CoreModule { } diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/profile/profile-routing.module.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/profile/profile-routing.module.ts new file mode 100644 index 00000000..339de808 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/profile/profile-routing.module.ts @@ -0,0 +1,10 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +const routes: Routes = []; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class ProfileRoutingModule { } diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/profile/profile.module.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/profile/profile.module.spec.ts new file mode 100644 index 00000000..0960501e --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/profile/profile.module.spec.ts @@ -0,0 +1,13 @@ +import { ProfileModule } from './profile.module'; + +describe('ProfileModule', () => { + let profileModule: ProfileModule; + + beforeEach(() => { + profileModule = new ProfileModule(); + }); + + it('should create an instance', () => { + expect(profileModule).toBeTruthy(); + }); +}); diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/profile/profile.module.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/profile/profile.module.ts new file mode 100644 index 00000000..dbb3875d --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/profile/profile.module.ts @@ -0,0 +1,13 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { ProfileRoutingModule } from './profile-routing.module'; + +@NgModule({ + imports: [ + CommonModule, + ProfileRoutingModule + ], + declarations: [] +}) +export class ProfileModule { } diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/report/report-routing.module.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/report/report-routing.module.ts new file mode 100644 index 00000000..c5d8680d --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/report/report-routing.module.ts @@ -0,0 +1,10 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +const routes: Routes = []; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class ReportRoutingModule { } diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/report/report.module.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/report/report.module.spec.ts new file mode 100644 index 00000000..cfbd84ca --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/report/report.module.spec.ts @@ -0,0 +1,13 @@ +import { ReportModule } from './report.module'; + +describe('ReportModule', () => { + let reportModule: ReportModule; + + beforeEach(() => { + reportModule = new ReportModule(); + }); + + it('should create an instance', () => { + expect(reportModule).toBeTruthy(); + }); +}); diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/report/report.module.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/report/report.module.ts new file mode 100644 index 00000000..ed2ea4c5 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/report/report.module.ts @@ -0,0 +1,13 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { ReportRoutingModule } from './report-routing.module'; + +@NgModule({ + imports: [ + CommonModule, + ReportRoutingModule + ], + declarations: [] +}) +export class ReportModule { } diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/samplepage/samplepage-routing.module.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/samplepage/samplepage-routing.module.ts new file mode 100644 index 00000000..9a98dc38 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/samplepage/samplepage-routing.module.ts @@ -0,0 +1,10 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +const routes: Routes = []; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class SamplepageRoutingModule { } diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/samplepage/samplepage.module.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/samplepage/samplepage.module.spec.ts new file mode 100644 index 00000000..856d8f3a --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/samplepage/samplepage.module.spec.ts @@ -0,0 +1,13 @@ +import { SamplepageModule } from './samplepage.module'; + +describe('SamplepageModule', () => { + let samplepageModule: SamplepageModule; + + beforeEach(() => { + samplepageModule = new SamplepageModule(); + }); + + it('should create an instance', () => { + expect(samplepageModule).toBeTruthy(); + }); +}); diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/samplepage/samplepage.module.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/samplepage/samplepage.module.ts new file mode 100644 index 00000000..c1a065f1 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/samplepage/samplepage.module.ts @@ -0,0 +1,13 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { SamplepageRoutingModule } from './samplepage-routing.module'; + +@NgModule({ + imports: [ + CommonModule, + SamplepageRoutingModule + ], + declarations: [] +}) +export class SamplepageModule { } diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/shared-routing.module.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/shared-routing.module.ts new file mode 100644 index 00000000..06ce37cd --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/shared-routing.module.ts @@ -0,0 +1,10 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +const routes: Routes = []; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class SharedRoutingModule { } diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/shared.module.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/shared.module.spec.ts new file mode 100644 index 00000000..3ecb6260 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/shared.module.spec.ts @@ -0,0 +1,13 @@ +import { SharedModule } from './shared.module'; + +describe('SharedModule', () => { + let sharedModule: SharedModule; + + beforeEach(() => { + sharedModule = new SharedModule(); + }); + + it('should create an instance', () => { + expect(sharedModule).toBeTruthy(); + }); +}); diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/shared.module.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/shared.module.ts new file mode 100644 index 00000000..f9eea33e --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/shared.module.ts @@ -0,0 +1,13 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { SharedRoutingModule } from './shared-routing.module'; + +@NgModule({ + imports: [ + CommonModule, + SharedRoutingModule + ], + declarations: [] +}) +export class SharedModule { } diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/assets/.gitkeep b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/assets/.gitkeep new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/assets/.gitkeep diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/assets/mockdata/get_usage_list.json b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/assets/mockdata/get_usage_list.json new file mode 100644 index 00000000..648043b6 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/assets/mockdata/get_usage_list.json @@ -0,0 +1,3 @@ +{ + "data":"[{\"lastName\":\"User\",\"lastAccess\":\"0:34\",\"id\":1,\"sessionId\":\"00A71210A24BFB0BF44CB5DA77FE3125\",\"delete\":\"no\",\"email\":\"demo@email.com\",\"remaining\":\"29:26\"}]" +}
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/browserslist b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/browserslist new file mode 100644 index 00000000..37371cb0 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/browserslist @@ -0,0 +1,11 @@ +# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers +# For additional information regarding the format and rule options, please see: +# https://github.com/browserslist/browserslist#queries +# +# For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed + +> 0.5% +last 2 versions +Firefox ESR +not dead +not IE 9-11
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/environments/environment.prod.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/environments/environment.prod.ts new file mode 100644 index 00000000..dc99c444 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/environments/environment.prod.ts @@ -0,0 +1,22 @@ +/* + * Copyright © 2017 AT&T Intellectual Property. + * + * Copyright © 2018 IBM + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export const environment = { + production: true, + baseUrl: '' +};
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/environments/environment.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/environments/environment.ts new file mode 100644 index 00000000..493f63e6 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/environments/environment.ts @@ -0,0 +1,28 @@ +/* + * Copyright © 2017 AT&T Intellectual Property. + * + * Copyright © 2018 IBM + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +// The file contents for the current environment will overwrite these during build. +// The build system defaults to the dev environment which uses `environment.ts`, but if you do +// `ng build --env=prod` then `environment.prod.ts` will be used instead. +// The list of which env maps to which file can be found in `.angular-cli.json`. + +export const environment = { + production: false, + baseUrl: 'http://localhost:8067/epsdk-app-os/' +};
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/favicon.ico b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/favicon.ico Binary files differnew file mode 100644 index 00000000..8081c7ce --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/favicon.ico diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/karma.conf.js b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/karma.conf.js new file mode 100644 index 00000000..b6e00421 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/karma.conf.js @@ -0,0 +1,31 @@ +// Karma configuration file, see link for more information +// https://karma-runner.github.io/1.0/config/configuration-file.html + +module.exports = function (config) { + config.set({ + basePath: '', + frameworks: ['jasmine', '@angular-devkit/build-angular'], + plugins: [ + require('karma-jasmine'), + require('karma-chrome-launcher'), + require('karma-jasmine-html-reporter'), + require('karma-coverage-istanbul-reporter'), + require('@angular-devkit/build-angular/plugins/karma') + ], + client: { + clearContext: false // leave Jasmine Spec Runner output visible in browser + }, + coverageIstanbulReporter: { + dir: require('path').join(__dirname, '../coverage'), + reports: ['html', 'lcovonly'], + fixWebpackSourcePaths: true + }, + reporters: ['progress', 'kjhtml'], + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: ['Chrome'], + singleRun: false + }); +};
\ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/main.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/main.ts new file mode 100644 index 00000000..2c9e65f6 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/main.ts @@ -0,0 +1,31 @@ +/* + * Copyright © 2017 AT&T Intellectual Property. + * + * Copyright © 2018 IBM + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { enableProdMode } from '@angular/core'; +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + +import { AppModule } from './app/app.module'; +import { environment } from './environments/environment'; + +if (environment.production) { + enableProdMode(); +} + +platformBrowserDynamic().bootstrapModule(AppModule) + .catch(err => console.error(err)); + diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/ngwelcome.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/ngwelcome.html new file mode 100644 index 00000000..63217b9a --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/ngwelcome.html @@ -0,0 +1,156 @@ +<!doctype html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>Welcome NG</title> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="icon" type="image/x-icon" href="favicon.ico"> + + <!-- B2b Library --> + <link rel="stylesheet" type="text/css" href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css"> + <link rel="stylesheet" type="text/css" href="app/fusion/external/b2b/css/b2b-angular/font_icons.css"> + + <!-- icons in open source --> + <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css"> + <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css"> + + <link rel="stylesheet" type="text/css" href="app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css"> + <link rel="stylesheet" type="text/css" href="app/fusion/external/angular-gridster/dist/angular-gridster.min.css"> + <link rel="stylesheet" type="text/css" href="static/fusion/sample/css/scribble.css" /> + <link rel="stylesheet" type="text/css" href="static/fusion/sample/css/welcome.css" /> + + <link rel="stylesheet" type="text/css" href="app/fusion/styles/ecomp.css"> + + <!-- Common scripts --> + <script src="app/fusion/external/angular-1.4.8/angular.min.js"></script> + <script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script> + <script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script> + <script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script> + <script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script> + <script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script> + <script src="app/fusion/external/jquery/dist/jquery.min.js"></script> + <script src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script> + <script src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script> + <script src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script> + + <!-- EPSDK App scripts and common services --> + <!-- B2b Library --> + <script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script> + <script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script> + <script src="app/fusion/external/ds2/js/appDS2.js"></script> + + <script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script> + <script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script> + <script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script> + <script src="app/fusion/scripts/DS2-services/manifestService.js"></script> + + <script src="app/fusion/scripts/DS2-directives/footer.js"></script> + <script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script> + <script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script> + <script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script> + <script src= "app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script> + + <!-- Page specific items --> + <script src="app/fusion/scripts/DS2-controllers/welcome-controller.js"></script> + <script src="app/fusion/scripts/DS2-controllers/welcome-route.js"></script> + +<style> + .controls { + margin-bottom: 20px; + } + .page-header { + margin-top: 20px; + } + ul { + list-style: none; + } + .box { + height: 100%; + border: 1px solid #ccc; + background-color: #fff; + position: relative; + overflow: hidden; + } + .box-header { + background-color: #eee; + padding: 0px 0px 0px 0px; + /* border-bottom: 1px solid #ccc; */ + margin-bottom: -25px; + cursor: move; + position: relative; + } + .box-header h3 { + margin-top: 0px; + display: inline-block; + } + .box-content { + padding: 10px; + display:block; + height: 100%; + position: relative; + overflow-x:auto; + overflow-y:auto; + } + .box-header-btns { + top: 15px; + right: 10px; + cursor: pointer; + position: absolute; + } + + .gridster { + border: none; + position:relative; + } + + .box-content .box-content-frame{ + + } + + .box table{ + border:none; + display:block; + } + + .box table tr{ + line-height:20px; + } + + .box table th{ + border:none; + line-height:20px; + } + + /* .header-container{ + margin-top:-50px; + } */ + /* .content-container{ + margin-top:50px; + } */ + .menu-container{ + margin-top:0px + } + + .handle-e { + width:3px; + } +</style> + +<link rel="stylesheet" type="text/css" href="app/ngapp/styles.css"> +</head> +<body class="appBody"> + <app-root></app-root> + <!-- commented the header for now to avoid duplicate headers on portal --> + <div ds2-Header class="header-container" ></div> + <div ds2-menu id="menuContainer" class="menu-container"></div> + <div ng-view id="rightContentProfile" class="content-container"></div> + <div ds2-Footer class="footer-container"></div> + + <script type="text/javascript" src="app/ngapp/runtime.js"></script> + <script type="text/javascript" src="app/ngapp/polyfills.js"></script> + <script type="text/javascript" src="app/ngapp/main.js"></script> + + </body> + +</body> +</html> diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/polyfills.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/polyfills.ts new file mode 100644 index 00000000..b012103c --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/polyfills.ts @@ -0,0 +1,98 @@ +/* + * Copyright © 2017 AT&T Intellectual Property. + * + * Copyright © 2018 IBM + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * This file includes polyfills needed by Angular and is loaded before the app. + * You can add your own extra polyfills to this file. + * + * This file is divided into 2 sections: + * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. + * 2. Application imports. Files imported after ZoneJS that should be loaded before your main + * file. + * + * The current setup is for so-called "evergreen" browsers; the last versions of browsers that + * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), + * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. + * + * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html + */ + +/*************************************************************************************************** + * BROWSER POLYFILLS + */ + +/** IE9, IE10 and IE11 requires all of the following polyfills. **/ + import 'core-js/es6/symbol'; + import 'core-js/es6/object'; + import 'core-js/es6/function'; + import 'core-js/es6/parse-int'; + import 'core-js/es6/parse-float'; + import 'core-js/es6/number'; + import 'core-js/es6/math'; + import 'core-js/es6/string'; + import 'core-js/es6/date'; + import 'core-js/es6/array'; + import 'core-js/es6/regexp'; + import 'core-js/es6/map'; + import 'core-js/es6/weak-map'; + import 'core-js/es6/set'; + +/** IE10 and IE11 requires the following for NgClass support on SVG elements */ +// import 'classlist.js'; // Run `npm install --save classlist.js`. + +/** IE10 and IE11 requires the following for the Reflect API. */ +// import 'core-js/es6/reflect'; + + +/** Evergreen browsers require these. **/ +// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove. +import 'core-js/es7/reflect'; + + +/** + * Web Animations `@angular/platform-browser/animations` + * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. + * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). + **/ +// import 'web-animations-js'; // Run `npm install --save web-animations-js`. + +/** + * By default, zone.js will patch all possible macroTask and DomEvents + * user can disable parts of macroTask/DomEvents patch by setting following flags + */ + + // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame + // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick + // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames + + /* + * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js + * with the following flag, it will bypass `zone.js` patch for IE/Edge + */ +// (window as any).__Zone_enable_cross_context_check = true; + +/*************************************************************************************************** + * Zone JS is required by default for Angular itself. + */ +import 'zone.js/dist/zone'; // Included with Angular CLI. + + + +/*************************************************************************************************** + * APPLICATION IMPORTS + */ diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/styles.css b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/styles.css new file mode 100644 index 00000000..90d4ee00 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/styles.css @@ -0,0 +1 @@ +/* You can add global styles to this file, and also import other style files */ diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/test.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/test.ts new file mode 100644 index 00000000..52acc194 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/test.ts @@ -0,0 +1,39 @@ +/* + * Copyright © 2017 AT&T Intellectual Property. + * + * Copyright © 2018 IBM + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +// This file is required by karma.conf.js and loads recursively all the .spec and framework files + +import 'zone.js/dist/zone-testing'; +import { getTestBed } from '@angular/core/testing'; +import { + BrowserDynamicTestingModule, + platformBrowserDynamicTesting +} from '@angular/platform-browser-dynamic/testing'; + +declare const require: any; + +// First, initialize the Angular testing environment. +getTestBed().initTestEnvironment( + BrowserDynamicTestingModule, + platformBrowserDynamicTesting() +); +// Then we find all the tests. +const context = require.context('./', true, /\.spec\.ts$/); +// And load the modules. +context.keys().map(context); diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/tsconfig.app.json b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/tsconfig.app.json new file mode 100644 index 00000000..e44bdeb3 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/tsconfig.app.json @@ -0,0 +1,11 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/app", + "types": ["node", "angular"] + }, + "exclude": [ + "test.ts", + "**/*.spec.ts" + ] +} diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/tsconfig.spec.json b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/tsconfig.spec.json new file mode 100644 index 00000000..de773363 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/tsconfig.spec.json @@ -0,0 +1,18 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/spec", + "types": [ + "jasmine", + "node" + ] + }, + "files": [ + "test.ts", + "polyfills.ts" + ], + "include": [ + "**/*.spec.ts", + "**/*.d.ts" + ] +} diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/tslint.json b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/tslint.json new file mode 100644 index 00000000..52e2c1a5 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/tslint.json @@ -0,0 +1,17 @@ +{ + "extends": "../tslint.json", + "rules": { + "directive-selector": [ + true, + "attribute", + "app", + "camelCase" + ], + "component-selector": [ + true, + "element", + "app", + "kebab-case" + ] + } +} |