From cc8d3c86394bb26650c593ba78c9b706b93208aa Mon Sep 17 00:00:00 2001 From: William Date: Sat, 1 Feb 2020 04:49:59 +1300 Subject: [PATCH] refactor(UX): disable/remove uneeded UI elements (#3530) * refactor(UX): disable/remove uneeded UI elements * refactor(UX): rm missed th in container network * refactor(UX): minor formatting improvement --- .../containerNetworksDatatable.html | 2 +- .../network-row-content/networkRowContent.html | 3 +-- .../networks-datatable/networksDatatable.html | 2 +- app/docker/views/services/edit/includes/configs.html | 2 +- .../views/services/edit/includes/constraints.html | 6 +++--- .../services/edit/includes/containerlabels.html | 4 ++-- .../services/edit/includes/environmentvariables.html | 2 +- app/docker/views/services/edit/includes/hosts.html | 4 ++-- app/docker/views/services/edit/includes/logging.html | 2 +- app/docker/views/services/edit/includes/mounts.html | 12 ++++++------ .../services/edit/includes/placementPreferences.html | 4 ++-- app/docker/views/services/edit/includes/ports.html | 10 +++++----- .../views/services/edit/includes/resources.html | 4 ++-- .../views/services/edit/includes/servicelabels.html | 4 ++-- app/docker/views/services/edit/service.html | 2 +- .../rbac/directives/disable-authorization.js | 3 +++ 16 files changed, 34 insertions(+), 32 deletions(-) diff --git a/app/docker/components/datatables/container-networks-datatable/containerNetworksDatatable.html b/app/docker/components/datatables/container-networks-datatable/containerNetworksDatatable.html index faf668ba0..694b06bef 100644 --- a/app/docker/components/datatables/container-networks-datatable/containerNetworksDatatable.html +++ b/app/docker/components/datatables/container-networks-datatable/containerNetworksDatatable.html @@ -33,7 +33,7 @@ IP Address Gateway MAC Address - Actions + Actions diff --git a/app/docker/components/datatables/networks-datatable/network-row-content/networkRowContent.html b/app/docker/components/datatables/networks-datatable/network-row-content/networkRowContent.html index 2e910a10d..6bcfd7d73 100644 --- a/app/docker/components/datatables/networks-datatable/network-row-content/networkRowContent.html +++ b/app/docker/components/datatables/networks-datatable/network-row-content/networkRowContent.html @@ -1,11 +1,10 @@ - + - {{ item.Name | truncate:40 }} {{ item.Name | truncate:40 }} diff --git a/app/docker/components/datatables/networks-datatable/networksDatatable.html b/app/docker/components/datatables/networks-datatable/networksDatatable.html index 98a7e0d49..6e3748213 100644 --- a/app/docker/components/datatables/networks-datatable/networksDatatable.html +++ b/app/docker/components/datatables/networks-datatable/networksDatatable.html @@ -61,7 +61,7 @@ - diff --git a/app/docker/views/services/edit/includes/constraints.html b/app/docker/views/services/edit/includes/constraints.html index c8dc4a9ff..69c681e4e 100644 --- a/app/docker/views/services/edit/includes/constraints.html +++ b/app/docker/views/services/edit/includes/constraints.html @@ -23,12 +23,12 @@ - - + + - - + @@ -26,18 +26,18 @@
+ diff --git a/app/docker/views/services/edit/includes/configs.html b/app/docker/views/services/edit/includes/configs.html index 9b62791ab..bd4479045 100644 --- a/app/docker/views/services/edit/includes/configs.html +++ b/app/docker/views/services/edit/includes/configs.html @@ -27,7 +27,7 @@
{{ config.Name }} - + {{ config.Uid }} {{ config.Gid }}
- +
- @@ -36,7 +36,7 @@
- +
name - +
value - +
value - +
- +
- +
value - +
Type Source TargetRead onlyActionsRead onlyActions
- - - + + diff --git a/app/docker/views/services/edit/includes/placementPreferences.html b/app/docker/views/services/edit/includes/placementPreferences.html index 9b37d38b6..a525d93ea 100644 --- a/app/docker/views/services/edit/includes/placementPreferences.html +++ b/app/docker/views/services/edit/includes/placementPreferences.html @@ -22,12 +22,12 @@
- +
- +
Container port Protocol Publish modeActionsActions
host - +
container - +
- @@ -45,7 +45,7 @@
- diff --git a/app/docker/views/services/edit/includes/resources.html b/app/docker/views/services/edit/includes/resources.html index c6c581a68..e9835bd00 100644 --- a/app/docker/views/services/edit/includes/resources.html +++ b/app/docker/views/services/edit/includes/resources.html @@ -38,7 +38,7 @@
- +

@@ -53,7 +53,7 @@

- +

diff --git a/app/docker/views/services/edit/includes/servicelabels.html b/app/docker/views/services/edit/includes/servicelabels.html index 049ad1eaf..61d36e3c3 100644 --- a/app/docker/views/services/edit/includes/servicelabels.html +++ b/app/docker/views/services/edit/includes/servicelabels.html @@ -27,13 +27,13 @@

name - +
value - +
-

+

Note: you can only rollback one level of changes. Clicking the rollback button without making a new change will undo your previous rollback

Service logs diff --git a/app/extensions/rbac/directives/disable-authorization.js b/app/extensions/rbac/directives/disable-authorization.js index 7efb113ee..9f376cf6f 100644 --- a/app/extensions/rbac/directives/disable-authorization.js +++ b/app/extensions/rbac/directives/disable-authorization.js @@ -18,6 +18,9 @@ angular.module('portainer.extensions.rbac') if (!Authentication.hasAuthorizations(authorizations)) { elem.attr('disabled', true); + if (elem.is('Slider')) { + elem.css('pointer-events', 'none'); + } } }