mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-23 20:45:59 +00:00
show json icon in perspectives
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
{:else}
|
||||
<span class="null"> (no image)</span>
|
||||
{/if}
|
||||
{:else if _.isArray(value) || _.isPlainObject(value)}
|
||||
{:else if !value.$oid && (_.isArray(value) || _.isPlainObject(value))}
|
||||
<JSONTree {value} slicedKeyCount={1} disableContextMenu />
|
||||
{:else}
|
||||
<CellValue {rowData} {value} />
|
||||
|
||||
@@ -241,6 +241,14 @@
|
||||
const orderIndex = sort.length > 1 ? _.findIndex(sort, x => x.columnName == columnName) : -1;
|
||||
return { order, orderIndex };
|
||||
},
|
||||
getColumnIconOverride: (designerId, columnName) => {
|
||||
const pattern = dataPatterns?.[designerId];
|
||||
const column = pattern?.columns.find(x => x.name == columnName);
|
||||
if (column?.types?.includes('json')) {
|
||||
return 'img json';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
isColumnFiltered: (designerId, columnName) => {
|
||||
return !!config.nodes.find(x => x.designerId == designerId)?.filters?.[columnName];
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user