Browse Source

fix: include `nc_shared_bases` table to export list

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/769/head
Pranav C 3 years ago
parent
commit
183a4c3a8d
  1. 16
      packages/nc-gui/components/base/shareBase.vue
  2. 7
      packages/nocodb/src/lib/noco/meta/NcMetaIO.ts

16
packages/nc-gui/components/base/shareBase.vue

@ -2,7 +2,8 @@
<div>
<v-icon color="grey" small>
mdi-open-in-new
</v-icon> <span class="grey--text caption">Shared base link</span>
</v-icon>
<span class="grey--text caption">Shared base link</span>
<div class="nc-container">
<v-menu>
<template #activator="{on}">
@ -81,7 +82,8 @@ export default {
methods: {
async loadSharedBase() {
try {
const sharedBase = await this.$store.dispatch('sqlMgr/ActSqlOp', [null, 'getSharedBaseLink'])
const sharedBase = await this.$store.dispatch('sqlMgr/ActSqlOp', [
{ dbAlias: 'db' }, 'getSharedBaseLink'])
this.base = sharedBase || {}
} catch (e) {
console.log(e)
@ -89,7 +91,7 @@ export default {
},
async createSharedBase() {
try {
const sharedBase = await this.$store.dispatch('sqlMgr/ActSqlOp', [null, 'createSharedBaseLink'])
const sharedBase = await this.$store.dispatch('sqlMgr/ActSqlOp', [{ dbAlias: 'db' }, 'createSharedBaseLink'])
this.base = sharedBase || {}
} catch (e) {
this.$toast.error(e.message).goAway(3000)
@ -97,7 +99,7 @@ export default {
},
async disableSharedBase() {
try {
await this.$store.dispatch('sqlMgr/ActSqlOp', [null, 'disableSharedBaseLink'])
await this.$store.dispatch('sqlMgr/ActSqlOp', [{ dbAlias: 'db' }, 'disableSharedBaseLink'])
this.base = {}
} catch (e) {
this.$toast.error(e.message).goAway(3000)
@ -105,8 +107,8 @@ export default {
},
async recreate() {
try {
await this.$store.dispatch('sqlMgr/ActSqlOp', [null, 'disableSharedBaseLink'])
const sharedBase = await this.$store.dispatch('sqlMgr/ActSqlOp', [null, 'createSharedBaseLink'])
await this.$store.dispatch('sqlMgr/ActSqlOp', [{ dbAlias: 'db' }, 'disableSharedBaseLink'])
const sharedBase = await this.$store.dispatch('sqlMgr/ActSqlOp', [{ dbAlias: 'db' }, 'createSharedBaseLink'])
this.base = sharedBase || {}
} catch (e) {
this.$toast.error(e.message).goAway(3000)
@ -127,7 +129,7 @@ export default {
<style scoped>
.nc-url-wrapper {
column-gap: 15px;
width:100%
width: 100%
}
.nc-url {

7
packages/nocodb/src/lib/noco/meta/NcMetaIO.ts

@ -16,6 +16,7 @@ const META_TABLES = {
'nc_migrations',
'nc_disabled_models_for_role',
'nc_shared_views',
'nc_shared_bases',
'nc_cron',
'nc_audit'
],
@ -31,7 +32,8 @@ const META_TABLES = {
'nc_api_tokens',
'nc_disabled_models_for_role',
'nc_shared_views',
'nc_cron'
'nc_cron',
'nc_shared_bases'
],
rest: [
'nc_models',
@ -46,7 +48,8 @@ const META_TABLES = {
'nc_disabled_models_for_role',
'nc_shared_views',
'nc_cron',
'nc_audit'
'nc_audit',
'nc_shared_bases'
]
};

Loading…
Cancel
Save