Uniq users: {Object.keys(activeSessions).length} of {data?.statistics?.totalClients} connections
Show only users
{#each Object.entries(activeSessions) as act} {@const wsInstance = $workspacesStore.find((it) => it.workspaceId === act[0])} {@const totalFind = act[1].sessions.reduce((it, itm) => itm.total.find + it, 0)} {@const totalTx = act[1].sessions.reduce((it, itm) => itm.total.tx + it, 0)} {@const currentFind = act[1].sessions.reduce((it, itm) => itm.current.find + it, 0)} {@const currentTx = act[1].sessions.reduce((it, itm) => itm.current.tx + it, 0)} {@const employeeGroups = Array.from(new Set(act[1].sessions.map((it) => it.userId))).filter( (it) => systemAccountEmail !== it || !realUsers )} {@const realGroup = Array.from(new Set(act[1].sessions.map((it) => it.userId))).filter( (it) => systemAccountEmail !== it )} {#if employeeGroups.length > 0}
Workspace: {wsInstance?.workspaceName ?? act[0]}: {employeeGroups.length} current 5 mins => {currentFind}/{currentTx}, total => {totalFind}/{totalTx} {#if act[1].upgrading} (Upgrading) {/if} {#if act[1].closing} (Closing) {/if}
{#if isAdminUser()}
{#each employeeGroups as employeeId} {@const employee = employees.get(employeeId)} {@const connections = act[1].sessions.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} rx/{txes} tx
{#each connections as user, i}
#{i} {user.userId}
Total: {user.total.find} rx/{user.total.tx} tx
Previous 5 mins: {user.mins5.find} rx/{user.mins5.tx} tx
Current 5 mins: {user.current.find} tx/{user.current.tx} tx
{#each Object.entries(user.data ?? {}) as [k, v]}
{k}: {JSON.stringify(v)}
{/each}
{/each}
{/each}
{/if} {/each}