From b4d1fb8b8e6e6cdb7be76a2d4fa0d2b9a84f3ba2 Mon Sep 17 00:00:00 2001 From: Vitalii Lysak Date: Wed, 10 Aug 2022 15:46:15 +0300 Subject: SILABMC-236: upd layput for ReadOnly role --- src/views/_sila/Overview/DateTime/DateTime.vue | 33 ++++++++++++++++++---- .../Inventory/InventoryServiceIndicator.vue | 1 + .../Overview/Inventory/InventoryTableAssembly.vue | 1 + .../Inventory/InventoryTableBmcManager.vue | 1 + .../Overview/Inventory/InventoryTableChassis.vue | 1 + .../Overview/Inventory/InventoryTableDimmSlot.vue | 25 ++++++++-------- .../Inventory/InventoryTableProcessors.vue | 1 + .../Overview/Inventory/InventoryTableSystem.vue | 1 + .../Overview/Network/NetworkGlobalSettings.vue | 10 ++++++- .../Overview/Network/NetworkInterfaceSettings.vue | 1 + src/views/_sila/Overview/Network/TableDns.vue | 6 +++- src/views/_sila/Overview/Network/TableIpv4.vue | 6 +++- src/views/_sila/Overview/OverviewInventory.vue | 1 + 13 files changed, 66 insertions(+), 22 deletions(-) (limited to 'src/views/_sila/Overview') diff --git a/src/views/_sila/Overview/DateTime/DateTime.vue b/src/views/_sila/Overview/DateTime/DateTime.vue index 796a57ac..e9de12c5 100644 --- a/src/views/_sila/Overview/DateTime/DateTime.vue +++ b/src/views/_sila/Overview/DateTime/DateTime.vue @@ -42,6 +42,7 @@ v-model="form.configurationSelected" value="manual" data-test-id="dateTime-radio-configureManual" + :disabled="$store.getters['authentication/role'] === 'ReadOnly'" > {{ $t('pageDateTime.form.manual') }} @@ -57,7 +58,10 @@ id="input-manual-date" v-model="form.manual.date" :state="getValidationState($v.form.manual.date)" - :disabled="ntpOptionSelected" + :disabled=" + ntpOptionSelected || + $store.getters['authentication/role'] === 'ReadOnly' + " data-test-id="dateTime-input-manualDate" class="form-control-with-button" @blur="$v.form.manual.date.$touch()" @@ -81,7 +85,10 @@ $t('global.calendar.useCursorKeysToNavigateCalendarDates') " :title="$t('global.calendar.selectDate')" - :disabled="ntpOptionSelected" + :disabled=" + ntpOptionSelected || + $store.getters['authentication/role'] === 'ReadOnly' + " button-variant="link" aria-controls="input-manual-date" > @@ -106,7 +113,10 @@ id="input-manual-time" v-model="form.manual.time" :state="getValidationState($v.form.manual.time)" - :disabled="ntpOptionSelected" + :disabled=" + ntpOptionSelected || + $store.getters['authentication/role'] === 'ReadOnly' + " data-test-id="dateTime-input-manualTime" @blur="$v.form.manual.time.$touch()" /> @@ -126,6 +136,7 @@ v-model="form.configurationSelected" value="ntp" data-test-id="dateTime-radio-configureNTP" + :disabled="$store.getters['authentication/role'] === 'ReadOnly'" > NTP @@ -140,7 +151,10 @@ id="input-ntp-1" v-model="form.ntp.firstAddress" :state="getValidationState($v.form.ntp.firstAddress)" - :disabled="manualOptionSelected" + :disabled=" + manualOptionSelected || + $store.getters['authentication/role'] === 'ReadOnly' + " data-test-id="dateTime-input-ntpServer1" @blur="$v.form.ntp.firstAddress.$touch()" /> @@ -165,7 +179,10 @@ id="input-ntp-2" v-model="form.ntp.secondAddress" :state="getValidationState($v.form.ntp.secondAddress)" - :disabled="manualOptionSelected" + :disabled=" + manualOptionSelected || + $store.getters['authentication/role'] === 'ReadOnly' + " data-test-id="dateTime-input-ntpServer2" @blur="$v.form.ntp.secondAddress.$touch()" /> @@ -187,7 +204,10 @@ id="input-ntp-3" v-model="form.ntp.thirdAddress" :state="getValidationState($v.form.ntp.thirdAddress)" - :disabled="manualOptionSelected" + :disabled=" + manualOptionSelected || + $store.getters['authentication/role'] === 'ReadOnly' + " data-test-id="dateTime-input-ntpServer3" @blur="$v.form.ntp.thirdAddress.$touch()" /> @@ -204,6 +224,7 @@ variant="primary" type="submit" data-test-id="dateTime-button-saveSettings" + :disabled="$store.getters['authentication/role'] === 'ReadOnly'" > {{ $t('global.action.saveSettings') }} diff --git a/src/views/_sila/Overview/Inventory/InventoryServiceIndicator.vue b/src/views/_sila/Overview/Inventory/InventoryServiceIndicator.vue index b4531be7..7f0c9030 100644 --- a/src/views/_sila/Overview/Inventory/InventoryServiceIndicator.vue +++ b/src/views/_sila/Overview/Inventory/InventoryServiceIndicator.vue @@ -23,6 +23,7 @@ v-model="systems.locationIndicatorActive" data-test-id="inventoryService-toggle-identifyLed" switch + :disabled="$store.getters['authentication/role'] === 'ReadOnly'" @change="toggleIdentifyLedSwitch" > diff --git a/src/views/_sila/Overview/Inventory/InventoryTableAssembly.vue b/src/views/_sila/Overview/Inventory/InventoryTableAssembly.vue index 9c284533..929c172b 100644 --- a/src/views/_sila/Overview/Inventory/InventoryTableAssembly.vue +++ b/src/views/_sila/Overview/Inventory/InventoryTableAssembly.vue @@ -32,6 +32,7 @@ v-model="row.item.identifyLed" name="switch" switch + :disabled="$store.getters['authentication/role'] === 'ReadOnly'" @change="toggleIdentifyLedValue(row.item)" > diff --git a/src/views/_sila/Overview/Inventory/InventoryTableBmcManager.vue b/src/views/_sila/Overview/Inventory/InventoryTableBmcManager.vue index e3375d57..5fb23bfd 100644 --- a/src/views/_sila/Overview/Inventory/InventoryTableBmcManager.vue +++ b/src/views/_sila/Overview/Inventory/InventoryTableBmcManager.vue @@ -36,6 +36,7 @@ v-model="row.item.identifyLed" name="switch" switch + :disabled="$store.getters['authentication/role'] === 'ReadOnly'" @change="toggleIdentifyLedValue(row.item)" > diff --git a/src/views/_sila/Overview/Inventory/InventoryTableChassis.vue b/src/views/_sila/Overview/Inventory/InventoryTableChassis.vue index a5eb5ae6..d141924f 100644 --- a/src/views/_sila/Overview/Inventory/InventoryTableChassis.vue +++ b/src/views/_sila/Overview/Inventory/InventoryTableChassis.vue @@ -35,6 +35,7 @@ v-model="row.item.identifyLed" name="switch" switch + :disabled="$store.getters['authentication/role'] === 'ReadOnly'" @change="toggleIdentifyLedValue(row.item)" > diff --git a/src/views/_sila/Overview/Inventory/InventoryTableDimmSlot.vue b/src/views/_sila/Overview/Inventory/InventoryTableDimmSlot.vue index f1858ae9..40c30d4c 100644 --- a/src/views/_sila/Overview/Inventory/InventoryTableDimmSlot.vue +++ b/src/views/_sila/Overview/Inventory/InventoryTableDimmSlot.vue @@ -52,19 +52,18 @@