mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-01 12:03:58 +00:00
feat: add error handler for server summary tab
This commit is contained in:
@@ -82,6 +82,14 @@
|
|||||||
wrapper
|
wrapper
|
||||||
/>
|
/>
|
||||||
{:then summary}
|
{:then summary}
|
||||||
|
{#if 'errorMessage' in summary}
|
||||||
|
<div class="wrapper error-wrapper">
|
||||||
|
<div class="error-message">
|
||||||
|
<h3>{_t('serverSummaryTab.errorTitle', { defaultMessage: 'Error loading server summary' })}</h3>
|
||||||
|
<p>{summary.errorMessage}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{:else}
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<TabControl
|
<TabControl
|
||||||
isInline
|
isInline
|
||||||
@@ -109,6 +117,7 @@
|
|||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
{/if}
|
||||||
{/await}
|
{/await}
|
||||||
|
|
||||||
<svelte:fragment slot="toolstrip">
|
<svelte:fragment slot="toolstrip">
|
||||||
@@ -130,4 +139,24 @@
|
|||||||
.action-separator {
|
.action-separator {
|
||||||
margin: 0 5px;
|
margin: 0 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.error-wrapper {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error-message {
|
||||||
|
background: var(--theme-bg-1);
|
||||||
|
border: 1px solid var(--theme-border);
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 20px;
|
||||||
|
max-width: 500px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error-message h3 {
|
||||||
|
color: var(--theme-font-error);
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user