mirror of
https://github.com/LukeHagar/idn-admin-console.git
synced 2025-12-09 12:37:47 +00:00
Refactor code for source aggregations table
This commit is contained in:
@@ -1,10 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Progress from '$lib/Components/Progress.svelte';
|
import Progress from '$lib/Components/Progress.svelte';
|
||||||
import {
|
import { Table, tableMapperValues, type TableSource } from '@skeletonlabs/skeleton';
|
||||||
Table,
|
|
||||||
tableMapperValues,
|
|
||||||
type TableSource,
|
|
||||||
} from '@skeletonlabs/skeleton';
|
|
||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
|
|
||||||
export let data;
|
export let data;
|
||||||
@@ -18,7 +14,7 @@
|
|||||||
accountStart: event.accounts.started?.created,
|
accountStart: event.accounts.started?.created,
|
||||||
accountPass: event.accounts.passed?.created,
|
accountPass: event.accounts.passed?.created,
|
||||||
entitlementStart: event.entitlements.started?.created,
|
entitlementStart: event.entitlements.started?.created,
|
||||||
entitlementPass: event.entitlements.passed?.created,
|
entitlementPass: event.entitlements.passed?.created
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -30,7 +26,7 @@
|
|||||||
'Account Aggregation Started',
|
'Account Aggregation Started',
|
||||||
'Account Aggregation Passed',
|
'Account Aggregation Passed',
|
||||||
'Entitlement Aggregation Started',
|
'Entitlement Aggregation Started',
|
||||||
'Entitlement Aggregation Passed',
|
'Entitlement Aggregation Passed'
|
||||||
],
|
],
|
||||||
// The data visibly shown in your table body UI.
|
// The data visibly shown in your table body UI.
|
||||||
body: tableMapperValues(aggregations, [
|
body: tableMapperValues(aggregations, [
|
||||||
@@ -38,7 +34,7 @@
|
|||||||
'accountStart',
|
'accountStart',
|
||||||
'accountPass',
|
'accountPass',
|
||||||
'entitlementStart',
|
'entitlementStart',
|
||||||
'entitlementPass',
|
'entitlementPass'
|
||||||
]),
|
]),
|
||||||
// Optional: The data returned when interactive is enabled and a row is clicked.
|
// Optional: The data returned when interactive is enabled and a row is clicked.
|
||||||
meta: tableMapperValues(aggregations, [
|
meta: tableMapperValues(aggregations, [
|
||||||
@@ -46,8 +42,8 @@
|
|||||||
'accountStart',
|
'accountStart',
|
||||||
'accountPass',
|
'accountPass',
|
||||||
'entitlementStart',
|
'entitlementStart',
|
||||||
'entitlementPass',
|
'entitlementPass'
|
||||||
]),
|
])
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -62,14 +58,11 @@
|
|||||||
Listing of sources and their most recent aggregation events
|
Listing of sources and their most recent aggregation events
|
||||||
</div>
|
</div>
|
||||||
{#if tableSimple}
|
{#if tableSimple}
|
||||||
<Table
|
<Table class="w-full" source={tableSimple} interactive={true} on:selected={onTableclick} />
|
||||||
class="w-full"
|
|
||||||
source={tableSimple}
|
|
||||||
interactive={true}
|
|
||||||
on:selected={onTableclick}
|
|
||||||
/>
|
|
||||||
{:else}
|
{:else}
|
||||||
<Progress />
|
<div class="grid h-full place-content-center p-8">
|
||||||
|
<Progress width="w-[100px]" />
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user