diff options
author | Mateusz Gapski <mateuszx.gapski@intel.com> | 2020-07-27 15:43:26 +0300 |
---|---|---|
committer | Yoshie Muranaka <yoshiemuranaka@gmail.com> | 2020-07-29 23:47:27 +0300 |
commit | 471f2e077a8e664ba96900c2464d46331808e0c2 (patch) | |
tree | 62eca46a3ab6062528bbc5a54edcf82ec2b7d936 /src/views/Control/ManagePowerUsage/ManagePowerUsage.vue | |
parent | 6b0e3a71cb691d24e5153cd4d4ec10e174ae4398 (diff) | |
download | webui-vue-471f2e077a8e664ba96900c2464d46331808e0c2.tar.xz |
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 <mateuszx.gapski@intel.com>
Change-Id: I02c5aaff180a4ce445b7135403a169a8db3704da
Diffstat (limited to 'src/views/Control/ManagePowerUsage/ManagePowerUsage.vue')
-rw-r--r-- | src/views/Control/ManagePowerUsage/ManagePowerUsage.vue | 114 |
1 files changed, 58 insertions, 56 deletions
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 @@ </b-row> <b-form @submit.prevent="submitForm"> - <b-row> - <b-col sm="8" md="6" xl="12"> - <b-form-group - :label="$t('pageManagePowerUsage.powerCapSettingLabel')" - > - <b-form-checkbox - v-model="isPowerCapFieldEnabled" - data-test-id="managePowerUsage-checkbox-togglePowerCapField" - name="power-cap-setting" + <b-form-group :disabled="loading"> + <b-row> + <b-col sm="8" md="6" xl="12"> + <b-form-group + :label="$t('pageManagePowerUsage.powerCapSettingLabel')" > - {{ $t('pageManagePowerUsage.powerCapSettingData') }} - </b-form-checkbox> - </b-form-group> - </b-col> - </b-row> + <b-form-checkbox + v-model="isPowerCapFieldEnabled" + data-test-id="managePowerUsage-checkbox-togglePowerCapField" + name="power-cap-setting" + > + {{ $t('pageManagePowerUsage.powerCapSettingData') }} + </b-form-checkbox> + </b-form-group> + </b-col> + </b-row> - <b-row> - <b-col sm="8" md="6" xl="3"> - <b-form-group - id="input-group-1" - :label="$t('pageManagePowerUsage.powerCapLabel')" - label-for="input-1" - > - <b-form-text id="power-help-text"> - {{ - $t('pageManagePowerUsage.powerCapLabelTextInfo', { - min: 1, - max: 10000 - }) - }} - </b-form-text> + <b-row> + <b-col sm="8" md="6" xl="3"> + <b-form-group + id="input-group-1" + :label="$t('pageManagePowerUsage.powerCapLabel')" + label-for="input-1" + > + <b-form-text id="power-help-text"> + {{ + $t('pageManagePowerUsage.powerCapLabelTextInfo', { + min: 1, + max: 10000 + }) + }} + </b-form-text> - <b-form-input - id="input-1" - v-model.number="powerCapValue" - :disabled="!isPowerCapFieldEnabled" - data-test-id="managePowerUsage-input-powerCapValue" - type="number" - aria-describedby="power-help-text" - :state="getValidationState($v.powerCapValue)" - ></b-form-input> + <b-form-input + id="input-1" + v-model.number="powerCapValue" + :disabled="!isPowerCapFieldEnabled" + data-test-id="managePowerUsage-input-powerCapValue" + type="number" + aria-describedby="power-help-text" + :state="getValidationState($v.powerCapValue)" + ></b-form-input> - <b-form-invalid-feedback id="input-live-feedback" role="alert"> - <template v-if="!$v.powerCapValue.required"> - {{ $t('global.form.fieldRequired') }} - </template> - <template v-else-if="!$v.powerCapValue.between"> - {{ $t('global.form.invalidValue') }} - </template> - </b-form-invalid-feedback> - </b-form-group> - </b-col> - </b-row> + <b-form-invalid-feedback id="input-live-feedback" role="alert"> + <template v-if="!$v.powerCapValue.required"> + {{ $t('global.form.fieldRequired') }} + </template> + <template v-else-if="!$v.powerCapValue.between"> + {{ $t('global.form.invalidValue') }} + </template> + </b-form-invalid-feedback> + </b-form-group> + </b-col> + </b-row> - <b-button - variant="primary" - type="submit" - data-test-id="managePowerUsage-button-savePowerCapValue" - > - {{ $t('global.action.save') }} - </b-button> + <b-button + variant="primary" + type="submit" + data-test-id="managePowerUsage-button-savePowerCapValue" + > + {{ $t('global.action.save') }} + </b-button> + </b-form-group> </b-form> </b-container> </template> |