From a9cd79d13938dc0e43fd443e3d2deb7367726403 Mon Sep 17 00:00:00 2001
From: Vitalii Lysak <v.lysak@dunice.net>
Date: Mon, 22 Aug 2022 15:10:26 +0300
Subject: SILABMC-275: add readonly for dynamic page

---
 src/views/_sila/Memory/Dynamic/MemoryTemp.vue | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'src/views/_sila/Memory/Dynamic/MemoryTemp.vue')

diff --git a/src/views/_sila/Memory/Dynamic/MemoryTemp.vue b/src/views/_sila/Memory/Dynamic/MemoryTemp.vue
index 2bc9f06f..2c890862 100644
--- a/src/views/_sila/Memory/Dynamic/MemoryTemp.vue
+++ b/src/views/_sila/Memory/Dynamic/MemoryTemp.vue
@@ -10,6 +10,7 @@
           <b-form-group :label="$t('pageMemory.labels.warning')">
             <b-form-input
               v-model.number="warning"
+              :disabled="$store.getters['authentication/role'] === 'ReadOnly'"
               type="number"
               :min="1"
               :max="critical"
@@ -30,6 +31,7 @@
           <b-form-group :label="$t('pageMemory.labels.critical')">
             <b-form-input
               v-model.number="critical"
+              :disabled="$store.getters['authentication/role'] === 'ReadOnly'"
               type="number"
               :min="warning"
               :max="100"
@@ -51,7 +53,9 @@
           <b-button
             variant="primary"
             style="height: 35px"
-            :disabled="loading"
+            :disabled="
+              loading || $store.getters['authentication/role'] === 'ReadOnly'
+            "
             @click="saveLimit"
           >
             {{ $t('global.action.save') }}
-- 
cgit v1.2.3

