check & load db model in statusbar

This commit is contained in:
Jan Prochazka
2021-04-29 10:40:53 +02:00
parent c24cc1dc72
commit fd6524867e
2 changed files with 6 additions and 0 deletions

View File

@@ -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;

View File

@@ -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'}