mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-29 05:16:00 +00:00
current db/archive buttons
This commit is contained in:
@@ -69,31 +69,31 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if direction == 'target'}
|
<div class="buttons">
|
||||||
<div class="buttons">
|
{#if $currentDatabase}
|
||||||
{#if $currentDatabase}
|
|
||||||
<FormStyledButton
|
|
||||||
value="Current DB"
|
|
||||||
on:click={() => {
|
|
||||||
values.update(x => ({
|
|
||||||
...x,
|
|
||||||
[storageTypeField]: 'database',
|
|
||||||
[connectionIdField]: $currentDatabase?.connection?._id,
|
|
||||||
[databaseNameField]: $currentDatabase?.name,
|
|
||||||
}));
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
{/if}
|
|
||||||
<FormStyledButton
|
<FormStyledButton
|
||||||
value="Current archive"
|
value="Current DB"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
values.update(x => ({
|
values.update(x => ({
|
||||||
...x,
|
...x,
|
||||||
[storageTypeField]: 'archive',
|
[storageTypeField]: 'database',
|
||||||
[archiveFolderField]: $currentArchive,
|
[connectionIdField]: $currentDatabase?.connection?._id,
|
||||||
|
[databaseNameField]: $currentDatabase?.name,
|
||||||
}));
|
}));
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
{/if}
|
||||||
|
<FormStyledButton
|
||||||
|
value="Current archive"
|
||||||
|
on:click={() => {
|
||||||
|
values.update(x => ({
|
||||||
|
...x,
|
||||||
|
[storageTypeField]: 'archive',
|
||||||
|
[archiveFolderField]: $currentArchive,
|
||||||
|
}));
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{#if direction == 'target'}
|
||||||
<FormStyledButton
|
<FormStyledButton
|
||||||
value="New archive"
|
value="New archive"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
@@ -104,8 +104,8 @@
|
|||||||
}));
|
}));
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
{/if}
|
||||||
{/if}
|
</div>
|
||||||
|
|
||||||
<FormSelectField
|
<FormSelectField
|
||||||
options={types.filter(x => x.directions.includes(direction))}
|
options={types.filter(x => x.directions.includes(direction))}
|
||||||
@@ -170,12 +170,11 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if driver?.importExportArgs}
|
{#if driver?.importExportArgs}
|
||||||
<FormArgumentList
|
<FormArgumentList
|
||||||
args={driver?.importExportArgs.filter(arg => !arg.direction || arg.direction == direction)}
|
args={driver?.importExportArgs.filter(arg => !arg.direction || arg.direction == direction)}
|
||||||
namePrefix={`${direction}_${driver.engine}_`}
|
namePrefix={`${direction}_${driver.engine}_`}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
Reference in New Issue
Block a user