From f1e9c646787225109f6c7ee66a088889056f89ee Mon Sep 17 00:00:00 2001 From: "Saravanan, Madheswaran" Date: Wed, 7 Nov 2018 18:36:41 -0500 Subject: Bootstrapping hybrid app (Angular v1 and v6) Issue-ID: PORTAL-356 Change-Id: I1ee7f6a51eb71dff2128a112afdefff5776f2ffe Change-Id: I1ee7f6a51eb71dff2128a112afdefff5776f2ffe Signed-off-by: Saravanan, Madheswaran --- ecomp-sdk/epsdk-app-os/README.md | 3 + ecomp-sdk/epsdk-app-os/pom.xml | 123 +++++++++++++++- .../ds2-samplePages/ngsamplePage.html | 70 +++++++++ ecomp-sdk/epsdk-app-overlay/README.md | 2 + .../webapp/WEB-INF/fusion/defs/definitions.xml | 43 +++++- .../DS2-workflows-page/ngworkflow-landing.html | 74 ++++++++++ .../scripts/DS2-view-models/ds2-admin/ngadmin.html | 73 ++++++++++ .../DS2-view-models/ds2-profile/ngprofile.html | 75 ++++++++++ .../DS2-view-models/ds2-reports/ngall-reports.html | 84 +++++++++++ .../ds2-samplePages/ngnotebook-frame.html | 81 +++++++++++ .../src/main/webapp/ngapp/.editorconfig | 13 ++ .../src/main/webapp/ngapp/.gitignore | 39 ++++++ .../src/main/webapp/ngapp/README.md | 27 ++++ .../src/main/webapp/ngapp/angular.json | 130 +++++++++++++++++ .../src/main/webapp/ngapp/e2e/protractor.conf.js | 28 ++++ .../src/main/webapp/ngapp/e2e/src/app.e2e-spec.ts | 14 ++ .../src/main/webapp/ngapp/e2e/src/app.po.ts | 11 ++ .../src/main/webapp/ngapp/e2e/tsconfig.e2e.json | 13 ++ .../src/main/webapp/ngapp/package.json | 50 +++++++ .../ngapp/src/app/admin/admin-routing.module.ts | 10 ++ .../ngapp/src/app/admin/admin.module.spec.ts | 13 ++ .../webapp/ngapp/src/app/admin/admin.module.ts | 77 ++++++++++ .../webapp/ngapp/src/app/app-routing.module.ts | 29 ++++ .../main/webapp/ngapp/src/app/app.component.css | 17 +++ .../main/webapp/ngapp/src/app/app.component.html | 24 ++++ .../webapp/ngapp/src/app/app.component.spec.ts | 49 +++++++ .../src/main/webapp/ngapp/src/app/app.component.ts | 37 +++++ .../src/main/webapp/ngapp/src/app/app.module.ts | 106 ++++++++++++++ .../ngapp/src/app/core/core-routing.module.ts | 10 ++ .../webapp/ngapp/src/app/core/core.module.spec.ts | 13 ++ .../main/webapp/ngapp/src/app/core/core.module.ts | 13 ++ .../src/app/profile/profile-routing.module.ts | 10 ++ .../ngapp/src/app/profile/profile.module.spec.ts | 13 ++ .../webapp/ngapp/src/app/profile/profile.module.ts | 13 ++ .../ngapp/src/app/report/report-routing.module.ts | 10 ++ .../ngapp/src/app/report/report.module.spec.ts | 13 ++ .../webapp/ngapp/src/app/report/report.module.ts | 13 ++ .../app/samplepage/samplepage-routing.module.ts | 10 ++ .../src/app/samplepage/samplepage.module.spec.ts | 13 ++ .../ngapp/src/app/samplepage/samplepage.module.ts | 13 ++ .../ngapp/src/app/shared/shared-routing.module.ts | 10 ++ .../ngapp/src/app/shared/shared.module.spec.ts | 13 ++ .../webapp/ngapp/src/app/shared/shared.module.ts | 13 ++ .../src/main/webapp/ngapp/src/assets/.gitkeep | 0 .../ngapp/src/assets/mockdata/get_usage_list.json | 3 + .../src/main/webapp/ngapp/src/browserslist | 11 ++ .../ngapp/src/environments/environment.prod.ts | 22 +++ .../webapp/ngapp/src/environments/environment.ts | 28 ++++ .../src/main/webapp/ngapp/src/favicon.ico | Bin 0 -> 5430 bytes .../src/main/webapp/ngapp/src/karma.conf.js | 31 ++++ .../src/main/webapp/ngapp/src/main.ts | 31 ++++ .../src/main/webapp/ngapp/src/ngwelcome.html | 156 +++++++++++++++++++++ .../src/main/webapp/ngapp/src/polyfills.ts | 98 +++++++++++++ .../src/main/webapp/ngapp/src/styles.css | 1 + .../src/main/webapp/ngapp/src/test.ts | 39 ++++++ .../src/main/webapp/ngapp/src/tsconfig.app.json | 11 ++ .../src/main/webapp/ngapp/src/tsconfig.spec.json | 18 +++ .../src/main/webapp/ngapp/src/tslint.json | 17 +++ .../src/main/webapp/ngapp/tsconfig.json | 25 ++++ .../src/main/webapp/ngapp/tslint.json | 131 +++++++++++++++++ 60 files changed, 2112 insertions(+), 5 deletions(-) create mode 100644 ecomp-sdk/epsdk-app-os/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/ngsamplePage.html create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/DS2-workflows-page/ngworkflow-landing.html create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/ngadmin.html create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/ngprofile.html create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/ngall-reports.html create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/ngnotebook-frame.html create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/.editorconfig create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/.gitignore create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/README.md create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/angular.json create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/e2e/protractor.conf.js create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/e2e/src/app.e2e-spec.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/e2e/src/app.po.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/e2e/tsconfig.e2e.json create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/package.json create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/admin/admin-routing.module.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/admin/admin.module.spec.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/admin/admin.module.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/app-routing.module.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/app.component.css create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/app.component.html create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/app.component.spec.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/app.component.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/app.module.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/core/core-routing.module.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/core/core.module.spec.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/core/core.module.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/profile/profile-routing.module.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/profile/profile.module.spec.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/profile/profile.module.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/report/report-routing.module.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/report/report.module.spec.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/report/report.module.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/samplepage/samplepage-routing.module.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/samplepage/samplepage.module.spec.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/samplepage/samplepage.module.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/shared-routing.module.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/shared.module.spec.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/shared.module.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/assets/.gitkeep create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/assets/mockdata/get_usage_list.json create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/browserslist create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/environments/environment.prod.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/environments/environment.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/favicon.ico create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/karma.conf.js create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/main.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/ngwelcome.html create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/polyfills.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/styles.css create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/test.ts create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/tsconfig.app.json create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/tsconfig.spec.json create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/tslint.json create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/tsconfig.json create mode 100644 ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/tslint.json diff --git a/ecomp-sdk/epsdk-app-os/README.md b/ecomp-sdk/epsdk-app-os/README.md index 675919bb..1c59c836 100644 --- a/ecomp-sdk/epsdk-app-os/README.md +++ b/ecomp-sdk/epsdk-app-os/README.md @@ -12,6 +12,9 @@ like Apache Tomcat. Eclipse users must install the M2E-WTP connector, see https://www.eclipse.org/m2e-wtp/ ## Release Notes +Version 2.5.0 +- PORTAL-356 Bootstrapping hybrid applications (Angular and AngularJS) + Version 2.3.0 - PORTAL 254 ECOMP AAF jar - PORTAL-281 Portal SDK AAF jar throws null pointer exception diff --git a/ecomp-sdk/epsdk-app-os/pom.xml b/ecomp-sdk/epsdk-app-os/pom.xml index 21f75af3..7ccc1776 100644 --- a/ecomp-sdk/epsdk-app-os/pom.xml +++ b/ecomp-sdk/epsdk-app-os/pom.xml @@ -41,6 +41,17 @@ ${project.artifactId} + + maven-clean-plugin + 3.0.0 + + + + ${basedir}/ngapp/app/dist + + + + org.apache.maven.plugins maven-surefire-plugin @@ -120,13 +131,120 @@ + + maven-resources-plugin + 2.5 + + + copy-angularjs-step1 + process-resources + + copy-resources + + + ${basedir}/ngapp + + + ../epsdk-app-overlay/src/main/webapp/ngapp + + + + + + + + + com.github.eirslett + frontend-maven-plugin + 1.6 + + + v8.11.3 + 5.6.0 + ${basedir}/ngapp + + + + install node and npm + compile + + install-node-and-npm + + - + + npm install + compile + + npm + + + + + npm run build + compile + + npm + + + + run build + + + + + + + maven-resources-plugin + 2.5 + + + + copy-angular-final-step2 + prepare-package + + copy-resources + + + ${basedir}/target/epsdk-app-os/app + + + ${basedir}/ngapp/dist + + + + + + + + + org.apache.maven.plugins maven-war-plugin - 2.0.2 + 3.2.2 @@ -143,6 +261,7 @@ epsdk-app-overlay + **/ngapp diff --git a/ecomp-sdk/epsdk-app-os/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/ngsamplePage.html b/ecomp-sdk/epsdk-app-os/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/ngsamplePage.html new file mode 100644 index 00000000..b774579a --- /dev/null +++ b/ecomp-sdk/epsdk-app-os/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/ngsamplePage.html @@ -0,0 +1,70 @@ + + + + + + + Sample Page NG + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + diff --git a/ecomp-sdk/epsdk-app-overlay/README.md b/ecomp-sdk/epsdk-app-overlay/README.md index 5f03cb9f..b6a4a01a 100644 --- a/ecomp-sdk/epsdk-app-overlay/README.md +++ b/ecomp-sdk/epsdk-app-overlay/README.md @@ -16,6 +16,8 @@ version 1.0.1. Note that previous versions of the EPSDK web application used AngularJS version 1.5.0. ### ONAP Distributions +Version 2.5.0 +- PORTAL-356 Bootstrapping hybrid applications (Angular and AngularJS) Version 1.4.0 - PORTAL-19 Rename Java package base to org.onap diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/defs/definitions.xml b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/defs/definitions.xml index 05556d27..90ccf9b7 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/defs/definitions.xml +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/defs/definitions.xml @@ -57,9 +57,13 @@ - + + --> + + /> + + --> + + + + + + + + + + + + + + + + + + @@ -124,8 +157,12 @@ + + + + + + + + + Workflow NG + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/ngadmin.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/ngadmin.html new file mode 100644 index 00000000..ad0ee468 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/ngadmin.html @@ -0,0 +1,73 @@ + + + + + + + + Admin NG + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/ngprofile.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/ngprofile.html new file mode 100644 index 00000000..37729dd8 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/ngprofile.html @@ -0,0 +1,75 @@ + + + + + + + + Profile Search NG + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/ngall-reports.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/ngall-reports.html new file mode 100644 index 00000000..bad0aeb9 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/ngall-reports.html @@ -0,0 +1,84 @@ + + + + + + + Reports NG + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/ngnotebook-frame.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/ngnotebook-frame.html new file mode 100644 index 00000000..7813b0c5 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/ngnotebook-frame.html @@ -0,0 +1,81 @@ + + + + + + + Notebook Page NG + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/.editorconfig b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/.editorconfig new file mode 100644 index 00000000..6e87a003 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/.editorconfig @@ -0,0 +1,13 @@ +# Editor configuration, see http://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/.gitignore b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/.gitignore new file mode 100644 index 00000000..ee5c9d83 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/.gitignore @@ -0,0 +1,39 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# compiled output +/dist +/tmp +/out-tsc + +# dependencies +/node_modules + +# IDEs and editors +/.idea +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# IDE - VSCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +# misc +/.sass-cache +/connect.lock +/coverage +/libpeerconnection.log +npm-debug.log +yarn-error.log +testem.log +/typings + +# System Files +.DS_Store +Thumbs.db diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/README.md b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/README.md new file mode 100644 index 00000000..6b2fc4be --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/README.md @@ -0,0 +1,27 @@ +# Ngapp + +This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.2.3. + +## Development server + +Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. + +## Code scaffolding + +Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. + +## Build + +Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. + +## Running unit tests + +Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). + +## Running end-to-end tests + +Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). + +## Further help + +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/angular.json b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/angular.json new file mode 100644 index 00000000..f3033b1f --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/angular.json @@ -0,0 +1,130 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "ngapp": { + "root": "", + "sourceRoot": "src", + "projectType": "application", + "prefix": "app", + "schematics": {}, + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:browser", + "options": { + "outputPath": "dist/ngapp", + "index": "src/ngwelcome.html", + "main": "src/main.ts", + "polyfills": "src/polyfills.ts", + "tsConfig": "src/tsconfig.app.json", + "assets": [ + "src/favicon.ico", + "src/assets", + "src/static", + "src/app/fusion", + "src/app/fusionapp" + ], + "styles": [ + "src/styles.css" + ], + "scripts": [] + }, + "configurations": { + "production": { + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.prod.ts" + } + ], + "optimization": true, + "outputHashing": "all", + "sourceMap": false, + "extractCss": true, + "namedChunks": false, + "aot": true, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": true + } + } + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "options": { + "browserTarget": "ngapp:build" + }, + "configurations": { + "production": { + "browserTarget": "ngapp:build:production" + } + } + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "browserTarget": "ngapp:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "main": "src/test.ts", + "polyfills": "src/polyfills.ts", + "tsConfig": "src/tsconfig.spec.json", + "karmaConfig": "src/karma.conf.js", + "styles": [ + "src/styles.css" + ], + "scripts": [], + "assets": [ + "src/favicon.ico", + "src/assets" + ] + } + }, + "lint": { + "builder": "@angular-devkit/build-angular:tslint", + "options": { + "tsConfig": [ + "src/tsconfig.app.json", + "src/tsconfig.spec.json" + ], + "exclude": [ + "**/node_modules/**" + ] + } + } + } + }, + "ngapp-e2e": { + "root": "e2e/", + "projectType": "application", + "architect": { + "e2e": { + "builder": "@angular-devkit/build-angular:protractor", + "options": { + "protractorConfig": "e2e/protractor.conf.js", + "devServerTarget": "ngapp:serve" + }, + "configurations": { + "production": { + "devServerTarget": "ngapp:serve:production" + } + } + }, + "lint": { + "builder": "@angular-devkit/build-angular:tslint", + "options": { + "tsConfig": "e2e/tsconfig.e2e.json", + "exclude": [ + "**/node_modules/**" + ] + } + } + } + } + }, + "defaultProject": "ngapp" +} \ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/e2e/protractor.conf.js b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/e2e/protractor.conf.js new file mode 100644 index 00000000..86776a39 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/e2e/protractor.conf.js @@ -0,0 +1,28 @@ +// Protractor configuration file, see link for more information +// https://github.com/angular/protractor/blob/master/lib/config.ts + +const { SpecReporter } = require('jasmine-spec-reporter'); + +exports.config = { + allScriptsTimeout: 11000, + specs: [ + './src/**/*.e2e-spec.ts' + ], + capabilities: { + 'browserName': 'chrome' + }, + directConnect: true, + baseUrl: 'http://localhost:4200/', + framework: 'jasmine', + jasmineNodeOpts: { + showColors: true, + defaultTimeoutInterval: 30000, + print: function() {} + }, + onPrepare() { + require('ts-node').register({ + project: require('path').join(__dirname, './tsconfig.e2e.json') + }); + jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); + } +}; \ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/e2e/src/app.e2e-spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/e2e/src/app.e2e-spec.ts new file mode 100644 index 00000000..b6f71fee --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/e2e/src/app.e2e-spec.ts @@ -0,0 +1,14 @@ +import { AppPage } from './app.po'; + +describe('workspace-project App', () => { + let page: AppPage; + + beforeEach(() => { + page = new AppPage(); + }); + + it('should display welcome message', () => { + page.navigateTo(); + expect(page.getParagraphText()).toEqual('Welcome to ngapp!'); + }); +}); diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/e2e/src/app.po.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/e2e/src/app.po.ts new file mode 100644 index 00000000..82ea75ba --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/e2e/src/app.po.ts @@ -0,0 +1,11 @@ +import { browser, by, element } from 'protractor'; + +export class AppPage { + navigateTo() { + return browser.get('/'); + } + + getParagraphText() { + return element(by.css('app-root h1')).getText(); + } +} diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/e2e/tsconfig.e2e.json b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/e2e/tsconfig.e2e.json new file mode 100644 index 00000000..a6dd6220 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/e2e/tsconfig.e2e.json @@ -0,0 +1,13 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/app", + "module": "commonjs", + "target": "es5", + "types": [ + "jasmine", + "jasminewd2", + "node" + ] + } +} \ No newline at end of file diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/package.json b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/package.json new file mode 100644 index 00000000..25c22951 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/package.json @@ -0,0 +1,50 @@ +{ + "name": "ngapp", + "version": "0.0.0", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build --prod --output-hashing none", + "test": "ng test", + "lint": "ng lint", + "e2e": "ng e2e" + }, + "private": true, + "dependencies": { + "@angular/animations": "^6.1.0", + "@angular/common": "^6.1.0", + "@angular/compiler": "^6.1.0", + "@angular/core": "^6.1.0", + "@angular/forms": "^6.1.0", + "@angular/http": "^6.1.0", + "@angular/platform-browser": "^6.1.0", + "@angular/platform-browser-dynamic": "^6.1.0", + "@angular/router": "^6.1.0", + "@angular/upgrade": "^6.1.0", + "core-js": "^2.5.4", + "rxjs": "~6.2.0", + "zone.js": "~0.8.26" + }, + "devDependencies": { + "@angular-devkit/build-angular": "~0.8.0", + "@angular/cli": "~6.2.3", + "@angular/compiler-cli": "^6.1.0", + "@angular/language-service": "^6.1.0", + "@types/angular": "^1.6.51", + "@types/jasmine": "~2.8.8", + "@types/jasminewd2": "~2.0.3", + "@types/node": "~8.9.4", + "codelyzer": "~4.3.0", + "jasmine-core": "~2.99.1", + "jasmine-spec-reporter": "~4.2.1", + "karma": "~3.0.0", + "karma-chrome-launcher": "~2.2.0", + "karma-coverage-istanbul-reporter": "~2.0.1", + "karma-jasmine": "~1.1.2", + "karma-jasmine-html-reporter": "^0.2.2", + "protractor": "~5.4.0", + "ts-node": "~7.0.0", + "tslint": "~5.11.0", + "typescript": "~2.9.2" + } +} 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 @@ + + + + + \ 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 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 new file mode 100644 index 00000000..8081c7ce Binary files /dev/null and b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/favicon.ico differ 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 @@ + + + + + Welcome NG + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + 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" + ] + } +} diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/tsconfig.json b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/tsconfig.json new file mode 100644 index 00000000..f6e888a7 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "baseUrl": "./", + "outDir": "./dist/out-tsc", + "sourceMap": true, + "declaration": false, + "module": "es2015", + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "target": "es5", + "typeRoots": [ + "node_modules/@types" + ], + "types": [ + "angular", + "jasmine" + ], + "lib": [ + "es2017", + "dom" + ] + } +} diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/tslint.json b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/tslint.json new file mode 100644 index 00000000..6ddb6b29 --- /dev/null +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/tslint.json @@ -0,0 +1,131 @@ +{ + "rulesDirectory": [ + "node_modules/codelyzer" + ], + "rules": { + "arrow-return-shorthand": true, + "callable-types": true, + "class-name": true, + "comment-format": [ + true, + "check-space" + ], + "curly": true, + "deprecation": { + "severity": "warn" + }, + "eofline": true, + "forin": true, + "import-blacklist": [ + true, + "rxjs/Rx" + ], + "import-spacing": true, + "indent": [ + true, + "spaces" + ], + "interface-over-type-literal": true, + "label-position": true, + "max-line-length": [ + true, + 140 + ], + "member-access": false, + "member-ordering": [ + true, + { + "order": [ + "static-field", + "instance-field", + "static-method", + "instance-method" + ] + } + ], + "no-arg": true, + "no-bitwise": true, + "no-console": [ + true, + "debug", + "info", + "time", + "timeEnd", + "trace" + ], + "no-construct": true, + "no-debugger": true, + "no-duplicate-super": true, + "no-empty": false, + "no-empty-interface": true, + "no-eval": true, + "no-inferrable-types": [ + true, + "ignore-params" + ], + "no-misused-new": true, + "no-non-null-assertion": true, + "no-redundant-jsdoc": true, + "no-shadowed-variable": true, + "no-string-literal": false, + "no-string-throw": true, + "no-switch-case-fall-through": true, + "no-trailing-whitespace": true, + "no-unnecessary-initializer": true, + "no-unused-expression": true, + "no-use-before-declare": true, + "no-var-keyword": true, + "object-literal-sort-keys": false, + "one-line": [ + true, + "check-open-brace", + "check-catch", + "check-else", + "check-whitespace" + ], + "prefer-const": true, + "quotemark": [ + true, + "single" + ], + "radix": true, + "semicolon": [ + true, + "always" + ], + "triple-equals": [ + true, + "allow-null-check" + ], + "typedef-whitespace": [ + true, + { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + } + ], + "unified-signatures": true, + "variable-name": false, + "whitespace": [ + true, + "check-branch", + "check-decl", + "check-operator", + "check-separator", + "check-type" + ], + "no-output-on-prefix": true, + "use-input-property-decorator": true, + "use-output-property-decorator": true, + "use-host-property-decorator": true, + "no-input-rename": true, + "no-output-rename": true, + "use-life-cycle-interface": true, + "use-pipe-transform-interface": true, + "component-class-suffix": true, + "directive-class-suffix": true + } +} -- cgit 1.2.3-korg