Browse Source

Merge pull request #6782 from nocodb/nc-fix/hide-col-for-project-erd

Hide col for project erd
pull/6785/head
Muhammed Mustafa 1 year ago committed by GitHub
parent
commit
8d145e26f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/nc-gui/components/dashboard/settings/DataSources.vue
  2. 3
      packages/nc-gui/components/dashboard/settings/Erd.vue
  3. 2
      packages/nc-gui/components/dlg/ProjectErd.vue
  4. 2
      packages/nc-gui/components/smartsheet/details/Erd.vue
  5. 5
      tests/playwright/tests/db/features/erd.spec.ts

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

@ -554,7 +554,7 @@ const isEditBaseModalOpen = computed({
/>
<GeneralModal v-model:visible="isErdModalOpen" size="large">
<div class="h-[80vh]">
<LazyDashboardSettingsErd :source-id="activeBaseId" />
<LazyDashboardSettingsErd :source-id="activeBaseId" :show-all-columns="false" />
</div>
</GeneralModal>
<GeneralModal v-model:visible="isMetaDataModal" size="medium">

3
packages/nc-gui/components/dashboard/settings/Erd.vue

@ -1,11 +1,12 @@
<script setup lang="ts">
const props = defineProps<{
sourceId: string
showAllColumns?: boolean
}>()
</script>
<template>
<div class="w-full h-full !p-0">
<ErdView :source-id="props.sourceId" />
<ErdView :source-id="props.sourceId" :show-all-columns="props.showAllColumns" />
</div>
</template>

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

@ -46,7 +46,7 @@ onMounted(async () => {
<template>
<GeneralModal v-model:visible="isOpen" size="large">
<div class="h-[80vh]">
<ErdView v-if="!isLoading" :source-id="activeSourceId" :base-id="baseId" />
<ErdView v-if="!isLoading" :source-id="activeSourceId" :base-id="baseId" :show-all-columns="false" />
</div>
</GeneralModal>
</template>

2
packages/nc-gui/components/smartsheet/details/Erd.vue

@ -24,7 +24,7 @@ const indicator = h(LoadingOutlined, {
</div>
<Suspense v-else>
<LazyErdView :table="activeTable" :source-id="activeTable?.source_id" :show-all-columns="false" />
<LazyErdView :table="activeTable" :source-id="activeTable?.source_id" show-all-columns />
<template #fallback>
<div class="h-full w-full flex flex-col justify-center items-center mt-28">
<a-spin size="large" :indicator="indicator" />

5
tests/playwright/tests/db/features/erd.spec.ts

@ -61,6 +61,8 @@ test.describe('Erd', () => {
const erd = dashboard.details.relations;
await erd.clickShowColumnNames();
if (isPg(context)) {
await erd.verifyNodesCount(sakilaTables.length);
await erd.verifyEdgesCount({
@ -181,7 +183,6 @@ test.describe('Erd', () => {
await openErdOfATable('Country');
const erd = dashboard.details.relations;
await erd.clickShowColumnNames();
// Verify tables with default config
await erd.verifyColumns({
tableName: `country`,
@ -224,7 +225,6 @@ test.describe('Erd', () => {
// Verify
await dashboard.grid.topbar.btn_details.click();
await openErdOfATable('Country');
await erd.clickShowColumnNames();
await erd.verifyNode({
tableName: `country`,
@ -245,7 +245,6 @@ test.describe('Erd', () => {
// Verify
await dashboard.grid.topbar.btn_details.click();
await openErdOfATable('Country');
await erd.clickShowColumnNames();
await erd.verifyNode({
tableName: `country`,

Loading…
Cancel
Save