From 3e64ae03bacff530ca0d61ac211254b97725004c Mon Sep 17 00:00:00 2001 From: Lucas Lara Date: Mon, 10 Feb 2025 13:15:24 +0100 Subject: [PATCH] refs #1477 Refactor CSS styles for improved layout and consistency in OgDhcp component --- .../og-dhcp-subnets.component.css | 45 +++++++------------ .../og-dhcp-subnets.component.html | 44 +++++++++++------- .../og-dhcp-subnets.component.spec.ts | 13 +++--- .../status/status.component.css | 28 +++++++----- .../status/status.component.html | 35 +++++++-------- 5 files changed, 84 insertions(+), 81 deletions(-) diff --git a/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/og-dhcp-subnets.component.css b/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/og-dhcp-subnets.component.css index f01f981..0fff2cf 100644 --- a/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/og-dhcp-subnets.component.css +++ b/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/og-dhcp-subnets.component.css @@ -1,29 +1,27 @@ .header-container { - display: flex; - justify-content: space-between; - align-items: center; - height: 100px; - padding: 10px; + display: flex; + justify-content: space-between; + align-items: center; + padding: 10px 10px; + border-bottom: 1px solid #ddd; } -.title { - font-size: 24px; -} - -.divider { - margin: 20px 0; +.header-container-title { + flex-grow: 1; + text-align: left; + margin-left: 1em; } .lists-container { - padding: 16px; + padding: 16px; } -.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,21 +32,10 @@ table { width: 100%; - margin-top: 50px; -} - -.header-container { - display: flex; - justify-content: space-between; - align-items: center; -} - -.header-container h1 { - margin: 0; } .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 { @@ -64,7 +51,5 @@ mat-spinner { .subnets-button-row { display: flex; - justify-content: flex-end; - margin-bottom: 20px; - gap: 10px; -} + gap: 15px; +} \ No newline at end of file diff --git a/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/og-dhcp-subnets.component.html b/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/og-dhcp-subnets.component.html index 1338179..0caafe9 100644 --- a/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/og-dhcp-subnets.component.html +++ b/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/og-dhcp-subnets.component.html @@ -2,35 +2,42 @@ -

Administrar Subredes

+
+

Administrar Subredes

+
- - + +
- -
- + Buscar nombre de la subred search Pulsar 'enter' para buscar - + Buscar netmask search Pulsar 'enter' para buscar - + Buscar IP search Pulsar 'enter' para buscar - + Buscar Boot file name search @@ -38,8 +45,9 @@
- - + +
- @@ -79,7 +89,9 @@
{{ column.header }} @@ -66,11 +74,13 @@ Acciones + - +
-
- +
+ -
+
\ No newline at end of file diff --git a/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/og-dhcp-subnets.component.spec.ts b/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/og-dhcp-subnets.component.spec.ts index 199d47c..81460b5 100644 --- a/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/og-dhcp-subnets.component.spec.ts +++ b/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/og-dhcp-subnets.component.spec.ts @@ -3,19 +3,20 @@ import { OgDhcpSubnetsComponent, Subnet } from './og-dhcp-subnets.component'; import { MatDialog } from '@angular/material/dialog'; import { HttpClient } from '@angular/common/http'; import { ToastrService } from 'ngx-toastr'; -import { of } from 'rxjs'; -import { MatExpansionModule } from '@angular/material/expansion'; +import { of } from 'rxjs'; +import { MatExpansionModule } from '@angular/material/expansion'; import { MatIconModule } from '@angular/material/icon'; import { MatDividerModule } from '@angular/material/divider'; import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatSelectModule } from '@angular/material/select'; +import { MatSelectModule } from '@angular/material/select'; import { MatPaginatorModule } from '@angular/material/paginator'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { FormsModule } from '@angular/forms'; import { MatInputModule } from '@angular/material/input'; -import { MatTableModule } from '@angular/material/table'; +import { MatTableModule } from '@angular/material/table'; import { TranslateModule } from '@ngx-translate/core'; import { JoyrideModule } from 'ngx-joyride'; +import { LoadingComponent } from '../../../shared/loading/loading.component'; describe('OgDhcpSubnetsComponent', () => { let component: OgDhcpSubnetsComponent; @@ -29,10 +30,10 @@ describe('OgDhcpSubnetsComponent', () => { mockHttpClient = jasmine.createSpyObj('HttpClient', ['get', 'post', 'put', 'delete']); mockToastrService = jasmine.createSpyObj('ToastrService', ['success', 'error']); mockHttpClient.get.and.returnValue(of({ 'hydra:member': [], 'hydra:totalItems': 0 })); - mockHttpClient.post.and.returnValue(of({})); + mockHttpClient.post.and.returnValue(of({})); await TestBed.configureTestingModule({ - declarations: [OgDhcpSubnetsComponent], + declarations: [OgDhcpSubnetsComponent, LoadingComponent], imports: [ MatExpansionModule, MatIconModule, diff --git a/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/status/status.component.css b/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/status/status.component.css index e0992fd..de87c64 100644 --- a/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/status/status.component.css +++ b/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/status/status.component.css @@ -1,5 +1,4 @@ - -.disk-usage-info{ +.disk-usage-info { display: flex; justify-content: start; margin-top: 10px; @@ -7,9 +6,11 @@ p { margin-left: 15px; -}.dashboard { - padding: 20px; - } +} + +.dashboard { + padding: 0.5rem 0.5rem 0.5rem 1rem; +} .disk-usage-container { display: flex; @@ -66,7 +67,8 @@ table { border-collapse: collapse; } -th, td { +th, +td { border: 1px solid #ddd; padding: 8px; } @@ -78,7 +80,7 @@ th { .button-container { display: flex; flex-direction: column; - gap: 10px; + gap: 10px; margin-top: 50px; } @@ -86,8 +88,14 @@ th { 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; } .btn:first-child { @@ -96,4 +104,4 @@ th { .btn:last-child { margin-right: 0; -} +} \ No newline at end of file diff --git a/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/status/status.component.html b/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/status/status.component.html index 5efe3a6..73bdbbe 100644 --- a/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/status/status.component.html +++ b/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/status/status.component.html @@ -1,24 +1,21 @@ -
-
- -

OgDhcp server Status

+
+
+

+ OgDhcp server Status +

+
+

Uso de disco

- +

Total: {{ diskUsage.total }}

@@ -28,21 +25,21 @@
-
+

Servicios

  • - + {{ service.name }}: {{ service.status }}
-
+

Subredes

@@ -65,4 +62,4 @@
-
+
\ No newline at end of file