Browse Source

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

pull/8543/head
Ramesh Mane 6 months 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> </a-button>
</div> </div>
<a-table <div class="h-[calc(100%_-_102px)] overflow-y-auto nc-scrollbar-thin">
class="nc-audit-table w-full" <a-table
size="small" class="nc-audit-table w-full"
:data-source="audits ?? []" size="small"
:columns="columns" :data-source="audits ?? []"
:pagination="false" :columns="columns"
:loading="isLoading" :pagination="false"
data-testid="audit-tab-table" :loading="isLoading"
> data-testid="audit-tab-table"
<template #emptyText> sticky
<a-empty :image="Empty.PRESENTED_IMAGE_SIMPLE" :description="$t('labels.noData')" /> bordered
</template> >
</a-table> <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"> <div v-if="+totalRows > currentLimit" class="flex flex-row justify-center items-center">
<a-pagination <a-pagination
v-model:current="currentPage" v-model:current="currentPage"
@ -152,30 +156,6 @@ const columns = [
font-family: unset; 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 { .pagination {
.ant-select-dropdown { .ant-select-dropdown {
@apply !border-1 !border-gray-200; @apply !border-1 !border-gray-200;

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

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

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

@ -108,8 +108,8 @@ const columns = [
</script> </script>
<template> <template>
<div class="flex flex-col w-full"> <div class="h-full flex flex-col w-full">
<div class="flex flex-col"> <div class="h-full flex flex-col">
<div class="flex flex-row justify-between items-center w-full mb-4"> <div class="flex flex-row justify-between items-center w-full mb-4">
<div class="flex"> <div class="flex">
<div v-if="isDifferent"> <div v-if="isDifferent">
@ -140,7 +140,7 @@ const columns = [
</div> </div>
</a-button> </a-button>
</div> </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 <a-table
class="nc-metasync-table w-full" class="nc-metasync-table w-full"
size="small" size="small"
@ -153,6 +153,7 @@ const columns = [
:columns="columns" :columns="columns"
:pagination="false" :pagination="false"
:loading="isLoading" :loading="isLoading"
sticky
bordered bordered
> >
<template #emptyText> <template #emptyText>
@ -179,26 +180,4 @@ const columns = [
</div> </div>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped></style>
: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>

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

@ -130,8 +130,8 @@ const toggleSelectAll = (role: Role) => {
</script> </script>
<template> <template>
<div class="flex flex-row w-full items-center justify-center"> <div class="h-full flex flex-row w-full items-center justify-center">
<div class="flex flex-col"> <div class="h-full flex flex-col">
<NcTooltip class="mb-4 first-letter:capital font-bold max-w-100 truncate" show-on-truncate-only> <NcTooltip class="mb-4 first-letter:capital font-bold max-w-100 truncate" show-on-truncate-only>
<template #title>{{ base.title }}</template> <template #title>{{ base.title }}</template>
<span> UI ACL : {{ base.title }} </span> <span> UI ACL : {{ base.title }} </span>
@ -159,7 +159,7 @@ const toggleSelectAll = (role: Role) => {
</div> </div>
</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 <a-table
class="w-full" class="w-full"
size="small" size="small"

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

@ -45,7 +45,7 @@ onMounted(async () => {
</script> </script>
<template> <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"> <div class="p-6 h-full">
<DashboardSettingsBaseAudit v-if="!isLoading" :source-id="activeSourceId" :base-id="baseId" :show-all-columns="false" /> <DashboardSettingsBaseAudit v-if="!isLoading" :source-id="activeSourceId" :base-id="baseId" :show-all-columns="false" />
</div> </div>

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

@ -3,7 +3,7 @@ const props = withDefaults(
defineProps<{ defineProps<{
visible: boolean visible: boolean
width?: string | number width?: string | number
size?: 'small' | 'medium' | 'large' size?: 'small' | 'medium' | 'large' | 'xl'
destroyOnClose?: boolean destroyOnClose?: boolean
maskClosable?: boolean maskClosable?: boolean
closable?: boolean closable?: boolean
@ -40,6 +40,10 @@ const width = computed(() => {
return '80rem' return '80rem'
} }
if (props.size === 'xl') {
return '80rem'
}
return 'max(30vw, 600px)' return 'max(30vw, 600px)'
}) })
@ -55,6 +59,9 @@ const height = computed(() => {
if (props.size === 'large') { if (props.size === 'large') {
return '80vh' return '80vh'
} }
if (props.size === 'xl') {
return '90vh'
}
return 'auto' return 'auto'
}) })

Loading…
Cancel
Save