@parallelworks/tandem-web 0.176.0 → 0.178.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_virtual/_virtual_i18n/en/common.js +19 -3
- package/_virtual/_virtual_i18n/es/common.js +19 -3
- package/_virtual/_virtual_i18n/ja/common.js +19 -3
- package/_virtual/_virtual_i18n/ko/common.js +19 -3
- package/_virtual/_virtual_i18n/zh/common.js +19 -3
- package/api/queries.js +87 -72
- package/components/AgentWork.js +275 -263
- package/components/RunnerBadge.js +37 -0
- package/lib/agents.js +8 -2
- package/package.json +1 -1
- package/routes/_workspace/agents/_slug2.js +219 -156
- package/routes/_workspace/agents/index2.js +121 -75
- package/routes/_workspace/settings/runners2.js +104 -74
|
@@ -1,139 +1,185 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../../../api/client.js";
|
|
2
|
-
import { agentsQuery as n, meQuery as r } from "../../../api/queries.js";
|
|
3
|
-
import { AgentIcon as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
2
|
+
import { agentsQuery as n, meQuery as r, runnersQuery as i, workspaceRunsQuery as a } from "../../../api/queries.js";
|
|
3
|
+
import { AgentIcon as o, AlertIcon as s } from "../../../components/icons.js";
|
|
4
|
+
import { RunnerBadge as c } from "../../../components/RunnerBadge.js";
|
|
5
|
+
import { harnessNames as l, runnersFor as u } from "../../../lib/agents.js";
|
|
6
|
+
import { useConfirm as d } from "../../../lib/confirm.js";
|
|
7
|
+
import { copyItem as f, useLinkItems as p } from "../../../lib/menus.js";
|
|
8
|
+
import { usePageTitle as m } from "../../../lib/pageTitle.js";
|
|
9
|
+
import { may as h } from "../../../lib/roles.js";
|
|
10
|
+
import { Link as g, useNavigate as _ } from "../../../lib/router.js";
|
|
11
|
+
import { Route as v } from "./index.js";
|
|
12
|
+
import { Avatar as y, Card as b, EmptyState as x, buttonClasses as S, menuDivider as C, useOpenMenu as w } from "@parallelworks/ui";
|
|
13
|
+
import { useTranslations as T } from "use-intl";
|
|
14
|
+
import { jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
15
|
+
import { useMutation as O, useQuery as k, useQueryClient as A, useSuspenseQuery as j } from "@tanstack/react-query";
|
|
15
16
|
// src/routes/$workspace/agents/index.tsx?tsr-split=component
|
|
16
|
-
function
|
|
17
|
-
let { workspace:
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
function M() {
|
|
18
|
+
let { workspace: s } = v.useParams(), c = T("agents"), u = T("common"), M = p(), { data: P } = j(n(s)), { data: F = [] } = k(i(s)), { data: I = [] } = k(a(s, {
|
|
19
|
+
live: !0,
|
|
20
|
+
limit: 200
|
|
21
|
+
}));
|
|
22
|
+
m(c("title"));
|
|
23
|
+
let { data: L } = j(r), R = h(L, s, "manage_agents"), z = w(), B = _(), V = A(), H = O({
|
|
20
24
|
mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/agents/{slug}", { params: { path: {
|
|
21
|
-
workspace:
|
|
25
|
+
workspace: s,
|
|
22
26
|
slug: n
|
|
23
27
|
} } })),
|
|
24
|
-
onSettled: () =>
|
|
25
|
-
}), { confirm:
|
|
28
|
+
onSettled: () => V.invalidateQueries({ queryKey: n(s).queryKey })
|
|
29
|
+
}), { confirm: U, dialog: W } = d(), G = (e) => [
|
|
26
30
|
{
|
|
27
|
-
label:
|
|
28
|
-
onClick: () =>
|
|
31
|
+
label: u("open"),
|
|
32
|
+
onClick: () => B({
|
|
29
33
|
to: "/$workspace/agents/$slug",
|
|
30
34
|
params: {
|
|
31
|
-
workspace:
|
|
35
|
+
workspace: s,
|
|
32
36
|
slug: e.slug
|
|
33
37
|
}
|
|
34
38
|
})
|
|
35
39
|
},
|
|
36
|
-
...
|
|
37
|
-
|
|
38
|
-
...
|
|
39
|
-
label:
|
|
40
|
+
...M(`/${s}/agents/${e.slug}`),
|
|
41
|
+
f(c("copySlug"), e.slug),
|
|
42
|
+
...R && !e.archivedAt ? [C, {
|
|
43
|
+
label: c("archive"),
|
|
40
44
|
destructive: !0,
|
|
41
|
-
onClick: () =>
|
|
42
|
-
title:
|
|
43
|
-
description:
|
|
44
|
-
confirmLabel:
|
|
45
|
-
onConfirm: () =>
|
|
45
|
+
onClick: () => U({
|
|
46
|
+
title: c("archiveTitle", { name: e.name }),
|
|
47
|
+
description: c("archiveDescription"),
|
|
48
|
+
confirmLabel: c("archive"),
|
|
49
|
+
onConfirm: () => H.mutateAsync(e.slug)
|
|
46
50
|
})
|
|
47
51
|
}] : []
|
|
48
52
|
];
|
|
49
|
-
return /* @__PURE__ */
|
|
53
|
+
return /* @__PURE__ */ D("div", {
|
|
50
54
|
className: "w-full px-4 py-6 md:px-8 md:py-8",
|
|
51
55
|
children: [
|
|
52
|
-
/* @__PURE__ */
|
|
56
|
+
/* @__PURE__ */ D("div", {
|
|
53
57
|
className: "flex items-center justify-between",
|
|
54
58
|
children: [
|
|
55
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ E("div", { children: /* @__PURE__ */ E("h1", {
|
|
56
60
|
className: "text-xl font-semibold tracking-tight",
|
|
57
|
-
children:
|
|
61
|
+
children: c("title")
|
|
58
62
|
}) }),
|
|
59
|
-
|
|
63
|
+
P.length > 0 && /* @__PURE__ */ E(g, {
|
|
60
64
|
to: "/$workspace/measures",
|
|
61
|
-
params: { workspace:
|
|
62
|
-
className: `${
|
|
63
|
-
children:
|
|
65
|
+
params: { workspace: s },
|
|
66
|
+
className: `${S()} ml-auto mr-2`,
|
|
67
|
+
children: c("measures")
|
|
64
68
|
}),
|
|
65
|
-
|
|
69
|
+
R && P.length > 0 && /* @__PURE__ */ E(g, {
|
|
66
70
|
to: "/$workspace/agents/$slug",
|
|
67
71
|
params: {
|
|
68
|
-
workspace:
|
|
72
|
+
workspace: s,
|
|
69
73
|
slug: "new"
|
|
70
74
|
},
|
|
71
|
-
className:
|
|
72
|
-
children:
|
|
75
|
+
className: S({ variant: "primary" }),
|
|
76
|
+
children: c("new")
|
|
73
77
|
})
|
|
74
78
|
]
|
|
75
79
|
}),
|
|
76
|
-
|
|
77
|
-
icon: /* @__PURE__ */
|
|
78
|
-
title:
|
|
79
|
-
description:
|
|
80
|
-
...
|
|
80
|
+
P.length === 0 ? /* @__PURE__ */ E(x, {
|
|
81
|
+
icon: /* @__PURE__ */ E(o, {}),
|
|
82
|
+
title: c("empty"),
|
|
83
|
+
description: c("emptyDescription"),
|
|
84
|
+
...R && { action: /* @__PURE__ */ E(g, {
|
|
81
85
|
to: "/$workspace/agents/$slug",
|
|
82
86
|
params: {
|
|
83
|
-
workspace:
|
|
87
|
+
workspace: s,
|
|
84
88
|
slug: "new"
|
|
85
89
|
},
|
|
86
|
-
className:
|
|
87
|
-
children:
|
|
90
|
+
className: S({ variant: "primary" }),
|
|
91
|
+
children: c("new")
|
|
88
92
|
}) },
|
|
89
93
|
className: "mt-8"
|
|
90
|
-
}) : /* @__PURE__ */
|
|
94
|
+
}) : /* @__PURE__ */ E(b, {
|
|
91
95
|
size: "fill",
|
|
92
96
|
padding: "none",
|
|
93
97
|
divided: !0,
|
|
94
98
|
interactive: !1,
|
|
95
|
-
render: /* @__PURE__ */
|
|
99
|
+
render: /* @__PURE__ */ E("ul", {}),
|
|
96
100
|
className: "mt-8 overflow-hidden",
|
|
97
|
-
children:
|
|
101
|
+
children: P.map((e) => /* @__PURE__ */ E("li", { children: /* @__PURE__ */ D(g, {
|
|
98
102
|
to: "/$workspace/agents/$slug",
|
|
99
103
|
params: {
|
|
100
|
-
workspace:
|
|
104
|
+
workspace: s,
|
|
101
105
|
slug: e.slug
|
|
102
106
|
},
|
|
103
|
-
onContextMenu: (t) =>
|
|
107
|
+
onContextMenu: (t) => z(t, G(e)),
|
|
104
108
|
className: "flex items-center gap-3 px-3 py-2.5 hover:bg-muted",
|
|
105
109
|
children: [
|
|
106
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ E(y, {
|
|
107
111
|
kind: "agent",
|
|
108
112
|
name: e.name,
|
|
109
113
|
size: "md",
|
|
110
114
|
decorative: !0
|
|
111
115
|
}),
|
|
112
|
-
/* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ D("span", {
|
|
113
117
|
className: "min-w-0 flex-1",
|
|
114
|
-
children: [
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
118
|
+
children: [
|
|
119
|
+
/* @__PURE__ */ D("span", {
|
|
120
|
+
className: "block text-sm font-medium",
|
|
121
|
+
children: [e.name, e.archivedAt && /* @__PURE__ */ D("span", {
|
|
122
|
+
className: "font-normal text-muted-foreground",
|
|
123
|
+
children: [" ", c("archived")]
|
|
124
|
+
})]
|
|
125
|
+
}),
|
|
126
|
+
/* @__PURE__ */ E("span", {
|
|
127
|
+
className: "block truncate text-xs text-muted-foreground",
|
|
128
|
+
children: e.description || c("noDescription")
|
|
129
|
+
}),
|
|
130
|
+
!e.archivedAt && /* @__PURE__ */ E(N, {
|
|
131
|
+
workspace: s,
|
|
132
|
+
agent: e,
|
|
133
|
+
runners: F,
|
|
134
|
+
working: I.filter((t) => t.agentId === e.id && t.state === "working")
|
|
135
|
+
})
|
|
136
|
+
]
|
|
124
137
|
}),
|
|
125
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ E("span", {
|
|
126
139
|
className: "text-xs text-muted-foreground",
|
|
127
|
-
children: e.model ?
|
|
128
|
-
harness:
|
|
140
|
+
children: e.model ? c("harnessWithModel", {
|
|
141
|
+
harness: l[e.harness] ?? e.harness,
|
|
129
142
|
model: e.model
|
|
130
|
-
}) :
|
|
143
|
+
}) : l[e.harness]
|
|
131
144
|
})
|
|
132
145
|
]
|
|
133
146
|
}) }, e.id))
|
|
134
147
|
}),
|
|
135
|
-
|
|
148
|
+
W
|
|
136
149
|
]
|
|
137
150
|
});
|
|
138
151
|
}
|
|
139
|
-
|
|
152
|
+
function N({ workspace: e, agent: t, runners: n, working: r }) {
|
|
153
|
+
let i = T("agents"), a = u(t, n).filter((e) => e.online), o = [...new Map(r.filter((e) => e.runnerName).map((e) => [e.runnerName, e])).values()];
|
|
154
|
+
return /* @__PURE__ */ D("span", {
|
|
155
|
+
className: "mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",
|
|
156
|
+
children: [o.length > 0 ? /* @__PURE__ */ D("span", {
|
|
157
|
+
className: "inline-flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-0.5",
|
|
158
|
+
children: [/* @__PURE__ */ E("span", {
|
|
159
|
+
className: "whitespace-nowrap",
|
|
160
|
+
children: i("workingOn")
|
|
161
|
+
}), o.map((t) => /* @__PURE__ */ E(c, {
|
|
162
|
+
workspace: e,
|
|
163
|
+
name: t.runnerName ?? "",
|
|
164
|
+
kind: t.runnerKind,
|
|
165
|
+
link: !1,
|
|
166
|
+
className: "font-medium text-foreground"
|
|
167
|
+
}, t.runnerName))]
|
|
168
|
+
}) : /* @__PURE__ */ E("span", { children: i("idle") }), a.length > 0 ? /* @__PURE__ */ D("span", {
|
|
169
|
+
className: "inline-flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-0.5",
|
|
170
|
+
children: [/* @__PURE__ */ E("span", {
|
|
171
|
+
className: "whitespace-nowrap",
|
|
172
|
+
children: i("canRunOn")
|
|
173
|
+
}), a.map((t) => /* @__PURE__ */ E(c, {
|
|
174
|
+
workspace: e,
|
|
175
|
+
name: t.runner.name,
|
|
176
|
+
kind: t.runner.kind,
|
|
177
|
+
link: !1
|
|
178
|
+
}, t.runner.id))]
|
|
179
|
+
}) : /* @__PURE__ */ D("span", {
|
|
180
|
+
className: "inline-flex items-center gap-1 text-warning",
|
|
181
|
+
children: [/* @__PURE__ */ E(s, { className: "size-3.5" }), i("noRunnerOnline")]
|
|
182
|
+
})]
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
export { M as component };
|
|
@@ -1,53 +1,67 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../../../api/client.js";
|
|
2
|
-
import { runnersQuery as n } from "../../../api/queries.js";
|
|
3
|
-
import { ComputeTargets as
|
|
4
|
-
import { InlineCommand as
|
|
5
|
-
import { WorkerIcon as
|
|
6
|
-
import { SettingsPage as
|
|
7
|
-
import { useConfirm as
|
|
8
|
-
import { copyItem as
|
|
9
|
-
import {
|
|
2
|
+
import { runnersQuery as n, workspaceRunsQuery as r } from "../../../api/queries.js";
|
|
3
|
+
import { ComputeTargets as i } from "../../../components/ComputeTargets.js";
|
|
4
|
+
import { InlineCommand as a } from "../../../components/InlineCommand.js";
|
|
5
|
+
import { WorkerIcon as o } from "../../../components/icons.js";
|
|
6
|
+
import { SettingsPage as s } from "../../../components/settings.js";
|
|
7
|
+
import { useConfirm as c } from "../../../lib/confirm.js";
|
|
8
|
+
import { copyItem as l } from "../../../lib/menus.js";
|
|
9
|
+
import { Link as ee } from "../../../lib/router.js";
|
|
10
|
+
import { useTime as te } from "../../../lib/time.js";
|
|
10
11
|
import { Route as u } from "./runners.js";
|
|
11
|
-
import { Callout as d, StatusDot as f, Table as p, menuDivider as m, useOpenMenu as
|
|
12
|
-
import { useMemo as
|
|
13
|
-
import { useFormatter as
|
|
14
|
-
import { jsx as
|
|
15
|
-
import { useMutation as
|
|
16
|
-
import { ListCellText as
|
|
12
|
+
import { Callout as d, StatusDot as f, Table as p, menuDivider as m, useOpenMenu as ne } from "@parallelworks/ui";
|
|
13
|
+
import { useMemo as h } from "react";
|
|
14
|
+
import { useFormatter as g, useTranslations as _ } from "use-intl";
|
|
15
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
16
|
+
import { useMutation as re, useQuery as ie, useQueryClient as ae, useSuspenseQuery as b } from "@tanstack/react-query";
|
|
17
|
+
import { ListCellText as x, ListColumns as S, ListPage as C, ListRow as w, ListToolbar as T, NameCell as E, listTableProps as D, useListNavigate as O, useListSearch as k, useListView as A } from "@parallelworks/ui/list";
|
|
17
18
|
// src/routes/$workspace/settings/runners.tsx?tsr-split=component
|
|
18
|
-
var
|
|
19
|
+
var j = {
|
|
19
20
|
default: "runnerModeDefault",
|
|
20
21
|
"accept-edits": "runnerModeAcceptEdits",
|
|
21
22
|
auto: "runnerModeAuto",
|
|
22
23
|
bypass: "runnerModeBypass"
|
|
23
24
|
};
|
|
24
|
-
function
|
|
25
|
+
function M() {
|
|
25
26
|
let { workspace: e } = u.useParams();
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ v(N, { workspace: e });
|
|
27
28
|
}
|
|
28
|
-
function
|
|
29
|
-
let { data:
|
|
29
|
+
function N({ workspace: u }) {
|
|
30
|
+
let { data: M } = b(n(u)), { data: N = [] } = ie(r(u, {
|
|
31
|
+
live: !0,
|
|
32
|
+
limit: 200
|
|
33
|
+
})), P = /* @__PURE__ */ new Map();
|
|
34
|
+
for (let e of N) e.state === "working" && e.runnerId && P.set(e.runnerId, [...P.get(e.runnerId) ?? [], e]);
|
|
35
|
+
let F = _("account"), I = g(), L = _("common"), R = te(), z = ae(), B = k(), V = O(), H = ne(), U = re({
|
|
30
36
|
mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/runners/{runnerId}", { params: { path: {
|
|
31
37
|
workspace: u,
|
|
32
38
|
runnerId: n
|
|
33
39
|
} } })),
|
|
34
40
|
onSettled: () => z.invalidateQueries({ queryKey: n(u).queryKey })
|
|
35
|
-
}), { confirm: W, dialog: G } =
|
|
41
|
+
}), { confirm: W, dialog: G } = c(), K = (e) => W({
|
|
36
42
|
title: F("revokeRunnerTitle"),
|
|
37
43
|
description: F("revokeRunnerDescription", { name: e.name }),
|
|
38
44
|
confirmLabel: F("revoke"),
|
|
39
45
|
onConfirm: () => U.mutateAsync(e.id)
|
|
40
|
-
}), q =
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
}), q = h(() => [
|
|
47
|
+
{
|
|
48
|
+
key: "name",
|
|
49
|
+
label: L("name"),
|
|
50
|
+
headerClassName: "py-2",
|
|
51
|
+
alwaysVisible: !0
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
key: "working",
|
|
55
|
+
label: F("runnerColWorking"),
|
|
56
|
+
headerClassName: "py-2 w-48"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
key: "seen",
|
|
60
|
+
label: F("runnerColSeen"),
|
|
61
|
+
headerClassName: "py-2 w-40",
|
|
62
|
+
align: "end"
|
|
63
|
+
}
|
|
64
|
+
], [F, L]), J = h(() => [{
|
|
51
65
|
value: "name",
|
|
52
66
|
label: L("name"),
|
|
53
67
|
compare: (e, t) => e.name.localeCompare(t.name)
|
|
@@ -55,31 +69,31 @@ function F({ workspace: u }) {
|
|
|
55
69
|
value: "seen",
|
|
56
70
|
label: F("runnerColSeen"),
|
|
57
71
|
compare: (e, t) => (t.lastSeenAt ?? "").localeCompare(e.lastSeenAt ?? "")
|
|
58
|
-
}], [F, L]), Y =
|
|
72
|
+
}], [F, L]), Y = A({
|
|
59
73
|
storageKey: `tandem-runners-${u}`,
|
|
60
74
|
defaultShowColumnHeaders: !1,
|
|
61
75
|
columns: q,
|
|
62
76
|
orderBys: J,
|
|
63
77
|
defaultOrderBy: "name",
|
|
64
78
|
facets: []
|
|
65
|
-
}), X = B.filter.trim().toLowerCase(), Z =
|
|
79
|
+
}), X = B.filter.trim().toLowerCase(), Z = M.filter((e) => !X || [
|
|
66
80
|
e.name,
|
|
67
81
|
e.group ?? "",
|
|
68
82
|
...e.harnesses,
|
|
69
83
|
...e.labels
|
|
70
|
-
].some((e) => e.toLowerCase().includes(X))), Q =
|
|
71
|
-
return /* @__PURE__ */
|
|
84
|
+
].some((e) => e.toLowerCase().includes(X))), Q = M.filter((e) => e.sharingRefused), $ = M.filter((e) => e.sharingUnchecked);
|
|
85
|
+
return /* @__PURE__ */ y(s, {
|
|
72
86
|
wide: !0,
|
|
73
87
|
title: F("runners"),
|
|
74
|
-
description: F.rich("runnersDescription", { code: (e) => /* @__PURE__ */
|
|
75
|
-
toolbar:
|
|
88
|
+
description: F.rich("runnersDescription", { code: (e) => /* @__PURE__ */ v(a, { children: e }) }),
|
|
89
|
+
toolbar: M.length > 0 && /* @__PURE__ */ v(T, {
|
|
76
90
|
view: Y,
|
|
77
91
|
search: B,
|
|
78
92
|
searchLabel: F("runnerSearch"),
|
|
79
93
|
searchPlaceholder: F("runnerSearch")
|
|
80
94
|
}),
|
|
81
95
|
children: [
|
|
82
|
-
Q.length > 0 && /* @__PURE__ */
|
|
96
|
+
Q.length > 0 && /* @__PURE__ */ v(d, {
|
|
83
97
|
tone: "warning",
|
|
84
98
|
className: "mb-6",
|
|
85
99
|
children: F("runnerSharingRefused", {
|
|
@@ -87,7 +101,7 @@ function F({ workspace: u }) {
|
|
|
87
101
|
names: I.list(Q.map((e) => e.name), { type: "conjunction" })
|
|
88
102
|
})
|
|
89
103
|
}),
|
|
90
|
-
$.length > 0 && /* @__PURE__ */
|
|
104
|
+
$.length > 0 && /* @__PURE__ */ v(d, {
|
|
91
105
|
tone: "muted",
|
|
92
106
|
className: "mb-6",
|
|
93
107
|
children: F("runnerSharingUnchecked", {
|
|
@@ -95,11 +109,11 @@ function F({ workspace: u }) {
|
|
|
95
109
|
names: I.list($.map((e) => e.name), { type: "conjunction" })
|
|
96
110
|
})
|
|
97
111
|
}),
|
|
98
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ v("div", {
|
|
99
113
|
className: "border-t border-border",
|
|
100
|
-
children: /* @__PURE__ */
|
|
114
|
+
children: /* @__PURE__ */ v(C, {
|
|
101
115
|
view: Y,
|
|
102
|
-
total:
|
|
116
|
+
total: M.length,
|
|
103
117
|
matches: Z.length,
|
|
104
118
|
count: {
|
|
105
119
|
filterActive: B.filter.trim() !== "",
|
|
@@ -107,19 +121,19 @@ function F({ workspace: u }) {
|
|
|
107
121
|
nounPlural: F("runnerNounPlural")
|
|
108
122
|
},
|
|
109
123
|
empty: {
|
|
110
|
-
icon: /* @__PURE__ */
|
|
124
|
+
icon: /* @__PURE__ */ v(o, {}),
|
|
111
125
|
title: F("noRunners")
|
|
112
126
|
},
|
|
113
127
|
noMatches: F("runnerNoMatches"),
|
|
114
|
-
children: /* @__PURE__ */
|
|
115
|
-
...
|
|
116
|
-
children: [/* @__PURE__ */
|
|
128
|
+
children: /* @__PURE__ */ y(p, {
|
|
129
|
+
...D,
|
|
130
|
+
children: [/* @__PURE__ */ v(S, { view: Y }), Y.applyOrder(Z).map((e) => /* @__PURE__ */ y(w, {
|
|
117
131
|
href: null,
|
|
118
132
|
goTo: V,
|
|
119
133
|
openMenu: H,
|
|
120
134
|
items: [
|
|
121
|
-
|
|
122
|
-
|
|
135
|
+
l(F("copyRunnerId"), e.id),
|
|
136
|
+
l(L("copyName"), e.name),
|
|
123
137
|
m,
|
|
124
138
|
{
|
|
125
139
|
label: F("revoke"),
|
|
@@ -127,37 +141,53 @@ function F({ workspace: u }) {
|
|
|
127
141
|
onClick: () => K(e)
|
|
128
142
|
}
|
|
129
143
|
],
|
|
130
|
-
children: [
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
className: "
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
144
|
+
children: [
|
|
145
|
+
/* @__PURE__ */ v(E, {
|
|
146
|
+
icon: /* @__PURE__ */ v(o, {}),
|
|
147
|
+
iconTile: !0,
|
|
148
|
+
name: e.name,
|
|
149
|
+
subtitle: I.list([
|
|
150
|
+
...e.group ? [F("runnerSharedWith", { group: e.group })] : [],
|
|
151
|
+
...e.sharingRefused ? [F("runnerNotTakingRuns")] : [],
|
|
152
|
+
...e.sharingUnchecked ? [F("runnerSharingUnknown")] : [],
|
|
153
|
+
...e.permissionMode ? [F(j[e.permissionMode])] : [],
|
|
154
|
+
...e.harnesses,
|
|
155
|
+
...e.labels
|
|
156
|
+
], { type: "unit" }),
|
|
157
|
+
href: null
|
|
158
|
+
}),
|
|
159
|
+
Y.isVisible("working") && /* @__PURE__ */ v(p.Item, {
|
|
160
|
+
className: "py-2.5",
|
|
161
|
+
children: /* @__PURE__ */ v(x, { children: (P.get(e.id) ?? []).length > 0 ? (P.get(e.id) ?? []).map((e, t) => /* @__PURE__ */ y("span", { children: [t > 0 && ", ", /* @__PURE__ */ v(ee, {
|
|
162
|
+
to: "/$workspace/issues/$identifier",
|
|
163
|
+
params: {
|
|
164
|
+
workspace: u,
|
|
165
|
+
identifier: e.identifier
|
|
166
|
+
},
|
|
167
|
+
className: "hover:underline",
|
|
168
|
+
title: e.issueTitle,
|
|
169
|
+
children: e.identifier
|
|
170
|
+
})] }, e.id)) : F("runnerIdle") })
|
|
171
|
+
}),
|
|
172
|
+
Y.isVisible("seen") && /* @__PURE__ */ y(p.Item, {
|
|
173
|
+
className: "py-2.5",
|
|
174
|
+
children: [/* @__PURE__ */ v(x, { children: e.lastSeenAt ? F("runnerSeen", { seen: R.relative(e.lastSeenAt) }) : F("runnerNeverConnected") }), e.isolation && /* @__PURE__ */ y("span", {
|
|
175
|
+
className: "flex items-center justify-end gap-1.5 text-xs text-muted-foreground",
|
|
176
|
+
title: e.isolation.failures.join("\n") || void 0,
|
|
177
|
+
children: [/* @__PURE__ */ v(f, {
|
|
178
|
+
variant: e.isolation.passed ? "success" : "error",
|
|
179
|
+
size: 8
|
|
180
|
+
}), e.isolation.passed ? F("runnerIsolated") : F("runnerNotIsolated", { count: e.isolation.failures.length })]
|
|
181
|
+
})]
|
|
182
|
+
})
|
|
183
|
+
]
|
|
154
184
|
}, e.id))]
|
|
155
185
|
})
|
|
156
186
|
})
|
|
157
187
|
}),
|
|
158
|
-
/* @__PURE__ */
|
|
188
|
+
/* @__PURE__ */ v(i, { workspace: u }),
|
|
159
189
|
G
|
|
160
190
|
]
|
|
161
191
|
});
|
|
162
192
|
}
|
|
163
|
-
export {
|
|
193
|
+
export { M as component };
|