mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-30 05:06:50 +00:00
feat: add sql views support(readonly)
re #135 Signed-off-by: Pranav C <pranavxc@gmail.com>
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
>
|
||||
Reload
|
||||
</x-btn>
|
||||
<x-btn
|
||||
<!-- <x-btn
|
||||
outlined
|
||||
tooltip="Toggle All"
|
||||
small
|
||||
@@ -33,7 +33,7 @@
|
||||
@click="toggleAll(toggle)"
|
||||
>
|
||||
Toggle All {{ toggle ? 'ON' : 'OFF' }}
|
||||
</x-btn>
|
||||
</x-btn>-->
|
||||
<x-btn
|
||||
outlined
|
||||
tooltip="Save Changes"
|
||||
@@ -68,12 +68,22 @@
|
||||
<template #header>
|
||||
<thead>
|
||||
<tr class="text-left caption">
|
||||
<th>#</th>
|
||||
<th>Table Name <span class="caption grey--text">({{ selectedCount }})</span></th>
|
||||
<th>Relation</th>
|
||||
<th>Parent</th>
|
||||
<th>Child</th>
|
||||
<th />
|
||||
<th class="grey--text">
|
||||
#
|
||||
</th>
|
||||
<th class="grey--text">
|
||||
Table Name <span class="caption grey--text">({{ selectedCount }})</span>
|
||||
</th>
|
||||
<th class="grey--text">
|
||||
Relation
|
||||
</th>
|
||||
<th class="grey--text">
|
||||
Parent
|
||||
</th>
|
||||
<th class="grey--text">
|
||||
Child
|
||||
</th>
|
||||
<!-- <th />-->
|
||||
</tr>
|
||||
</thead>
|
||||
</template>
|
||||
@@ -85,7 +95,7 @@
|
||||
<td>{{ item.relationType === 'hm' ? 'HasMany' : 'BelongsTo' }}</td>
|
||||
<td>{{ item.rtn }}</td>
|
||||
<td>{{ item.tn }}</td>
|
||||
<td>
|
||||
<!-- <td>
|
||||
<v-checkbox
|
||||
v-model="item.enabled"
|
||||
class=""
|
||||
@@ -93,7 +103,7 @@
|
||||
hide-details
|
||||
@change="$set(item,'edited',true)"
|
||||
/>
|
||||
</td>
|
||||
</td>-->
|
||||
</tr>
|
||||
</template>
|
||||
</v-data-table>
|
||||
|
||||
@@ -49,14 +49,16 @@
|
||||
<v-simple-table dense style="min-width: 400px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<th class="grey--text">
|
||||
Models <span v-show="!isNewOrDeletedModelFound" class="caption ml-1">({{
|
||||
enableCountText
|
||||
}})</span>
|
||||
</th>
|
||||
<th>APIs</th>
|
||||
<th>Actions</th>
|
||||
<th>Comment</th>
|
||||
<!-- <th>APIs</th>-->
|
||||
<th class="grey--text">
|
||||
Actions
|
||||
</th>
|
||||
<th />
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -70,14 +72,14 @@
|
||||
<span class="caption">{{ model.title }}</span>
|
||||
</v-tooltip>
|
||||
</td>
|
||||
<td>
|
||||
<!-- <td>
|
||||
<v-checkbox
|
||||
v-model="model.enabled"
|
||||
dense
|
||||
:disabled="model.new || model.deleted"
|
||||
@change="edited = true"
|
||||
/>
|
||||
</td>
|
||||
</td>-->
|
||||
<td>
|
||||
<template v-if="model.new">
|
||||
<!-- <x-icon small color="success success" tooltip="Add and sync meta information"-->
|
||||
|
||||
@@ -49,14 +49,17 @@
|
||||
<v-simple-table dense style="min-width: 400px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<th class="grey--text">
|
||||
Models <span v-show="!isNewOrDeletedModelFound" class="caption ml-1">({{
|
||||
enableCountText
|
||||
}})</span>
|
||||
</th>
|
||||
<th>APIs</th>
|
||||
<th>Actions</th>
|
||||
<th>Comment</th>
|
||||
<!-- <th>APIs</th>-->
|
||||
<th class="grey--text">
|
||||
Actions
|
||||
</th>
|
||||
<!-- <th>Comment</th>-->
|
||||
<th />
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -68,14 +71,14 @@
|
||||
:key="model.title"
|
||||
>
|
||||
<td>{{ model.title }}</td>
|
||||
<td>
|
||||
<!-- <td>
|
||||
<v-checkbox
|
||||
v-model="model.enabled"
|
||||
dense
|
||||
:disabled="model.new || model.deleted"
|
||||
@change="edited = true"
|
||||
/>
|
||||
</td>
|
||||
</td>-->
|
||||
<td>
|
||||
<template v-if="model.new">
|
||||
<!-- <x-icon small color="success success" tooltip="Add and sync meta information"-->
|
||||
@@ -263,7 +266,7 @@ export default {
|
||||
this.views = (await this.$store.dispatch('sqlMgr/ActSqlOp', [{
|
||||
dbAlias: this.db.meta.dbAlias,
|
||||
env: this.$store.getters['project/GtrEnv']
|
||||
}, 'viewList'])).data.list
|
||||
}, 'viewList', { force: true }])).data.list
|
||||
},
|
||||
|
||||
async saveModels() {
|
||||
|
||||
Reference in New Issue
Block a user