多维表格
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

305 lines
8.6 KiB

Feat - Airtable import (#2048) * wip: add job manager Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: job manager impl Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: migrations Signed-off-by: Pranav C <pranavxc@gmail.com> * wip Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: data sync Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: sync source creation Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: api integration Signed-off-by: Pranav C <pranavxc@gmail.com> * chore: remove unused files Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: update to work with project id, handle exceptions Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: show more progress details Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: extract id from source creation api response Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: bring latest changes Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: column creation and data sync Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: ui improvements Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: bring changes from sync branch Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: avoid opening additional socket Signed-off-by: Pranav C <pranavxc@gmail.com> * chore: update package-lock Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: wait until data and LTAR insertion completes Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: load table list after sync completes Signed-off-by: Pranav C <pranavxc@gmail.com> * enhancement: add navigation back to dashboard Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: column order as in base, column visibility clean-up Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * refactor: ui updates Signed-off-by: Pranav C <pranavxc@gmail.com> * enhancement: load first table after sync Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: common routine to sanitize column names Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * enhancement: accept both hared base id / url Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: sanitize table name Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * sync: fetch improvements Signed-off-by: mertmit <mertmit99@gmail.com> * sync: fix nestedLookup Signed-off-by: mertmit <mertmit99@gmail.com> * fix: dateTime datatype support Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * enhancement: add validation for credential form Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: migrate default values if configured Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * fix: include support for created time, modified time Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * fix: rollup column function map Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * feat: log column not migrated info Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * feat: fetch template Signed-off-by: mertmit <mertmit99@gmail.com> * fix: move record id & hash to bottom of list Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * refactor: add import from airtable under project tabs menu Signed-off-by: Pranav C <pranavxc@gmail.com> Co-authored-by: Raju Udava <86527202+dstala@users.noreply.github.com> Co-authored-by: mertmit <mertmit99@gmail.com>
3 years ago
<template>
<v-dialog v-model="airtableModal" max-width="min(600px, 90%)">
<v-card class="nc-import-card h-100">
<v-toolbar class="elevation-0 align-center" height="68">
<h3 class="mt-2">
{{ $t('title.importFromAirtable') }}
Feat - Airtable import (#2048) * wip: add job manager Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: job manager impl Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: migrations Signed-off-by: Pranav C <pranavxc@gmail.com> * wip Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: data sync Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: sync source creation Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: api integration Signed-off-by: Pranav C <pranavxc@gmail.com> * chore: remove unused files Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: update to work with project id, handle exceptions Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: show more progress details Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: extract id from source creation api response Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: bring latest changes Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: column creation and data sync Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: ui improvements Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: bring changes from sync branch Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: avoid opening additional socket Signed-off-by: Pranav C <pranavxc@gmail.com> * chore: update package-lock Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: wait until data and LTAR insertion completes Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: load table list after sync completes Signed-off-by: Pranav C <pranavxc@gmail.com> * enhancement: add navigation back to dashboard Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: column order as in base, column visibility clean-up Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * refactor: ui updates Signed-off-by: Pranav C <pranavxc@gmail.com> * enhancement: load first table after sync Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: common routine to sanitize column names Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * enhancement: accept both hared base id / url Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: sanitize table name Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * sync: fetch improvements Signed-off-by: mertmit <mertmit99@gmail.com> * sync: fix nestedLookup Signed-off-by: mertmit <mertmit99@gmail.com> * fix: dateTime datatype support Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * enhancement: add validation for credential form Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: migrate default values if configured Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * fix: include support for created time, modified time Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * fix: rollup column function map Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * feat: log column not migrated info Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * feat: fetch template Signed-off-by: mertmit <mertmit99@gmail.com> * fix: move record id & hash to bottom of list Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * refactor: add import from airtable under project tabs menu Signed-off-by: Pranav C <pranavxc@gmail.com> Co-authored-by: Raju Udava <86527202+dstala@users.noreply.github.com> Co-authored-by: mertmit <mertmit99@gmail.com>
3 years ago
</h3>
<div v-t="['c:airtable-import:turbo-mode']" class="ml-2 mt-3 title pointer" @click="enableTurbo">
🚀
</div>
Feat - Airtable import (#2048) * wip: add job manager Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: job manager impl Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: migrations Signed-off-by: Pranav C <pranavxc@gmail.com> * wip Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: data sync Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: sync source creation Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: api integration Signed-off-by: Pranav C <pranavxc@gmail.com> * chore: remove unused files Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: update to work with project id, handle exceptions Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: show more progress details Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: extract id from source creation api response Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: bring latest changes Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: column creation and data sync Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: ui improvements Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: bring changes from sync branch Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: avoid opening additional socket Signed-off-by: Pranav C <pranavxc@gmail.com> * chore: update package-lock Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: wait until data and LTAR insertion completes Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: load table list after sync completes Signed-off-by: Pranav C <pranavxc@gmail.com> * enhancement: add navigation back to dashboard Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: column order as in base, column visibility clean-up Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * refactor: ui updates Signed-off-by: Pranav C <pranavxc@gmail.com> * enhancement: load first table after sync Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: common routine to sanitize column names Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * enhancement: accept both hared base id / url Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: sanitize table name Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * sync: fetch improvements Signed-off-by: mertmit <mertmit99@gmail.com> * sync: fix nestedLookup Signed-off-by: mertmit <mertmit99@gmail.com> * fix: dateTime datatype support Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * enhancement: add validation for credential form Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: migrate default values if configured Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * fix: include support for created time, modified time Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * fix: rollup column function map Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * feat: log column not migrated info Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * feat: fetch template Signed-off-by: mertmit <mertmit99@gmail.com> * fix: move record id & hash to bottom of list Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * refactor: add import from airtable under project tabs menu Signed-off-by: Pranav C <pranavxc@gmail.com> Co-authored-by: Raju Udava <86527202+dstala@users.noreply.github.com> Co-authored-by: mertmit <mertmit99@gmail.com>
3 years ago
<v-spacer />
</v-toolbar>
<v-divider />
Feat - Airtable import (#2048) * wip: add job manager Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: job manager impl Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: migrations Signed-off-by: Pranav C <pranavxc@gmail.com> * wip Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: data sync Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: sync source creation Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: api integration Signed-off-by: Pranav C <pranavxc@gmail.com> * chore: remove unused files Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: update to work with project id, handle exceptions Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: show more progress details Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: extract id from source creation api response Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: bring latest changes Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: column creation and data sync Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: ui improvements Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: bring changes from sync branch Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: avoid opening additional socket Signed-off-by: Pranav C <pranavxc@gmail.com> * chore: update package-lock Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: wait until data and LTAR insertion completes Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: load table list after sync completes Signed-off-by: Pranav C <pranavxc@gmail.com> * enhancement: add navigation back to dashboard Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: column order as in base, column visibility clean-up Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * refactor: ui updates Signed-off-by: Pranav C <pranavxc@gmail.com> * enhancement: load first table after sync Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: common routine to sanitize column names Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * enhancement: accept both hared base id / url Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: sanitize table name Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * sync: fetch improvements Signed-off-by: mertmit <mertmit99@gmail.com> * sync: fix nestedLookup Signed-off-by: mertmit <mertmit99@gmail.com> * fix: dateTime datatype support Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * enhancement: add validation for credential form Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: migrate default values if configured Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * fix: include support for created time, modified time Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * fix: rollup column function map Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * feat: log column not migrated info Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * feat: fetch template Signed-off-by: mertmit <mertmit99@gmail.com> * fix: move record id & hash to bottom of list Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * refactor: add import from airtable under project tabs menu Signed-off-by: Pranav C <pranavxc@gmail.com> Co-authored-by: Raju Udava <86527202+dstala@users.noreply.github.com> Co-authored-by: mertmit <mertmit99@gmail.com>
3 years ago
<div class="h-100" style="width: 100%">
<div>
<v-card v-if="step === 1" class="py-6 elevation-0" height="500">
<div class="d-flex flex-column justify-center align-center pt-2 pb-6">
<span class="subtitle-1 font-weight-medium" @dblclick="$set(syncSource.details,'syncViews',true)">
Credentials
</span>
<a href="https://docs.nocodb.com/setup-and-usages/import-airtable-to-sql-database-within-a-minute-for-free" class="caption grey--text" target="_blank">Where to find this?</a>
</div>
Feat - Airtable import (#2048) * wip: add job manager Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: job manager impl Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: migrations Signed-off-by: Pranav C <pranavxc@gmail.com> * wip Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: data sync Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: sync source creation Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: api integration Signed-off-by: Pranav C <pranavxc@gmail.com> * chore: remove unused files Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: update to work with project id, handle exceptions Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: show more progress details Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: extract id from source creation api response Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: bring latest changes Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: column creation and data sync Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: ui improvements Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: bring changes from sync branch Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: avoid opening additional socket Signed-off-by: Pranav C <pranavxc@gmail.com> * chore: update package-lock Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: wait until data and LTAR insertion completes Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: load table list after sync completes Signed-off-by: Pranav C <pranavxc@gmail.com> * enhancement: add navigation back to dashboard Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: column order as in base, column visibility clean-up Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * refactor: ui updates Signed-off-by: Pranav C <pranavxc@gmail.com> * enhancement: load first table after sync Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: common routine to sanitize column names Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * enhancement: accept both hared base id / url Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: sanitize table name Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * sync: fetch improvements Signed-off-by: mertmit <mertmit99@gmail.com> * sync: fix nestedLookup Signed-off-by: mertmit <mertmit99@gmail.com> * fix: dateTime datatype support Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * enhancement: add validation for credential form Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: migrate default values if configured Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * fix: include support for created time, modified time Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * fix: rollup column function map Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * feat: log column not migrated info Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * feat: fetch template Signed-off-by: mertmit <mertmit99@gmail.com> * fix: move record id & hash to bottom of list Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * refactor: add import from airtable under project tabs menu Signed-off-by: Pranav C <pranavxc@gmail.com> Co-authored-by: Raju Udava <86527202+dstala@users.noreply.github.com> Co-authored-by: mertmit <mertmit99@gmail.com>
3 years ago
<v-form v-model="valid">
<div v-if="syncSource" class="px-10 mt-1 mx-auto" style="max-width: 400px">
<v-text-field
v-model="syncSource.details.apiKey"
outlined
dense
label="Api Key"
class="caption"
:type="isPasswordVisible ? 'text':'password'"
Feat - Airtable import (#2048) * wip: add job manager Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: job manager impl Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: migrations Signed-off-by: Pranav C <pranavxc@gmail.com> * wip Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: data sync Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: sync source creation Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: api integration Signed-off-by: Pranav C <pranavxc@gmail.com> * chore: remove unused files Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: update to work with project id, handle exceptions Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: show more progress details Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: extract id from source creation api response Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: bring latest changes Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: column creation and data sync Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: ui improvements Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: bring changes from sync branch Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: avoid opening additional socket Signed-off-by: Pranav C <pranavxc@gmail.com> * chore: update package-lock Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: wait until data and LTAR insertion completes Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: load table list after sync completes Signed-off-by: Pranav C <pranavxc@gmail.com> * enhancement: add navigation back to dashboard Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: column order as in base, column visibility clean-up Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * refactor: ui updates Signed-off-by: Pranav C <pranavxc@gmail.com> * enhancement: load first table after sync Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: common routine to sanitize column names Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * enhancement: accept both hared base id / url Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: sanitize table name Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * sync: fetch improvements Signed-off-by: mertmit <mertmit99@gmail.com> * sync: fix nestedLookup Signed-off-by: mertmit <mertmit99@gmail.com> * fix: dateTime datatype support Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * enhancement: add validation for credential form Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: migrate default values if configured Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * fix: include support for created time, modified time Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * fix: rollup column function map Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * feat: log column not migrated info Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * feat: fetch template Signed-off-by: mertmit <mertmit99@gmail.com> * fix: move record id & hash to bottom of list Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * refactor: add import from airtable under project tabs menu Signed-off-by: Pranav C <pranavxc@gmail.com> Co-authored-by: Raju Udava <86527202+dstala@users.noreply.github.com> Co-authored-by: mertmit <mertmit99@gmail.com>
3 years ago
:rules="[v=> !!v || 'Api Key is required']"
>
<template #append="">
<v-icon class="mt-1" small @click="isPasswordVisible = !isPasswordVisible">
{{ isPasswordVisible ? 'visibility_off' : 'visibility' }}
</v-icon>
</template>
</v-text-field>
Feat - Airtable import (#2048) * wip: add job manager Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: job manager impl Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: migrations Signed-off-by: Pranav C <pranavxc@gmail.com> * wip Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: data sync Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: sync source creation Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: api integration Signed-off-by: Pranav C <pranavxc@gmail.com> * chore: remove unused files Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: update to work with project id, handle exceptions Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: show more progress details Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: extract id from source creation api response Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: bring latest changes Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: column creation and data sync Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: ui improvements Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: bring changes from sync branch Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: avoid opening additional socket Signed-off-by: Pranav C <pranavxc@gmail.com> * chore: update package-lock Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: wait until data and LTAR insertion completes Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: load table list after sync completes Signed-off-by: Pranav C <pranavxc@gmail.com> * enhancement: add navigation back to dashboard Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: column order as in base, column visibility clean-up Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * refactor: ui updates Signed-off-by: Pranav C <pranavxc@gmail.com> * enhancement: load first table after sync Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: common routine to sanitize column names Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * enhancement: accept both hared base id / url Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: sanitize table name Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * sync: fetch improvements Signed-off-by: mertmit <mertmit99@gmail.com> * sync: fix nestedLookup Signed-off-by: mertmit <mertmit99@gmail.com> * fix: dateTime datatype support Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * enhancement: add validation for credential form Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: migrate default values if configured Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * fix: include support for created time, modified time Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * fix: rollup column function map Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * feat: log column not migrated info Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * feat: fetch template Signed-off-by: mertmit <mertmit99@gmail.com> * fix: move record id & hash to bottom of list Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * refactor: add import from airtable under project tabs menu Signed-off-by: Pranav C <pranavxc@gmail.com> Co-authored-by: Raju Udava <86527202+dstala@users.noreply.github.com> Co-authored-by: mertmit <mertmit99@gmail.com>
3 years ago
<v-text-field
v-model="syncSourceUrlOrId"
outlined
dense
label="Shared Base ID / URL"
class="caption"
:rules="[(v) => !!v || 'Shared Base ID / URL is required']"
/>
</div>
</v-form> <v-card-actions class="justify-center pb-6">
<v-btn
v-t="['c:sync-airtable:save-and-sync']"
:disabled="!valid"
large
color="primary"
@click="saveAndSync"
>
Import
Feat - Airtable import (#2048) * wip: add job manager Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: job manager impl Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: migrations Signed-off-by: Pranav C <pranavxc@gmail.com> * wip Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: data sync Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: sync source creation Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: api integration Signed-off-by: Pranav C <pranavxc@gmail.com> * chore: remove unused files Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: update to work with project id, handle exceptions Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: show more progress details Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: extract id from source creation api response Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: bring latest changes Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: column creation and data sync Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: ui improvements Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: bring changes from sync branch Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: avoid opening additional socket Signed-off-by: Pranav C <pranavxc@gmail.com> * chore: update package-lock Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: wait until data and LTAR insertion completes Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: load table list after sync completes Signed-off-by: Pranav C <pranavxc@gmail.com> * enhancement: add navigation back to dashboard Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: column order as in base, column visibility clean-up Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * refactor: ui updates Signed-off-by: Pranav C <pranavxc@gmail.com> * enhancement: load first table after sync Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: common routine to sanitize column names Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * enhancement: accept both hared base id / url Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: sanitize table name Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * sync: fetch improvements Signed-off-by: mertmit <mertmit99@gmail.com> * sync: fix nestedLookup Signed-off-by: mertmit <mertmit99@gmail.com> * fix: dateTime datatype support Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * enhancement: add validation for credential form Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: migrate default values if configured Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * fix: include support for created time, modified time Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * fix: rollup column function map Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * feat: log column not migrated info Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * feat: fetch template Signed-off-by: mertmit <mertmit99@gmail.com> * fix: move record id & hash to bottom of list Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * refactor: add import from airtable under project tabs menu Signed-off-by: Pranav C <pranavxc@gmail.com> Co-authored-by: Raju Udava <86527202+dstala@users.noreply.github.com> Co-authored-by: mertmit <mertmit99@gmail.com>
3 years ago
</v-btn>
</v-card-actions>
</v-card>
<v-card
v-if="step === 2"
class="pb-4 mt-4 elevation-0"
Feat - Airtable import (#2048) * wip: add job manager Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: job manager impl Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: migrations Signed-off-by: Pranav C <pranavxc@gmail.com> * wip Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: data sync Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: sync source creation Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: api integration Signed-off-by: Pranav C <pranavxc@gmail.com> * chore: remove unused files Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: update to work with project id, handle exceptions Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: show more progress details Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: extract id from source creation api response Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: bring latest changes Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: column creation and data sync Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: ui improvements Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: bring changes from sync branch Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: avoid opening additional socket Signed-off-by: Pranav C <pranavxc@gmail.com> * chore: update package-lock Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: wait until data and LTAR insertion completes Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: load table list after sync completes Signed-off-by: Pranav C <pranavxc@gmail.com> * enhancement: add navigation back to dashboard Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: column order as in base, column visibility clean-up Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * refactor: ui updates Signed-off-by: Pranav C <pranavxc@gmail.com> * enhancement: load first table after sync Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: common routine to sanitize column names Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * enhancement: accept both hared base id / url Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: sanitize table name Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * sync: fetch improvements Signed-off-by: mertmit <mertmit99@gmail.com> * sync: fix nestedLookup Signed-off-by: mertmit <mertmit99@gmail.com> * fix: dateTime datatype support Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * enhancement: add validation for credential form Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: migrate default values if configured Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * fix: include support for created time, modified time Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * fix: rollup column function map Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * feat: log column not migrated info Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * feat: fetch template Signed-off-by: mertmit <mertmit99@gmail.com> * fix: move record id & hash to bottom of list Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * refactor: add import from airtable under project tabs menu Signed-off-by: Pranav C <pranavxc@gmail.com> Co-authored-by: Raju Udava <86527202+dstala@users.noreply.github.com> Co-authored-by: mertmit <mertmit99@gmail.com>
3 years ago
>
<v-card-title class=" justify-center">
<span class="subtitle-1 font-weight-medium">Logs</span>
</v-card-title>
Feat - Airtable import (#2048) * wip: add job manager Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: job manager impl Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: migrations Signed-off-by: Pranav C <pranavxc@gmail.com> * wip Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: data sync Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: sync source creation Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: api integration Signed-off-by: Pranav C <pranavxc@gmail.com> * chore: remove unused files Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: update to work with project id, handle exceptions Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: show more progress details Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: extract id from source creation api response Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: bring latest changes Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: column creation and data sync Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: ui improvements Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: bring changes from sync branch Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: avoid opening additional socket Signed-off-by: Pranav C <pranavxc@gmail.com> * chore: update package-lock Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: wait until data and LTAR insertion completes Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: load table list after sync completes Signed-off-by: Pranav C <pranavxc@gmail.com> * enhancement: add navigation back to dashboard Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: column order as in base, column visibility clean-up Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * refactor: ui updates Signed-off-by: Pranav C <pranavxc@gmail.com> * enhancement: load first table after sync Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: common routine to sanitize column names Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * enhancement: accept both hared base id / url Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: sanitize table name Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * sync: fetch improvements Signed-off-by: mertmit <mertmit99@gmail.com> * sync: fix nestedLookup Signed-off-by: mertmit <mertmit99@gmail.com> * fix: dateTime datatype support Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * enhancement: add validation for credential form Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: migrate default values if configured Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * fix: include support for created time, modified time Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * fix: rollup column function map Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * feat: log column not migrated info Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * feat: fetch template Signed-off-by: mertmit <mertmit99@gmail.com> * fix: move record id & hash to bottom of list Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * refactor: add import from airtable under project tabs menu Signed-off-by: Pranav C <pranavxc@gmail.com> Co-authored-by: Raju Udava <86527202+dstala@users.noreply.github.com> Co-authored-by: mertmit <mertmit99@gmail.com>
3 years ago
<v-card
ref="log"
dark
class="mt-2 mx-4 pa-4 elevation-0 green--text"
Feat - Airtable import (#2048) * wip: add job manager Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: job manager impl Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: migrations Signed-off-by: Pranav C <pranavxc@gmail.com> * wip Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: data sync Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: sync source creation Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: api integration Signed-off-by: Pranav C <pranavxc@gmail.com> * chore: remove unused files Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: update to work with project id, handle exceptions Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: show more progress details Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: extract id from source creation api response Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: bring latest changes Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: column creation and data sync Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: ui improvements Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: bring changes from sync branch Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: avoid opening additional socket Signed-off-by: Pranav C <pranavxc@gmail.com> * chore: update package-lock Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: wait until data and LTAR insertion completes Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: load table list after sync completes Signed-off-by: Pranav C <pranavxc@gmail.com> * enhancement: add navigation back to dashboard Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: column order as in base, column visibility clean-up Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * refactor: ui updates Signed-off-by: Pranav C <pranavxc@gmail.com> * enhancement: load first table after sync Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: common routine to sanitize column names Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * enhancement: accept both hared base id / url Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: sanitize table name Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * sync: fetch improvements Signed-off-by: mertmit <mertmit99@gmail.com> * sync: fix nestedLookup Signed-off-by: mertmit <mertmit99@gmail.com> * fix: dateTime datatype support Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * enhancement: add validation for credential form Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: migrate default values if configured Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * fix: include support for created time, modified time Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * fix: rollup column function map Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * feat: log column not migrated info Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * feat: fetch template Signed-off-by: mertmit <mertmit99@gmail.com> * fix: move record id & hash to bottom of list Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * refactor: add import from airtable under project tabs menu Signed-off-by: Pranav C <pranavxc@gmail.com> Co-authored-by: Raju Udava <86527202+dstala@users.noreply.github.com> Co-authored-by: mertmit <mertmit99@gmail.com>
3 years ago
height="500"
style="overflow-y: auto"
>
<div v-for="({msg , status}, i) in progress" :key="i">
<v-icon v-if="status==='FAILED'" color="red" size="15">
mdi-close-circle-outline
</v-icon>
<v-icon v-else color="green" size="15">
mdi-currency-usd
</v-icon>
<span class="caption nc-text">{{ msg }}</span>
</div>
<div
v-if="!progress || !progress.length || progress[progress.length-1].status !== 'COMPLETED' && progress[progress.length-1].status !== 'FAILED'"
class=""
>
<v-icon color="green" size="15">
mdi-loading mdi-spin
</v-icon>
<span class="caption nc-text">Syncing
</span>
<!-- <div class="nc-progress" />-->
</div>
</v-card>
<div
v-if="progress && progress.length && progress[progress.length-1].status === 'COMPLETED'"
class="pa-4 pt-8 text-center"
>
<v-btn large color="primary" @click="airtableModal=false">
Go to dashboard
</v-btn>
</div>
</v-card>
</div>
</div>
</v-card>
</v-dialog>
</template>
<script>
import io from 'socket.io-client'
export default {
name: 'ImportFromAirtable',
props: {
value: Boolean
},
data: () => ({
isPasswordVisible: false,
Feat - Airtable import (#2048) * wip: add job manager Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: job manager impl Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: migrations Signed-off-by: Pranav C <pranavxc@gmail.com> * wip Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: data sync Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: sync source creation Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: api integration Signed-off-by: Pranav C <pranavxc@gmail.com> * chore: remove unused files Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: update to work with project id, handle exceptions Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: show more progress details Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: extract id from source creation api response Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: bring latest changes Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: column creation and data sync Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: ui improvements Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: bring changes from sync branch Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: avoid opening additional socket Signed-off-by: Pranav C <pranavxc@gmail.com> * chore: update package-lock Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: wait until data and LTAR insertion completes Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: load table list after sync completes Signed-off-by: Pranav C <pranavxc@gmail.com> * enhancement: add navigation back to dashboard Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: column order as in base, column visibility clean-up Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * refactor: ui updates Signed-off-by: Pranav C <pranavxc@gmail.com> * enhancement: load first table after sync Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: common routine to sanitize column names Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * enhancement: accept both hared base id / url Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: sanitize table name Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * sync: fetch improvements Signed-off-by: mertmit <mertmit99@gmail.com> * sync: fix nestedLookup Signed-off-by: mertmit <mertmit99@gmail.com> * fix: dateTime datatype support Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * enhancement: add validation for credential form Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: migrate default values if configured Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * fix: include support for created time, modified time Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * fix: rollup column function map Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * feat: log column not migrated info Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * feat: fetch template Signed-off-by: mertmit <mertmit99@gmail.com> * fix: move record id & hash to bottom of list Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * refactor: add import from airtable under project tabs menu Signed-off-by: Pranav C <pranavxc@gmail.com> Co-authored-by: Raju Udava <86527202+dstala@users.noreply.github.com> Co-authored-by: mertmit <mertmit99@gmail.com>
3 years ago
valid: false,
socket: null,
step: 1,
progress: [],
syncSource: null,
syncSourceUrlOrId: ''
}),
computed: {
airtableModal: {
set(v) {
this.$emit('input', v)
},
get() {
return this.value
}
}
},
watch: {
syncSourceUrlOrId(v) {
if (this.syncSource && this.syncSource.details) {
const m = v && v.match(/(exp|shr).{14}/g)
this.syncSource.details.shareId = m ? m[0] : null
}
}
},
created() {
this.socket = io(new URL(this.$axios.defaults.baseURL, window.location.href.split(/[?#]/)[0]).href, {
extraHeaders: { 'xc-auth': this.$store.state.users.token }
})
this.socket.on('connect_error', () => {
this.socket.disconnect()
this.socket = null
})
const socket = this.socket
socket.on('connect', function(data) {
console.log(socket.id)
console.log('socket connected', data)
})
socket.on('progress', (d) => {
this.progress.push(d)
this.$nextTick(() => {
if (this.$refs.log) {
const el = this.$refs.log.$el
el.scrollTop = el.scrollHeight
}
})
if (d.status === 'COMPLETED') {
this.$store.dispatch('project/_loadTables', {
dbKey: '0.projectJson.envs._noco.db.0',
key: '0.projectJson.envs._noco.db.0.tables',
_nodes: {
dbAlias: 'db',
env: '_noco',
type: 'tableDir'
}
}).then(() => this.$store.dispatch('tabs/loadFirstTableTab'))
}
})
this.loadSyncSrc()
},
beforeDestroy() {
if (this.socket) {
this.socket.disconnect()
}
},
methods: {
async saveAndSync() {
await this.createOrUpdate()
this.sync()
},
sync() {
this.step = 2
this.$axios.post(`/api/v1/db/meta/syncs/${this.syncSource.id}/trigger`, this.payload, {
params: {
id: this.socket.id
}
})
},
async loadSyncSrc() {
const { data: { list: srcs } } = await this.$axios.get(`/api/v1/db/meta/projects/${this.projectId}/syncs`)
if (srcs && srcs[0]) {
srcs[0].details = srcs[0].details || {}
this.syncSource = srcs[0]
this.syncSourceUrlOrId = srcs[0].details.shareId
} else {
this.syncSource = {
type: 'Airtable',
details: {
syncInterval: '15mins',
syncDirection: 'Airtable to NocoDB',
syncRetryCount: 1,
syncViews: false,
apiKey: '',
shareId: ''
}
}
}
},
async createOrUpdate() {
try {
const { id, ...payload } = this.syncSource
if (id) {
await this.$axios.patch(`/api/v1/db/meta/syncs/${id}`, payload)
} else {
this.syncSource = (await this.$axios.post(`/api/v1/db/meta/projects/${this.projectId}/syncs`, payload)).data
}
} catch (e) {
this.$toast.error(await this._extractSdkResponseErrorMsg(e)).goAway(3000)
}
},
enableTurbo() {
this.$set(this.syncSource.details, 'syncViews', true)
this.$toast.success('🚀🚀 Ludicrous mode activated! Let\'s go! 🚀🚀').goAway(3000)
Feat - Airtable import (#2048) * wip: add job manager Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: job manager impl Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: migrations Signed-off-by: Pranav C <pranavxc@gmail.com> * wip Signed-off-by: Pranav C <pranavxc@gmail.com> * wip: data sync Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: sync source creation Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: api integration Signed-off-by: Pranav C <pranavxc@gmail.com> * chore: remove unused files Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: update to work with project id, handle exceptions Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: show more progress details Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: extract id from source creation api response Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: bring latest changes Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: column creation and data sync Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: ui improvements Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: bring changes from sync branch Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: avoid opening additional socket Signed-off-by: Pranav C <pranavxc@gmail.com> * chore: update package-lock Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: wait until data and LTAR insertion completes Signed-off-by: Pranav C <pranavxc@gmail.com> * feat: load table list after sync completes Signed-off-by: Pranav C <pranavxc@gmail.com> * enhancement: add navigation back to dashboard Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: column order as in base, column visibility clean-up Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * refactor: ui updates Signed-off-by: Pranav C <pranavxc@gmail.com> * enhancement: load first table after sync Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: common routine to sanitize column names Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * enhancement: accept both hared base id / url Signed-off-by: Pranav C <pranavxc@gmail.com> * refactor: sanitize table name Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * sync: fetch improvements Signed-off-by: mertmit <mertmit99@gmail.com> * sync: fix nestedLookup Signed-off-by: mertmit <mertmit99@gmail.com> * fix: dateTime datatype support Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * enhancement: add validation for credential form Signed-off-by: Pranav C <pranavxc@gmail.com> * fix: migrate default values if configured Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * fix: include support for created time, modified time Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * fix: rollup column function map Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * feat: log column not migrated info Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * feat: fetch template Signed-off-by: mertmit <mertmit99@gmail.com> * fix: move record id & hash to bottom of list Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> * refactor: add import from airtable under project tabs menu Signed-off-by: Pranav C <pranavxc@gmail.com> Co-authored-by: Raju Udava <86527202+dstala@users.noreply.github.com> Co-authored-by: mertmit <mertmit99@gmail.com>
3 years ago
}
}
}
</script>
<style scoped>
.nc-progress {
margin-left: 12px;
position: relative;
width: 5px;
height: 5px;
border-radius: 5px;
background-color: #9880ff;
color: #9880ff;
animation: dotFlashing 1s infinite linear alternate;
animation-delay: .5s;
}
.nc-progress::before, .nc-progress::after {
content: '';
display: inline-block;
position: absolute;
top: 0;
}
.nc-progress::before {
left: -7.5px;
width: 5px;
height: 5px;
border-radius: 5px;
background-color: #9880ff;
color: #9880ff;
animation: dotFlashing 1s infinite alternate;
animation-delay: 0s;
}
.nc-progress::after {
left: 7.5px;
width: 5px;
height: 5px;
border-radius: 5px;
background-color: var(--v-primary-base);
color: var(--v-primary-base);
animation: dotFlashing 1s infinite alternate;
animation-delay: 1s;
}
@keyframes dotFlashing {
0% {
background-color: var(--v-primary-base);
}
50%,
100% {
background-color: var(--v-backgroundColor-base);
}
}
</style>