mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 18:46:00 +00:00
check & load db model in statusbar
This commit is contained in:
@@ -29,6 +29,7 @@ async function checkedAsyncCall(promise) {
|
||||
|
||||
async function handleFullRefresh() {
|
||||
const driver = requireEngineDriver(storedConnection);
|
||||
setStatusName('loadStructure');
|
||||
analysedStructure = await checkedAsyncCall(driver.analyseFull(systemConnection));
|
||||
process.send({ msgtype: 'structure', structure: analysedStructure });
|
||||
setStatusName('ok');
|
||||
@@ -36,6 +37,7 @@ async function handleFullRefresh() {
|
||||
|
||||
async function handleIncrementalRefresh() {
|
||||
const driver = requireEngineDriver(storedConnection);
|
||||
setStatusName('checkStructure');
|
||||
const newStructure = await checkedAsyncCall(driver.analyseIncremental(systemConnection, analysedStructure));
|
||||
if (newStructure != null) {
|
||||
analysedStructure = newStructure;
|
||||
|
||||
@@ -49,6 +49,10 @@
|
||||
<div class="item">
|
||||
{#if $status.name == 'pending'}
|
||||
<FontIcon icon="icon loading" /> Loading
|
||||
{:else if $status.name == 'checkStructure'}
|
||||
<FontIcon icon="icon loading" /> Checking model
|
||||
{:else if $status.name == 'loadStructure'}
|
||||
<FontIcon icon="icon loading" /> Loading model
|
||||
{:else if $status.name == 'ok'}
|
||||
<FontIcon icon="img ok-inv" /> Connected
|
||||
{:else if $status.name == 'error'}
|
||||
|
||||
Reference in New Issue
Block a user