diff --git a/ogWebconsole/src/app/components/ogboot/pxe-images/pxe-images.component.css b/ogWebconsole/src/app/components/ogboot/pxe-images/pxe-images.component.css index a9062b9..c003fd9 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe-images/pxe-images.component.css +++ b/ogWebconsole/src/app/components/ogboot/pxe-images/pxe-images.component.css @@ -48,4 +48,24 @@ table { display: flex; justify-content: end; margin-bottom: 30px; -} \ No newline at end of file +} + +.status-active { + background-color: #46c446 !important; + color: white !important; +} + +.status-inactive { + background-color: #e87979 !important; + color: white !important; +} + +.status-installing { + background-color: #f5a623 !important; + color: white !important; +} + +.status-failed { + background-color: #9e9e9e !important; + color: white !important; +} diff --git a/ogWebconsole/src/app/components/ogboot/pxe-images/pxe-images.component.html b/ogWebconsole/src/app/components/ogboot/pxe-images/pxe-images.component.html index bf06c2f..72cce0c 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe-images/pxe-images.component.html +++ b/ogWebconsole/src/app/components/ogboot/pxe-images/pxe-images.component.html @@ -1,3 +1,5 @@ + +
@@ -39,12 +41,13 @@ - {{ 'searchInstalledLabel' | translate }} - {{ 'status' | translate }} + - {{ 'allOption' | translate }} - {{ 'yesOption' | translate }} - {{ 'noOption' | translate }} + {{ 'inactiveOption' | translate }} + {{ 'activeOption' | translate }} + {{ 'failedOption' | translate }} + {{ 'pendingOption' | translate }} @@ -55,7 +58,7 @@ {{ column.header }} - + {{ 'checkCircle' | translate }} @@ -79,13 +82,13 @@ - - {{ column.cell(image) }} + + {{ getStatusLabel(image.status).label }} + *ngIf="column.columnDef !== 'isDefault' && column.columnDef !== 'downloadUrl' && column.columnDef !== 'status' && column.columnDef !== 'name'"> {{ column.cell(image) }} @@ -108,12 +111,12 @@ menu - - - @@ -128,4 +131,4 @@ - \ No newline at end of file + 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 380504d..29c1ee5 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 @@ -50,11 +50,6 @@ export class PXEimagesComponent implements OnInit { header: 'Imagen por defecto', cell: (user: any) => `${user.isDefault}` }, - { - columnDef: 'installed', - header: 'Imagen instalada', - cell: (user: any) => `${user.installed}` - }, { columnDef: 'status', header: 'Estado', @@ -110,13 +105,18 @@ export class PXEimagesComponent implements OnInit { ); } - showInfo(image: any): void { - const dialogRef = this.dialog.open(InfoImageComponent, { - width: '700px', - data: image - }); + getStatusLabel(status: string): { label: string; class: string } { + const statusMap: { [key: string]: { label: string; class: string } } = { + active: { label: 'Instalada', class: 'status-active' }, + inactive: { label: 'Sin instalar', class: 'status-inactive' }, + installing: { label: 'Instalando...', class: 'status-installing' }, + failed: { label: 'Fallido', class: 'status-failed' } + }; + + return statusMap[status] || { label: 'Desconocido', class: 'status-default' }; } + toggleAction(image: any, action: string): void { switch (action) { case 'set-default': diff --git a/ogWebconsole/src/app/components/ogboot/pxe/pxe.component.html b/ogWebconsole/src/app/components/ogboot/pxe/pxe.component.html index ca58141..b16e300 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe/pxe.component.html +++ b/ogWebconsole/src/app/components/ogboot/pxe/pxe.component.html @@ -74,4 +74,4 @@ - \ No newline at end of file + diff --git a/ogWebconsole/src/assets/images/og_logo.png b/ogWebconsole/src/assets/images/og_logo.png new file mode 100644 index 0000000..9beadc3 Binary files /dev/null and b/ogWebconsole/src/assets/images/og_logo.png differ diff --git a/ogWebconsole/src/locale/en.json b/ogWebconsole/src/locale/en.json index 424a881..28a75e6 100644 --- a/ogWebconsole/src/locale/en.json +++ b/ogWebconsole/src/locale/en.json @@ -374,6 +374,10 @@ "selectOptionPlaceholder": "Select an option", "yesOption": "Yes", "noOption": "No", + "inactiveOption": "Uninstalled", + "activeOption": "Installed", + "pendingOption": "Pending", + "failedOption": "Failed", "actionsColumn": "Actions", "createServerButton": "Create Server", "labelName": "Name", @@ -381,6 +385,8 @@ "servicesStatusDescription": "Here is the status of the server services.", "oglivesDescription": "Here are the OgLives installed on the server.", "addImageButtonDescription": "Click to add a new image.", + "addOgLiveButtonDescription": "Click to add a new OgLive.", + "addOgLiveButton": "Add OgLive", "adminPxeDescription": "From here you can manage the PXE templates of the server.", "addTemplateButtonDescription": "Add PXE Template", "addTemplateButton": "Add Template", diff --git a/ogWebconsole/src/locale/es.json b/ogWebconsole/src/locale/es.json index e9f04b6..ed397d9 100644 --- a/ogWebconsole/src/locale/es.json +++ b/ogWebconsole/src/locale/es.json @@ -374,6 +374,12 @@ "selectOptionPlaceholder": "Selecciona una opción", "yesOption": "Sí", "noOption": "No", + "inactiveOption": "No instalada", + "activeOption": "Instalada", + "pendingOption": "Instalando", + "failedOption": "Fallida", + "addOgLiveButtonDescription": "Haz clic para añadir un nuevo OgLive.", + "addOgLiveButton": "Añadir OgLive", "menuLabel": "Menu", "actionsColumn": "Acciones", "createServerButton": "Crear servidor",