-
-
-
- Workspace: {wsInstance?.workspaceName ?? act.wsId}: {employeeGroups.length} current 5 mins => {currentFind}/{currentTx},
- total => {totalFind}/{totalTx}
-
- {#if isAdminUser()}
-
-
-
- {#each employeeGroups as employeeId}
- {@const employee = employees.get(employeeId)}
- {@const connections = act.sessions.filter((it) => it.userId === employeeId)}
+
+ Connections: {ss.reduce((it, itm) => it + itm.sessions.length, 0)}
+
+
+ Users: {ss.reduce((it, itm) => it + itm.sessions.filter((it) => !isSystemAccount(it.userId)).length, 0)}
+
+
+ Active {ss.reduce((it, itm) => it + itm.sessions.filter((it) => it.current.tx > 0).length, 0)} /
+ {ss.reduce((it, itm) => it + itm.sessions.filter((it) => it.mins5.tx > 0 || it.current.tx > 0).length, 0)}
+
+
+
+
+ {#each ss as act}
+ {@const wsInstance = $workspacesStore.find((it) => it.workspaceId === act.wsId)}
+ {@const totalFind = act.sessions.reduce((it, itm) => itm.total.find + it, 0)}
+ {@const totalTx = act.sessions.reduce((it, itm) => itm.total.tx + it, 0)}
- {@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}
-
-
-
- {#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)}
+ {@const currentFind = act.sessions.reduce((it, itm) => itm.current.find + it, 0)}
+ {@const currentTx = act.sessions.reduce((it, itm) => itm.current.tx + it, 0)}
+ {@const employeeGroups = Array.from(
+ new Set(act.sessions.filter((it) => !showActive5 || it.current.tx > 0).map((it) => it.userId))
+ ).filter((it) => !isSystemAccount(it) || !realUsers)}
+ {@const realGroup = Array.from(new Set(act.sessions.map((it) => it.userId))).filter(
+ (it) => !isSystemAccount(it)
+ )}
+ {#if employeeGroups.length > 0}
+
+
+
+
+
+ Workspace: {wsInstance?.workspaceName ?? act.wsId}: {employeeGroups.length} current 5 mins => {currentFind}/{currentTx},
+ total => {totalFind}/{totalTx}
+
+ {#if isAdminUser()}
+
+
+
+ {#each employeeGroups as employeeId}
+ {@const employee = employees.get(employeeId)}
+ {@const connections = act.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}
+
+
+
+ {#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}
-
+
+
+ {/each}
- {/each}
-
-
-
- {/if}
- {/each}
+
+
+ {/if}
+ {/each}
+
+
{/each}