X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Fapp%2Fk8s%2Fk8s-add-cluster%2FK8sAddClusterComponent.ts;h=8115b6f2f28c7ed48e4b35873fecc9381bfa6b8d;hb=refs%2Fchanges%2F14%2F14414%2F3;hp=aa33193fbd3d7bdeed7ad0181c2c4ee440d5c87e;hpb=f633dbf8c1a5bab7a06b16512a06d4d535b7ea3a;p=osm%2FNG-UI.git diff --git a/src/app/k8s/k8s-add-cluster/K8sAddClusterComponent.ts b/src/app/k8s/k8s-add-cluster/K8sAddClusterComponent.ts index aa33193..8115b6f 100644 --- a/src/app/k8s/k8s-add-cluster/K8sAddClusterComponent.ts +++ b/src/app/k8s/k8s-add-cluster/K8sAddClusterComponent.ts @@ -28,8 +28,7 @@ import { APIURLHEADER, ERRORDATA, MODALCLOSERESPONSEDATA, TYPESECTION } from 'Co import { environment } from 'environment'; import * as jsyaml from 'js-yaml'; import { RestService } from 'RestService'; -import { SharedService } from 'SharedService'; -import { isNullOrUndefined } from 'util'; +import { SharedService, isNullOrUndefined } from 'SharedService'; import { VimAccountDetails } from 'VimAccountModel'; /** * Creating Component @@ -58,7 +57,7 @@ export class K8sAddClusterComponent implements OnInit { public deploymentMethodsSubmit: Map; /** Contains all deployment methods selected */ - public selectedDeploymentMethods: string[] = ['helm-chart-v2', 'helm-chart-v3', 'juju-bundle']; + public selectedDeploymentMethods: string[] = ['helm-chart', 'helm-chart-v3', 'juju-bundle']; /** Instance for active modal service @public */ public activeModal: NgbActiveModal; @@ -116,7 +115,7 @@ export class K8sAddClusterComponent implements OnInit { this.deploymentMethodsSelect = [ { title: 'Helm v2', - value: 'helm-chart-v2' + value: 'helm-chart' }, { title: 'Helm v3', @@ -209,6 +208,7 @@ export class K8sAddClusterComponent implements OnInit { // 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 +232,6 @@ export class K8sAddClusterComponent implements OnInit { 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 +254,6 @@ export class K8sAddClusterComponent implements OnInit { 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 +270,4 @@ export class K8sAddClusterComponent implements OnInit { this.fileInputCredentialsLabel.nativeElement.innerText = files[0].name; this.fileInputCredentials.nativeElement.value = null; } - }