Browse Source

Merge pull request #8543 from nocodb/nc-fix/audit-table

Nc fix/audit table
pull/8552/head
Ramesh Mane 6 months ago committed by GitHub
parent
commit
6ece1cf00a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 9
      packages/nc-gui/components/dashboard/settings/BaseAudit.vue
  2. 6
      packages/nc-gui/components/dashboard/settings/DataSources.vue
  3. 11
      packages/nc-gui/components/dashboard/settings/Metadata.vue
  4. 6
      packages/nc-gui/components/dashboard/settings/UIAcl.vue
  5. 4
      packages/nc-gui/components/dlg/ProjectAudit.vue
  6. 11
      packages/nc-gui/components/general/Modal.vue
  7. 2
      packages/nc-gui/components/smartsheet/expanded-form/Comments.vue

9
packages/nc-gui/components/dashboard/settings/BaseAudit.vue

@ -103,7 +103,7 @@ const columns = [
</script>
<template>
<div class="flex flex-col gap-4 w-full">
<div class="h-full flex flex-col gap-4 w-full">
<div v-if="!appInfo.auditEnabled" class="text-red-500">Audit logs are currently disabled by administrators.</div>
<div class="flex flex-row justify-between items-center">
<h6 class="mb-4 first-letter:capital font-bold">Audit : {{ base.title }}</h6>
@ -116,6 +116,7 @@ const columns = [
</a-button>
</div>
<div class="h-[calc(100%_-_102px)] overflow-y-auto nc-scrollbar-thin">
<a-table
class="nc-audit-table w-full"
size="small"
@ -124,12 +125,15 @@ const columns = [
:pagination="false"
:loading="isLoading"
data-testid="audit-tab-table"
sticky
bordered
>
<template #emptyText>
<a-empty :image="Empty.PRESENTED_IMAGE_SIMPLE" :description="$t('labels.noData')" />
</template>
</a-table>
<div class="flex flex-row justify-center items-center">
</div>
<div v-if="+totalRows > currentLimit" class="flex flex-row justify-center items-center">
<a-pagination
v-model:current="currentPage"
v-model:page-size="currentLimit"
@ -151,6 +155,7 @@ const columns = [
font-size: unset;
font-family: unset;
}
.pagination {
.ant-select-dropdown {
@apply !border-1 !border-gray-200;

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

@ -303,7 +303,7 @@ const openedTab = ref('erd')
<div>{{ $t('title.auditLogs') }}</div>
</div>
</template>
<div class="p-4 h-full overflow-auto">
<div class="p-4 h-full">
<LazyDashboardSettingsBaseAudit :source-id="activeSource.id" />
</div>
</a-tab-pane>
@ -330,7 +330,7 @@ const openedTab = ref('erd')
</div>
</template>
<div class="pt-4 h-full overflow-auto">
<div class="pt-4 h-full">
<LazyDashboardSettingsUIAcl :source-id="activeSource.id" />
</div>
</a-tab-pane>
@ -340,7 +340,7 @@ const openedTab = ref('erd')
<div>{{ $t('labels.metaSync') }}</div>
</div>
</template>
<div class="pt-4 h-full overflow-auto">
<div class="pt-4 h-full">
<LazyDashboardSettingsMetadata :source-id="activeSource.id" @source-synced="loadBases(true)" />
</div>
</a-tab-pane>

11
packages/nc-gui/components/dashboard/settings/Metadata.vue

@ -108,8 +108,8 @@ const columns = [
</script>
<template>
<div class="flex flex-col w-full">
<div class="flex flex-col">
<div class="h-full flex flex-col w-full">
<div class="h-full flex flex-col">
<div class="flex flex-row justify-between items-center w-full mb-4">
<div class="flex">
<div v-if="isDifferent">
@ -140,9 +140,9 @@ const columns = [
</div>
</a-button>
</div>
<div class="max-h-600px overflow-y-auto">
<div class="h-auto max-h-[calc(100%_-_72px)] overflow-y-auto nc-scrollbar-thin">
<a-table
class="w-full"
class="nc-metasync-table w-full"
size="small"
:custom-row="
(record) => ({
@ -153,6 +153,7 @@ const columns = [
:columns="columns"
:pagination="false"
:loading="isLoading"
sticky
bordered
>
<template #emptyText>
@ -178,3 +179,5 @@ const columns = [
</div>
</div>
</template>
<style lang="scss" scoped></style>

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

@ -130,8 +130,8 @@ const toggleSelectAll = (role: Role) => {
</script>
<template>
<div class="flex flex-row w-full items-center justify-center">
<div class="flex flex-col">
<div class="h-full flex flex-row w-full items-center justify-center">
<div class="h-full flex flex-col">
<NcTooltip class="mb-4 first-letter:capital font-bold max-w-100 truncate" show-on-truncate-only>
<template #title>{{ base.title }}</template>
<span> UI ACL : {{ base.title }} </span>
@ -159,7 +159,7 @@ const toggleSelectAll = (role: Role) => {
</div>
</div>
<div class="max-h-600px overflow-y-auto">
<div class="h-auto max-h-[calc(100%_-_102px)] overflow-y-auto nc-scrollbar-thin">
<a-table
class="w-full"
size="small"

4
packages/nc-gui/components/dlg/ProjectAudit.vue

@ -45,8 +45,8 @@ onMounted(async () => {
</script>
<template>
<GeneralModal v-model:visible="isOpen" size="large" class="!w-[70rem]">
<div class="p-6">
<GeneralModal v-model:visible="isOpen" size="xl" class="!w-[70rem] !top-[5vh]">
<div class="p-6 h-full">
<DashboardSettingsBaseAudit v-if="!isLoading" :source-id="activeSourceId" :base-id="baseId" :show-all-columns="false" />
</div>
</GeneralModal>

11
packages/nc-gui/components/general/Modal.vue

@ -3,7 +3,7 @@ const props = withDefaults(
defineProps<{
visible: boolean
width?: string | number
size?: 'small' | 'medium' | 'large'
size?: 'small' | 'medium' | 'large' | 'xl'
destroyOnClose?: boolean
maskClosable?: boolean
closable?: boolean
@ -40,6 +40,10 @@ const width = computed(() => {
return '80rem'
}
if (props.size === 'xl') {
return '80rem'
}
return 'max(30vw, 600px)'
})
@ -55,6 +59,9 @@ const height = computed(() => {
if (props.size === 'large') {
return '80vh'
}
if (props.size === 'xl') {
return '90vh'
}
return 'auto'
})
@ -75,7 +82,7 @@ const visible = useVModel(props, 'visible', emits)
:mask-closable="maskClosable"
@keydown.esc="visible = false"
>
<div :class="`nc-modal max-h-[${height}]`">
<div :class="`nc-modal h-[${height}] max-h-[${height}]`">
<slot />
</div>
</a-modal>

2
packages/nc-gui/components/smartsheet/expanded-form/Comments.vue

@ -389,7 +389,7 @@ watch(commentsWrapperEl, () => {
.ant-tabs-nav {
@apply px-3;
.ant-tabs-nav-list {
@apply w-full gap-6;
@apply w-[99%] mx-auto gap-6;
.ant-tabs-tab {
@apply flex-1 flex items-center justify-center pt-3 pb-2.5;

Loading…
Cancel
Save