mirror of
https://github.com/Fabio286/antares.git
synced 2025-02-18 20:50:48 +01:00
feat: ability to change sql dump file name
This commit is contained in:
parent
56918d89c7
commit
2e39d810b5
@ -42,10 +42,16 @@
|
|||||||
|
|
||||||
<div class="columns export-options">
|
<div class="columns export-options">
|
||||||
<div class="column col-8 left">
|
<div class="column col-8 left">
|
||||||
<div class="columns mb-2">
|
<div class="columns mb-2 mt-1 p-vcentered">
|
||||||
<div class="column col-auto d-flex text-italic ">
|
<div class="column col-auto input-group d-flex text-italic" :style="'flex-grow: 1'">
|
||||||
<i class="mdi mdi-file-document-outline mr-2" />
|
<i class="input-group-addon mdi mdi-file-document-outline" />
|
||||||
{{ filename }}
|
<input
|
||||||
|
v-model="chosenFilename"
|
||||||
|
class="form-input"
|
||||||
|
type="text"
|
||||||
|
:placeholder="filename"
|
||||||
|
:title="t('application.fileName')"
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="column col-auto col-ml-auto ">
|
<div class="column col-auto col-ml-auto ">
|
||||||
@ -54,7 +60,7 @@
|
|||||||
:title="t('general.refresh')"
|
:title="t('general.refresh')"
|
||||||
@click="refresh"
|
@click="refresh"
|
||||||
>
|
>
|
||||||
<i class="mdi mdi-database-refresh" />
|
<i class="mdi mdi-refresh" />
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="btn btn-dark btn-sm mx-1"
|
class="btn btn-dark btn-sm mx-1"
|
||||||
@ -62,7 +68,7 @@
|
|||||||
:disabled="isRefreshing"
|
:disabled="isRefreshing"
|
||||||
@click="uncheckAllTables"
|
@click="uncheckAllTables"
|
||||||
>
|
>
|
||||||
<i class="mdi mdi-file-tree-outline" />
|
<i class="mdi mdi-checkbox-blank-outline" />
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="btn btn-dark btn-sm"
|
class="btn btn-dark btn-sm"
|
||||||
@ -70,7 +76,7 @@
|
|||||||
:disabled="isRefreshing"
|
:disabled="isRefreshing"
|
||||||
@click="checkAllTables"
|
@click="checkAllTables"
|
||||||
>
|
>
|
||||||
<i class="mdi mdi-file-tree" />
|
<i class="mdi mdi-checkbox-marked-outline" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -316,6 +322,7 @@ const options: Ref<Partial<ExportOptions>> = ref({
|
|||||||
sqlInsertDivider: 'bytes' as 'bytes' | 'rows'
|
sqlInsertDivider: 'bytes' as 'bytes' | 'rows'
|
||||||
});
|
});
|
||||||
const basePath = ref('');
|
const basePath = ref('');
|
||||||
|
const chosenFilename = ref('');
|
||||||
|
|
||||||
const currentWorkspace = computed(() => getWorkspace(selectedWorkspace.value));
|
const currentWorkspace = computed(() => getWorkspace(selectedWorkspace.value));
|
||||||
const clientCustoms: Ref<Customizations> = computed(() => currentWorkspace.value.customizations);
|
const clientCustoms: Ref<Customizations> = computed(() => currentWorkspace.value.customizations);
|
||||||
@ -328,9 +335,9 @@ const schemaItems = computed(() => {
|
|||||||
});
|
});
|
||||||
const filename = computed(() => {
|
const filename = computed(() => {
|
||||||
const date = moment().format('YYYY-MM-DD_HH-mm-ss');
|
const date = moment().format('YYYY-MM-DD_HH-mm-ss');
|
||||||
return `${props.selectedSchema}_${date}.${options.value.outputFormat}`;
|
return `${props.selectedSchema}_${date}`;
|
||||||
});
|
});
|
||||||
const dumpFilePath = computed(() => `${basePath.value}/${filename.value}`);
|
const dumpFilePath = computed(() => `${basePath.value}/${chosenFilename.value || filename.value}.${options.value.outputFormat}`);
|
||||||
const includeStructureStatus = computed(() => {
|
const includeStructureStatus = computed(() => {
|
||||||
if (tables.value.every(item => item.includeStructure)) return 1;
|
if (tables.value.every(item => item.includeStructure)) return 1;
|
||||||
else if (tables.value.some(item => item.includeStructure)) return 2;
|
else if (tables.value.some(item => item.includeStructure)) return 2;
|
||||||
|
@ -290,6 +290,7 @@ export const enUS = {
|
|||||||
color: 'Color',
|
color: 'Color',
|
||||||
label: 'Label',
|
label: 'Label',
|
||||||
icon: 'Icon',
|
icon: 'Icon',
|
||||||
|
fileName: 'File name',
|
||||||
madeWithJS: 'Made with 💛 and JavaScript!',
|
madeWithJS: 'Made with 💛 and JavaScript!',
|
||||||
checkForUpdates: 'Check for updates',
|
checkForUpdates: 'Check for updates',
|
||||||
noUpdatesAvailable: 'No updates available',
|
noUpdatesAvailable: 'No updates available',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user