Build fail Fix for NG-UI
* Updated angular from 9 to 11
Change-Id: I935283cbef382288d9d7dcfe9af125b0020f059e
Signed-off-by: Barath Kumar R <barath.r@tataelxsi.co.in>
diff --git a/browserslist b/.browserslistrc
similarity index 100%
rename from browserslist
rename to .browserslistrc
diff --git a/angular.json b/angular.json
index 5420910..a8eb6a6 100644
--- a/angular.json
+++ b/angular.json
@@ -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/build-debpkg.sh b/build-debpkg.sh
index 07a6d43..75ffeca 100755
--- a/build-debpkg.sh
+++ b/build-debpkg.sh
@@ -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"
diff --git a/package.json b/package.json
index 869d690..798656e 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "osm",
- "version": "8.0.2",
+ "version": "9.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
@@ -13,17 +13,17 @@
"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",
@@ -57,34 +57,34 @@
"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"
}
}
diff --git a/src/app/AppModule.ts b/src/app/AppModule.ts
index 02fa736..5cfa65b 100644
--- a/src/app/AppModule.ts
+++ b/src/app/AppModule.ts
@@ -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 @@
}),
NgbModule,
NgSelectModule,
- RouterModule.forRoot(appRoutes, { useHash: false }),
+ RouterModule.forRoot(appRoutes, { useHash: false, relativeLinkResolution: 'legacy' }),
NgIdleKeepaliveModule.forRoot(),
LoaderModule
],
diff --git a/src/app/dashboard/DashboardComponent.ts b/src/app/dashboard/DashboardComponent.ts
index 31a8516..8df0e7c 100644
--- a/src/app/dashboard/DashboardComponent.ts
+++ b/src/app/dashboard/DashboardComponent.ts
@@ -107,7 +107,7 @@
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 @@
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 @@
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')
diff --git a/src/app/login/LoginComponent.scss b/src/app/login/LoginComponent.scss
index 28ac159..293e50c 100644
--- a/src/app/login/LoginComponent.scss
+++ b/src/app/login/LoginComponent.scss
@@ -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 {
diff --git a/tsconfig.json b/tsconfig.json
index ba5b667..7bac1a3 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -7,7 +7,7 @@
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
- "module": "esnext",
+ "module": "es2020",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
diff --git a/tslint.json b/tslint.json
index ba584e0..62ff200 100644
--- a/tslint.json
+++ b/tslint.json
@@ -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,
@@ -245,14 +248,11 @@
"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,