mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-30 17:24:00 +00:00
table backups
This commit is contained in:
@@ -1086,14 +1086,24 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$: isPinned = !!$pinnedTables.find(x => testEqual(data, x));
|
$: isPinned = !!$pinnedTables.find(x => testEqual(data, x));
|
||||||
|
|
||||||
|
$: backupParsed =
|
||||||
|
data.objectTypeField === 'tables'
|
||||||
|
? data.pureName.match(/^_(.*)_(\d\d\d\d)-(\d\d)-(\d\d)-(\d\d)-(\d\d)-(\d\d)$/)
|
||||||
|
: null;
|
||||||
|
$: backupTitle =
|
||||||
|
backupParsed != null
|
||||||
|
? `${backupParsed[1]} (${backupParsed[2]}-${backupParsed[3]}-${backupParsed[4]} ${backupParsed[5]}:${backupParsed[6]}:${backupParsed[7]})`
|
||||||
|
: null;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<AppObjectCore
|
<AppObjectCore
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
module={$$props.module}
|
module={$$props.module}
|
||||||
{data}
|
{data}
|
||||||
title={data.schemaName && !passProps?.hideSchemaName ? `${data.schemaName}.${data.pureName}` : data.pureName}
|
title={backupTitle ??
|
||||||
icon={databaseObjectIcons[data.objectTypeField]}
|
(data.schemaName && !passProps?.hideSchemaName ? `${data.schemaName}.${data.pureName}` : data.pureName)}
|
||||||
|
icon={backupParsed ? 'img table-backup' : databaseObjectIcons[data.objectTypeField]}
|
||||||
menu={createMenu}
|
menu={createMenu}
|
||||||
showPinnedInsteadOfUnpin={passProps?.showPinnedInsteadOfUnpin}
|
showPinnedInsteadOfUnpin={passProps?.showPinnedInsteadOfUnpin}
|
||||||
onPin={passProps?.ingorePin ? null : isPinned ? null : () => pinnedTables.update(list => [...list, data])}
|
onPin={passProps?.ingorePin ? null : isPinned ? null : () => pinnedTables.update(list => [...list, data])}
|
||||||
|
|||||||
@@ -353,6 +353,7 @@
|
|||||||
'img data-deploy': 'mdi mdi-database-settings color-icon-green',
|
'img data-deploy': 'mdi mdi-database-settings color-icon-green',
|
||||||
'img arrow-start-here': 'mdi mdi-arrow-down-bold-circle color-icon-green',
|
'img arrow-start-here': 'mdi mdi-arrow-down-bold-circle color-icon-green',
|
||||||
'img team-file': 'mdi mdi-account-file color-icon-red',
|
'img team-file': 'mdi mdi-account-file color-icon-red',
|
||||||
|
'img table-backup': 'mdi mdi-cube color-icon-yellow',
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -232,6 +232,15 @@
|
|||||||
$focusedConnectionOrDatabase?.database != extractDbNameFromComposite(database)));
|
$focusedConnectionOrDatabase?.database != extractDbNameFromComposite(database)));
|
||||||
|
|
||||||
// $: console.log('STATUS', $status);
|
// $: console.log('STATUS', $status);
|
||||||
|
|
||||||
|
function getAppObjectGroup(data) {
|
||||||
|
if (data.objectTypeField == 'tables') {
|
||||||
|
if (data.pureName.match(/^_(.*)_\d\d\d\d-\d\d-\d\d-\d\d-\d\d-\d\d$/)) {
|
||||||
|
return _t('dbObject.tableBackups', { defaultMessage: 'Table Backups' });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return getObjectTypeFieldLabel(data.objectTypeField, driver);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if $status && $status.name == 'error'}
|
{#if $status && $status.name == 'error'}
|
||||||
@@ -371,7 +380,7 @@
|
|||||||
.filter(x => x.schemaName == null || ($appliedCurrentSchema ? x.schemaName == $appliedCurrentSchema : true))
|
.filter(x => x.schemaName == null || ($appliedCurrentSchema ? x.schemaName == $appliedCurrentSchema : true))
|
||||||
.map(x => ({ ...x, conid, database }))}
|
.map(x => ({ ...x, conid, database }))}
|
||||||
module={databaseObjectAppObject}
|
module={databaseObjectAppObject}
|
||||||
groupFunc={data => getObjectTypeFieldLabel(data.objectTypeField, driver)}
|
groupFunc={getAppObjectGroup}
|
||||||
subItemsComponent={(data, { isExpandedBySearch }) =>
|
subItemsComponent={(data, { isExpandedBySearch }) =>
|
||||||
data.objectTypeField == 'procedures' || data.objectTypeField == 'functions'
|
data.objectTypeField == 'procedures' || data.objectTypeField == 'functions'
|
||||||
? isExpandedBySearch
|
? isExpandedBySearch
|
||||||
|
|||||||
Reference in New Issue
Block a user