mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 05:26:00 +00:00
mongo profile view - shows collection tab
This commit is contained in:
@@ -254,11 +254,10 @@
|
||||
text: 'Create database',
|
||||
onClick: handleCreateDatabase,
|
||||
},
|
||||
$openedConnections.includes(data._id) &&
|
||||
driver?.supportsServerSummary && {
|
||||
text: 'Server summary',
|
||||
onClick: handleServerSummary,
|
||||
},
|
||||
driver?.supportsServerSummary && {
|
||||
text: 'Server summary',
|
||||
onClick: handleServerSummary,
|
||||
},
|
||||
],
|
||||
data.singleDatabase && [
|
||||
{ divider: true },
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
}
|
||||
|
||||
async function runAction(action, row) {
|
||||
const { command, openQuery } = action;
|
||||
const { command, openQuery, openTab, addDbProps } = action;
|
||||
if (command) {
|
||||
await apiCall('server-connections/summary-command', { conid, refreshToken, command, row });
|
||||
refresh();
|
||||
@@ -55,6 +55,20 @@
|
||||
},
|
||||
});
|
||||
}
|
||||
if (openTab) {
|
||||
const props = {};
|
||||
if (addDbProps) {
|
||||
props['conid'] = conid;
|
||||
props['database'] = row.name;
|
||||
}
|
||||
openNewTab({
|
||||
...openTab,
|
||||
props: {
|
||||
...openTab.props,
|
||||
...props,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -77,7 +91,7 @@
|
||||
<svelte:fragment slot="2" let:row let:col>
|
||||
{#each col.actions as action, index}
|
||||
{#if index > 0}
|
||||
<span> | </span>
|
||||
<span class="action-separator">|</span>
|
||||
{/if}
|
||||
<Link onClick={() => runAction(action, row)}>{action.header}</Link>
|
||||
{/each}
|
||||
@@ -101,4 +115,8 @@
|
||||
background-color: var(--theme-bg-0);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.action-separator {
|
||||
margin: 0 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user