Removing fields related to gns3 vm from templates

This commit is contained in:
piotrpekala7
2021-06-10 15:50:13 +02:00
parent 8e93fa9d36
commit 21dfa56b17
16 changed files with 21 additions and 166 deletions

View File

@ -10,13 +10,6 @@
<mat-radio-button class="radio-button" value="1" (click)="setServerType('local')" checked <mat-radio-button class="radio-button" value="1" (click)="setServerType('local')" checked
>Run the cloud node locally</mat-radio-button >Run the cloud node locally</mat-radio-button
> >
<mat-radio-button
[disabled]="!isGns3VmAvailable"
class="radio-button"
value="2"
(click)="setServerType('gns3 vm')"
>Run the cloud node on the GNS3 VM</mat-radio-button
>
</mat-radio-group> </mat-radio-group>
<form [formGroup]="formGroup"> <form [formGroup]="formGroup">

View File

@ -20,9 +20,6 @@ export class CloudNodesAddTemplateComponent implements OnInit {
server: Server; server: Server;
templateName: string = ''; templateName: string = '';
formGroup: FormGroup; formGroup: FormGroup;
isGns3VmAvailable: boolean = false;
isGns3VmChosen: boolean = false;
isLocalComputerChosen: boolean = true; isLocalComputerChosen: boolean = true;
constructor( constructor(
@ -44,19 +41,11 @@ export class CloudNodesAddTemplateComponent implements OnInit {
const server_id = this.route.snapshot.paramMap.get('server_id'); const server_id = this.route.snapshot.paramMap.get('server_id');
this.serverService.get(parseInt(server_id, 10)).then((server: Server) => { this.serverService.get(parseInt(server_id, 10)).then((server: Server) => {
this.server = server; this.server = server;
this.computeService.getComputes(server).subscribe((computes: Compute[]) => {
if (computes.filter((compute) => compute.compute_id === 'vm').length > 0) this.isGns3VmAvailable = true;
});
}); });
} }
setServerType(serverType: string) { setServerType(serverType: string) {
if (serverType === 'gns3 vm' && this.isGns3VmAvailable) { if (serverType === 'local') {
this.isGns3VmChosen = true;
this.isLocalComputerChosen = false;
} else {
this.isGns3VmChosen = false;
this.isLocalComputerChosen = true; this.isLocalComputerChosen = true;
} }
} }
@ -75,7 +64,7 @@ export class CloudNodesAddTemplateComponent implements OnInit {
cloudTemplate.template_id = uuid(); cloudTemplate.template_id = uuid();
cloudTemplate.name = this.formGroup.get('templateName').value; cloudTemplate.name = this.formGroup.get('templateName').value;
cloudTemplate.compute_id = this.isGns3VmChosen ? 'vm' : 'local'; cloudTemplate.compute_id = 'local';
this.builtInTemplatesService.addTemplate(this.server, cloudTemplate).subscribe((cloudNodeTemplate) => { this.builtInTemplatesService.addTemplate(this.server, cloudTemplate).subscribe((cloudNodeTemplate) => {
this.goBack(); this.goBack();

View File

@ -10,13 +10,6 @@
<mat-radio-button class="radio-button" value="1" (click)="setServerType('local')" checked <mat-radio-button class="radio-button" value="1" (click)="setServerType('local')" checked
>Run the Ethernet Hub locally</mat-radio-button >Run the Ethernet Hub locally</mat-radio-button
> >
<mat-radio-button
[disabled]="!isGns3VmAvailable"
class="radio-button"
value="2"
(click)="setServerType('gns3 vm')"
>Run the Ethernet Hub on the GNS3 VM</mat-radio-button
>
</mat-radio-group> </mat-radio-group>
<form [formGroup]="formGroup"> <form [formGroup]="formGroup">

View File

@ -20,9 +20,6 @@ export class EthernetHubsAddTemplateComponent implements OnInit {
server: Server; server: Server;
templateName: string = ''; templateName: string = '';
formGroup: FormGroup; formGroup: FormGroup;
isGns3VmAvailable: boolean = false;
isGns3VmChosen: boolean = false;
isLocalComputerChosen: boolean = true; isLocalComputerChosen: boolean = true;
constructor( constructor(
@ -45,19 +42,11 @@ export class EthernetHubsAddTemplateComponent implements OnInit {
const server_id = this.route.snapshot.paramMap.get('server_id'); const server_id = this.route.snapshot.paramMap.get('server_id');
this.serverService.get(parseInt(server_id, 10)).then((server: Server) => { this.serverService.get(parseInt(server_id, 10)).then((server: Server) => {
this.server = server; this.server = server;
this.computeService.getComputes(server).subscribe((computes: Compute[]) => {
if (computes.filter((compute) => compute.compute_id === 'vm').length > 0) this.isGns3VmAvailable = true;
});
}); });
} }
setServerType(serverType: string) { setServerType(serverType: string) {
if (serverType === 'gns3 vm' && this.isGns3VmAvailable) { if (serverType === 'local') {
this.isGns3VmChosen = true;
this.isLocalComputerChosen = false;
} else {
this.isGns3VmChosen = false;
this.isLocalComputerChosen = true; this.isLocalComputerChosen = true;
} }
} }
@ -76,7 +65,7 @@ export class EthernetHubsAddTemplateComponent implements OnInit {
ethernetHubTemplate.template_id = uuid(); ethernetHubTemplate.template_id = uuid();
ethernetHubTemplate.name = this.formGroup.get('templateName').value; ethernetHubTemplate.name = this.formGroup.get('templateName').value;
ethernetHubTemplate.compute_id = this.isGns3VmChosen ? 'vm' : 'local'; ethernetHubTemplate.compute_id = 'local';
for (let i = 0; i < this.formGroup.get('numberOfPorts').value; i++) { for (let i = 0; i < this.formGroup.get('numberOfPorts').value; i++) {
ethernetHubTemplate.ports_mapping.push({ ethernetHubTemplate.ports_mapping.push({

View File

@ -10,13 +10,6 @@
<mat-radio-button class="radio-button" value="1" (click)="setServerType('local')" checked <mat-radio-button class="radio-button" value="1" (click)="setServerType('local')" checked
>Run the Ethernet switch locally</mat-radio-button >Run the Ethernet switch locally</mat-radio-button
> >
<mat-radio-button
[disabled]="!isGns3VmAvailable"
class="radio-button"
value="2"
(click)="setServerType('gns3 vm')"
>Run the Ethernet switch on the GNS3 VM</mat-radio-button
>
</mat-radio-group> </mat-radio-group>
<form [formGroup]="formGroup"> <form [formGroup]="formGroup">

View File

@ -20,9 +20,6 @@ export class EthernetSwitchesAddTemplateComponent implements OnInit {
server: Server; server: Server;
templateName: string = ''; templateName: string = '';
formGroup: FormGroup; formGroup: FormGroup;
isGns3VmAvailable: boolean = false;
isGns3VmChosen: boolean = false;
isLocalComputerChosen: boolean = true; isLocalComputerChosen: boolean = true;
constructor( constructor(
@ -45,10 +42,6 @@ export class EthernetSwitchesAddTemplateComponent implements OnInit {
const server_id = this.route.snapshot.paramMap.get('server_id'); const server_id = this.route.snapshot.paramMap.get('server_id');
this.serverService.get(parseInt(server_id, 10)).then((server: Server) => { this.serverService.get(parseInt(server_id, 10)).then((server: Server) => {
this.server = server; this.server = server;
this.computeService.getComputes(server).subscribe((computes: Compute[]) => {
if (computes.filter((compute) => compute.compute_id === 'vm').length > 0) this.isGns3VmAvailable = true;
});
}); });
} }
@ -57,11 +50,7 @@ export class EthernetSwitchesAddTemplateComponent implements OnInit {
} }
setServerType(serverType: string) { setServerType(serverType: string) {
if (serverType === 'gns3 vm' && this.isGns3VmAvailable) { if (serverType === 'local') {
this.isGns3VmChosen = true;
this.isLocalComputerChosen = false;
} else {
this.isGns3VmChosen = false;
this.isLocalComputerChosen = true; this.isLocalComputerChosen = true;
} }
} }
@ -76,7 +65,7 @@ export class EthernetSwitchesAddTemplateComponent implements OnInit {
ethernetSwitchTemplate.template_id = uuid(); ethernetSwitchTemplate.template_id = uuid();
ethernetSwitchTemplate.name = this.formGroup.get('templateName').value; ethernetSwitchTemplate.name = this.formGroup.get('templateName').value;
ethernetSwitchTemplate.compute_id = this.isGns3VmChosen ? 'vm' : 'local'; ethernetSwitchTemplate.compute_id = 'local';
for (let i = 0; i < this.formGroup.get('numberOfPorts').value; i++) { for (let i = 0; i < this.formGroup.get('numberOfPorts').value; i++) {
ethernetSwitchTemplate.ports_mapping.push({ ethernetSwitchTemplate.ports_mapping.push({

View File

@ -7,19 +7,12 @@
<div class="default-content"> <div class="default-content">
<div class="container mat-elevation-z8"> <div class="container mat-elevation-z8">
<mat-vertical-stepper [linear]="true"> <mat-vertical-stepper [linear]="true">
<mat-step label="Server type" [completed]="isGns3VmChosen || isLocalComputerChosen"> <mat-step label="Server type" [completed]="isLocalComputerChosen">
<mat-radio-group class="radio-group"> <mat-radio-group class="radio-group">
<!-- <mat-radio-button class="radio-button" value="1" (click)="setServerType('remote computer')">Run this Docker container on a remote computer</mat-radio-button> --> <!-- <mat-radio-button class="radio-button" value="1" (click)="setServerType('remote computer')">Run this Docker container on a remote computer</mat-radio-button> -->
<mat-radio-button class="radio-button" value="1" (click)="setServerType('local')" checked <mat-radio-button class="radio-button" value="1" (click)="setServerType('local')" checked
>Run this Docker container locally</mat-radio-button >Run this Docker container locally</mat-radio-button
> >
<mat-radio-button
[disabled]="!isGns3VmAvailable"
class="radio-button"
value="2"
(click)="setServerType('gns3 vm')"
>Run this Docker container on the GNS3 VM</mat-radio-button
>
</mat-radio-group> </mat-radio-group>
</mat-step> </mat-step>

View File

@ -30,9 +30,6 @@ export class AddDockerTemplateComponent implements OnInit {
virtualMachineForm: FormGroup; virtualMachineForm: FormGroup;
containerNameForm: FormGroup; containerNameForm: FormGroup;
networkAdaptersForm: FormGroup; networkAdaptersForm: FormGroup;
isGns3VmAvailable: boolean = false;
isGns3VmChosen: boolean = false;
isLocalComputerChosen: boolean = true; isLocalComputerChosen: boolean = true;
constructor( constructor(
@ -72,10 +69,6 @@ export class AddDockerTemplateComponent implements OnInit {
this.dockerTemplate = dockerTemplate; this.dockerTemplate = dockerTemplate;
}); });
this.computeService.getComputes(server).subscribe((computes: Compute[]) => {
if (computes.filter((compute) => compute.compute_id === 'vm').length > 0) this.isGns3VmAvailable = true;
});
this.dockerService.getImages(server).subscribe((images) => { this.dockerService.getImages(server).subscribe((images) => {
this.dockerImages = images; this.dockerImages = images;
}); });
@ -83,11 +76,7 @@ export class AddDockerTemplateComponent implements OnInit {
} }
setServerType(serverType: string) { setServerType(serverType: string) {
if (serverType === 'gns3 vm' && this.isGns3VmAvailable) { if (serverType === 'local') {
this.isGns3VmChosen = true;
this.isLocalComputerChosen = false;
} else {
this.isGns3VmChosen = false;
this.isLocalComputerChosen = true; this.isLocalComputerChosen = true;
} }
} }
@ -116,7 +105,7 @@ export class AddDockerTemplateComponent implements OnInit {
this.dockerTemplate.name = this.containerNameForm.get('templateName').value; this.dockerTemplate.name = this.containerNameForm.get('templateName').value;
this.dockerTemplate.adapters = +this.networkAdaptersForm.get('adapters').value; this.dockerTemplate.adapters = +this.networkAdaptersForm.get('adapters').value;
this.dockerTemplate.compute_id = this.isGns3VmChosen ? 'vm' : 'local'; this.dockerTemplate.compute_id = 'local';
this.dockerService.addTemplate(this.server, this.dockerTemplate).subscribe((template: DockerTemplate) => { this.dockerService.addTemplate(this.server, this.dockerTemplate).subscribe((template: DockerTemplate) => {
this.goBack(); this.goBack();

View File

@ -7,18 +7,11 @@
<div class="default-content" *ngIf="iosTemplate"> <div class="default-content" *ngIf="iosTemplate">
<div class="container mat-elevation-z8"> <div class="container mat-elevation-z8">
<mat-vertical-stepper [linear]="true"> <mat-vertical-stepper [linear]="true">
<mat-step label="Server type" [completed]="isGns3VmChosen || isLocalComputerChosen"> <mat-step label="Server type" [completed]="isLocalComputerChosen">
<mat-radio-group class="radio-group"> <mat-radio-group class="radio-group">
<mat-radio-button class="radio-button" value="1" (click)="setServerType('local')" checked <mat-radio-button class="radio-button" value="1" (click)="setServerType('local')" checked
>Run this IOS router locally</mat-radio-button >Run this IOS router locally</mat-radio-button
> >
<mat-radio-button
[disabled]="!isGns3VmAvailable"
class="radio-button"
value="2"
(click)="setServerType('gns3 vm')"
>Run this IOS router on the GNS3 VM</mat-radio-button
>
</mat-radio-group> </mat-radio-group>
</mat-step> </mat-step>

View File

@ -45,9 +45,6 @@ export class AddIosTemplateComponent implements OnInit {
ciscoUrl: string = 'https://cfn.cloudapps.cisco.com/ITDIT/CFN/jsp/SearchBySoftware.jsp'; ciscoUrl: string = 'https://cfn.cloudapps.cisco.com/ITDIT/CFN/jsp/SearchBySoftware.jsp';
uploader: FileUploader; uploader: FileUploader;
isGns3VmAvailable: boolean = false;
isGns3VmChosen: boolean = false;
isLocalComputerChosen: boolean = true; isLocalComputerChosen: boolean = true;
constructor( constructor(
@ -114,19 +111,11 @@ export class AddIosTemplateComponent implements OnInit {
this.chassis = this.iosConfigurationService.getChassis(); this.chassis = this.iosConfigurationService.getChassis();
this.defaultRam = this.iosConfigurationService.getDefaultRamSettings(); this.defaultRam = this.iosConfigurationService.getDefaultRamSettings();
}); });
this.computeService.getComputes(server).subscribe((computes: Compute[]) => {
if (computes.filter((compute) => compute.compute_id === 'vm').length > 0) this.isGns3VmAvailable = true;
});
}); });
} }
setServerType(serverType: string) { setServerType(serverType: string) {
if (serverType === 'gns3 vm' && this.isGns3VmAvailable) { if (serverType === 'local') {
this.isGns3VmChosen = true;
this.isLocalComputerChosen = false;
} else {
this.isGns3VmChosen = false;
this.isLocalComputerChosen = true; this.isLocalComputerChosen = true;
} }
} }
@ -174,8 +163,7 @@ export class AddIosTemplateComponent implements OnInit {
if (this.networkAdaptersForTemplate.length > 0) this.completeAdaptersData(); if (this.networkAdaptersForTemplate.length > 0) this.completeAdaptersData();
if (this.networkModulesForTemplate.length > 0) this.completeModulesData(); if (this.networkModulesForTemplate.length > 0) this.completeModulesData();
this.iosTemplate.compute_id = 'local';
this.iosTemplate.compute_id = this.isGns3VmChosen ? 'vm' : 'local';
this.iosService.addTemplate(this.server, this.iosTemplate).subscribe((template: IosTemplate) => { this.iosService.addTemplate(this.server, this.iosTemplate).subscribe((template: IosTemplate) => {
this.goBack(); this.goBack();

View File

@ -7,18 +7,11 @@
<div class="default-content"> <div class="default-content">
<div class="container mat-elevation-z8"> <div class="container mat-elevation-z8">
<mat-vertical-stepper [linear]="true"> <mat-vertical-stepper [linear]="true">
<mat-step label="Server type" [completed]="isGns3VmChosen || isLocalComputerChosen"> <mat-step label="Server type" [completed]="isLocalComputerChosen">
<mat-radio-group class="radio-group"> <mat-radio-group class="radio-group">
<mat-radio-button class="radio-button" value="1" (click)="setServerType('local')" checked <mat-radio-button class="radio-button" value="1" (click)="setServerType('local')" checked
>Run this IOU device locally</mat-radio-button >Run this IOU device locally</mat-radio-button
> >
<mat-radio-button
[disabled]="!isGns3VmAvailable"
class="radio-button"
value="2"
(click)="setServerType('gns3 vm')"
>Run this IOU device on the GNS3 VM</mat-radio-button
>
</mat-radio-group> </mat-radio-group>
</mat-step> </mat-step>

View File

@ -30,9 +30,6 @@ export class AddIouTemplateComponent implements OnInit {
templateNameForm: FormGroup; templateNameForm: FormGroup;
imageForm: FormGroup; imageForm: FormGroup;
isGns3VmAvailable: boolean = false;
isGns3VmChosen: boolean = false;
isLocalComputerChosen: boolean = true; isLocalComputerChosen: boolean = true;
constructor( constructor(
@ -82,10 +79,6 @@ export class AddIouTemplateComponent implements OnInit {
this.templateMocksService.getIouTemplate().subscribe((iouTemplate: IouTemplate) => { this.templateMocksService.getIouTemplate().subscribe((iouTemplate: IouTemplate) => {
this.iouTemplate = iouTemplate; this.iouTemplate = iouTemplate;
}); });
this.computeService.getComputes(server).subscribe((computes: Compute[]) => {
if (computes.filter((compute) => compute.compute_id === 'vm').length > 0) this.isGns3VmAvailable = true;
});
}); });
} }
@ -96,11 +89,7 @@ export class AddIouTemplateComponent implements OnInit {
} }
setServerType(serverType: string) { setServerType(serverType: string) {
if (serverType === 'gns3 vm' && this.isGns3VmAvailable) { if (serverType === 'local') {
this.isGns3VmChosen = true;
this.isLocalComputerChosen = false;
} else {
this.isGns3VmChosen = false;
this.isLocalComputerChosen = true; this.isLocalComputerChosen = true;
} }
} }
@ -134,7 +123,7 @@ export class AddIouTemplateComponent implements OnInit {
this.iouTemplate.template_id = uuid(); this.iouTemplate.template_id = uuid();
this.iouTemplate.name = this.templateNameForm.get('templateName').value; this.iouTemplate.name = this.templateNameForm.get('templateName').value;
if (this.newImageSelected) this.iouTemplate.path = this.imageForm.get('imageName').value; if (this.newImageSelected) this.iouTemplate.path = this.imageForm.get('imageName').value;
this.iouTemplate.compute_id = this.isGns3VmChosen ? 'vm' : 'local'; this.iouTemplate.compute_id = 'local';
if (this.selectedType === 'L2 image') { if (this.selectedType === 'L2 image') {
this.iouTemplate.ethernet_adapters = 4; this.iouTemplate.ethernet_adapters = 4;

View File

@ -7,18 +7,11 @@
<div class="default-content"> <div class="default-content">
<div class="container mat-elevation-z8"> <div class="container mat-elevation-z8">
<mat-vertical-stepper [linear]="true"> <mat-vertical-stepper [linear]="true">
<mat-step label="Server type" [completed]="isGns3VmChosen || isLocalComputerChosen"> <mat-step label="Server type" [completed]="isLocalComputerChosen">
<mat-radio-group class="radio-group"> <mat-radio-group class="radio-group">
<mat-radio-button class="radio-button" value="1" (click)="setServerType('local')" checked <mat-radio-button class="radio-button" value="1" (click)="setServerType('local')" checked
>Run this QEMU VM locally</mat-radio-button >Run this QEMU VM locally</mat-radio-button
> >
<mat-radio-button
[disabled]="!isGns3VmAvailable"
class="radio-button"
value="2"
(click)="setServerType('gns3 vm')"
>Run this QEMU VM on the GNS3 VM</mat-radio-button
>
</mat-radio-group> </mat-radio-group>
</mat-step> </mat-step>

View File

@ -36,9 +36,6 @@ export class AddQemuVmTemplateComponent implements OnInit {
nameForm: FormGroup; nameForm: FormGroup;
memoryForm: FormGroup; memoryForm: FormGroup;
diskForm: FormGroup; diskForm: FormGroup;
isGns3VmAvailable: boolean = false;
isGns3VmChosen: boolean = false;
isLocalComputerChosen: boolean = true; isLocalComputerChosen: boolean = true;
constructor( constructor(
@ -105,19 +102,11 @@ export class AddQemuVmTemplateComponent implements OnInit {
}); });
this.consoleTypes = this.configurationService.getConsoleTypes(); this.consoleTypes = this.configurationService.getConsoleTypes();
this.computeService.getComputes(server).subscribe((computes: Compute[]) => {
if (computes.filter((compute) => compute.compute_id === 'vm').length > 0) this.isGns3VmAvailable = true;
});
}); });
} }
setServerType(serverType: string) { setServerType(serverType: string) {
if (serverType === 'gns3 vm' && this.isGns3VmAvailable) { if (serverType === 'local') {
this.isGns3VmChosen = true;
this.isLocalComputerChosen = false;
} else {
this.isGns3VmChosen = false;
this.isLocalComputerChosen = true; this.isLocalComputerChosen = true;
} }
} }
@ -154,7 +143,7 @@ export class AddQemuVmTemplateComponent implements OnInit {
} }
this.qemuTemplate.template_id = uuid(); this.qemuTemplate.template_id = uuid();
this.qemuTemplate.name = this.nameForm.get('templateName').value; this.qemuTemplate.name = this.nameForm.get('templateName').value;
this.qemuTemplate.compute_id = this.isGns3VmChosen ? 'vm' : 'local'; this.qemuTemplate.compute_id = 'local';
this.qemuService.addTemplate(this.server, this.qemuTemplate).subscribe((template: QemuTemplate) => { this.qemuService.addTemplate(this.server, this.qemuTemplate).subscribe((template: QemuTemplate) => {
this.goBack(); this.goBack();

View File

@ -10,13 +10,6 @@
<mat-radio-button class="radio-button" value="1" (click)="setServerType('local')" checked <mat-radio-button class="radio-button" value="1" (click)="setServerType('local')" checked
>Run the VPCS node locally</mat-radio-button >Run the VPCS node locally</mat-radio-button
> >
<mat-radio-button
[disabled]="!isGns3VmAvailable"
class="radio-button"
value="2"
(click)="setServerType('gns3 vm')"
>Run the VPCS node on the GNS3 VM</mat-radio-button
>
</mat-radio-group> </mat-radio-group>
<form [formGroup]="templateNameForm"> <form [formGroup]="templateNameForm">

View File

@ -20,9 +20,6 @@ export class AddVpcsTemplateComponent implements OnInit {
server: Server; server: Server;
templateName: string = ''; templateName: string = '';
templateNameForm: FormGroup; templateNameForm: FormGroup;
isGns3VmAvailable: boolean = false;
isGns3VmChosen: boolean = false;
isLocalComputerChosen: boolean = true; isLocalComputerChosen: boolean = true;
constructor( constructor(
@ -44,19 +41,11 @@ export class AddVpcsTemplateComponent implements OnInit {
const server_id = this.route.snapshot.paramMap.get('server_id'); const server_id = this.route.snapshot.paramMap.get('server_id');
this.serverService.get(parseInt(server_id, 10)).then((server: Server) => { this.serverService.get(parseInt(server_id, 10)).then((server: Server) => {
this.server = server; this.server = server;
this.computeService.getComputes(server).subscribe((computes: Compute[]) => {
if (computes.filter((compute) => compute.compute_id === 'vm').length > 0) this.isGns3VmAvailable = true;
});
}); });
} }
setServerType(serverType: string) { setServerType(serverType: string) {
if (serverType === 'gns3 vm' && this.isGns3VmAvailable) { if (serverType === 'local') {
this.isGns3VmChosen = true;
this.isLocalComputerChosen = false;
} else {
this.isGns3VmChosen = false;
this.isLocalComputerChosen = true; this.isLocalComputerChosen = true;
} }
} }
@ -77,7 +66,7 @@ export class AddVpcsTemplateComponent implements OnInit {
(vpcsTemplate.template_id = uuid()), (vpcsTemplate.template_id = uuid()),
(vpcsTemplate.name = this.templateName), (vpcsTemplate.name = this.templateName),
(vpcsTemplate.compute_id = this.isGns3VmChosen ? 'vm' : 'local'); (vpcsTemplate.compute_id = 'local');
this.vpcsService.addTemplate(this.server, vpcsTemplate).subscribe(() => { this.vpcsService.addTemplate(this.server, vpcsTemplate).subscribe(() => {
this.goBack(); this.goBack();