From 458d722d4754f010344d1ff3bdc8612ac9bf7bee Mon Sep 17 00:00:00 2001 From: Ali <83188384+testA113@users.noreply.github.com> Date: Tue, 5 Nov 2024 14:25:40 +1300 Subject: [PATCH] fix(ui): consistent widget padding [r8s-136] (#82) --- app/assets/css/rdash.css | 7 +---- app/assets/css/vendor-override.css | 28 ++++++++++++++++++ .../views/containers/edit/container.html | 2 +- .../views/services/edit/includes/configs.html | 4 +-- .../views/services/edit/includes/logging.html | 4 +-- .../views/services/edit/includes/secrets.html | 4 +-- .../views/applications/helm/helm.html | 6 ++-- app/kubernetes/views/cluster/node/node.html | 6 ++-- .../configmap/edit/configMap.html | 6 ++-- .../configurations/secret/edit/secret.html | 8 ++--- .../access/resourcePoolAccess.html | 2 +- .../resource-pools/edit/resourcePool.html | 29 ++++++++----------- app/kubernetes/views/volumes/edit/volume.html | 2 +- .../registry-details/registry-details.html | 4 +-- .../kubernetes/dashboard/EnvironmentInfo.tsx | 6 ++-- .../AccessDatatable/AccessDatatable.tsx | 8 ++--- 16 files changed, 72 insertions(+), 54 deletions(-) diff --git a/app/assets/css/rdash.css b/app/assets/css/rdash.css index 449a1f647..fc7325718 100644 --- a/app/assets/css/rdash.css +++ b/app/assets/css/rdash.css @@ -144,12 +144,7 @@ div.input-mask { } .widget .widget-footer { border-top: 1px solid #e9e9e9; - padding: 10px; -} - -.widget .widget-footer { - border-top: 1px solid #e9e9e9; - padding: 10px; + padding: 20px; } .widget .widget-title .pagination, .widget .widget-footer .pagination { diff --git a/app/assets/css/vendor-override.css b/app/assets/css/vendor-override.css index 248d759cc..74fa94d4e 100644 --- a/app/assets/css/vendor-override.css +++ b/app/assets/css/vendor-override.css @@ -32,6 +32,34 @@ border-top: 1px solid var(--border-table-top-color); } +/* the first cell in the table should have 20px padding instead of 5px to match all other widgets */ +.widget .table:not(td .table) > thead > tr > th:first-child, +.widget .table:not(td .table) > tbody > tr > th:first-child, +.widget .table:not(td .table) > tfoot > tr > th:first-child, +.widget .table:not(td .table) > thead > tr > td:first-child, +.widget .table:not(td .table) > tbody > tr > td:first-child, +.widget .table:not(td .table) > tfoot > tr > td:first-child { + padding-left: 20px; +} + +/* the last cell in the table should have 20px padding instead of 5px to match all other widgets */ +.widget .table:not(td .table) > thead > tr > th:last-child, +.widget .table:not(td .table) > tbody > tr > th:last-child, +.widget .table:not(td .table) > tfoot > tr > th:last-child, +.widget .table:not(td .table) > thead > tr > td:last-child, +.widget .table:not(td .table) > tbody > tr > td:last-child, +.widget .table:not(td .table) > tfoot > tr > td:last-child { + padding-right: 20px; +} + +/* tables inside widgets should extend the full width of the widget, with 20px table cell padding padding on the left and right */ +.widget-body:not(.no-padding) > .table, +.widget-body:not(.no-padding) > .widget-content > .table { + margin: 0 -20px; + width: calc(100% + 40px); + max-width: calc(100% + 40px); +} + .input-group-addon { color: var(--text-input-group-addon-color); background-color: var(--bg-input-group-addon-color); diff --git a/app/docker/views/containers/edit/container.html b/app/docker/views/containers/edit/container.html index 3d86871cc..9b7033788 100644 --- a/app/docker/views/containers/edit/container.html +++ b/app/docker/views/containers/edit/container.html @@ -146,7 +146,7 @@ -
+
Logs diff --git a/app/docker/views/services/edit/includes/configs.html b/app/docker/views/services/edit/includes/configs.html index 7793d34a9..435e00b50 100644 --- a/app/docker/views/services/edit/includes/configs.html +++ b/app/docker/views/services/edit/includes/configs.html @@ -2,7 +2,7 @@ -
+
Add a config: - add config + Add config
diff --git a/app/docker/views/services/edit/includes/logging.html b/app/docker/views/services/edit/includes/logging.html index 98b57fce3..4f17720dc 100644 --- a/app/docker/views/services/edit/includes/logging.html +++ b/app/docker/views/services/edit/includes/logging.html @@ -2,7 +2,7 @@ -
diff --git a/app/docker/views/services/edit/includes/secrets.html b/app/docker/views/services/edit/includes/secrets.html index 6c4c2a8da..8f85e923b 100644 --- a/app/docker/views/services/edit/includes/secrets.html +++ b/app/docker/views/services/edit/includes/secrets.html @@ -2,7 +2,7 @@ -
+
Add a secret:
diff --git a/app/kubernetes/views/applications/helm/helm.html b/app/kubernetes/views/applications/helm/helm.html index 54bea49f8..a815e8a9d 100644 --- a/app/kubernetes/views/applications/helm/helm.html +++ b/app/kubernetes/views/applications/helm/helm.html @@ -24,19 +24,19 @@
- + - + - + diff --git a/app/kubernetes/views/cluster/node/node.html b/app/kubernetes/views/cluster/node/node.html index b2cadabac..e0fa631f3 100644 --- a/app/kubernetes/views/cluster/node/node.html +++ b/app/kubernetes/views/cluster/node/node.html @@ -11,7 +11,7 @@ Node -
+
NameName {{ $ctrl.state.release.name }}
ChartChart {{ $ctrl.state.release.chart }}
App versionApp version {{ $ctrl.state.release.app_version }}
@@ -73,7 +73,7 @@
-
+
-
+
Labels
diff --git a/app/kubernetes/views/configurations/configmap/edit/configMap.html b/app/kubernetes/views/configurations/configmap/edit/configMap.html index 2fa61285d..89e1c38c5 100644 --- a/app/kubernetes/views/configurations/configmap/edit/configMap.html +++ b/app/kubernetes/views/configurations/configmap/edit/configMap.html @@ -28,15 +28,15 @@ ConfigMap -
+
- + - +
NameName {{ ctrl.configuration.Name }}
NamespaceNamespace {{ ctrl.configuration.Namespace }} system diff --git a/app/kubernetes/views/configurations/secret/edit/secret.html b/app/kubernetes/views/configurations/secret/edit/secret.html index 856e59846..0309d356c 100644 --- a/app/kubernetes/views/configurations/secret/edit/secret.html +++ b/app/kubernetes/views/configurations/secret/edit/secret.html @@ -28,25 +28,25 @@ Secret -
+
- + - + - + diff --git a/app/kubernetes/views/resource-pools/access/resourcePoolAccess.html b/app/kubernetes/views/resource-pools/access/resourcePoolAccess.html index abc1815bf..08c68c3e9 100644 --- a/app/kubernetes/views/resource-pools/access/resourcePoolAccess.html +++ b/app/kubernetes/views/resource-pools/access/resourcePoolAccess.html @@ -25,7 +25,7 @@
NameName {{ ctrl.configuration.Name }} system
NamespaceNamespace {{ ctrl.configuration.Namespace }} system
Secret TypeSecret Type {{ ctrl.secretTypeName }}
- + diff --git a/app/kubernetes/views/resource-pools/edit/resourcePool.html b/app/kubernetes/views/resource-pools/edit/resourcePool.html index 134f6d6e9..5a94051eb 100644 --- a/app/kubernetes/views/resource-pools/edit/resourcePool.html +++ b/app/kubernetes/views/resource-pools/edit/resourcePool.html @@ -15,23 +15,18 @@ Namespace - - -
-
-
NameName {{ ctrl.pool.Namespace.Name }}
- - - - - - -
Name - {{ ctrl.pool.Namespace.Name }} - system -
-
-
+ + + + + + + + +
Name + {{ ctrl.pool.Namespace.Name }} + system +
diff --git a/app/kubernetes/views/volumes/edit/volume.html b/app/kubernetes/views/volumes/edit/volume.html index 7134016f4..4dbbdc9db 100644 --- a/app/kubernetes/views/volumes/edit/volume.html +++ b/app/kubernetes/views/volumes/edit/volume.html @@ -28,7 +28,7 @@ Volume -
+
diff --git a/app/portainer/components/registry-details/registry-details.html b/app/portainer/components/registry-details/registry-details.html index a45f6f520..3c53bca57 100644 --- a/app/portainer/components/registry-details/registry-details.html +++ b/app/portainer/components/registry-details/registry-details.html @@ -6,13 +6,13 @@
- + - + diff --git a/app/react/kubernetes/dashboard/EnvironmentInfo.tsx b/app/react/kubernetes/dashboard/EnvironmentInfo.tsx index 4babb91c8..e25473a8a 100644 --- a/app/react/kubernetes/dashboard/EnvironmentInfo.tsx +++ b/app/react/kubernetes/dashboard/EnvironmentInfo.tsx @@ -23,7 +23,7 @@ export function EnvironmentInfo() {
NameName {{ $ctrl.registry.Name }}
URLURL {{ $ctrl.registry.URL }}
- + - + - + diff --git a/app/react/portainer/access-control/AccessManagement/AccessDatatable/AccessDatatable.tsx b/app/react/portainer/access-control/AccessManagement/AccessDatatable/AccessDatatable.tsx index 6cc49bf62..1b604e70b 100644 --- a/app/react/portainer/access-control/AccessManagement/AccessDatatable/AccessDatatable.tsx +++ b/app/react/portainer/access-control/AccessManagement/AccessDatatable/AccessDatatable.tsx @@ -80,9 +80,9 @@ export function AccessDatatable({ )} description={ -
+ <> {inheritFrom && ( - <> +
Access tagged as inherited are inherited from the group access. They cannot be removed or modified at the @@ -91,7 +91,7 @@ export function AccessDatatable({
Access tagged as override are overriding the group
- +
)} {isBE && showWarning && isUpdateEnabled && ( @@ -101,7 +101,7 @@ export function AccessDatatable({
)} -
+ } /> );
EnvironmentEnvironment
URLURL {stripProtocol(environmentData.URL) || '-'}
TagsTags {tagNames}