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