mirror of
https://github.com/garraflavatra/rolens.git
synced 2025-01-18 13:07:58 +00:00
Hide object types in object grid
This commit is contained in:
parent
037d5432a4
commit
21afb01ea1
@ -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 = [];
|
||||
|
@ -20,6 +20,7 @@
|
||||
<div class="grid">
|
||||
<ObjectGrid
|
||||
data={collection.stats}
|
||||
showTypes={false}
|
||||
errorTitle={collection.statsError ? 'Error fetching collection stats' : ''}
|
||||
errorDescription={collection.statsError}
|
||||
busy={!collection.stats && !collection.statsError && `Fetching stats for ${collection.key}…`}
|
||||
|
@ -20,6 +20,7 @@
|
||||
<div class="grid">
|
||||
<ObjectGrid
|
||||
data={database.stats}
|
||||
showTypes={false}
|
||||
errorTitle={database.statsError ? 'Error fetching database stats' : ''}
|
||||
errorDescription={database.statsError}
|
||||
busy={!database.stats && !database.statsError && `Fetching stats for ${database.key}…`}
|
||||
|
@ -20,6 +20,7 @@
|
||||
<div class="grid">
|
||||
<ObjectGrid
|
||||
data={host.status || {}}
|
||||
showTypes={false}
|
||||
errorTitle={host.statusError ? 'Error fetching server status' : ''}
|
||||
errorDescription={host.statusError}
|
||||
busy={!host.status && !host.statusError && 'Fetching server status…'}
|
||||
|
@ -20,6 +20,7 @@
|
||||
<div class="grid">
|
||||
<ObjectGrid
|
||||
data={host.systemInfo}
|
||||
showTypes={false}
|
||||
errorTitle={host.systemInfoError ? 'Error fetching system info' : ''}
|
||||
errorDescription={host.systemInfoError}
|
||||
busy={!host.systemInfo && !host.systemInfoError && 'Fetching system info…'}
|
||||
|
Loading…
Reference in New Issue
Block a user