mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-25 23:36:01 +00:00
fixes from testing
This commit is contained in:
@@ -78,6 +78,7 @@ registerCommand({
|
||||
toolbar: true,
|
||||
toolbarOrder: 2,
|
||||
name: 'Query',
|
||||
toolbarName: 'New query',
|
||||
keyText: 'Ctrl+Q',
|
||||
onClick: () => newQuery(),
|
||||
});
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
export let gridCoreComponent;
|
||||
export let formViewComponent;
|
||||
export let formDisplay;
|
||||
export let display;
|
||||
|
||||
export let isDetailView = false;
|
||||
export let showReferences = false;
|
||||
@@ -35,7 +36,7 @@
|
||||
name="references"
|
||||
height="30%"
|
||||
collapsed={isDetailView}
|
||||
skip={!showReferences}
|
||||
skip={!showReferences || !display.hasReferences}
|
||||
>
|
||||
<ReferenceManager {...$$props} {managerSize} />
|
||||
</WidgetColumnBarItem>
|
||||
|
||||
@@ -93,11 +93,11 @@
|
||||
{value.toString()}
|
||||
{/if}
|
||||
|
||||
{#if hintFieldsAllowed && hintFieldsAllowed.includes(col.uniqueName) && rowData}
|
||||
{#if hintFieldsAllowed && hintFieldsAllowed.includes(col.uniqueName) && rowData && rowData[col.hintColumnName]}
|
||||
<span class="hint">{rowData[col.hintColumnName]}</span>
|
||||
{/if}
|
||||
|
||||
{#if col.foreignKey && rowData[col.uniqueName]}
|
||||
{#if col.foreignKey && rowData && rowData[col.uniqueName]}
|
||||
<ShowFormButton on:click={() => onSetFormView(rowData, col)} />
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
{#if isSmall}
|
||||
<div class="container-small">
|
||||
<FontIcon {icon} />
|
||||
{message}
|
||||
{message || 'Unknown error'}
|
||||
</div>
|
||||
{:else}
|
||||
<div class="container">
|
||||
<div class="icon">
|
||||
<FontIcon {icon} />
|
||||
</div>
|
||||
{message}
|
||||
{message || 'Unknown error'}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
@@ -111,6 +111,7 @@
|
||||
import tabs from '../tabs';
|
||||
import { setSelectedTab } from '../utility/common';
|
||||
import contextMenu from '../utility/contextMenu';
|
||||
import { getConnectionInfo } from '../utility/metadataLoaders';
|
||||
|
||||
$: currentDbKey =
|
||||
$currentDatabase && $currentDatabase.name && $currentDatabase.connection
|
||||
@@ -172,11 +173,27 @@
|
||||
}
|
||||
return res;
|
||||
};
|
||||
|
||||
const handleSetDb = async props => {
|
||||
const { conid, database } = props || {};
|
||||
if (conid) {
|
||||
const connection = await getConnectionInfo({ conid, database });
|
||||
if (connection) {
|
||||
$currentDatabase = { connection, name: database };
|
||||
return;
|
||||
}
|
||||
}
|
||||
$currentDatabase = null;
|
||||
};
|
||||
</script>
|
||||
|
||||
{#each dbKeys as dbKey}
|
||||
<div class="db-wrapper">
|
||||
<div class="db-name" class:selected={tabsByDb[dbKey][0].tabDbKey == currentDbKey}>
|
||||
<div
|
||||
class="db-name"
|
||||
class:selected={tabsByDb[dbKey][0].tabDbKey == currentDbKey}
|
||||
on:click={() => handleSetDb(tabsByDb[dbKey][0].props)}
|
||||
>
|
||||
<FontIcon icon={getDbIcon(dbKey)} />
|
||||
{tabsByDb[dbKey][0].tabDbName}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user