mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-03 15:13:57 +00:00
show error for current connection
This commit is contained in:
@@ -35,6 +35,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
}
|
}
|
||||||
.icon {
|
.icon {
|
||||||
font-size: 20pt;
|
font-size: 20pt;
|
||||||
|
|||||||
@@ -5,10 +5,14 @@
|
|||||||
import { focusedConnectionOrDatabase, openedConnections } from '../stores';
|
import { focusedConnectionOrDatabase, openedConnections } from '../stores';
|
||||||
import FormStyledButton from '../buttons/FormStyledButton.svelte';
|
import FormStyledButton from '../buttons/FormStyledButton.svelte';
|
||||||
import { openConnection } from '../appobj/ConnectionAppObject.svelte';
|
import { openConnection } from '../appobj/ConnectionAppObject.svelte';
|
||||||
|
import { useServerStatus } from '../utility/metadataLoaders';
|
||||||
|
import ErrorInfo from '../elements/ErrorInfo.svelte';
|
||||||
|
|
||||||
export let conid;
|
export let conid;
|
||||||
export let database;
|
export let database;
|
||||||
export let connection;
|
export let connection;
|
||||||
|
|
||||||
|
$: serverStatus = useServerStatus();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="no-focused-info">
|
<div class="no-focused-info">
|
||||||
@@ -32,7 +36,7 @@
|
|||||||
<FormStyledButton
|
<FormStyledButton
|
||||||
value={`Show ${database}`}
|
value={`Show ${database}`}
|
||||||
skipWidth
|
skipWidth
|
||||||
outline
|
outline
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$focusedConnectionOrDatabase = {
|
$focusedConnectionOrDatabase = {
|
||||||
conid,
|
conid,
|
||||||
@@ -43,6 +47,11 @@
|
|||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
{:else}
|
{:else}
|
||||||
|
{#if $focusedConnectionOrDatabase?.conid && $serverStatus?.[$focusedConnectionOrDatabase?.conid]?.message}
|
||||||
|
<div class="m-1">Error connecting <b>{getConnectionLabel($focusedConnectionOrDatabase?.connection)}</b>:</div>
|
||||||
|
<ErrorInfo message={$serverStatus?.[$focusedConnectionOrDatabase?.conid]?.message} />
|
||||||
|
<div class="m-3" />
|
||||||
|
{/if}
|
||||||
{#if connection}
|
{#if connection}
|
||||||
<div class="m-1">Current connection:</div>
|
<div class="m-1">Current connection:</div>
|
||||||
<div class="m-1 ml-3 mb-3">
|
<div class="m-1 ml-3 mb-3">
|
||||||
|
|||||||
Reference in New Issue
Block a user