refs #1091. DeployImage Multicast mode

pull/10/head
Manuel Aranda Rosales 2024-12-11 17:03:02 +01:00
parent 016e5a821a
commit 5bc5a9d23a
2 changed files with 7 additions and 0 deletions

View File

@ -1,4 +1,5 @@
<div class="header-container">
<button mat-flat-button color="primary" (click)="back()">Volver</button>
<h2 class="title" i18n="@@subnetsTitle">Desplegar imagen en {{ clientName }}</h2>
<div class="subnets-button-row">
<button mat-flat-button color="primary" (click)="save()">Guardar</button>

View File

@ -32,6 +32,7 @@ export class DeployImageComponent {
p2pMode: string = '';
p2pTime: Number = 0;
name: string = '';
client: any = null;
protected p2pModeOptions = [
{ name: 'Leecher', value: 'p2p-mode-leecher' },
@ -119,6 +120,7 @@ export class DeployImageComponent {
this.http.get(url).subscribe(
(response: any) => {
if (response.partitions) {
this.client = response;
this.clientName = response.name;
this.dataSource.data = response.partitions.filter((partition: any) => {
return partition.partitionNumber !== 0;
@ -149,6 +151,10 @@ export class DeployImageComponent {
);
}
back() {
this.router.navigate(['clients', this.clientId], { state: { clientData: this.client} });
}
save(): void {
if (!this.selectedImage) {
this.toastService.error('Debe seleccionar una imagen');