From 00088973e288fde9ff6f1f0560831d1f56894e0d Mon Sep 17 00:00:00 2001 From: Manuel Aranda Date: Thu, 17 Oct 2024 16:15:44 +0200 Subject: [PATCH] refs #968. UX Operative System, Software and SOftwarProfile --- .../create-image/create-image.component.css | 11 ++++++++--- .../create-image/create-image.component.html | 4 +++- .../create-image/create-image.component.ts | 7 +++++-- .../ogboot/pxe-images/pxe-images.component.ts | 2 +- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/ogWebconsole/src/app/components/ogboot/pxe-images/create-image/create-image/create-image.component.css b/ogWebconsole/src/app/components/ogboot/pxe-images/create-image/create-image/create-image.component.css index 4525d20..5a93649 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe-images/create-image/create-image/create-image.component.css +++ b/ogWebconsole/src/app/components/ogboot/pxe-images/create-image/create-image/create-image.component.css @@ -1,4 +1,9 @@ .full-width { - width: 100%; - } - \ No newline at end of file + width: 100%; +} + +.spinner { + margin: 0 auto; + display: block; + justify-content: center; +} diff --git a/ogWebconsole/src/app/components/ogboot/pxe-images/create-image/create-image/create-image.component.html b/ogWebconsole/src/app/components/ogboot/pxe-images/create-image/create-image/create-image.component.html index 6ea7556..ffba170 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe-images/create-image/create-image/create-image.component.html +++ b/ogWebconsole/src/app/components/ogboot/pxe-images/create-image/create-image/create-image.component.html @@ -4,7 +4,9 @@ Nombre - + + + Seleccionar ISO diff --git a/ogWebconsole/src/app/components/ogboot/pxe-images/create-image/create-image/create-image.component.ts b/ogWebconsole/src/app/components/ogboot/pxe-images/create-image/create-image/create-image.component.ts index feaee7b..0a3787c 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe-images/create-image/create-image/create-image.component.ts +++ b/ogWebconsole/src/app/components/ogboot/pxe-images/create-image/create-image/create-image.component.ts @@ -14,6 +14,7 @@ export class CreatePXEImageComponent implements OnInit { downloads: any[] = []; selectedDownload: any; isEditMode: boolean = false; + loading: boolean = false; imageId: string | null = null; constructor( @@ -34,10 +35,12 @@ export class CreatePXEImageComponent implements OnInit { } fetchDownloads(): void { + this.loading = true; this.http.get(`${this.baseUrl}/og-lives/server/get-isos?page=1&itemsPerPage=30`) .subscribe({ next: (response: any) => { - this.downloads = response.message.downloads.downloads; + this.loading = false; + this.downloads = response.message; }, error: (error) => { console.error('Error fetching downloads:', error); @@ -53,7 +56,7 @@ export class CreatePXEImageComponent implements OnInit { submitForm(): void { const payload = { name: this.name, - downloadUrl: this.selectedDownload.filename + downloadUrl: this.selectedDownload.url }; if (this.isEditMode && this.imageId) { diff --git a/ogWebconsole/src/app/components/ogboot/pxe-images/pxe-images.component.ts b/ogWebconsole/src/app/components/ogboot/pxe-images/pxe-images.component.ts index 6924478..c1c739d 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe-images/pxe-images.component.ts +++ b/ogWebconsole/src/app/components/ogboot/pxe-images/pxe-images.component.ts @@ -80,7 +80,7 @@ export class PXEimagesComponent implements OnInit { addImage(): void { const dialogRef = this.dialog.open(CreatePXEImageComponent, { - width: '400px' + width: '600px' }); dialogRef.afterClosed().subscribe(result => {