Browse Source

fix(nc-gui): audit, meta sync table issue

pull/8543/head
Ramesh Mane 1 month ago
parent
commit
73a4c31872
  1. 54
      packages/nc-gui/components/dashboard/settings/BaseAudit.vue
  2. 4
      packages/nc-gui/components/dashboard/settings/DataSources.vue
  3. 31
      packages/nc-gui/components/dashboard/settings/Metadata.vue
  4. 6
      packages/nc-gui/components/dashboard/settings/UIAcl.vue
  5. 2
      packages/nc-gui/components/dlg/ProjectAudit.vue
  6. 9
      packages/nc-gui/components/general/Modal.vue

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

@ -116,19 +116,23 @@ const columns = [
</a-button>
</div>
<a-table
class="nc-audit-table w-full"
size="small"
:data-source="audits ?? []"
:columns="columns"
:pagination="false"
:loading="isLoading"
data-testid="audit-tab-table"
>
<template #emptyText>
<a-empty :image="Empty.PRESENTED_IMAGE_SIMPLE" :description="$t('labels.noData')" />
</template>
</a-table>
<div class="h-[calc(100%_-_102px)] overflow-y-auto nc-scrollbar-thin">
<a-table
class="nc-audit-table w-full"
size="small"
:data-source="audits ?? []"
:columns="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>
<div v-if="+totalRows > currentLimit" class="flex flex-row justify-center items-center">
<a-pagination
v-model:current="currentPage"
@ -152,30 +156,6 @@ const columns = [
font-family: unset;
}
:deep(.nc-audit-table) {
@apply h-[calc(100%_-_102px)];
.ant-spin-nested-loading,
.ant-spin-container,
.ant-table,
.ant-table-container,
table {
@apply !h-full;
}
.ant-table-thead {
@apply sticky top-0 w-full z-10;
}
.ant-table-content {
@apply !h-auto max-h-full overflow-auto nc-scrollbar-thin;
tr {
height: auto !important;
}
}
pre {
@apply mb-0;
}
}
.pagination {
.ant-select-dropdown {
@apply !border-1 !border-gray-200;

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

@ -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>

31
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,7 +140,7 @@ const columns = [
</div>
</a-button>
</div>
<div class="h-auto max-h-600px">
<div class="h-auto max-h-[calc(100%_-_72px)] overflow-y-auto nc-scrollbar-thin">
<a-table
class="nc-metasync-table w-full"
size="small"
@ -153,6 +153,7 @@ const columns = [
:columns="columns"
:pagination="false"
:loading="isLoading"
sticky
bordered
>
<template #emptyText>
@ -179,26 +180,4 @@ const columns = [
</div>
</template>
<style lang="scss" scoped>
:deep(.nc-metasync-table) {
@apply !h-[calc(100%_-_102px)];
.ant-spin-nested-loading,
.ant-spin-container,
.ant-table,
.ant-table-container,
table {
@apply !h-full;
}
.ant-table-thead {
@apply sticky top-0 w-full z-10;
}
.ant-table-content {
@apply !h-auto max-h-full overflow-auto nc-scrollbar-thin;
tr {
height: auto !important;
}
}
}
</style>
<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 nc-scrollbar-thin">
<div class="h-auto max-h-[calc(100%_-_102px)] overflow-y-auto nc-scrollbar-thin">
<a-table
class="w-full"
size="small"

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

@ -45,7 +45,7 @@ onMounted(async () => {
</script>
<template>
<GeneralModal v-model:visible="isOpen" size="large" class="!w-[70rem]">
<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>

9
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'
})

Loading…
Cancel
Save