From 828f711549f26837c24c138c31fe0d0f6e4fd7bd Mon Sep 17 00:00:00 2001 From: Lucas Lara Date: Mon, 10 Feb 2025 16:49:11 +0100 Subject: [PATCH] refs #1477 Refactor Ogboot component for improved layout and styling --- .../ogboot-status/ogboot-status.component.css | 156 ++++++++++-------- .../ogboot-status.component.html | 30 ++-- .../pxe-boot-files.component.css | 52 +++--- .../pxe-boot-files.component.html | 48 +++--- .../pxe-images/pxe-images.component.css | 53 ++---- .../pxe-images/pxe-images.component.html | 54 +++--- .../components/ogboot/pxe/pxe.component.css | 37 ++--- .../components/ogboot/pxe/pxe.component.html | 34 ++-- 8 files changed, 219 insertions(+), 245 deletions(-) diff --git a/ogWebconsole/src/app/components/ogboot/ogboot-status/ogboot-status.component.css b/ogWebconsole/src/app/components/ogboot/ogboot-status/ogboot-status.component.css index a4c857a..a3b3ffc 100644 --- a/ogWebconsole/src/app/components/ogboot/ogboot-status/ogboot-status.component.css +++ b/ogWebconsole/src/app/components/ogboot/ogboot-status/ogboot-status.component.css @@ -2,95 +2,105 @@ display: flex; justify-content: space-between; align-items: center; - height: 100px; - padding: 10px; + padding: 10px 10px; + border-bottom: 1px solid #ddd; } - - .disk-usage-info{ - display: flex; - justify-content: start; - margin-top: 10px; - } - p { - margin-left: 15px; - }.dashboard { - padding: 20px; - } +.header-container-title { + flex-grow: 1; + text-align: left; + margin-left: 1em; +} - .disk-usage-container { - display: flex; - align-items: flex-start; - margin-bottom: 20px; - } +.disk-usage-info { + display: flex; + justify-content: start; + margin-top: 10px; +} - .disk-usage { - flex: 2; - margin-right: 20px; - } +p { + margin-left: 15px; +} - .services-status { - flex: 1; - } +.dashboard { + padding: 0.5rem 0.5rem 0.5rem 1rem; +} - .services-status ul { - list-style-type: none; - padding: 0; - } +.disk-usage-container { + display: flex; + align-items: flex-start; + margin-bottom: 20px; +} - .services-status li { - margin: 5px 0; - display: flex; - align-items: center; - } +.disk-usage { + flex: 2; + margin-right: 20px; +} - .status-led { - width: 10px; - height: 10px; - border-radius: 50%; - display: inline-block; - margin-right: 10px; - } +.services-status { + flex: 1; +} - .status-led.active { - background-color: green; - } +.services-status ul { + list-style-type: none; + padding: 0; +} - .status-led.inactive { - background-color: red; - } +.services-status li { + margin: 5px 0; + display: flex; + align-items: center; +} - .installed-oglives { - margin-top: 20px; - } +.status-led { + width: 10px; + height: 10px; + border-radius: 50%; + display: inline-block; + margin-right: 10px; +} - table { - width: 100%; - border-collapse: collapse; - } +.status-led.active { + background-color: green; +} - th, td { - border: 1px solid #ddd; - padding: 8px; - } +.status-led.inactive { + background-color: red; +} - th { - background-color: #f4f4f4; - } +.installed-oglives { + margin-top: 20px; +} - .button-container { - display: flex; - flex-direction: column; - gap: 10px; /* Espacio entre botones */ - margin-top: 50px; - } +table { + width: 100%; + border-collapse: collapse; +} + +th, +td { + border: 1px solid #ddd; + padding: 8px; +} + +th { + background-color: #f4f4f4; +} + +.button-container { + display: flex; + flex-direction: column; + gap: 10px; + /* Espacio entre botones */ + margin-top: 50px; +} - .btn:first-child { - margin-left: 0; - } +.btn:first-child { + margin-left: 0; +} - .btn:last-child { - margin-right: 0; - } +.btn:last-child { + margin-right: 0; +} \ No newline at end of file diff --git a/ogWebconsole/src/app/components/ogboot/ogboot-status/ogboot-status.component.html b/ogWebconsole/src/app/components/ogboot/ogboot-status/ogboot-status.component.html index a8a5ebe..1f955ed 100644 --- a/ogWebconsole/src/app/components/ogboot/ogboot-status/ogboot-status.component.html +++ b/ogWebconsole/src/app/components/ogboot/ogboot-status/ogboot-status.component.html @@ -1,27 +1,23 @@ -
-
+
+ +

{{ 'ogBootServerStatus' | translate }}

-
+
+

{{ 'diskUsageTitle' | translate }}

- +

{{ 'totalLabel' | translate }}: {{ formatBytes(diskUsage.total) }}

@@ -36,10 +32,8 @@

{{ 'servicesTitle' | translate }}

  • - + {{ service.name }}: {{ service.status | translate }}
@@ -68,4 +62,4 @@
-
+
\ No newline at end of file diff --git a/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.css b/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.css index 71b0af9..d2ea8a8 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.css +++ b/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.css @@ -1,31 +1,33 @@ -.title { - font-size: 24px; +.header-container { + display: flex; + justify-content: space-between; + align-items: center; + padding: 10px 10px; + border-bottom: 1px solid #ddd; } -.divider { - margin: 20px 0; +.header-container-title { + flex-grow: 1; + text-align: left; + margin-left: 1em; } -table { - width: 100%; - margin-top: 50px; -} - -.search-container { +.search-container { display: flex; justify-content: space-between; align-items: center; width: 100%; - padding: 0 5px; + margin: 1.5rem 0rem 0rem 0rem; box-sizing: border-box; } .global-selectors { display: flex; align-items: center; - justify-content: space-between; - gap: 10px; - padding: 0 5px; + justify-content: start; + padding-left: 5px; + gap: 1rem; + margin-bottom: 1rem; } .selected-global { @@ -42,25 +44,12 @@ table { padding: 5px; } -.save-button{ +.save-button { justify-self: end; } -.header-container { - display: flex; - justify-content: space-between; - align-items: center; - padding: 10px; -} - .mat-elevation-z8 { - box-shadow: 0px 0px 0px rgba(0,0,0,0.2); -} - -.paginator-container { - display: flex; - justify-content: end; - margin-bottom: 30px; + box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.2); } .example-headers-align .mat-expansion-panel-header-description { @@ -68,7 +57,7 @@ table { align-items: center; } -.example-headers-align .mat-mdc-form-field + .mat-mdc-form-field { +.example-headers-align .mat-mdc-form-field+.mat-mdc-form-field { margin-left: 8px; } @@ -79,5 +68,4 @@ table { .example-button-row .mat-mdc-button-base { margin: 8px 8px 8px 0; -} - +} \ No newline at end of file diff --git a/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.html b/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.html index c8f7ed4..34d1f13 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.html +++ b/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.html @@ -1,27 +1,28 @@
-

- {{ 'advancedNetbootTitle' | translate }} -

-
- -
-
- - {{ 'selectClassLabel' | translate }} - - {{ unit.name }} - - +
+

+ {{ 'advancedNetbootTitle' | translate }} +

- +
+ + {{ 'selectClassLabel' | translate }} + + {{ unit.name }} + + +
+
- + {{ 'applyToAllLabel' | translate }} @@ -30,18 +31,14 @@ -
- + {{ 'idColumnHeader' | translate }} {{ element.id }} @@ -65,7 +62,8 @@ {{ 'templateColumnHeader' | translate }} - + {{ 'selectTemplateLabel' | translate }} {{ 'noTemplateOption' | translate }} @@ -79,4 +77,4 @@ - + \ No newline at end of file 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 7d92813..a9062b9 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 @@ -1,28 +1,32 @@ -.title { - font-size: 24px; +.header-container { + display: flex; + justify-content: space-between; + align-items: center; + padding: 10px 10px; + border-bottom: 1px solid #ddd; +} + +.header-container-title { + flex-grow: 1; + text-align: left; + margin-left: 1em; } .images-button-row { - display: flex; - justify-content: flex-start; - margin-top: 16px; -} - -.divider { - margin: 20px 0; + display: flex; + gap: 15px; } table { width: 100%; - margin-top: 50px; } -.search-container { +.search-container { display: flex; justify-content: space-between; align-items: center; width: 100%; - padding: 0 5px; + margin: 1.5rem 0rem 1.5rem 0rem; box-sizing: border-box; } @@ -36,33 +40,12 @@ table { padding: 5px; } -.header-container { - display: flex; - justify-content: space-between; - align-items: center; - height: 100px; - padding: 10px; -} - .mat-elevation-z8 { - box-shadow: 0px 0px 0px rgba(0,0,0,0.2); + box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.2); } .paginator-container { display: flex; justify-content: end; margin-bottom: 30px; -} - -.images-button-row { - display: flex; - justify-content: flex-start; - margin-top: 16px; - gap: 10px; -} - -mat-spinner { - margin: 0 auto; - align-self: center; -} - +} \ No newline at end of file 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 fffcbe4..f5d5ad2 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 @@ -2,39 +2,46 @@ -

- {{ 'adminImagesTitle' | translate }} -

+
+

+ {{ 'adminImagesTitle' | translate }} +

+
-
- -
- + {{ 'searchLabel' | translate }} - + search {{ 'searchHint' | translate }} - + {{ 'searchDefaultLabel' | translate }} - + {{ 'allOption' | translate }} {{ 'yesOption' | translate }} {{ 'noOption' | translate }} - + {{ 'searchInstalledLabel' | translate }} - + {{ 'allOption' | translate }} {{ 'yesOption' | translate }} {{ 'noOption' | translate }} @@ -43,7 +50,8 @@
- +
@@ -84,7 +93,8 @@ -
{{ column.header }} @@ -66,7 +74,7 @@ - {{ image.name }} + {{ image.name }} @@ -76,7 +84,8 @@ - + {{ column.cell(image) }} {{ 'actionsColumnHeader' | translate }} + @@ -98,7 +108,8 @@ menu - + @@ -114,10 +125,7 @@
- + -
+
\ No newline at end of file diff --git a/ogWebconsole/src/app/components/ogboot/pxe/pxe.component.css b/ogWebconsole/src/app/components/ogboot/pxe/pxe.component.css index b478ce5..1c943ca 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe/pxe.component.css +++ b/ogWebconsole/src/app/components/ogboot/pxe/pxe.component.css @@ -1,22 +1,13 @@ -.title { - font-size: 24px; -} - -.divider { - margin: 20px 0; -} - table { width: 100%; - margin-top: 50px; } -.search-container { +.search-container { display: flex; justify-content: space-between; align-items: center; width: 100%; - padding: 0 5px; + margin: 1.5rem 0rem 1.5rem 0rem; box-sizing: border-box; } @@ -34,29 +25,27 @@ table { display: flex; justify-content: space-between; align-items: center; - height: 100px; - padding: 10px; + padding: 10px 10px; + border-bottom: 1px solid #ddd; +} + +.header-container-title { + flex-grow: 1; + text-align: left; + margin-left: 1em; } .mat-elevation-z8 { - box-shadow: 0px 0px 0px rgba(0,0,0,0.2); + box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.2); } .template-button-row { display: flex; - justify-content: flex-start; - margin-top: 16px; - gap: 10px; -} - -mat-spinner { - margin: 0 auto; - align-self: center; + gap: 15px; } .paginator-container { display: flex; justify-content: end; margin-bottom: 30px; -} - +} \ No newline at end of file diff --git a/ogWebconsole/src/app/components/ogboot/pxe/pxe.component.html b/ogWebconsole/src/app/components/ogboot/pxe/pxe.component.html index 303362e..b01e065 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe/pxe.component.html +++ b/ogWebconsole/src/app/components/ogboot/pxe/pxe.component.html @@ -2,25 +2,31 @@ -

{{ 'adminPxeTitle' | translate }}

+
+

{{ 'adminPxeTitle' | + translate }}

+
- +
- -
- + {{ 'searchLabel' | translate }} - + search {{ 'searchHint' | translate }} - + {{ 'createdInOgbootLabel' | translate }} - + {{ 'allOption' | translate }} {{ 'yesOption' | translate }} {{ 'noOption' | translate }} @@ -29,7 +35,8 @@
- +
{{ column.header }} @@ -64,10 +71,7 @@
- + -
+
\ No newline at end of file