From bae2069661b3d99cfccc48919f540d9fb7f02e91 Mon Sep 17 00:00:00 2001 From: llara Date: Thu, 27 Feb 2025 10:35:20 +0100 Subject: [PATCH] refs #1619. In Progress. Refactor: update layout dimensions and styles for groups component --- .../components/groups/groups.component.css | 99 +-- .../components/groups/groups.component.html | 672 +++++++++--------- .../app/layout/header/header.component.css | 2 +- .../main-layout/main-layout.component.css | 15 +- .../main-layout/main-layout.component.html | 2 +- 5 files changed, 384 insertions(+), 406 deletions(-) diff --git a/ogWebconsole/src/app/components/groups/groups.component.css b/ogWebconsole/src/app/components/groups/groups.component.css index d461702..dcf9a86 100644 --- a/ogWebconsole/src/app/components/groups/groups.component.css +++ b/ogWebconsole/src/app/components/groups/groups.component.css @@ -1,3 +1,10 @@ +.groups-container { + display: flex; + flex-direction: column; + width: 100%; + height: 100%; +} + .header-container { display: flex; justify-content: space-between; @@ -6,6 +13,13 @@ border-bottom: 1px solid #ddd; } +.main-container { + display: flex; + flex-direction: row; + width: 100%; + height: 100%; +} + .header-container-title { flex-grow: 1; text-align: left; @@ -15,6 +29,7 @@ .groups-button-row { display: flex; gap: 15px; + padding-right: 0.5rem; } .button-container { @@ -23,6 +38,23 @@ margin: 20px 0; } +.clients-container { + flex-grow: 1; + box-sizing: border-box; + overflow-y: auto; +} + +.clients-view-header { + display: flex; + flex-direction: row; + justify-content: space-between; + margin-bottom: 0.5rem; + margin-top: 0.5rem; + align-items: center; + padding-right: 1rem; + flex-grow: 1; +} + .actions mat-icon { color: #757575; cursor: pointer; @@ -59,25 +91,6 @@ border-radius: 8px; } -.details-container { - display: flex; - flex-direction: column; - gap: 20px; - padding: 20px; - align-items: center; - text-align: center; -} - -.details-wrapper { - width: 95%; - padding: 20px; - display: block; -} - -.details-placeholder { - width: 100%; -} - @media (max-width: 1024px) { .card-container { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); @@ -105,19 +118,6 @@ } } -.details-container { - display: flex; - flex-direction: column; - align-items: center; - gap: 20px; - padding: 30px; - background-color: #f9f9f9; - border-radius: 12px; - box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); - max-width: 1200px; - margin: 20px auto; -} - mat-tree { background-color: #f9f9f9; padding: 0px 10px 10px 10px; @@ -232,14 +232,9 @@ mat-tree mat-tree-node.disabled:hover { .filters-container { display: flex; + flex-direction: column; justify-content: start; - gap: 1rem; - margin: 2rem 0px 0.7rem 10px; -} - -.filters-container mat-form-field { - flex: 1 1 100%; - max-width: 250px; + padding: 1em; } .chip-busy { @@ -270,7 +265,6 @@ mat-tree mat-tree-node.disabled:hover { color: white; } - .clients-card-container { display: flex; flex-wrap: wrap; @@ -317,13 +311,7 @@ mat-tree mat-tree-node.disabled:hover { margin: 0 4px; } -.main-container { - display: flex; - flex-direction: row; -} - .tree-container { - width: 25%; overflow-x: hidden; overflow-y: auto; } @@ -353,8 +341,8 @@ mat-tree mat-tree-node.disabled:hover { } .client-image { - max-width: 30px !important; - max-height: 30px !important; + max-width: 35px !important; + max-height: 35px !important; height: auto; } @@ -464,15 +452,6 @@ mat-tree mat-tree-node.disabled:hover { margin-top: 4px; } -.clients-view-header { - display: flex; - flex-direction: row; - justify-content: space-between; - margin-bottom: 1rem; - align-items: center; - padding-right: 1rem; -} - @media (max-width: 1560px) { .clients-view-header { display: flex; @@ -548,12 +527,6 @@ mat-button-toggle-group { background-color: #c7c7c7; } -.clients-container { - width: 75%; - box-sizing: border-box; - overflow-y: auto; -} - .cards-view { display: flex; width: 100%; diff --git a/ogWebconsole/src/app/components/groups/groups.component.html b/ogWebconsole/src/app/components/groups/groups.component.html index 6ba9d30..b159d54 100644 --- a/ogWebconsole/src/app/components/groups/groups.component.html +++ b/ogWebconsole/src/app/components/groups/groups.component.html @@ -1,358 +1,372 @@ - -
- -
-

- {{ 'adminGroupsTitle' | translate }} -

-
-
- - - - - - +
+

+ {{ 'adminGroupsTitle' | translate }} +

+
+
+ + + + + + - -
-
- -
- -
- - - -
-
- - {{ 'searchTree' | translate }} - - - - - {{ 'searchClient' | translate }} - - - - - - +
- -
- -
- - - - - {{ - node.type === 'organizational-unit' ? 'apartment' - : node.type === 'classrooms-group' ? 'meeting_room' - : node.type === 'classroom' ? 'school' - : node.type === 'clients-group' ? 'lan' - : node.type === 'client' ? 'computer' - : 'group' - }} - - {{ node.name }} - - - - - - {{ - node.type === 'organizational-unit' ? 'apartment' - : node.type === 'classrooms-group' ? 'meeting_room' - : node.type === 'classroom' ? 'school' - : node.type === 'clients-group' ? 'lan' - : node.type === 'client' ? 'computer' - : 'group' - }} - - {{ node.name }} - - - IP: {{ node.ip }} - - - - -
+
+ +
- + + +
- - - - - - - - - - - - - + +
- -
-
-
- - {{ 'clients' | translate }} - {{ selectedNode?.name }} - + +
+
+ + {{ 'searchTree' | translate }} + + + + + {{ 'searchClient' | translate }} + + + + + + +
-
- - - - list {{ 'Vista Lista' | translate }} - - - grid_view {{ 'Vista Tarjeta' | translate }} - - + + +
+ + + + + {{ + node.type === 'organizational-unit' ? 'apartment' + : node.type === 'classrooms-group' ? 'meeting_room' + : node.type === 'classroom' ? 'school' + : node.type === 'clients-group' ? 'lan' + : node.type === 'client' ? 'computer' + : 'group' + }} + + {{ node.name }} + + + + + + {{ + node.type === 'organizational-unit' ? 'apartment' + : node.type === 'classrooms-group' ? 'meeting_room' + : node.type === 'classroom' ? 'school' + : node.type === 'clients-group' ? 'lan' + : node.type === 'client' ? 'computer' + : 'group' + }} + + {{ node.name }} + + - IP: {{ node.ip }} + + + +
+ + + + + + + + + + + + + + +
- + -
-
- -
- - -
-
-
- - - Client Icon + +
-
- {{ client.name }} - {{ client.ip }} - {{ client.mac }} -
- + +
+
+ + {{ 'clients' | translate }} + {{ selectedNode?.name }} + +
+
+ + + + list {{ 'Vista Lista' | translate }} + + + grid_view {{ 'Vista Tarjeta' | translate }} + + +
+
- + - + +
+
+ +
+ + +
+
+
+ + + Client Icon - - - - - - - + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + {{ 'status' | translate }} + Client Icon + {{ 'name' | translate }} + {{ client.name }} + IP + {{ client.ip }} + OG Live {{ client.ogLive?.date | date }} {{ 'maintenance' | translate }} {{ client.maintenance }} {{ 'subnet' | translate }} {{ client.subnet }} {{ 'pxeTemplate' | translate }} {{ client.template?.name }} {{ 'parent' | translate }} {{ client.parentName }} {{ 'actions' | translate }} + + + + + + + + +
+ +
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - {{ 'status' | translate }} - Client Icon - {{ 'name' | translate }} - {{ client.name }} - IP - {{ client.ip }} - OG Live {{ client.ogLive?.date | date }} {{ 'maintenance' | translate }} {{ client.maintenance }} {{ 'subnet' | translate }} {{ client.subnet }} {{ 'pxeTemplate' | translate }} {{ client.template?.name }} {{ 'parent' | translate }} {{ client.parentName }} {{ 'actions' | translate }} - - - - - - - - -
- -
+ + +
+ {{ 'noClients' | translate }} + error_outline +
+
- - -
- {{ 'noClients' | translate }} - error_outline -
-
+
-
- + +
\ No newline at end of file diff --git a/ogWebconsole/src/app/layout/header/header.component.css b/ogWebconsole/src/app/layout/header/header.component.css index b69be3a..52e3147 100644 --- a/ogWebconsole/src/app/layout/header/header.component.css +++ b/ogWebconsole/src/app/layout/header/header.component.css @@ -1,5 +1,5 @@ mat-toolbar { - height: 60px; + height: 7vh; background-color: #3f51b5; color: white; } diff --git a/ogWebconsole/src/app/layout/main-layout/main-layout.component.css b/ogWebconsole/src/app/layout/main-layout/main-layout.component.css index c60e4f2..1fd8655 100644 --- a/ogWebconsole/src/app/layout/main-layout/main-layout.component.css +++ b/ogWebconsole/src/app/layout/main-layout/main-layout.component.css @@ -1,19 +1,10 @@ -.header { - height: 10vh; -} - .container { width: 100vw; - height: calc(100vh - 10vh); + height: calc(100vh - 7vh); } .sidebar { - width: 250px; + width: 15vw; + min-width: 250px; z-index: auto !important; } - -.content { - margin: 0px 10px 10px 10px; - padding: 0px 10px 10px 10px; - box-sizing: border-box; -} diff --git a/ogWebconsole/src/app/layout/main-layout/main-layout.component.html b/ogWebconsole/src/app/layout/main-layout/main-layout.component.html index 43b94b3..59eebe9 100644 --- a/ogWebconsole/src/app/layout/main-layout/main-layout.component.html +++ b/ogWebconsole/src/app/layout/main-layout/main-layout.component.html @@ -1,4 +1,4 @@ - +