Build fail Fix for NG-UI 18/10018/10 release-v9.0-start v9.0.0 v9.0.0rc1
authorBarath Kumar R <barath.r@tataelxsi.co.in>
Sun, 22 Nov 2020 14:45:10 +0000 (20:15 +0530)
committerBarath Kumar R <barath.r@tataelxsi.co.in>
Tue, 24 Nov 2020 04:32:45 +0000 (10:02 +0530)
 * Updated angular from 9 to 11

Change-Id: I935283cbef382288d9d7dcfe9af125b0020f059e
Signed-off-by: Barath Kumar R <barath.r@tataelxsi.co.in>
.browserslistrc [new file with mode: 0644]
angular.json
browserslist [deleted file]
build-debpkg.sh
package.json
src/app/AppModule.ts
src/app/dashboard/DashboardComponent.ts
src/app/login/LoginComponent.scss
tsconfig.json
tslint.json

diff --git a/.browserslistrc b/.browserslistrc
new file mode 100644 (file)
index 0000000..412910d
--- /dev/null
@@ -0,0 +1,28 @@
+# Copyright 2020 TATA ELXSI
+#
+# 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.
+#
+# Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in)
+
+# 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
index 5420910..a8eb6a6 100644 (file)
@@ -10,7 +10,8 @@
             "prefix": "app",
             "schematics": {
                 "@schematics/angular:component": {
-                    "styleext": "scss"
+                    "styleext": "scss",
+                    "style": "scss"
                 }
             },
             "architect": {
@@ -33,8 +34,7 @@
                         ],
                         "scripts": [
                             "src/assets/js/tar.js"
-                        ],
-                        "es5BrowserSupport": true
+                        ]
                     },
                     "configurations": {
                         "production": {
@@ -47,7 +47,6 @@
                             "optimization": true,
                             "outputHashing": "all",
                             "sourceMap": false,
-                            "extractCss": true,
                             "namedChunks": false,
                             "aot": true,
                             "extractLicenses": true,
diff --git a/browserslist b/browserslist
deleted file mode 100644 (file)
index 412910d..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 2020 TATA ELXSI
-#
-# 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.
-#
-# Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in)
-
-# 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
index 07a6d43..75ffeca 100755 (executable)
@@ -16,7 +16,7 @@
 
 
 PKG_DIRECTORIES="nginx src"
-PKG_FILES="angular.json browserslist CONTRIBUTING.md package.json proxy.conf.json tsconfig.json tslint.json LICENSE README.md"
+PKG_FILES="angular.json .browserslistrc CONTRIBUTING.md package.json proxy.conf.json tsconfig.json tslint.json LICENSE README.md"
 MDG_NAME=ngui
 DEB_INSTALL=debian/osm-${MDG_NAME}.install
 export DEBEMAIL="gerardo.garciadeblas@telefonica.com"
index 869d690..798656e 100644 (file)
@@ -1,6 +1,6 @@
 {
   "name": "osm",
-  "version": "8.0.2",
+  "version": "9.0.0",
   "scripts": {
     "ng": "ng",
     "start": "ng serve",
   "private": true,
   "dependencies": {
     "@akveo/ng2-completer": "^9.0.1",
-    "@angular/animations": "~9.1.0",
+    "@angular/animations": "~11.0.2",
     "@angular/cdk": "^7.3.7",
-    "@angular/common": "~9.1.0",
-    "@angular/compiler": "~9.1.0",
-    "@angular/core": "~9.1.0",
+    "@angular/common": "~11.0.2",
+    "@angular/compiler": "~11.0.2",
+    "@angular/core": "~11.0.2",
     "@angular/flex-layout": "^9.0.0-beta.29",
-    "@angular/forms": "~9.1.0",
-    "@angular/localize": "^9.1.2",
-    "@angular/platform-browser": "~9.1.0",
-    "@angular/platform-browser-dynamic": "~9.1.0",
-    "@angular/router": "~9.1.0",
+    "@angular/forms": "~11.0.2",
+    "@angular/localize": "^11.0.2",
+    "@angular/platform-browser": "~11.0.2",
+    "@angular/platform-browser-dynamic": "~11.0.2",
+    "@angular/router": "~11.0.2",
     "@ctrl/ngx-codemirror": "^2.2.1",
     "@fortawesome/fontawesome-free": "^5.13.0",
     "@ng-bootstrap/ng-bootstrap": "^5.3.0",
     "rxjs": "^6.5.4",
     "rxjs-compat": "^6.5.5",
     "stream": "0.0.2",
-    "tslib": "^1.11.1",
+    "tslib": "^2.0.0",
     "web-animations-js": "^2.3.2",
     "zone.js": "~0.10.3"
   },
   "devDependencies": {
-    "@angular-devkit/build-angular": "^0.901.8",
-    "@angular/cli": "~9.1.0",
-    "@angular/compiler-cli": "~9.1.0",
-    "@angular/language-service": "~9.1.0",
-    "@types/jasmine": "~2.8.8",
+    "@angular-devkit/build-angular": "^0.1100.2",
+    "@angular/cli": "~11.0.2",
+    "@angular/compiler-cli": "~11.0.2",
+    "@angular/language-service": "~11.0.2",
+    "@types/jasmine": "~3.6.0",
     "@types/jasminewd2": "~2.0.3",
     "@types/jquery": "^3.3.31",
     "@types/node": "^8.10.59",
-    "codelyzer": "^5.0.1",
-    "jasmine-core": "~2.99.1",
-    "jasmine-spec-reporter": "~4.2.1",
-    "karma": "~3.1.1",
-    "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",
+    "codelyzer": "^6.0.0",
+    "jasmine-core": "~3.6.0",
+    "jasmine-spec-reporter": "~5.0.0",
+    "karma": "~5.0.0",
+    "karma-chrome-launcher": "~3.1.0",
+    "karma-coverage-istanbul-reporter": "~3.0.2",
+    "karma-jasmine": "~4.0.0",
+    "karma-jasmine-html-reporter": "^1.5.0",
     "ng2-completer": "^3.0.3",
     "node-sass": "^4.14.1",
-    "protractor": "~5.4.0",
+    "protractor": "~7.0.0",
     "ts-node": "~7.0.0",
-    "tslint": "^5.11.0",
+    "tslint": "~6.1.0",
     "tslint-html-report": "^2.0.3",
     "tslint-microsoft-contrib": "^6.1.1",
-    "typescript": "~3.8.3"
+    "typescript": "~4.0.5"
   }
 }
index 02fa736..5cfa65b 100644 (file)
@@ -19,7 +19,7 @@
  * @file Instance Module file
  */
 import { CommonModule, LOCATION_INITIALIZED } from '@angular/common';
-import { HTTP_INTERCEPTORS, HttpClient, HttpClientModule } from '@angular/common/http';
+import { HttpClient, HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
 import { APP_INITIALIZER, Injector, NgModule } from '@angular/core';
 import { FormsModule, ReactiveFormsModule } from '@angular/forms';
 import { BrowserModule } from '@angular/platform-browser';
@@ -143,7 +143,7 @@ const customNotifierOptions: NotifierOptions = {
         }),
         NgbModule,
         NgSelectModule,
-        RouterModule.forRoot(appRoutes, { useHash: false }),
+        RouterModule.forRoot(appRoutes, { useHash: false, relativeLinkResolution: 'legacy' }),
         NgIdleKeepaliveModule.forRoot(),
         LoaderModule
     ],
index 31a8516..8df0e7c 100644 (file)
@@ -107,7 +107,7 @@ export class DashboardComponent implements OnInit {
     public message: string = 'PLEASEWAIT';
 
     /** List of NS Success Instances @public */
-    public nsRunningInstance: {}[] = [];
+    public nsRunningInstance: string[] = [];
 
     /** List of color for Instances @private */
     private backgroundColor: string[] = [];
@@ -281,7 +281,7 @@ export class DashboardComponent implements OnInit {
             if (operationalStatus === 'failed' || configStatus === 'failed') {
                 this.nsFailedInstances.push(nsdInstanceData);
             } else if (operationalStatus === 'running' && configStatus === 'configured') {
-                this.nsRunningInstance.push({ name: nsdInstanceData.name, id: nsdInstanceData.id });
+                this.nsRunningInstance.push(nsdInstanceData.name);
                 this.backgroundColor.push(this.sharedService.generateColor());
                 this.createdTimes.push(((nsdInstanceData._admin.created).toString()).slice(0, this.sliceLimit));
             }
@@ -315,28 +315,10 @@ export class DashboardComponent implements OnInit {
                         el.style.cursor = item[0] ? 'pointer' : 'default';
                     }
                 },
-                onClick(evt: Event, item: {}): void {
-                    if (item[0] !== undefined) {
-                        const location: string = '/instances/ns/' + item[0]._chart.data.labels[item[0]._index].id;
-                        window.open(location);
-                    }
-                },
                 legend: { display: false },
                 scales: {
                     xAxes: [{
                         display: true,
-                        ticks: {
-                            // tslint:disable-next-line: no-any
-                            callback: (label: any, index: number, labels: string): string => {
-                                const length: number = 20;
-                                const ending: string = '...';
-                                if (label.name.length > length) {
-                                    return label.name.substring(0, length - ending.length) + ending;
-                                } else {
-                                    return label.name;
-                                }
-                            }
-                        },
                         scaleLabel: {
                             display: true,
                             labelString: this.translateService.instant('INSTANCES')
index 28ac159..293e50c 100644 (file)
@@ -21,7 +21,7 @@
 .login-container {
   @include wh-value(100%, 100vh);
   @include flexbox(flex, center, null, null, center, null);
-  @include background(url("../../assets/images/login_background.jpg"), null, cover, no-repeat, center);
+  @include background(url("../../images/login_background.jpg"), null, cover, no-repeat, center);
   background-attachment: fixed;
   flex-wrap: wrap;
   .wrap-login {
index ba5b667..7bac1a3 100644 (file)
@@ -7,7 +7,7 @@
         "outDir": "./dist/out-tsc",
         "sourceMap": true,
         "declaration": false,
-        "module": "esnext",
+        "module": "es2020",
         "moduleResolution": "node",
         "emitDecoratorMetadata": true,
         "experimentalDecorators": true,
index ba584e0..62ff200 100644 (file)
@@ -24,6 +24,9 @@
         "no-inner-html": true,
         "no-octal-literal": true,
         "no-reserved-keywords": true,
+        "deprecation": {
+          "severity": "warning"
+        },
         "no-string-based-set-immediate": true,
         "no-string-based-set-interval": true,
         "no-string-based-set-timeout": true,
         "no-missing-visibility-modifiers": false,
         "no-multiple-var-decl": false,
         "no-switch-case-fall-through": true,
-        //As of 2017-08-21 'no-unused-variable' doesn't work well with generics, disabled for now
-        "no-unused-variable": false,
         "typeof-compare": true,
         "no-inferred-empty-object-type": true,
         "await-promise": true,
         "no-floating-promises": true,
         "no-for-in-array": true,
-        "no-use-before-declare": true,
         "promise-function-async": true,
         "completed-docs": [
             true,