{#if data}
Mem: {data.statistics.memoryUsed} / {data.statistics.memoryTotal} CPU: {data.statistics.cpuUsage} TotalFind: {totalStats.find} / Total Tx: {totalStats.tx}
{/if}
Server manager { selectedTab = result.detail.id }} /> {#if data} {#if selectedTab === 'general'} {#if admin}
1.
2.
{/if} {:else if selectedTab === 'users'}
{#each Object.entries(activeSessions) as act} {@const totalFind = act[1].reduce((it, itm) => itm.current.find + it, 0)} {@const totalTx = act[1].reduce((it, itm) => itm.current.tx + it, 0)} {@const employeeGroups = Array.from(new Set(act[1].map((it) => it.userId)))}
Workspace: {act[0]}: {act[1].length} current 5 mins => {totalFind}/{totalTx}
{#each employeeGroups as employeeId} {@const employee = employees.get(employeeId)} {@const connections = act[1].filter((it) => it.userId === employeeId)} {@const find = connections.reduce((it, itm) => itm.current.find + it, 0)} {@const txes = connections.reduce((it, itm) => itm.current.tx + it, 0)}
{#if employee} {:else} {employeeId} {/if} : {connections.length}
{find}/{txes}
{#each connections as user, i}
#{i} {user.userId}
Total: {user.total.find}/{user.total.tx}
Previous 5 mins: {user.mins5.find}/{user.mins5.tx}
Current 5 mins: {user.current.find}/{user.current.tx}
{#each Object.entries(user.data ?? {}) as [k, v]}
{k}: {JSON.stringify(v)}
{/each}
{/each}
{/each}
{/each}
{:else if selectedTab === 'statistics'}
{#if metricsData !== undefined} {/if}
{/if} {:else} {/if}