mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-29 16:15:51 +00:00
* fix(frontend): App icon select double click issue * fix(frontend): Update script metadata page * fix(frontend): Set dropdown default icon to vertical dots * fix(frontend): Clean up * fix(frontend): Update table styles * fix(frontend): Add spacing to secondary menu items * fix(frontend): Scale down full path * fix(frontend): Table loading state * fix(frontend): Hide script kind setting by default
33 lines
728 B
Svelte
33 lines
728 B
Svelte
<script lang="ts">
|
|
import { FolderService, GroupService } from '$lib/gen'
|
|
import { workspaceStore } from '$lib/stores'
|
|
|
|
export let name: string
|
|
export let tabular = false
|
|
export let order = ['scripts', 'flows', 'apps', 'schedules', 'variables', 'resources']
|
|
|
|
$: $workspaceStore && loadUsage()
|
|
|
|
let usage: Record<string, number> = {}
|
|
|
|
async function loadUsage() {
|
|
usage = await FolderService.getFolderUsage({ workspace: $workspaceStore!, name })
|
|
}
|
|
</script>
|
|
|
|
{#if tabular}
|
|
{#each order as key}
|
|
<td class="text-center">
|
|
{usage[key] ?? ''}
|
|
</td>
|
|
{/each}
|
|
{:else}
|
|
<div class="flex flex-col text-xs text-gray-600">
|
|
{#each Object.entries(usage) as [k, v]}
|
|
<div>
|
|
{k}: {v}
|
|
</div>
|
|
{/each}
|
|
</div>
|
|
{/if}
|