feat: add sql views support(readonly)

re #135

Signed-off-by: Pranav C <pranavxc@gmail.com>
This commit is contained in:
Pranav C
2021-12-05 17:00:25 +05:30
parent 5efb2271c4
commit 5dee734e58
15 changed files with 286 additions and 181 deletions

View File

@@ -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() {