configurable auto refresh inteval

This commit is contained in:
Jan Prochazka
2022-06-30 08:57:20 +02:00
parent 179bd1f6b1
commit cc8438ef66
2 changed files with 9 additions and 2 deletions

View File

@@ -91,6 +91,12 @@ ORDER BY
<FormCheckboxField name="dataGrid.thousandsSeparator" label="Use thousands separator for numbers" />
<FormTextField
name="dataGrid.defaultAutoRefreshInterval"
label="Default grid auto refresh interval in seconds"
defaultValue="10"
/>
<div class="heading">Connection</div>
<FormCheckboxField
name="connection.autoRefresh"
@@ -99,7 +105,7 @@ ORDER BY
/>
<FormTextField
name="connection.autoRefreshInterval"
label="Interval between automatic refreshes in seconds"
label="Interval between automatic DB structure reloads in seconds"
defaultValue="30"
disabled={values['connection.autoRefresh'] === false}
/>

View File

@@ -98,6 +98,7 @@
import ToolStripCommandButton from '../buttons/ToolStripCommandButton.svelte';
import ToolStripExportButton, { createQuickExportHandlerRef } from '../buttons/ToolStripExportButton.svelte';
import ToolStripCommandSplitButton from '../buttons/ToolStripCommandSplitButton.svelte';
import { getIntSettingsValue } from '../settings/settingsTools';
export let tabid;
export let conid;
@@ -111,7 +112,7 @@
const cache = writable(createGridCache());
const dbinfo = useDatabaseInfo({ conid, database });
let autoRefreshInterval = 10;
let autoRefreshInterval = getIntSettingsValue('dataGrid.defaultAutoRefreshInterval', 10, 1, 3600);
let autoRefreshStarted = false;
let autoRefreshTimer = null;