mirror of
https://github.com/dbgate/dbgate
synced 2024-11-13 23:33:47 +00:00
table engine shown in object tree
This commit is contained in:
parent
448c15c308
commit
15c400747e
@ -860,6 +860,18 @@
|
|||||||
return createDatabaseObjectMenu(data, passProps?.connection);
|
return createDatabaseObjectMenu(data, passProps?.connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getExtInfo(data) {
|
||||||
|
const res = [];
|
||||||
|
if (data.tableRowCount != null) {
|
||||||
|
res.push(`${formatRowCount(data.tableRowCount)} rows`);
|
||||||
|
}
|
||||||
|
if (data.tableEngine) {
|
||||||
|
res.push(data.tableEngine);
|
||||||
|
}
|
||||||
|
if (res.length > 0) return res.join(', ');
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
$: isPinned = !!$pinnedTables.find(x => testEqual(data, x));
|
$: isPinned = !!$pinnedTables.find(x => testEqual(data, x));
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -873,7 +885,7 @@
|
|||||||
showPinnedInsteadOfUnpin={passProps?.showPinnedInsteadOfUnpin}
|
showPinnedInsteadOfUnpin={passProps?.showPinnedInsteadOfUnpin}
|
||||||
onPin={isPinned ? null : () => pinnedTables.update(list => [...list, data])}
|
onPin={isPinned ? null : () => pinnedTables.update(list => [...list, data])}
|
||||||
onUnpin={isPinned ? () => pinnedTables.update(list => list.filter(x => !testEqual(x, data))) : null}
|
onUnpin={isPinned ? () => pinnedTables.update(list => list.filter(x => !testEqual(x, data))) : null}
|
||||||
extInfo={data.tableRowCount != null ? `${formatRowCount(data.tableRowCount)} rows` : null}
|
extInfo={getExtInfo(data)}
|
||||||
on:click={() => handleClick()}
|
on:click={() => handleClick()}
|
||||||
on:middleclick={() => handleClick(true)}
|
on:middleclick={() => handleClick(true)}
|
||||||
on:expand
|
on:expand
|
||||||
|
Loading…
Reference in New Issue
Block a user