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