mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-28 03:46:00 +00:00
pro tabs
This commit is contained in:
@@ -158,6 +158,7 @@
|
|||||||
|
|
||||||
function getTabDbName(tab, connectionList) {
|
function getTabDbName(tab, connectionList) {
|
||||||
if (tab.tabComponent == 'ConnectionTab') return 'Connections';
|
if (tab.tabComponent == 'ConnectionTab') return 'Connections';
|
||||||
|
if (tab.tabComponent?.startsWith('Admin')) return 'Administration';
|
||||||
if (tab.props && tab.props.conid && tab.props.database) return tab.props.database;
|
if (tab.props && tab.props.conid && tab.props.database) return tab.props.database;
|
||||||
if (tab.props && tab.props.conid) {
|
if (tab.props && tab.props.conid) {
|
||||||
const connection = connectionList?.find(x => x._id == tab.props.conid);
|
const connection = connectionList?.find(x => x._id == tab.props.conid);
|
||||||
@@ -174,6 +175,7 @@
|
|||||||
if (key.startsWith('archive://')) return 'icon archive';
|
if (key.startsWith('archive://')) return 'icon archive';
|
||||||
if (key.startsWith('server://')) return 'icon server';
|
if (key.startsWith('server://')) return 'icon server';
|
||||||
if (key.startsWith('connections.')) return 'icon connection';
|
if (key.startsWith('connections.')) return 'icon connection';
|
||||||
|
if (key.startsWith('admin.')) return 'icon admin';
|
||||||
}
|
}
|
||||||
return 'icon file';
|
return 'icon file';
|
||||||
}
|
}
|
||||||
|
|||||||
1
packages/web/src/tabs/index-pro.js
Normal file
1
packages/web/src/tabs/index-pro.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export default {};
|
||||||
@@ -30,6 +30,8 @@ import * as ProfilerTab from './ProfilerTab.svelte';
|
|||||||
import * as DataDuplicatorTab from './DataDuplicatorTab.svelte';
|
import * as DataDuplicatorTab from './DataDuplicatorTab.svelte';
|
||||||
import * as ImportExportTab from './ImportExportTab.svelte';
|
import * as ImportExportTab from './ImportExportTab.svelte';
|
||||||
|
|
||||||
|
import protabs from './index-pro';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
TableDataTab,
|
TableDataTab,
|
||||||
CollectionDataTab,
|
CollectionDataTab,
|
||||||
@@ -62,4 +64,5 @@ export default {
|
|||||||
ProfilerTab,
|
ProfilerTab,
|
||||||
DataDuplicatorTab,
|
DataDuplicatorTab,
|
||||||
ImportExportTab,
|
ImportExportTab,
|
||||||
|
...protabs,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -152,6 +152,9 @@ export function getTabDbKey(tab) {
|
|||||||
if (tab.tabComponent == 'ConnectionTab') {
|
if (tab.tabComponent == 'ConnectionTab') {
|
||||||
return 'connections.';
|
return 'connections.';
|
||||||
}
|
}
|
||||||
|
if (tab.tabComponent?.startsWith('Admin')) {
|
||||||
|
return 'admin.';
|
||||||
|
}
|
||||||
if (tab.props && tab.props.conid && tab.props.database) {
|
if (tab.props && tab.props.conid && tab.props.database) {
|
||||||
return `database://${tab.props.database}-${tab.props.conid}`;
|
return `database://${tab.props.database}-${tab.props.conid}`;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user