summaryrefslogtreecommitdiff
path: root/src/views/_sila/Logs
diff options
context:
space:
mode:
authorVitalii Lysak <v.lysak@dunice.net>2022-08-10 15:46:15 +0300
committerVitalii Lysak <v.lysak@dunice.net>2022-08-10 15:46:15 +0300
commitb4d1fb8b8e6e6cdb7be76a2d4fa0d2b9a84f3ba2 (patch)
tree8806fa43f2e0d1301a89ddd4c7667d10568e531f /src/views/_sila/Logs
parent5fff754d48ec658673c11f8e593d3af4f94d79df (diff)
downloadwebui-vue-b4d1fb8b8e6e6cdb7be76a2d4fa0d2b9a84f3ba2.tar.xz
SILABMC-236: upd layput for ReadOnly role
Diffstat (limited to 'src/views/_sila/Logs')
-rw-r--r--src/views/_sila/Logs/EventLogs/EventLogs.vue23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/views/_sila/Logs/EventLogs/EventLogs.vue b/src/views/_sila/Logs/EventLogs/EventLogs.vue
index 8cc65bfb..f283fc8b 100644
--- a/src/views/_sila/Logs/EventLogs/EventLogs.vue
+++ b/src/views/_sila/Logs/EventLogs/EventLogs.vue
@@ -32,7 +32,10 @@
<table-filter :filters="tableFilters" @filter-change="onFilterChange" />
<b-button
variant="link"
- :disabled="allLogs.length === 0"
+ :disabled="
+ allLogs.length === 0 &&
+ $store.getters['authentication/role'] === 'ReadOnly'
+ "
@click="deleteAllLogs"
>
<icon-delete /> {{ $t('global.action.deleteAll') }}
@@ -57,10 +60,18 @@
@batch-action="onBatchAction"
>
<template #toolbar-buttons>
- <b-button variant="primary" @click="resolveLogs">
+ <b-button
+ variant="primary"
+ :disabled="$store.getters['authentication/role'] === 'ReadOnly'"
+ @click="resolveLogs"
+ >
{{ $t('pageEventLogs.resolve') }}
</b-button>
- <b-button variant="primary" @click="unresolveLogs">
+ <b-button
+ variant="primary"
+ :disabled="$store.getters['authentication/role'] === 'ReadOnly'"
+ @click="unresolveLogs"
+ >
{{ $t('pageEventLogs.unresolve') }}
</b-button>
<table-toolbar-export
@@ -184,6 +195,7 @@
v-model="row.item.status"
name="switch"
switch
+ :disabled="$store.getters['authentication/role'] === 'ReadOnly'"
@change="changelogStatus(row.item)"
>
<span v-if="row.item.status">
@@ -206,6 +218,11 @@
:row-data="row.item"
:export-name="exportFileNameByDate('export')"
:data-test-id="`eventLogs-button-deleteRow-${row.index}`"
+ :class="{
+ disabledDiv:
+ $store.getters['authentication/role'] === 'ReadOnly' &&
+ action.value === 'delete',
+ }"
@click-table-action="onTableRowAction($event, row.item)"
>
<template #icon>