This commit is contained in:
SPRINX0\prochazka
2025-04-10 17:43:32 +02:00
8 changed files with 79 additions and 11 deletions

View File

@@ -8,7 +8,7 @@ Builds:
- linux - application for linux
- win - application for Windows
## 6.3.3 - not released
## 6.3.3
- CHANGED: New administration UI, redesigned administration of users, connections and roles
- ADDED: Encrypting passwords in team-premium edition
- ADDED: Show scale bar on map #1090

View File

@@ -7,6 +7,7 @@
export let value;
export let jsonParsedValue = undefined;
export let editorTypes;
export let rightMargin = false;
$: stringified = stringifyCellValue(
value,
@@ -20,7 +21,7 @@
{#if rowData == null}
<span class="null">(No row)</span>
{:else}
<span class={stringified.gridStyle} title={stringified.gridTitle}>{stringified.value}</span>
<span class={stringified.gridStyle} title={stringified.gridTitle} class:rightMargin>{stringified.value}</span>
{/if}
<style>
@@ -31,4 +32,8 @@
.valueCellStyle {
color: var(--theme-icon-green);
}
.rightMargin {
margin-right: 16px;
}
</style>

View File

@@ -73,7 +73,13 @@
class:alignRight={_.isNumber(value) && !showHint}
{style}
>
<CellValue {rowData} {value} {jsonParsedValue} {editorTypes} />
<CellValue
{rowData}
{value}
{jsonParsedValue}
{editorTypes}
rightMargin={_.isNumber(value) && !showHint && (editorTypes?.explicitDataType || col.foreignKey)}
/>
{#if showHint}
<span class="hint"

View File

@@ -43,7 +43,7 @@
if (e.detail == '@create') {
showModal(InputTextModal, {
header: 'Archive',
label: 'Name of new folder',
label: 'Name of new archive folder',
onConfirm: createOption,
});
}

View File

@@ -23,6 +23,8 @@
import { findEngineDriver } from 'dbgate-tools';
import AceEditor from '../query/AceEditor.svelte';
import { _t } from '../translations';
import { showModal } from '../modals/modalTools';
import InputTextModal from '../modals/InputTextModal.svelte';
export let direction;
export let storageTypeField;
@@ -54,7 +56,7 @@
{ value: 'query', label: _t('common.query', { defaultMessage: 'Query' }), directions: ['source'] },
{
value: 'archive',
label: _t('common.archive', { defaultMessage: 'Archive' }),
label: _t('common.archive', { defaultMessage: 'Archive (JSONL)' }),
directions: ['source', 'target'],
},
];
@@ -108,11 +110,18 @@
<FormStyledButton
value="New archive"
on:click={() => {
values.update(x => ({
...x,
[storageTypeField]: 'archive',
[archiveFolderField]: `import-${moment().format('YYYY-MM-DD-hh-mm-ss')}`,
}));
showModal(InputTextModal, {
header: 'Archive',
label: 'Name of new archive folder',
value: `import-${moment().format('YYYY-MM-DD-hh-mm-ss')}`,
onConfirm: value => {
values.update(x => ({
...x,
[storageTypeField]: 'archive',
[archiveFolderField]: value,
}));
},
});
}}
/>
{/if}

View File

@@ -433,7 +433,7 @@ ORDER BY
<FormCheckboxField
name="behaviour.jsonPreviewWrap"
label={_t('settings.behaviour.jsonPreviewWrap', { defaultMessage: 'Wrap json in preview' })}
label={_t('settings.behaviour.jsonPreviewWrap', { defaultMessage: 'Wrap JSON in preview' })}
defaultValue={false}
/>

View File

@@ -240,6 +240,19 @@ const mysqlDriverBase = {
if (options.force) {
args.push('--force');
}
if (options.lockTables) {
args.push('--lock-tables');
}
if (options.skipLockTables) {
args.push('--skip-lock-tables');
}
if (options.singleTransaction) {
args.push('--single-transaction');
}
if (options.customArgs?.trim()) {
const customArgs = options.customArgs.split(/\s+/).filter(arg => arg.trim() != '');
args.push(...customArgs);
}
args.push(database);
return { command, args };
},
@@ -312,6 +325,32 @@ const mysqlDriverBase = {
default: true,
disabledFn: values => values.noStructure,
},
{
type: 'checkbox',
label: 'Lock tables',
name: 'lockTables',
default: false,
disabledFn: values => values.skipLockTables || values.singleTransaction,
},
{
type: 'checkbox',
label: 'Skip lock tables',
name: 'skipLockTables',
default: false,
disabledFn: values => values.lockTables || values.singleTransaction,
},
{
type: 'checkbox',
label: 'Single transaction',
name: 'singleTransaction',
default: false,
disabledFn: values => values.lockTables || values.skipLockTables,
},
{
type: 'text',
label: 'Custom arguments',
name: 'customArgs',
},
];
}
return null;

View File

@@ -267,6 +267,11 @@ EXECUTE FUNCTION function_name();`,
name: 'noOwner',
default: false,
},
{
type: 'text',
label: 'Custom arguments',
name: 'customArgs',
},
];
}
return null;
@@ -304,6 +309,10 @@ EXECUTE FUNCTION function_name();`,
);
}
}
if (options.customArgs?.trim()) {
const customArgs = options.customArgs.split(/\s+/).filter(arg => arg.trim() != '');
args.push(...customArgs);
}
return {
command,