Fix Bug 2121: NG-UI uses unmaintained Chokidar version
- Upgraded Angular from 11 to 14 version to remove chokidar
unmaintained version.
- Changed linting tool tslint to eslint for angular 14 as tslint
is depreacted after angular 12
- Resolved linting issues from code
Change-Id: I00e908ab651db0f080e0d18a9d1c9711f4e36b91
Signed-off-by: SANDHYA.JS <sandhya.j@tataelxsi.co.in>
diff --git a/src/app/k8s/k8s-add-cluster/K8sAddClusterComponent.ts b/src/app/k8s/k8s-add-cluster/K8sAddClusterComponent.ts
index aa33193..bad533f 100644
--- a/src/app/k8s/k8s-add-cluster/K8sAddClusterComponent.ts
+++ b/src/app/k8s/k8s-add-cluster/K8sAddClusterComponent.ts
@@ -18,6 +18,7 @@
/**
* @file K8sAddClusterComponent.ts.
*/
+import { isNullOrUndefined } from 'util';
import { HttpHeaders } from '@angular/common/http';
import { Component, ElementRef, Injector, OnInit, ViewChild } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
@@ -29,7 +30,6 @@
import * as jsyaml from 'js-yaml';
import { RestService } from 'RestService';
import { SharedService } from 'SharedService';
-import { isNullOrUndefined } from 'util';
import { VimAccountDetails } from 'VimAccountModel';
/**
* Creating Component
@@ -209,6 +209,7 @@
// Transform Map to json object
const jsonDMObject: {} = {};
this.deploymentMethodsSubmit.forEach((value: boolean, key: string): void => {
+ // eslint-disable-next-line security/detect-object-injection
jsonDMObject[key] = value;
});
@@ -232,7 +233,6 @@
if (files && files.length === 1) {
this.sharedService.getFileString(files, 'json').then((fileContent: string): void => {
const getNetsJson: string = jsyaml.load(fileContent, { json: true });
- // tslint:disable-next-line: no-backbone-get-set-outside-model
this.k8sclusterForm.get('nets').setValue(JSON.stringify(getNetsJson));
}).catch((err: string): void => {
if (err === 'typeError') {
@@ -255,7 +255,6 @@
if (files && files.length === 1) {
this.sharedService.getFileString(files, 'yaml').then((fileContent: string): void => {
const getCredentialsJson: string = jsyaml.load(fileContent, { json: true });
- // tslint:disable-next-line: no-backbone-get-set-outside-model
this.k8sclusterForm.get('credentials').setValue(JSON.stringify(getCredentialsJson));
}).catch((err: string): void => {
if (err === 'typeError') {
@@ -272,5 +271,4 @@
this.fileInputCredentialsLabel.nativeElement.innerText = files[0].name;
this.fileInputCredentials.nativeElement.value = null;
}
-
}