worker page ui fixes (#5927)

* worker page ui fixes

* Update +page.svelte

---------

Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
This commit is contained in:
Diego Imbert
2025-06-12 17:33:47 +02:00
committed by GitHub
co-authored by Ruben Fiszel
parent 4ea6a60d7d
commit 4d0576fe42
@@ -590,14 +590,17 @@
<Cell head>Limits</Cell>
<Cell head>Version</Cell>
<Cell head>Liveness</Cell>
<Cell head last
>Live Shell <Tooltip>
<p class="text-sm">
Open a live shell to execute bash commands on the machine where the worker
runs — useful for quick access, inspection, and real-time debugging
</p>
</Tooltip></Cell
>
{#if $superadmin}
<Cell head>
Live Shell
<Tooltip>
<p class="text-sm">
Open a live shell to execute bash commands on the machine where the worker
runs — useful for quick access, inspection, and real-time debugging
</p>
</Tooltip>
</Cell>
{/if}
</tr>
</Head>
<tbody class="divide-y">
@@ -607,7 +610,7 @@
<Cell
first
colspan={(!config || config?.dedicated_worker == undefined) && $superadmin
? 11
? 12
: 9}
scope="colgroup"
class="bg-surface-secondary/30 !py-1 border-b !text-xs"
@@ -717,34 +720,36 @@
: 'Unknown'}
</Badge>
</Cell>
<Cell last>
<Button
size="xs"
color="light"
on:click={() => {
if (isWorkerAlive === false) {
sendUserToast('Worker must be alive', true)
return
}
if (worker.startsWith(AGENT_WORKER_NAME_PREFIX)) {
if (!sshWorker) {
sendUserToast(
'Unexpected error could not find agent worker handling repl feature',
true
)
{#if $superadmin}
<Cell>
<Button
size="xs"
color="light"
on:click={() => {
if (isWorkerAlive === false) {
sendUserToast('Worker must be alive', true)
return
}
tag = sshWorker
} else {
tag = hostname
}
replForWorkerDrawer?.openDrawer()
}}
startIcon={{ icon: Terminal }}
>
Command
</Button>
</Cell>
if (worker.startsWith(AGENT_WORKER_NAME_PREFIX)) {
if (!sshWorker) {
sendUserToast(
'Unexpected error could not find agent worker handling repl feature',
true
)
return
}
tag = sshWorker
} else {
tag = hostname
}
replForWorkerDrawer?.openDrawer()
}}
startIcon={{ icon: Terminal }}
>
ssh
</Button>
</Cell>
{/if}
</tr>
{/each}
{/if}