From 471f2e077a8e664ba96900c2464d46331808e0c2 Mon Sep 17 00:00:00 2001 From: Mateusz Gapski Date: Mon, 27 Jul 2020 14:43:26 +0200 Subject: Disable elements on page during loading Pages: Network settings, Date and time, LDAP, Manage power usage More details: https://github.com/openbmc/webui-vue/issues/15 Signed-off-by: Mateusz Gapski Change-Id: I02c5aaff180a4ce445b7135403a169a8db3704da --- src/components/Mixins/LoadingBarMixin.js | 7 + src/views/AccessControl/Ldap/Ldap.vue | 392 ++++++++--------- .../DateTimeSettings/DateTimeSettings.vue | 20 +- .../NetworkSettings/NetworkSettings.vue | 484 +++++++++++---------- .../Control/ManagePowerUsage/ManagePowerUsage.vue | 114 ++--- 5 files changed, 519 insertions(+), 498 deletions(-) diff --git a/src/components/Mixins/LoadingBarMixin.js b/src/components/Mixins/LoadingBarMixin.js index 111b40dc..fffb1cab 100644 --- a/src/components/Mixins/LoadingBarMixin.js +++ b/src/components/Mixins/LoadingBarMixin.js @@ -1,10 +1,17 @@ const LoadingBarMixin = { + data() { + return { + loading: true + }; + }, methods: { startLoader() { this.$root.$emit('loader::start'); + this.loading = true; }, endLoader() { this.$root.$emit('loader::end'); + this.loading = false; }, hideLoader() { this.$root.$emit('loader::hide'); diff --git a/src/views/AccessControl/Ldap/Ldap.vue b/src/views/AccessControl/Ldap/Ldap.vue index 50ba8f16..8bebed9c 100644 --- a/src/views/AccessControl/Ldap/Ldap.vue +++ b/src/views/AccessControl/Ldap/Ldap.vue @@ -3,216 +3,218 @@ - - - - + + + - {{ $t('global.action.enable') }} - - - - -
- - - - - - {{ $t('pageLdap.form.secureLdapHelper') }} - - + + + +
+ + + + - {{ $t('global.action.enable') }} - - -
-
{{ $t('pageLdap.form.caCertificateValidUntil') }}
-
- {{ caCertificateExpiration | formatDate }} -
-
--
-
{{ $t('pageLdap.form.ldapCertificateValidUntil') }}
-
- {{ ldapCertificateExpiration | formatDate }} -
-
--
-
- - {{ $t('pageLdap.form.manageSslCertificates') }} - -
- - - - - - OpenLDAP - - + {{ $t('pageLdap.form.secureLdapHelper') }} + + + {{ $t('global.action.enable') }} + + +
+
{{ $t('pageLdap.form.caCertificateValidUntil') }}
+
+ {{ caCertificateExpiration | formatDate }} +
+
--
+
{{ $t('pageLdap.form.ldapCertificateValidUntil') }}
+
+ {{ ldapCertificateExpiration | formatDate }} +
+
--
+
+ + {{ $t('pageLdap.form.manageSslCertificates') }} + +
+ + + + + + OpenLDAP + + + Active Directory + + + + + + + + + + + + {{ $t('global.form.fieldRequired') }} + + + + + + - Active Directory - - - - - - - - - {{ $t('global.form.fieldRequired') }} - - - - - - - - {{ $t('global.form.fieldRequired') }} - - - - - - + + + + + + + {{ $t('global.form.fieldRequired') }} + + + + + + {{ $t('global.form.fieldRequired') }} - - - - - - - - {{ $t('global.form.fieldRequired') }} - - - - - - - - - - - - - - - -
-
-
- - - - {{ $t('global.action.saveSettings') }} - - - +
+ + + + + + + + + + + + + + + +
+ + + + {{ $t('global.action.saveSettings') }} + + + +
diff --git a/src/views/Configuration/DateTimeSettings/DateTimeSettings.vue b/src/views/Configuration/DateTimeSettings/DateTimeSettings.vue index 74879f32..008fefff 100644 --- a/src/views/Configuration/DateTimeSettings/DateTimeSettings.vue +++ b/src/views/Configuration/DateTimeSettings/DateTimeSettings.vue @@ -33,7 +33,11 @@ - + + + {{ $t('global.action.saveSettings') }} + - - {{ $t('global.action.saveSettings') }} - diff --git a/src/views/Configuration/NetworkSettings/NetworkSettings.vue b/src/views/Configuration/NetworkSettings/NetworkSettings.vue index fd245a31..e8c6ae81 100644 --- a/src/views/Configuration/NetworkSettings/NetworkSettings.vue +++ b/src/views/Configuration/NetworkSettings/NetworkSettings.vue @@ -11,6 +11,7 @@ - - - - - - -
- {{ $t('global.form.fieldRequired') }} -
-
- {{ $t('global.form.invalidFormat') }} -
-
-
-
- - - - -
- {{ $t('global.form.fieldRequired') }} -
-
- {{ - $t('global.form.lengthMustBeBetween', { min: 1, max: 64 }) - }} -
-
-
-
- - - - -
- {{ $t('global.form.fieldRequired') }} -
-
- {{ $t('global.form.invalidFormat') }} -
-
-
-
-
-
- - - - - - - - - - - {{ $t('pageNetworkSettings.table.addStaticIpv4Address') }} - - - - - - - - - - - - - {{ $t('pageNetworkSettings.table.addDns') }} - - - - - - {{ $t('global.action.saveSettings') }} - + + + + + + + + + + + + + + + {{ $t('pageNetworkSettings.table.addStaticIpv4Address') }} + + + + + + + + + + + + + {{ $t('pageNetworkSettings.table.addDns') }} + + + + + + {{ $t('global.action.saveSettings') }} + +
diff --git a/src/views/Control/ManagePowerUsage/ManagePowerUsage.vue b/src/views/Control/ManagePowerUsage/ManagePowerUsage.vue index bbe32404..5a7eed08 100644 --- a/src/views/Control/ManagePowerUsage/ManagePowerUsage.vue +++ b/src/views/Control/ManagePowerUsage/ManagePowerUsage.vue @@ -18,67 +18,69 @@ - - - - + + + - {{ $t('pageManagePowerUsage.powerCapSettingData') }} - - - - + + {{ $t('pageManagePowerUsage.powerCapSettingData') }} + + + + - - - - - {{ - $t('pageManagePowerUsage.powerCapLabelTextInfo', { - min: 1, - max: 10000 - }) - }} - + + + + + {{ + $t('pageManagePowerUsage.powerCapLabelTextInfo', { + min: 1, + max: 10000 + }) + }} + - + - - - - - - - + + + + + + + - - {{ $t('global.action.save') }} - + + {{ $t('global.action.save') }} + + -- cgit v1.2.3