From 21afb01ea191c6d5b597884fae637ae1b8f49a7a Mon Sep 17 00:00:00 2001 From: Romein van Buren Date: Sat, 1 Jul 2023 19:26:04 +0200 Subject: [PATCH] Hide object types in object grid --- frontend/src/components/objectgrid.svelte | 13 +++++++------ .../organisms/connection/collection/stats.svelte | 1 + .../src/organisms/connection/database/stats.svelte | 1 + .../src/organisms/connection/host/status.svelte | 1 + .../src/organisms/connection/host/systeminfo.svelte | 1 + 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/objectgrid.svelte b/frontend/src/components/objectgrid.svelte index 288463f..6036926 100644 --- a/frontend/src/components/objectgrid.svelte +++ b/frontend/src/components/objectgrid.svelte @@ -11,15 +11,16 @@ export let errorTitle = ''; export let errorDescription = ''; export let busy = false; - - const columns = [ - { key: 'key', label: 'Key' }, - { key: 'value', label: 'Value' }, - { key: 'type', label: 'Type' }, - ]; + export let showTypes = true; let items = []; + $: columns = [ + { key: 'key', label: 'Key' }, + { key: 'value', label: 'Value' }, + showTypes ? { key: 'type', label: 'Type' } : undefined, + ].filter(c => !!c); + $: if (data) { // items = dissectObject(data).map(item => ({ ...item, menu: getRootMenu(item.key, item) })); items = []; diff --git a/frontend/src/organisms/connection/collection/stats.svelte b/frontend/src/organisms/connection/collection/stats.svelte index b8d404d..d489e7e 100644 --- a/frontend/src/organisms/connection/collection/stats.svelte +++ b/frontend/src/organisms/connection/collection/stats.svelte @@ -20,6 +20,7 @@