@parallelworks/tandem-web 0.185.0 → 0.186.1
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 -4
- package/_virtual/_virtual_i18n/es/common.js +19 -4
- package/_virtual/_virtual_i18n/ja/common.js +19 -4
- package/_virtual/_virtual_i18n/ko/common.js +19 -4
- package/_virtual/_virtual_i18n/zh/common.js +19 -4
- package/components/DocsTree.js +149 -139
- package/components/FavoriteStar.js +13 -1
- package/components/FavoritesNav.js +97 -60
- package/components/StatusRules.js +119 -85
- package/package.json +1 -1
- package/pages/areas.js +183 -173
- package/pages/decisions.js +61 -57
- package/pages/projects.js +71 -67
- package/pages/triage.js +197 -184
- package/routes/_workspace/agents/index2.js +95 -87
- package/routes/_workspace/dashboards/index2.js +61 -53
- package/routes/_workspace/docs/space2._space.js +105 -94
- package/routes/_workspace/graph3.js +69 -60
- package/routes/_workspace/measures3.js +82 -74
- package/routes/_workspace/notifications2.js +236 -230
- package/routes/_workspace/teams/_key/cycles/index2.js +98 -88
- package/routes/_workspace2.js +3 -2
|
@@ -1,185 +1,193 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../../../api/client.js";
|
|
2
2
|
import { agentsQuery as n, meQuery as r, runnersQuery as i, workspaceRunsQuery as a } from "../../../api/queries.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
3
|
+
import { FavoriteStar as o } from "../../../components/FavoriteStar.js";
|
|
4
|
+
import { AgentIcon as s, AlertIcon as c } from "../../../components/icons.js";
|
|
5
|
+
import { RunnerBadge as l } from "../../../components/RunnerBadge.js";
|
|
6
|
+
import { harnessNames as u, runnersFor as d } from "../../../lib/agents.js";
|
|
7
|
+
import { useConfirm as f } from "../../../lib/confirm.js";
|
|
8
|
+
import { copyItem as p, useLinkItems as m } from "../../../lib/menus.js";
|
|
9
|
+
import { usePageTitle as h } from "../../../lib/pageTitle.js";
|
|
10
|
+
import { may as g } from "../../../lib/roles.js";
|
|
11
|
+
import { Link as _, useNavigate as v } from "../../../lib/router.js";
|
|
12
|
+
import { Route as y } from "./index.js";
|
|
13
|
+
import { Avatar as b, Card as x, EmptyState as S, buttonClasses as C, menuDivider as w, useOpenMenu as T } from "@parallelworks/ui";
|
|
14
|
+
import { useTranslations as E } from "use-intl";
|
|
15
|
+
import { jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
16
|
+
import { useMutation as k, useQuery as A, useQueryClient as j, useSuspenseQuery as M } from "@tanstack/react-query";
|
|
16
17
|
// src/routes/$workspace/agents/index.tsx?tsr-split=component
|
|
17
|
-
function
|
|
18
|
-
let { workspace:
|
|
18
|
+
function N() {
|
|
19
|
+
let { workspace: c } = y.useParams(), l = E("agents"), d = E("common"), N = m(), { data: F } = M(n(c)), { data: I = [] } = A(i(c)), { data: L = [] } = A(a(c, {
|
|
19
20
|
live: !0,
|
|
20
21
|
limit: 200
|
|
21
22
|
}));
|
|
22
|
-
|
|
23
|
-
let { data:
|
|
23
|
+
h(l("title"));
|
|
24
|
+
let { data: R } = M(r), z = g(R, c, "manage_agents"), B = T(), V = v(), H = j(), U = k({
|
|
24
25
|
mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/agents/{slug}", { params: { path: {
|
|
25
|
-
workspace:
|
|
26
|
+
workspace: c,
|
|
26
27
|
slug: n
|
|
27
28
|
} } })),
|
|
28
|
-
onSettled: () =>
|
|
29
|
-
}), { confirm:
|
|
29
|
+
onSettled: () => H.invalidateQueries({ queryKey: n(c).queryKey })
|
|
30
|
+
}), { confirm: W, dialog: G } = f(), K = (e) => [
|
|
30
31
|
{
|
|
31
|
-
label:
|
|
32
|
-
onClick: () =>
|
|
32
|
+
label: d("open"),
|
|
33
|
+
onClick: () => V({
|
|
33
34
|
to: "/$workspace/agents/$slug",
|
|
34
35
|
params: {
|
|
35
|
-
workspace:
|
|
36
|
+
workspace: c,
|
|
36
37
|
slug: e.slug
|
|
37
38
|
}
|
|
38
39
|
})
|
|
39
40
|
},
|
|
40
|
-
...
|
|
41
|
-
|
|
42
|
-
...
|
|
43
|
-
label:
|
|
41
|
+
...N(`/${c}/agents/${e.slug}`),
|
|
42
|
+
p(l("copySlug"), e.slug),
|
|
43
|
+
...z && !e.archivedAt ? [w, {
|
|
44
|
+
label: l("archive"),
|
|
44
45
|
destructive: !0,
|
|
45
|
-
onClick: () =>
|
|
46
|
-
title:
|
|
47
|
-
description:
|
|
48
|
-
confirmLabel:
|
|
49
|
-
onConfirm: () =>
|
|
46
|
+
onClick: () => W({
|
|
47
|
+
title: l("archiveTitle", { name: e.name }),
|
|
48
|
+
description: l("archiveDescription"),
|
|
49
|
+
confirmLabel: l("archive"),
|
|
50
|
+
onConfirm: () => U.mutateAsync(e.slug)
|
|
50
51
|
})
|
|
51
52
|
}] : []
|
|
52
53
|
];
|
|
53
|
-
return /* @__PURE__ */
|
|
54
|
+
return /* @__PURE__ */ O("div", {
|
|
54
55
|
className: "w-full px-4 py-6 md:px-8 md:py-8",
|
|
55
56
|
children: [
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ O("div", {
|
|
57
58
|
className: "flex items-center justify-between",
|
|
58
59
|
children: [
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
className: "
|
|
61
|
-
children:
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
/* @__PURE__ */ O("div", {
|
|
61
|
+
className: "flex items-center gap-2",
|
|
62
|
+
children: [/* @__PURE__ */ D("h1", {
|
|
63
|
+
className: "text-xl font-semibold tracking-tight",
|
|
64
|
+
children: l("title")
|
|
65
|
+
}), /* @__PURE__ */ D(o, {
|
|
66
|
+
workspace: c,
|
|
67
|
+
kind: "page",
|
|
68
|
+
target: "agents"
|
|
69
|
+
})]
|
|
70
|
+
}),
|
|
71
|
+
F.length > 0 && /* @__PURE__ */ D(_, {
|
|
64
72
|
to: "/$workspace/measures",
|
|
65
|
-
params: { workspace:
|
|
66
|
-
className: `${
|
|
67
|
-
children:
|
|
73
|
+
params: { workspace: c },
|
|
74
|
+
className: `${C()} ml-auto mr-2`,
|
|
75
|
+
children: l("measures")
|
|
68
76
|
}),
|
|
69
|
-
|
|
77
|
+
z && F.length > 0 && /* @__PURE__ */ D(_, {
|
|
70
78
|
to: "/$workspace/agents/$slug",
|
|
71
79
|
params: {
|
|
72
|
-
workspace:
|
|
80
|
+
workspace: c,
|
|
73
81
|
slug: "new"
|
|
74
82
|
},
|
|
75
|
-
className:
|
|
76
|
-
children:
|
|
83
|
+
className: C({ variant: "primary" }),
|
|
84
|
+
children: l("new")
|
|
77
85
|
})
|
|
78
86
|
]
|
|
79
87
|
}),
|
|
80
|
-
|
|
81
|
-
icon: /* @__PURE__ */
|
|
82
|
-
title:
|
|
83
|
-
description:
|
|
84
|
-
...
|
|
88
|
+
F.length === 0 ? /* @__PURE__ */ D(S, {
|
|
89
|
+
icon: /* @__PURE__ */ D(s, {}),
|
|
90
|
+
title: l("empty"),
|
|
91
|
+
description: l("emptyDescription"),
|
|
92
|
+
...z && { action: /* @__PURE__ */ D(_, {
|
|
85
93
|
to: "/$workspace/agents/$slug",
|
|
86
94
|
params: {
|
|
87
|
-
workspace:
|
|
95
|
+
workspace: c,
|
|
88
96
|
slug: "new"
|
|
89
97
|
},
|
|
90
|
-
className:
|
|
91
|
-
children:
|
|
98
|
+
className: C({ variant: "primary" }),
|
|
99
|
+
children: l("new")
|
|
92
100
|
}) },
|
|
93
101
|
className: "mt-8"
|
|
94
|
-
}) : /* @__PURE__ */
|
|
102
|
+
}) : /* @__PURE__ */ D(x, {
|
|
95
103
|
size: "fill",
|
|
96
104
|
padding: "none",
|
|
97
105
|
divided: !0,
|
|
98
106
|
interactive: !1,
|
|
99
|
-
render: /* @__PURE__ */
|
|
107
|
+
render: /* @__PURE__ */ D("ul", {}),
|
|
100
108
|
className: "mt-8 overflow-hidden",
|
|
101
|
-
children:
|
|
109
|
+
children: F.map((e) => /* @__PURE__ */ D("li", { children: /* @__PURE__ */ O(_, {
|
|
102
110
|
to: "/$workspace/agents/$slug",
|
|
103
111
|
params: {
|
|
104
|
-
workspace:
|
|
112
|
+
workspace: c,
|
|
105
113
|
slug: e.slug
|
|
106
114
|
},
|
|
107
|
-
onContextMenu: (t) =>
|
|
115
|
+
onContextMenu: (t) => B(t, K(e)),
|
|
108
116
|
className: "flex items-center gap-3 px-3 py-2.5 hover:bg-muted",
|
|
109
117
|
children: [
|
|
110
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ D(b, {
|
|
111
119
|
kind: "agent",
|
|
112
120
|
name: e.name,
|
|
113
121
|
size: "md",
|
|
114
122
|
decorative: !0
|
|
115
123
|
}),
|
|
116
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ O("span", {
|
|
117
125
|
className: "min-w-0 flex-1",
|
|
118
126
|
children: [
|
|
119
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ O("span", {
|
|
120
128
|
className: "block text-sm font-medium",
|
|
121
|
-
children: [e.name, e.archivedAt && /* @__PURE__ */
|
|
129
|
+
children: [e.name, e.archivedAt && /* @__PURE__ */ O("span", {
|
|
122
130
|
className: "font-normal text-muted-foreground",
|
|
123
|
-
children: [" ",
|
|
131
|
+
children: [" ", l("archived")]
|
|
124
132
|
})]
|
|
125
133
|
}),
|
|
126
|
-
/* @__PURE__ */
|
|
134
|
+
/* @__PURE__ */ D("span", {
|
|
127
135
|
className: "block truncate text-xs text-muted-foreground",
|
|
128
|
-
children: e.description ||
|
|
136
|
+
children: e.description || l("noDescription")
|
|
129
137
|
}),
|
|
130
|
-
!e.archivedAt && /* @__PURE__ */
|
|
131
|
-
workspace:
|
|
138
|
+
!e.archivedAt && /* @__PURE__ */ D(P, {
|
|
139
|
+
workspace: c,
|
|
132
140
|
agent: e,
|
|
133
|
-
runners:
|
|
134
|
-
working:
|
|
141
|
+
runners: I,
|
|
142
|
+
working: L.filter((t) => t.agentId === e.id && t.state === "working")
|
|
135
143
|
})
|
|
136
144
|
]
|
|
137
145
|
}),
|
|
138
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ D("span", {
|
|
139
147
|
className: "text-xs text-muted-foreground",
|
|
140
|
-
children: e.model ?
|
|
141
|
-
harness:
|
|
148
|
+
children: e.model ? l("harnessWithModel", {
|
|
149
|
+
harness: u[e.harness] ?? e.harness,
|
|
142
150
|
model: e.model
|
|
143
|
-
}) :
|
|
151
|
+
}) : u[e.harness]
|
|
144
152
|
})
|
|
145
153
|
]
|
|
146
154
|
}) }, e.id))
|
|
147
155
|
}),
|
|
148
|
-
|
|
156
|
+
G
|
|
149
157
|
]
|
|
150
158
|
});
|
|
151
159
|
}
|
|
152
|
-
function
|
|
153
|
-
let i =
|
|
154
|
-
return /* @__PURE__ */
|
|
160
|
+
function P({ workspace: e, agent: t, runners: n, working: r }) {
|
|
161
|
+
let i = E("agents"), a = d(t, n).filter((e) => e.online), o = [...new Map(r.filter((e) => e.runnerName).map((e) => [e.runnerName, e])).values()];
|
|
162
|
+
return /* @__PURE__ */ O("span", {
|
|
155
163
|
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__ */
|
|
164
|
+
children: [o.length > 0 ? /* @__PURE__ */ O("span", {
|
|
157
165
|
className: "inline-flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-0.5",
|
|
158
|
-
children: [/* @__PURE__ */
|
|
166
|
+
children: [/* @__PURE__ */ D("span", {
|
|
159
167
|
className: "whitespace-nowrap",
|
|
160
168
|
children: i("workingOn")
|
|
161
|
-
}), o.map((t) => /* @__PURE__ */
|
|
169
|
+
}), o.map((t) => /* @__PURE__ */ D(l, {
|
|
162
170
|
workspace: e,
|
|
163
171
|
name: t.runnerName ?? "",
|
|
164
172
|
kind: t.runnerKind,
|
|
165
173
|
link: !1,
|
|
166
174
|
className: "font-medium text-foreground"
|
|
167
175
|
}, t.runnerName))]
|
|
168
|
-
}) : /* @__PURE__ */
|
|
176
|
+
}) : /* @__PURE__ */ D("span", { children: i("idle") }), a.length > 0 ? /* @__PURE__ */ O("span", {
|
|
169
177
|
className: "inline-flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-0.5",
|
|
170
|
-
children: [/* @__PURE__ */
|
|
178
|
+
children: [/* @__PURE__ */ D("span", {
|
|
171
179
|
className: "whitespace-nowrap",
|
|
172
180
|
children: i("canRunOn")
|
|
173
|
-
}), a.map((t) => /* @__PURE__ */
|
|
181
|
+
}), a.map((t) => /* @__PURE__ */ D(l, {
|
|
174
182
|
workspace: e,
|
|
175
183
|
name: t.runner.name,
|
|
176
184
|
kind: t.runner.kind,
|
|
177
185
|
link: !1
|
|
178
186
|
}, t.runner.id))]
|
|
179
|
-
}) : /* @__PURE__ */
|
|
187
|
+
}) : /* @__PURE__ */ O("span", {
|
|
180
188
|
className: "inline-flex items-center gap-1 text-warning",
|
|
181
|
-
children: [/* @__PURE__ */
|
|
189
|
+
children: [/* @__PURE__ */ D(c, { className: "size-3.5" }), i("noRunnerOnline")]
|
|
182
190
|
})]
|
|
183
191
|
});
|
|
184
192
|
}
|
|
185
|
-
export {
|
|
193
|
+
export { N as component };
|
|
@@ -1,96 +1,104 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../../../api/client.js";
|
|
2
2
|
import { dashboardsQuery as n, teamsQuery as r } from "../../../api/queries.js";
|
|
3
3
|
import { sharingItems as i, sharingOf as a, starterPanels as o } from "../../../components/DashboardPanel.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
4
|
+
import { FavoriteStar as s } from "../../../components/FavoriteStar.js";
|
|
5
|
+
import { ChartIcon as c } from "../../../components/icons.js";
|
|
6
|
+
import { useFormError as l } from "../../../components/settings.js";
|
|
7
|
+
import { usePageTitle as u } from "../../../lib/pageTitle.js";
|
|
8
|
+
import { Link as d } from "../../../lib/router.js";
|
|
9
|
+
import { Route as f } from "./index.js";
|
|
10
|
+
import { Button as p, Card as m, EmptyState as h, Field as g, Input as _, Modal as v, Select as y } from "@parallelworks/ui";
|
|
11
|
+
import { useNavigate as b } from "@tanstack/react-router";
|
|
12
|
+
import { useState as x } from "react";
|
|
13
|
+
import { useTranslations as S } from "use-intl";
|
|
14
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
15
|
+
import { useMutation as E, useQueryClient as D, useSuspenseQuery as O } from "@tanstack/react-query";
|
|
15
16
|
// src/routes/$workspace/dashboards/index.tsx?tsr-split=component
|
|
16
|
-
function
|
|
17
|
-
let e =
|
|
18
|
-
|
|
19
|
-
let { workspace: t } =
|
|
20
|
-
return /* @__PURE__ */
|
|
17
|
+
function k() {
|
|
18
|
+
let e = S("dashboards");
|
|
19
|
+
u(e("title"));
|
|
20
|
+
let { workspace: t } = f.useParams(), { data: i } = O(n(t)), { data: a } = O(r(t)), [o, l] = x(!1), g = (e) => a.find((t) => t.key === e)?.name;
|
|
21
|
+
return /* @__PURE__ */ T("div", {
|
|
21
22
|
className: "w-full space-y-6 px-4 py-6 md:px-8 md:py-8",
|
|
22
23
|
children: [
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
+
/* @__PURE__ */ T("div", {
|
|
24
25
|
className: "flex flex-wrap items-end justify-between gap-4",
|
|
25
|
-
children: [/* @__PURE__ */
|
|
26
|
-
className: "
|
|
27
|
-
children:
|
|
28
|
-
|
|
26
|
+
children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
|
|
27
|
+
className: "flex items-center gap-2",
|
|
28
|
+
children: [/* @__PURE__ */ w("h1", {
|
|
29
|
+
className: "text-xl font-semibold tracking-tight",
|
|
30
|
+
children: e("title")
|
|
31
|
+
}), /* @__PURE__ */ w(s, {
|
|
32
|
+
workspace: t,
|
|
33
|
+
kind: "page",
|
|
34
|
+
target: "dashboards"
|
|
35
|
+
})]
|
|
36
|
+
}), /* @__PURE__ */ w("p", {
|
|
29
37
|
className: "mt-1 text-sm text-muted-foreground",
|
|
30
38
|
children: e("description")
|
|
31
|
-
})] }), /* @__PURE__ */
|
|
39
|
+
})] }), /* @__PURE__ */ w(p, {
|
|
32
40
|
variant: "primary",
|
|
33
|
-
onClick: () =>
|
|
41
|
+
onClick: () => l(!0),
|
|
34
42
|
children: e("new")
|
|
35
43
|
})]
|
|
36
44
|
}),
|
|
37
|
-
i.length === 0 ? /* @__PURE__ */
|
|
38
|
-
icon: /* @__PURE__ */
|
|
45
|
+
i.length === 0 ? /* @__PURE__ */ w(h, {
|
|
46
|
+
icon: /* @__PURE__ */ w(c, {}),
|
|
39
47
|
title: e("noneTitle"),
|
|
40
48
|
description: e("noneDescription"),
|
|
41
|
-
action: /* @__PURE__ */
|
|
49
|
+
action: /* @__PURE__ */ w(p, {
|
|
42
50
|
variant: "primary",
|
|
43
|
-
onClick: () =>
|
|
51
|
+
onClick: () => l(!0),
|
|
44
52
|
children: e("new")
|
|
45
53
|
})
|
|
46
|
-
}) : /* @__PURE__ */
|
|
54
|
+
}) : /* @__PURE__ */ w("ul", {
|
|
47
55
|
className: "grid gap-3 sm:grid-cols-2 xl:grid-cols-3",
|
|
48
|
-
children: i.map((n) => /* @__PURE__ */
|
|
56
|
+
children: i.map((n) => /* @__PURE__ */ w("li", { children: /* @__PURE__ */ w(m, {
|
|
49
57
|
padding: "none",
|
|
50
|
-
children: /* @__PURE__ */
|
|
58
|
+
children: /* @__PURE__ */ T(d, {
|
|
51
59
|
to: "/$workspace/dashboards/$dashboardId",
|
|
52
60
|
params: {
|
|
53
61
|
workspace: t,
|
|
54
62
|
dashboardId: n.id
|
|
55
63
|
},
|
|
56
64
|
className: "block space-y-1 p-4",
|
|
57
|
-
children: [/* @__PURE__ */
|
|
65
|
+
children: [/* @__PURE__ */ T("span", {
|
|
58
66
|
className: "flex items-center gap-2 font-medium",
|
|
59
|
-
children: [/* @__PURE__ */
|
|
67
|
+
children: [/* @__PURE__ */ w(c, { className: "size-4 text-muted-foreground" }), /* @__PURE__ */ w("span", {
|
|
60
68
|
className: "truncate",
|
|
61
69
|
children: n.name
|
|
62
70
|
})]
|
|
63
|
-
}), /* @__PURE__ */
|
|
71
|
+
}), /* @__PURE__ */ w("span", {
|
|
64
72
|
className: "block text-xs text-muted-foreground",
|
|
65
73
|
children: [
|
|
66
74
|
e("panels", { count: n.panels.length }),
|
|
67
|
-
n.shared ? n.team ? e("sharedTeam", { team:
|
|
75
|
+
n.shared ? n.team ? e("sharedTeam", { team: g(n.team) ?? n.team }) : e("sharedWorkspace") : e("private"),
|
|
68
76
|
n.owner
|
|
69
77
|
].join(" · ")
|
|
70
78
|
})]
|
|
71
79
|
})
|
|
72
80
|
}) }, n.id))
|
|
73
81
|
}),
|
|
74
|
-
o && /* @__PURE__ */
|
|
82
|
+
o && /* @__PURE__ */ w(A, {
|
|
75
83
|
workspace: t,
|
|
76
|
-
onClose: () =>
|
|
84
|
+
onClose: () => l(!1)
|
|
77
85
|
})
|
|
78
86
|
]
|
|
79
87
|
});
|
|
80
88
|
}
|
|
81
|
-
function
|
|
82
|
-
let u =
|
|
89
|
+
function A({ workspace: s, onClose: c }) {
|
|
90
|
+
let u = S("dashboards"), d = D(), f = b(), { data: m } = O(r(s)), [h, k] = x(""), [A, j] = x("private"), M = l(), N = E({
|
|
83
91
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/dashboards", {
|
|
84
92
|
params: { path: { workspace: s } },
|
|
85
93
|
body: {
|
|
86
|
-
name:
|
|
94
|
+
name: h,
|
|
87
95
|
...a(A),
|
|
88
96
|
panels: o(u)
|
|
89
97
|
}
|
|
90
98
|
})),
|
|
91
99
|
onMutate: M.clear,
|
|
92
100
|
onSuccess: (e) => {
|
|
93
|
-
d.invalidateQueries({ queryKey: n(s).queryKey }),
|
|
101
|
+
d.invalidateQueries({ queryKey: n(s).queryKey }), f({
|
|
94
102
|
to: "/$workspace/dashboards/$dashboardId",
|
|
95
103
|
params: {
|
|
96
104
|
workspace: s,
|
|
@@ -100,47 +108,47 @@ function k({ workspace: s, onClose: l }) {
|
|
|
100
108
|
},
|
|
101
109
|
onError: M.set
|
|
102
110
|
});
|
|
103
|
-
return /* @__PURE__ */
|
|
111
|
+
return /* @__PURE__ */ w(v, {
|
|
104
112
|
open: !0,
|
|
105
|
-
onClose:
|
|
113
|
+
onClose: c,
|
|
106
114
|
title: u("new"),
|
|
107
115
|
size: "md",
|
|
108
116
|
onSubmit: (e) => {
|
|
109
117
|
e.preventDefault(), N.mutate();
|
|
110
118
|
},
|
|
111
|
-
footer: /* @__PURE__ */
|
|
119
|
+
footer: /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(p, {
|
|
112
120
|
variant: "ghost",
|
|
113
|
-
onClick:
|
|
121
|
+
onClick: c,
|
|
114
122
|
children: u("cancel")
|
|
115
|
-
}), /* @__PURE__ */
|
|
123
|
+
}), /* @__PURE__ */ w(p, {
|
|
116
124
|
type: "submit",
|
|
117
125
|
variant: "primary",
|
|
118
126
|
loading: N.isPending,
|
|
119
127
|
children: u("create")
|
|
120
128
|
})] }),
|
|
121
|
-
children: /* @__PURE__ */
|
|
129
|
+
children: /* @__PURE__ */ T("div", {
|
|
122
130
|
className: "space-y-4",
|
|
123
131
|
children: [
|
|
124
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ w(g, {
|
|
125
133
|
label: u("name"),
|
|
126
|
-
children: /* @__PURE__ */
|
|
127
|
-
value:
|
|
134
|
+
children: /* @__PURE__ */ w(_, {
|
|
135
|
+
value: h,
|
|
128
136
|
onChange: (e) => k(e.target.value),
|
|
129
137
|
required: !0,
|
|
130
138
|
maxLength: 200,
|
|
131
139
|
autoFocus: !0
|
|
132
140
|
})
|
|
133
141
|
}),
|
|
134
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ w(g, {
|
|
135
143
|
label: u("sharing"),
|
|
136
144
|
description: u("startsWith"),
|
|
137
|
-
children: /* @__PURE__ */
|
|
145
|
+
children: /* @__PURE__ */ w(y, {
|
|
138
146
|
value: A,
|
|
139
147
|
onValueChange: (e) => e && j(e),
|
|
140
148
|
items: i(u, m)
|
|
141
149
|
})
|
|
142
150
|
}),
|
|
143
|
-
M.error && /* @__PURE__ */
|
|
151
|
+
M.error && /* @__PURE__ */ w("p", {
|
|
144
152
|
className: "text-sm text-danger",
|
|
145
153
|
children: M.error
|
|
146
154
|
})
|
|
@@ -148,4 +156,4 @@ function k({ workspace: s, onClose: l }) {
|
|
|
148
156
|
})
|
|
149
157
|
});
|
|
150
158
|
}
|
|
151
|
-
export {
|
|
159
|
+
export { k as component };
|