perspectives support views

This commit is contained in:
Jan Prochazka
2022-07-31 16:56:09 +02:00
parent c8d031e2c4
commit 2b4120435b
4 changed files with 75 additions and 19 deletions

View File

@@ -142,6 +142,12 @@
tab: 'TableStructureTab',
icon: 'img view-structure',
},
{
label: 'Open perspective',
tab: 'PerspectiveTab',
forceNewTab: true,
icon: 'img perspective',
},
{
label: 'Drop view',
isDrop: true,
@@ -193,12 +199,6 @@
dropViews: true,
},
},
{
label: 'Create perspective',
tab: 'PerspectiveTab',
forceNewTab: true,
icon: 'img perspective',
},
],
matviews: [
{

View File

@@ -5,6 +5,7 @@
PerspectiveDataProvider,
PerspectiveTableColumnNode,
PerspectiveTableNode,
PerspectiveViewNode,
} from 'dbgate-datalib';
import _ from 'lodash';
@@ -60,6 +61,8 @@
$: loader = new PerspectiveDataLoader(apiCall);
$: root = $tableInfo
? new PerspectiveTableNode($tableInfo, $dbInfo, config, setConfig, dataProvider, { conid, database }, null)
: $viewInfo
? new PerspectiveViewNode($viewInfo, $dbInfo, config, setConfig, dataProvider, { conid, database }, null)
: null;
// $: console.log('CONFIG', config);