refs #1090. CreateImage. Add back button
parent
5bc5a9d23a
commit
a9afb951e2
|
@ -1,4 +1,5 @@
|
||||||
<div class="header-container">
|
<div class="header-container">
|
||||||
|
<button mat-flat-button color="primary" (click)="back()">Volver</button>
|
||||||
<h2 class="title" i18n="@@subnetsTitle">Crear Imagen desde {{ clientName }}</h2>
|
<h2 class="title" i18n="@@subnetsTitle">Crear Imagen desde {{ clientName }}</h2>
|
||||||
<div class="subnets-button-row">
|
<div class="subnets-button-row">
|
||||||
<button mat-flat-button color="primary" (click)="save()">Guardar y ejecutar</button>
|
<button mat-flat-button color="primary" (click)="save()">Guardar y ejecutar</button>
|
||||||
|
|
|
@ -68,6 +68,7 @@ export class CreateImageComponent {
|
||||||
selectedImage: string | null = null;
|
selectedImage: string | null = null;
|
||||||
selectedPartition: any = null;
|
selectedPartition: any = null;
|
||||||
name: string = '';
|
name: string = '';
|
||||||
|
client: any = null;
|
||||||
dataSource = new MatTableDataSource<any>();
|
dataSource = new MatTableDataSource<any>();
|
||||||
columns = [
|
columns = [
|
||||||
{
|
{
|
||||||
|
@ -120,6 +121,7 @@ export class CreateImageComponent {
|
||||||
this.http.get(url).subscribe(
|
this.http.get(url).subscribe(
|
||||||
(response: any) => {
|
(response: any) => {
|
||||||
if (response.partitions) {
|
if (response.partitions) {
|
||||||
|
this.client = response;
|
||||||
this.clientName = response.name;
|
this.clientName = response.name;
|
||||||
|
|
||||||
this.dataSource.data = response.partitions.filter((partition: any) => {
|
this.dataSource.data = response.partitions.filter((partition: any) => {
|
||||||
|
@ -145,6 +147,10 @@ export class CreateImageComponent {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
back() {
|
||||||
|
this.router.navigate(['clients', this.clientId], { state: { clientData: this.client} });
|
||||||
|
}
|
||||||
|
|
||||||
save(): void {
|
save(): void {
|
||||||
const payload = {
|
const payload = {
|
||||||
client: `/clients/${this.clientId}`,
|
client: `/clients/${this.clientId}`,
|
||||||
|
|
Loading…
Reference in New Issue