diff --git a/packages/nc-gui/components/dlg/AirtableImport.vue b/packages/nc-gui/components/dlg/AirtableImport.vue index 69dc489369..0ab6bc3438 100644 --- a/packages/nc-gui/components/dlg/AirtableImport.vue +++ b/packages/nc-gui/components/dlg/AirtableImport.vue @@ -20,7 +20,9 @@ const emit = defineEmits(['update:modelValue', 'back']) const { $api } = useNuxtApp() -const { $poller } = useNuxtApp() +const baseURL = $api.instance.defaults.baseURL + +const { $state, $poller } = useNuxtApp() const workspace = useWorkspace() @@ -48,6 +50,8 @@ const goBack = ref(false) const listeningForUpdates = ref(false) +const hasWarning = ref(false) + const syncSource = ref({ id: '', type: 'Airtable', @@ -80,6 +84,10 @@ const customSourceId = computed(() => { const onLog = (data: { message: string }) => { progressRef.value?.pushProgress(data.message, 'progress') lastProgress.value = { msg: data.message, status: 'progress' } + + if (data.message.startsWith('WARNING: ')) { + hasWarning.value = true + } } const onStatus = async (status: JobStatus, data?: any) => { @@ -480,9 +488,12 @@ const collapseKey = ref('') :description="$t('msg.error.anErrorOccuredWhileAirtableBaseImport')" /> -
- - {{ $t('msg.airtableImportSuccess') }} +
+
+ + {{ $t('msg.airtableImportSuccess') }} +
+
{{ $t('msg.airtableImportWarning') }}
diff --git a/packages/nc-gui/components/general/ProgressPanel.vue b/packages/nc-gui/components/general/ProgressPanel.vue index 6c718898ed..159f9046f4 100644 --- a/packages/nc-gui/components/general/ProgressPanel.vue +++ b/packages/nc-gui/components/general/ProgressPanel.vue @@ -14,9 +14,12 @@ const scrollToBottom = () => { container.scrollTop = container.scrollHeight } -const pushProgress = (message: string, status: JobStatus | 'progress') => { +const pushProgress = (message: string, status: JobStatus | 'progress' | 'warning') => { if (!message?.trim()) return - progress.value.push({ msg: message, status }) + progress.value.push({ + msg: message, + status: status === JobStatus.FAILED ? JobStatus.FAILED : message.startsWith('WARNING: ') ? 'warning' : status, + }) if (autoScroll.value) { nextTick(scrollToBottom) @@ -88,7 +91,11 @@ onMounted(() => { {{ msg }} +
+ + {{ msg }} +
diff --git a/packages/nc-gui/lang/en.json b/packages/nc-gui/lang/en.json index 5e5c74da02..88eaa48069 100644 --- a/packages/nc-gui/lang/en.json +++ b/packages/nc-gui/lang/en.json @@ -2251,6 +2251,7 @@ "urlFilterError": "Invalid URL filter. Ignored as it could not be applied.", "dropYourDocHere": "Drop your document here", "airtableImportSuccess": "Successfully imported from Airtable Base.", + "airtableImportWarning": "Note: Import completed with warnings. Please review the details for more information.", "nocoDBImportSuccess": "Successfully imported from NocoDB Base.", "deleteAccountPermanently": "Delete your account permanently", "learnMore": "Learn more", @@ -2478,7 +2479,7 @@ "shareBasePrivate": "Generate publicly shareable readonly base", "shareBasePublic": "Anyone on the internet with this link can view", "noSandboxesFound": "No apps found in the marketplace", - "userInviteNoSMTP": "Looks like you have not configured mailer yet! Please copy above invite link and send it to", + "userInviteNoSMTP": "Looks like you have not configured mailer yet! Please copy above invite link and send it to", "dragDropHide": "Drag and drop fields here to hide", "formInput": "Enter form input label", "formHelpText": "Add some help text", diff --git a/packages/nc-gui/store/base.ts b/packages/nc-gui/store/base.ts index 9b03d5883a..3f2458b55b 100644 --- a/packages/nc-gui/store/base.ts +++ b/packages/nc-gui/store/base.ts @@ -312,6 +312,7 @@ export const useBase = defineStore('baseStore', () => { sources, tables, baseId, + loadRoles, loadProject, updateProject, loadTables, diff --git a/tests/playwright/pages/Dashboard/ExpandedForm/index.ts b/tests/playwright/pages/Dashboard/ExpandedForm/index.ts index 087dcbfcba..1134e1b45c 100644 --- a/tests/playwright/pages/Dashboard/ExpandedForm/index.ts +++ b/tests/playwright/pages/Dashboard/ExpandedForm/index.ts @@ -232,16 +232,16 @@ export class ExpandedFormPage extends BasePage { await this.btn_moreActions.click(); } + if (!isEE()) { + await expect(this.rootPage.getByTestId('nc-expanded-form-reload')).toBeVisible(); + } else { + await expect(this.rootPage.getByTestId('nc-expanded-form-reload')).toHaveCount(0); + } + if (role === 'owner' || role === 'editor' || role === 'creator') { - if (!isEE()) { - await expect(this.rootPage.getByTestId('nc-expanded-form-reload')).toBeVisible(); - } else { - await expect(this.rootPage.getByTestId('nc-expanded-form-reload')).toHaveCount(0); - } await expect(this.rootPage.getByTestId('nc-expanded-form-duplicate')).toBeVisible(); await expect(this.rootPage.getByTestId('nc-expanded-form-delete')).toBeVisible(); } else { - await expect(this.rootPage.getByTestId('nc-expanded-form-reload')).toHaveCount(0); await expect(this.rootPage.getByTestId('nc-expanded-form-duplicate')).toHaveCount(0); await expect(this.rootPage.getByTestId('nc-expanded-form-delete')).toHaveCount(0); }