|
|
@ -306,342 +306,396 @@ const isEditBaseModalOpen = computed({ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const activeSource = ref<SourceType>(null) |
|
|
|
|
|
|
|
const openedTab = ref('erd') |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div class="flex flex-row w-full h-full nc-data-sources-view"> |
|
|
|
<div class="flex flex-col h-full"> |
|
|
|
<div class="flex flex-col w-full overflow-auto"> |
|
|
|
<div class="px-4 py-2"> |
|
|
|
<div class="flex flex-row w-full justify-end mt-6.5 mb-2"> |
|
|
|
<a-breadcrumb separator=">" class="w-full cursor-pointer font-weight-bold"> |
|
|
|
<NcButton |
|
|
|
<a-breadcrumb-item @click="activeSource = null"> |
|
|
|
v-if="!isDataSourceLimitReached" |
|
|
|
<a class="!no-underline">Data Sources</a> |
|
|
|
size="large" |
|
|
|
</a-breadcrumb-item> |
|
|
|
class="z-10 !px-2" |
|
|
|
<a-breadcrumb-item v-if="activeSource"> |
|
|
|
type="primary" |
|
|
|
<span class="capitalize">{{ activeSource.alias || 'Default Source' }}</span> |
|
|
|
@click="vState = DataSourcesSubTab.New" |
|
|
|
</a-breadcrumb-item> |
|
|
|
|
|
|
|
</a-breadcrumb> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="flex flex-row w-full h-full nc-data-sources-view flex-grow"> |
|
|
|
|
|
|
|
<template v-if="activeSource"> |
|
|
|
|
|
|
|
<NcTabs v-model:activeKey="openedTab" class="nc-source-tab w-full"> |
|
|
|
|
|
|
|
<a-tab-pane key="erd"> |
|
|
|
|
|
|
|
<template #tab> |
|
|
|
|
|
|
|
<div class="tab" data-testid="nc-erd-tab"> |
|
|
|
|
|
|
|
<div>{{ $t('title.erdView') }}</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<div class="h-[80vh]"> |
|
|
|
|
|
|
|
<LazyDashboardSettingsErd class="mt-4 overflow-scroll" :source-id="activeSource.id" :show-all-columns="false" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</a-tab-pane> |
|
|
|
|
|
|
|
<a-tab-pane key="acl"> |
|
|
|
|
|
|
|
<template #tab> |
|
|
|
|
|
|
|
<div class="tab" data-testid="nc-acl-tab"> |
|
|
|
|
|
|
|
<div>{{ $t('labels.uiAcl') }}</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<LazyDashboardSettingsUIAcl class="mt-4" :source-id="activeSource.id" /> |
|
|
|
|
|
|
|
</a-tab-pane> |
|
|
|
|
|
|
|
<a-tab-pane v-if="activeSource.is_meta || activeSource.is_local" key="audit"> |
|
|
|
|
|
|
|
<template #tab> |
|
|
|
|
|
|
|
<div class="tab" data-testid="nc-audit-tab"> |
|
|
|
|
|
|
|
<div>{{ $t('title.audit') }}</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<LazyDashboardSettingsBaseAudit class="mt-4" :source-id="activeSource.id" /> |
|
|
|
|
|
|
|
</a-tab-pane> |
|
|
|
|
|
|
|
<a-tab-pane key="meta-sync"> |
|
|
|
|
|
|
|
<template #tab> |
|
|
|
|
|
|
|
<div class="tab" data-testid="nc-meta-sync-tab"> |
|
|
|
|
|
|
|
<div>{{ $t('labels.metaSync') }}</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<LazyDashboardSettingsMetadata class="mt-4" :source-id="activeSource.id" @source-synced="loadBases(true)" /> |
|
|
|
|
|
|
|
</a-tab-pane> |
|
|
|
|
|
|
|
</NcTabs> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<div v-else class="flex flex-col w-full overflow-auto"> |
|
|
|
|
|
|
|
<div class="flex flex-row w-full justify-end mt-6.5 mb-2"> |
|
|
|
|
|
|
|
<NcButton |
|
|
|
|
|
|
|
v-if="!isDataSourceLimitReached" |
|
|
|
|
|
|
|
size="large" |
|
|
|
|
|
|
|
class="z-10 !px-2" |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
@click="vState = DataSourcesSubTab.New" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div class="flex flex-row items-center w-full gap-x-1"> |
|
|
|
|
|
|
|
<component :is="iconMap.plus" /> |
|
|
|
|
|
|
|
<div class="flex">{{ $t('activity.newSource') }}</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</NcButton> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div |
|
|
|
|
|
|
|
class="overflow-y-auto nc-scrollbar-md" |
|
|
|
|
|
|
|
:style="{ |
|
|
|
|
|
|
|
maxHeight: 'calc(100vh - 200px)', |
|
|
|
|
|
|
|
}" |
|
|
|
> |
|
|
|
> |
|
|
|
<div class="flex flex-row items-center w-full gap-x-1"> |
|
|
|
<div class="ds-table-head"> |
|
|
|
<component :is="iconMap.plus" /> |
|
|
|
<div class="ds-table-row"> |
|
|
|
<div class="flex">{{ $t('activity.newSource') }}</div> |
|
|
|
<div class="ds-table-col ds-table-enabled cursor-pointer">{{ $t('general.visibility') }}</div> |
|
|
|
</div> |
|
|
|
<div class="ds-table-col ds-table-name">{{ $t('general.name') }}</div> |
|
|
|
</NcButton> |
|
|
|
<div class="ds-table-col ds-table-type">{{ $t('general.type') }}</div> |
|
|
|
</div> |
|
|
|
<div class="ds-table-col ds-table-actions -ml-13">{{ $t('labels.actions') }}</div> |
|
|
|
<div |
|
|
|
<div class="ds-table-col ds-table-crud"></div> |
|
|
|
class="overflow-y-auto nc-scrollbar-md" |
|
|
|
</div> |
|
|
|
:style="{ |
|
|
|
|
|
|
|
maxHeight: 'calc(100vh - 200px)', |
|
|
|
|
|
|
|
}" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div class="ds-table-head"> |
|
|
|
|
|
|
|
<div class="ds-table-row"> |
|
|
|
|
|
|
|
<div class="ds-table-col ds-table-enabled cursor-pointer">{{ $t('general.visibility') }}</div> |
|
|
|
|
|
|
|
<div class="ds-table-col ds-table-name">{{ $t('general.name') }}</div> |
|
|
|
|
|
|
|
<div class="ds-table-col ds-table-type">{{ $t('general.type') }}</div> |
|
|
|
|
|
|
|
<div class="ds-table-col ds-table-actions -ml-13">{{ $t('labels.actions') }}</div> |
|
|
|
|
|
|
|
<div class="ds-table-col ds-table-crud"></div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="ds-table-body"> |
|
|
|
<div class="ds-table-body"> |
|
|
|
<Draggable :list="sources" item-key="id" handle=".ds-table-handle" @end="moveBase"> |
|
|
|
<Draggable :list="sources" item-key="id" handle=".ds-table-handle" @end="moveBase"> |
|
|
|
<template #header> |
|
|
|
<template #header> |
|
|
|
<div v-if="sources[0]" class="ds-table-row border-gray-200" @click="activeSource = sources[0]"> |
|
|
|
<div v-if="sources[0]" class="ds-table-row border-gray-200"> |
|
|
|
<div class="ds-table-col ds-table-enabled"> |
|
|
|
<div class="ds-table-col ds-table-enabled"> |
|
|
|
<div class="flex items-center gap-1"> |
|
|
|
<div class="flex items-center gap-1"> |
|
|
|
<div v-if="sources.length > 2" class="ds-table-handle" /> |
|
|
|
<div v-if="sources.length > 2" class="ds-table-handle" /> |
|
|
|
<a-tooltip> |
|
|
|
<a-tooltip> |
|
|
|
<template #title> |
|
|
|
<template #title> |
|
|
|
<template v-if="sources[0].enabled">{{ $t('activity.hideInUI') }}</template> |
|
|
|
<template v-if="sources[0].enabled">{{ $t('activity.hideInUI') }}</template> |
|
|
|
<template v-else>{{ $t('activity.showInUI') }}</template> |
|
|
|
<template v-else>{{ $t('activity.showInUI') }}</template> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<a-switch |
|
|
|
<a-switch |
|
|
|
:checked="sources[0].enabled ? true : false" |
|
|
|
:checked="sources[0].enabled ? true : false" |
|
|
|
class="cursor-pointer" |
|
|
|
class="cursor-pointer" |
|
|
|
size="small" |
|
|
|
size="small" |
|
|
|
@change="toggleBase(sources[0], $event)" |
|
|
|
@change="toggleBase(sources[0], $event)" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</a-tooltip> |
|
|
|
</a-tooltip> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="ds-table-col ds-table-name font-medium"> |
|
|
|
<div class="ds-table-col ds-table-name font-medium"> |
|
|
|
<div class="flex items-center gap-1"> |
|
|
|
<div class="flex items-center gap-1"> |
|
|
|
<!-- <GeneralBaseLogo :base-type="sources[0].type" /> --> |
|
|
|
<!-- <GeneralBaseLogo :base-type="sources[0].type" /> --> |
|
|
|
{{ $t('general.default') }} |
|
|
|
{{ $t('general.default') }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="ds-table-col ds-table-type"> |
|
|
|
<div class="ds-table-col ds-table-type"> |
|
|
|
<div class="flex items-center gap-1">-</div> |
|
|
|
<div class="flex items-center gap-1">-</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="ds-table-col ds-table-actions"> |
|
|
|
<div class="ds-table-col ds-table-actions"> |
|
|
|
<div class="flex items-center gap-2"> |
|
|
|
<div class="flex items-center gap-2"> |
|
|
|
<NcTooltip v-if="!sources[0].is_meta && !sources[0].is_local"> |
|
|
|
<NcTooltip v-if="!sources[0].is_meta && !sources[0].is_local"> |
|
|
|
<template #title> |
|
|
|
<template #title> |
|
|
|
{{ $t('tooltip.metaSync') }} |
|
|
|
{{ $t('tooltip.metaSync') }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<NcButton |
|
|
|
<NcButton |
|
|
|
class="nc-action-btn cursor-pointer outline-0" |
|
|
|
class="nc-action-btn cursor-pointer outline-0" |
|
|
|
type="text" |
|
|
|
type="text" |
|
|
|
data-testid="nc-data-sources-view-meta-sync" |
|
|
|
data-testid="nc-data-sources-view-meta-sync" |
|
|
|
size="small" |
|
|
|
size="small" |
|
|
|
@click="baseAction(sources[0].id, DataSourcesSubTab.Metadata)" |
|
|
|
@click="baseAction(sources[0].id, DataSourcesSubTab.Metadata)" |
|
|
|
> |
|
|
|
> |
|
|
|
<div class="flex items-center gap-2 text-gray-600"> |
|
|
|
<div class="flex items-center gap-2 text-gray-600"> |
|
|
|
<GeneralIcon icon="sync" class="group-hover:text-accent" /> |
|
|
|
<GeneralIcon icon="sync" class="group-hover:text-accent" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</NcButton> |
|
|
|
</NcButton> |
|
|
|
</NcTooltip> |
|
|
|
</NcTooltip> |
|
|
|
<NcTooltip> |
|
|
|
<NcTooltip> |
|
|
|
<template #title> |
|
|
|
<template #title> |
|
|
|
{{ $t('title.relations') }} |
|
|
|
{{ $t('title.relations') }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<NcButton |
|
|
|
<NcButton |
|
|
|
size="small" |
|
|
|
size="small" |
|
|
|
class="nc-action-btn cursor-pointer outline-0" |
|
|
|
class="nc-action-btn cursor-pointer outline-0" |
|
|
|
type="text" |
|
|
|
type="text" |
|
|
|
data-testid="nc-data-sources-view-erd" |
|
|
|
data-testid="nc-data-sources-view-erd" |
|
|
|
@click="baseAction(sources[0].id, DataSourcesSubTab.ERD)" |
|
|
|
@click="baseAction(sources[0].id, DataSourcesSubTab.ERD)" |
|
|
|
> |
|
|
|
> |
|
|
|
<div class="flex items-center gap-2 text-gray-600"> |
|
|
|
<div class="flex items-center gap-2 text-gray-600"> |
|
|
|
<GeneralIcon icon="erd" class="group-hover:text-accent" /> |
|
|
|
<GeneralIcon icon="erd" class="group-hover:text-accent" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</NcButton> |
|
|
|
</NcButton> |
|
|
|
</NcTooltip> |
|
|
|
</NcTooltip> |
|
|
|
<NcTooltip> |
|
|
|
<NcTooltip> |
|
|
|
<template #title> |
|
|
|
<template #title> |
|
|
|
{{ $t('labels.uiAcl') }} |
|
|
|
{{ $t('labels.uiAcl') }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<NcButton |
|
|
|
<NcButton |
|
|
|
size="small" |
|
|
|
size="small" |
|
|
|
class="nc-action-btn cursor-pointer outline-0" |
|
|
|
class="nc-action-btn cursor-pointer outline-0" |
|
|
|
type="text" |
|
|
|
type="text" |
|
|
|
data-testid="nc-data-sources-view-ui-acl" |
|
|
|
data-testid="nc-data-sources-view-ui-acl" |
|
|
|
@click="baseAction(sources[0].id, DataSourcesSubTab.UIAcl)" |
|
|
|
@click="baseAction(sources[0].id, DataSourcesSubTab.UIAcl)" |
|
|
|
> |
|
|
|
> |
|
|
|
<div class="flex items-center gap-2 text-gray-600"> |
|
|
|
<div class="flex items-center gap-2 text-gray-600"> |
|
|
|
<GeneralIcon icon="acl" class="group-hover:text-accent" /> |
|
|
|
<GeneralIcon icon="acl" class="group-hover:text-accent" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</NcButton> |
|
|
|
</NcButton> |
|
|
|
</NcTooltip> |
|
|
|
</NcTooltip> |
|
|
|
<NcTooltip> |
|
|
|
<NcTooltip> |
|
|
|
<template #title> |
|
|
|
<template #title> |
|
|
|
{{ $t('title.audit') }} |
|
|
|
{{ $t('title.audit') }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<NcButton |
|
|
|
<NcButton |
|
|
|
size="small" |
|
|
|
size="small" |
|
|
|
class="nc-action-btn cursor-pointer outline-0" |
|
|
|
class="nc-action-btn cursor-pointer outline-0" |
|
|
|
type="text" |
|
|
|
type="text" |
|
|
|
data-testid="nc-data-sources-view-audit" |
|
|
|
data-testid="nc-data-sources-view-audit" |
|
|
|
@click="baseAction(sources[0].id, DataSourcesSubTab.Audit)" |
|
|
|
@click="baseAction(sources[0].id, DataSourcesSubTab.Audit)" |
|
|
|
> |
|
|
|
> |
|
|
|
<div class="flex items-center gap-2 text-gray-600"> |
|
|
|
<div class="flex items-center gap-2 text-gray-600"> |
|
|
|
<GeneralIcon icon="book" class="group-hover:text-accent" /> |
|
|
|
<GeneralIcon icon="book" class="group-hover:text-accent" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</NcButton> |
|
|
|
</NcButton> |
|
|
|
</NcTooltip> |
|
|
|
</NcTooltip> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="ds-table-col ds-table-crud"> |
|
|
|
<div class="ds-table-col ds-table-crud"> |
|
|
|
<NcButton |
|
|
|
<NcButton |
|
|
|
v-if="!sources[0].is_meta && !sources[0].is_local" |
|
|
|
v-if="!sources[0].is_meta && !sources[0].is_local" |
|
|
|
size="small" |
|
|
|
size="small" |
|
|
|
class="nc-action-btn cursor-pointer outline-0 !w-8 !px-1 !rounded-lg" |
|
|
|
class="nc-action-btn cursor-pointer outline-0 !w-8 !px-1 !rounded-lg" |
|
|
|
type="text" |
|
|
|
type="text" |
|
|
|
@click="baseAction(sources[0].id, DataSourcesSubTab.Edit)" |
|
|
|
@click="baseAction(sources[0].id, DataSourcesSubTab.Edit)" |
|
|
|
> |
|
|
|
> |
|
|
|
<GeneralIcon icon="edit" class="text-gray-600" /> |
|
|
|
<GeneralIcon icon="edit" class="text-gray-600" /> |
|
|
|
</NcButton> |
|
|
|
</NcButton> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<template #item="{ element: source, index }"> |
|
|
|
|
|
|
|
<div v-if="index !== 0" class="ds-table-row border-gray-200"> |
|
|
|
|
|
|
|
<div class="ds-table-col ds-table-enabled"> |
|
|
|
|
|
|
|
<div class="flex items-center gap-1"> |
|
|
|
|
|
|
|
<GeneralIcon v-if="sources.length > 2" icon="dragVertical" small class="ds-table-handle" /> |
|
|
|
|
|
|
|
<a-tooltip> |
|
|
|
|
|
|
|
<template #title> |
|
|
|
|
|
|
|
<template v-if="source.enabled">{{ $t('activity.hideInUI') }}</template> |
|
|
|
|
|
|
|
<template v-else>{{ $t('activity.showInUI') }}</template> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<a-switch |
|
|
|
|
|
|
|
:checked="source.enabled ? true : false" |
|
|
|
|
|
|
|
class="cursor-pointer" |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
@change="toggleBase(source, $event)" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</a-tooltip> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="ds-table-col ds-table-name font-medium w-full"> |
|
|
|
</template> |
|
|
|
<div v-if="source.is_meta || source.is_local">-</div> |
|
|
|
<template #item="{ element: source, index }"> |
|
|
|
<span v-else class="truncate"> |
|
|
|
<div v-if="index !== 0" class="ds-table-row border-gray-200" @click="activeSource = source"> |
|
|
|
{{ source.is_meta || source.is_local ? $t('general.base') : source.alias }} |
|
|
|
<div class="ds-table-col ds-table-enabled"> |
|
|
|
</span> |
|
|
|
<div class="flex items-center gap-1"> |
|
|
|
</div> |
|
|
|
<GeneralIcon v-if="sources.length > 2" icon="dragVertical" small class="ds-table-handle" /> |
|
|
|
|
|
|
|
<a-tooltip> |
|
|
|
|
|
|
|
<template #title> |
|
|
|
|
|
|
|
<template v-if="source.enabled">{{ $t('activity.hideInUI') }}</template> |
|
|
|
|
|
|
|
<template v-else>{{ $t('activity.showInUI') }}</template> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<a-switch |
|
|
|
|
|
|
|
:checked="source.enabled ? true : false" |
|
|
|
|
|
|
|
class="cursor-pointer" |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
@change="toggleBase(source, $event)" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</a-tooltip> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="ds-table-col ds-table-name font-medium w-full"> |
|
|
|
|
|
|
|
<div v-if="source.is_meta || source.is_local">-</div> |
|
|
|
|
|
|
|
<span v-else class="truncate"> |
|
|
|
|
|
|
|
{{ source.is_meta || source.is_local ? $t('general.base') : source.alias }} |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="ds-table-col ds-table-type"> |
|
|
|
<div class="ds-table-col ds-table-type"> |
|
|
|
<div class="flex items-center gap-2"> |
|
|
|
<div class="flex items-center gap-2"> |
|
|
|
<GeneralBaseLogo :source-type="source.type" /> |
|
|
|
<GeneralBaseLogo :source-type="source.type" /> |
|
|
|
<span class="text-gray-700 capitalize">{{ source.type }}</span> |
|
|
|
<span class="text-gray-700 capitalize">{{ source.type }}</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="ds-table-col ds-table-actions"> |
|
|
|
<div class="ds-table-col ds-table-actions"> |
|
|
|
<div class="flex items-center gap-2"> |
|
|
|
<div class="flex items-center gap-2"> |
|
|
|
<NcTooltip> |
|
|
|
<NcTooltip> |
|
|
|
<template #title> |
|
|
|
<template #title> |
|
|
|
{{ $t('title.relations') }} |
|
|
|
{{ $t('title.relations') }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<NcButton |
|
|
|
<NcButton |
|
|
|
size="small" |
|
|
|
size="small" |
|
|
|
class="nc-action-btn cursor-pointer outline-0" |
|
|
|
class="nc-action-btn cursor-pointer outline-0" |
|
|
|
type="text" |
|
|
|
type="text" |
|
|
|
data-testid="nc-data-sources-view-erd" |
|
|
|
data-testid="nc-data-sources-view-erd" |
|
|
|
@click="baseAction(source.id, DataSourcesSubTab.ERD)" |
|
|
|
@click="baseAction(source.id, DataSourcesSubTab.ERD)" |
|
|
|
> |
|
|
|
> |
|
|
|
<div class="flex items-center gap-2 text-gray-600"> |
|
|
|
<div class="flex items-center gap-2 text-gray-600"> |
|
|
|
<GeneralIcon icon="erd" class="group-hover:text-accent" /> |
|
|
|
<GeneralIcon icon="erd" class="group-hover:text-accent" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</NcButton> |
|
|
|
</NcButton> |
|
|
|
</NcTooltip> |
|
|
|
</NcTooltip> |
|
|
|
|
|
|
|
<NcTooltip> |
|
|
|
|
|
|
|
<template #title> |
|
|
|
|
|
|
|
{{ $t('labels.uiAcl') }} |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<NcButton |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
type="text" |
|
|
|
|
|
|
|
class="nc-action-btn cursor-pointer outline-0" |
|
|
|
|
|
|
|
data-testid="nc-data-sources-view-ui-acl" |
|
|
|
|
|
|
|
@click="baseAction(source.id, DataSourcesSubTab.UIAcl)" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div class="flex items-center gap-2 text-gray-600"> |
|
|
|
|
|
|
|
<GeneralIcon icon="acl" class="group-hover:text-accent" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</NcButton> |
|
|
|
|
|
|
|
</NcTooltip> |
|
|
|
|
|
|
|
<NcTooltip v-if="!isEeUI"> |
|
|
|
|
|
|
|
<template #title> |
|
|
|
|
|
|
|
{{ $t('title.audit') }} |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<NcButton |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
class="nc-action-btn cursor-pointer outline-0" |
|
|
|
|
|
|
|
type="text" |
|
|
|
|
|
|
|
data-testid="nc-data-sources-view-audit" |
|
|
|
|
|
|
|
@click="baseAction(source.id, DataSourcesSubTab.Audit)" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div class="flex items-center gap-2 text-gray-600"> |
|
|
|
|
|
|
|
<GeneralIcon icon="book" class="group-hover:text-accent" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</NcButton> |
|
|
|
|
|
|
|
</NcTooltip> |
|
|
|
|
|
|
|
<NcTooltip> |
|
|
|
|
|
|
|
<template #title> |
|
|
|
|
|
|
|
{{ $t('tooltip.metaSync') }} |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<NcButton |
|
|
|
|
|
|
|
v-if="!source.is_meta && !source.is_local" |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
type="text" |
|
|
|
|
|
|
|
data-testid="nc-data-sources-view-meta-sync" |
|
|
|
|
|
|
|
class="nc-action-btn cursor-pointer outline-0" |
|
|
|
|
|
|
|
@click="baseAction(source.id, DataSourcesSubTab.Metadata)" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div class="flex items-center gap-2 text-gray-600"> |
|
|
|
|
|
|
|
<GeneralIcon icon="sync" class="group-hover:text-accent" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</NcButton> |
|
|
|
|
|
|
|
</NcTooltip> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="ds-table-col ds-table-crud justify-end gap-x-1"> |
|
|
|
<NcTooltip> |
|
|
|
<NcTooltip> |
|
|
|
<template #title> |
|
|
|
<template #title> |
|
|
|
{{ $t('labels.uiAcl') }} |
|
|
|
{{ $t('general.edit') }} |
|
|
|
</template> |
|
|
|
|
|
|
|
<NcButton |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
type="text" |
|
|
|
|
|
|
|
class="nc-action-btn cursor-pointer outline-0" |
|
|
|
|
|
|
|
data-testid="nc-data-sources-view-ui-acl" |
|
|
|
|
|
|
|
@click="baseAction(source.id, DataSourcesSubTab.UIAcl)" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div class="flex items-center gap-2 text-gray-600"> |
|
|
|
|
|
|
|
<GeneralIcon icon="acl" class="group-hover:text-accent" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</NcButton> |
|
|
|
|
|
|
|
</NcTooltip> |
|
|
|
|
|
|
|
<NcTooltip v-if="!isEeUI"> |
|
|
|
|
|
|
|
<template #title> |
|
|
|
|
|
|
|
{{ $t('title.audit') }} |
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<NcButton |
|
|
|
<NcButton |
|
|
|
|
|
|
|
v-if="!source.is_meta && !source.is_local" |
|
|
|
size="small" |
|
|
|
size="small" |
|
|
|
class="nc-action-btn cursor-pointer outline-0" |
|
|
|
class="nc-action-btn cursor-pointer outline-0 !w-8 !px-1 !rounded-lg" |
|
|
|
type="text" |
|
|
|
type="text" |
|
|
|
data-testid="nc-data-sources-view-audit" |
|
|
|
@click="baseAction(source.id, DataSourcesSubTab.Edit)" |
|
|
|
@click="baseAction(source.id, DataSourcesSubTab.Audit)" |
|
|
|
|
|
|
|
> |
|
|
|
> |
|
|
|
<div class="flex items-center gap-2 text-gray-600"> |
|
|
|
<GeneralIcon icon="edit" class="text-gray-600" /> |
|
|
|
<GeneralIcon icon="book" class="group-hover:text-accent" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</NcButton> |
|
|
|
</NcButton> |
|
|
|
</NcTooltip> |
|
|
|
</NcTooltip> |
|
|
|
<NcTooltip> |
|
|
|
<NcTooltip> |
|
|
|
<template #title> |
|
|
|
<template #title> |
|
|
|
{{ $t('tooltip.metaSync') }} |
|
|
|
{{ $t('general.remove') }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<NcButton |
|
|
|
<NcButton |
|
|
|
v-if="!source.is_meta && !source.is_local" |
|
|
|
v-if="!source.is_meta && !source.is_local" |
|
|
|
size="small" |
|
|
|
size="small" |
|
|
|
|
|
|
|
class="nc-action-btn cursor-pointer outline-0 !w-8 !px-1 !rounded-lg" |
|
|
|
type="text" |
|
|
|
type="text" |
|
|
|
data-testid="nc-data-sources-view-meta-sync" |
|
|
|
@click="openDeleteBase(source)" |
|
|
|
class="nc-action-btn cursor-pointer outline-0" |
|
|
|
|
|
|
|
@click="baseAction(source.id, DataSourcesSubTab.Metadata)" |
|
|
|
|
|
|
|
> |
|
|
|
> |
|
|
|
<div class="flex items-center gap-2 text-gray-600"> |
|
|
|
<GeneralIcon icon="delete" class="text-red-500" /> |
|
|
|
<GeneralIcon icon="sync" class="group-hover:text-accent" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</NcButton> |
|
|
|
</NcButton> |
|
|
|
</NcTooltip> |
|
|
|
</NcTooltip> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="ds-table-col ds-table-crud justify-end gap-x-1"> |
|
|
|
</template> |
|
|
|
<NcTooltip> |
|
|
|
</Draggable> |
|
|
|
<template #title> |
|
|
|
</div> |
|
|
|
{{ $t('general.edit') }} |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<NcButton |
|
|
|
|
|
|
|
v-if="!source.is_meta && !source.is_local" |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
class="nc-action-btn cursor-pointer outline-0 !w-8 !px-1 !rounded-lg" |
|
|
|
|
|
|
|
type="text" |
|
|
|
|
|
|
|
@click="baseAction(source.id, DataSourcesSubTab.Edit)" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<GeneralIcon icon="edit" class="text-gray-600" /> |
|
|
|
|
|
|
|
</NcButton> |
|
|
|
|
|
|
|
</NcTooltip> |
|
|
|
|
|
|
|
<NcTooltip> |
|
|
|
|
|
|
|
<template #title> |
|
|
|
|
|
|
|
{{ $t('general.remove') }} |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<NcButton |
|
|
|
|
|
|
|
v-if="!source.is_meta && !source.is_local" |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
class="nc-action-btn cursor-pointer outline-0 !w-8 !px-1 !rounded-lg" |
|
|
|
|
|
|
|
type="text" |
|
|
|
|
|
|
|
@click="openDeleteBase(source)" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<GeneralIcon icon="delete" class="text-red-500" /> |
|
|
|
|
|
|
|
</NcButton> |
|
|
|
|
|
|
|
</NcTooltip> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</Draggable> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<LazyDashboardSettingsDataSourcesCreateBase |
|
|
|
|
|
|
|
v-model:open="isNewBaseModalOpen" |
|
|
|
|
|
|
|
:connection-type="clientType" |
|
|
|
|
|
|
|
@source-created="loadBases(true)" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<GeneralModal v-model:visible="isErdModalOpen" size="large"> |
|
|
|
|
|
|
|
<div class="h-[80vh]"> |
|
|
|
|
|
|
|
<LazyDashboardSettingsErd :source-id="activeBaseId" :show-all-columns="false" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</GeneralModal> |
|
|
|
|
|
|
|
<GeneralModal v-model:visible="isMetaDataModal" size="medium"> |
|
|
|
|
|
|
|
<div class="p-6"> |
|
|
|
|
|
|
|
<LazyDashboardSettingsMetadata :source-id="activeBaseId" @source-synced="loadBases(true)" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</GeneralModal> |
|
|
|
|
|
|
|
<GeneralModal v-model:visible="isUIAclModalOpen" class="!w-[60rem]"> |
|
|
|
|
|
|
|
<div class="p-6"> |
|
|
|
|
|
|
|
<LazyDashboardSettingsUIAcl :source-id="activeBaseId" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</GeneralModal> |
|
|
|
|
|
|
|
<GeneralModal v-model:visible="isEditBaseModalOpen" closable :mask-closable="false" size="medium"> |
|
|
|
|
|
|
|
<div class="p-6"> |
|
|
|
|
|
|
|
<LazyDashboardSettingsDataSourcesEditBase |
|
|
|
|
|
|
|
:source-id="activeBaseId" |
|
|
|
|
|
|
|
@source-updated="loadBases(true)" |
|
|
|
|
|
|
|
@close="isEditBaseModalOpen = false" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</GeneralModal> |
|
|
|
|
|
|
|
<GeneralModal v-model:visible="isBaseAuditModalOpen" class="!w-[70rem]"> |
|
|
|
|
|
|
|
<div class="p-6"> |
|
|
|
|
|
|
|
<LazyDashboardSettingsBaseAudit :source-id="activeBaseId" @close="isBaseAuditModalOpen = false" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</GeneralModal> |
|
|
|
<LazyDashboardSettingsDataSourcesCreateBase |
|
|
|
<GeneralDeleteModal |
|
|
|
v-model:open="isNewBaseModalOpen" |
|
|
|
v-model:visible="isDeleteBaseModalOpen" |
|
|
|
:connection-type="clientType" |
|
|
|
:entity-name="$t('general.datasource')" |
|
|
|
@source-created="loadBases(true)" |
|
|
|
:on-delete="deleteBase" |
|
|
|
/> |
|
|
|
:delete-label="$t('general.remove')" |
|
|
|
<GeneralModal v-model:visible="isErdModalOpen" size="large"> |
|
|
|
> |
|
|
|
<div class="h-[80vh]"> |
|
|
|
<template #entity-preview> |
|
|
|
<LazyDashboardSettingsErd :source-id="activeBaseId" :show-all-columns="false" /> |
|
|
|
<div v-if="toBeDeletedBase" class="flex flex-row items-center py-2 px-3.25 bg-gray-50 rounded-lg text-gray-700 mb-4"> |
|
|
|
|
|
|
|
<GeneralBaseLogo :source-type="toBeDeletedBase.type" /> |
|
|
|
|
|
|
|
<div |
|
|
|
|
|
|
|
class="capitalize text-ellipsis overflow-hidden select-none w-full pl-3" |
|
|
|
|
|
|
|
:style="{ wordBreak: 'keep-all', whiteSpace: 'nowrap', display: 'inline' }" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{{ toBeDeletedBase.alias }} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</GeneralModal> |
|
|
|
</GeneralDeleteModal> |
|
|
|
<GeneralModal v-model:visible="isMetaDataModal" size="medium"> |
|
|
|
|
|
|
|
<div class="p-6"> |
|
|
|
|
|
|
|
<LazyDashboardSettingsMetadata :source-id="activeBaseId" @source-synced="loadBases(true)" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</GeneralModal> |
|
|
|
|
|
|
|
<GeneralModal v-model:visible="isUIAclModalOpen" class="!w-[60rem]"> |
|
|
|
|
|
|
|
<div class="p-6"> |
|
|
|
|
|
|
|
<LazyDashboardSettingsUIAcl :source-id="activeBaseId" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</GeneralModal> |
|
|
|
|
|
|
|
<GeneralModal v-model:visible="isEditBaseModalOpen" closable :mask-closable="false" size="medium"> |
|
|
|
|
|
|
|
<div class="p-6"> |
|
|
|
|
|
|
|
<LazyDashboardSettingsDataSourcesEditBase |
|
|
|
|
|
|
|
:source-id="activeBaseId" |
|
|
|
|
|
|
|
@source-updated="loadBases(true)" |
|
|
|
|
|
|
|
@close="isEditBaseModalOpen = false" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</GeneralModal> |
|
|
|
|
|
|
|
<GeneralModal v-model:visible="isBaseAuditModalOpen" class="!w-[70rem]"> |
|
|
|
|
|
|
|
<div class="p-6"> |
|
|
|
|
|
|
|
<LazyDashboardSettingsBaseAudit :source-id="activeBaseId" @close="isBaseAuditModalOpen = false" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</GeneralModal> |
|
|
|
|
|
|
|
<GeneralDeleteModal |
|
|
|
|
|
|
|
v-model:visible="isDeleteBaseModalOpen" |
|
|
|
|
|
|
|
:entity-name="$t('general.datasource')" |
|
|
|
|
|
|
|
:on-delete="deleteBase" |
|
|
|
|
|
|
|
:delete-label="$t('general.remove')" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<template #entity-preview> |
|
|
|
|
|
|
|
<div v-if="toBeDeletedBase" class="flex flex-row items-center py-2 px-3.25 bg-gray-50 rounded-lg text-gray-700 mb-4"> |
|
|
|
|
|
|
|
<GeneralBaseLogo :source-type="toBeDeletedBase.type" /> |
|
|
|
|
|
|
|
<div |
|
|
|
|
|
|
|
class="capitalize text-ellipsis overflow-hidden select-none w-full pl-3" |
|
|
|
|
|
|
|
:style="{ wordBreak: 'keep-all', whiteSpace: 'nowrap', display: 'inline' }" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{{ toBeDeletedBase.alias }} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</GeneralDeleteModal> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|