Browse Source

feat(nc-gui): show the audit log disabled message

pull/5137/head
Wing-Kam Wong 2 years ago
parent
commit
84e1bfc182
  1. 6
      packages/nc-gui/components/dashboard/settings/AuditTab.vue

6
packages/nc-gui/components/dashboard/settings/AuditTab.vue

@ -1,7 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { Tooltip as ATooltip, Empty } from 'ant-design-vue' import { Tooltip as ATooltip, Empty } from 'ant-design-vue'
import type { AuditType } from 'nocodb-sdk' import type { AuditType } from 'nocodb-sdk'
import { h, onMounted, timeAgo, useI18n, useNuxtApp, useProject } from '#imports' import { h, onMounted, timeAgo, useGlobal, useI18n, useNuxtApp, useProject } from '#imports'
const { $api } = useNuxtApp() const { $api } = useNuxtApp()
@ -16,8 +16,11 @@ let audits = $ref<null | Array<AuditType>>(null)
let totalRows = $ref(0) let totalRows = $ref(0)
const currentPage = $ref(1) const currentPage = $ref(1)
const currentLimit = $ref(25) const currentLimit = $ref(25)
const { appInfo } = useGlobal()
async function loadAudits(page = currentPage, limit = currentLimit) { async function loadAudits(page = currentPage, limit = currentLimit) {
try { try {
if (!project.value?.id) return if (!project.value?.id) return
@ -86,6 +89,7 @@ const columns = [
<template> <template>
<div class="flex flex-col gap-4 w-full"> <div class="flex flex-col gap-4 w-full">
<div v-if="!appInfo.auditEnabled">Audit logs are currently disabled by administrators.</div>
<div class="flex flex-row justify-between items-center"> <div class="flex flex-row justify-between items-center">
<a-button class="self-start" @click="loadAudits"> <a-button class="self-start" @click="loadAudits">
<!-- Reload --> <!-- Reload -->

Loading…
Cancel
Save