@burdenoff/microfe-botmanor 2026.1120.2 → 2026.1120.4
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/dist/botlit/components/BucketDialogs.d.ts +40 -0
- package/dist/botlit/components/BucketDialogs.js +258 -0
- package/dist/botlit/components/BucketDialogs.js.map +1 -0
- package/dist/botlit/components/StoreDialogs.d.ts +33 -0
- package/dist/botlit/components/StoreDialogs.js +139 -0
- package/dist/botlit/components/StoreDialogs.js.map +1 -0
- package/dist/botlit/hooks/index.d.ts +3 -3
- package/dist/botlit/hooks/index.js +6 -6
- package/dist/botlit/hooks/useBuckets.d.ts +48 -15
- package/dist/botlit/hooks/useBuckets.js +128 -85
- package/dist/botlit/hooks/useBuckets.js.map +1 -1
- package/dist/botlit/hooks/useStore.d.ts +4 -0
- package/dist/botlit/hooks/useStore.js +87 -60
- package/dist/botlit/hooks/useStore.js.map +1 -1
- package/dist/botlit/pages/BucketDetailPage.js +283 -209
- package/dist/botlit/pages/BucketDetailPage.js.map +1 -1
- package/dist/botlit/pages/BucketsPage.js +413 -545
- package/dist/botlit/pages/BucketsPage.js.map +1 -1
- package/dist/botlit/pages/ChatPage.js +10 -16
- package/dist/botlit/pages/ChatPage.js.map +1 -1
- package/dist/botlit/pages/InstalledPackagesPage.js +275 -275
- package/dist/botlit/pages/InstalledPackagesPage.js.map +1 -1
- package/dist/botlit/pages/StorePackageDetailPage.js +165 -257
- package/dist/botlit/pages/StorePackageDetailPage.js.map +1 -1
- package/dist/botlit/pages/StorePage.js +179 -184
- package/dist/botlit/pages/StorePage.js.map +1 -1
- package/dist/generated/wspace-operations.d.ts +216 -0
- package/dist/generated/wspace-operations.js +162 -93
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +49 -0
- package/dist/generated/wspace-types.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,251 +1,325 @@
|
|
|
1
1
|
import { useBotlit as e } from "../providers/BotlitProvider.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { PageLayout as t } from "../components/PageLayout.js";
|
|
3
|
+
import { useBots as n } from "../hooks/useBots.js";
|
|
4
|
+
import { useAgents as r } from "../hooks/useAgents.js";
|
|
5
5
|
import { Card as i, CardContent as a, CardDescription as o, CardHeader as s, CardTitle as c } from "../components/Card.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { BOTMANOR_PERMISSIONS as l } from "../permissions/botmanorPermissions.js";
|
|
7
|
+
import { BotmanorPermissionGate as u } from "../permissions/useBotmanorPermissions.js";
|
|
8
|
+
import { Button as d } from "../components/Button.js";
|
|
9
|
+
import { EmptyState as ee } from "../components/EmptyState.js";
|
|
10
|
+
import { ErrorState as f } from "../components/ErrorState.js";
|
|
11
|
+
import { LoadMore as p } from "../components/LoadMore.js";
|
|
12
|
+
import { BucketFormDialog as m, DeleteBucketDialog as h } from "../components/BucketDialogs.js";
|
|
13
|
+
import "../permissions/index.js";
|
|
14
|
+
import { useTr as g } from "../../shared/hooks/useTr.js";
|
|
15
|
+
import { StatusBadge as _ } from "../components/Badge.js";
|
|
16
|
+
import { useChannelConnectors as v } from "../hooks/useChannels.js";
|
|
17
|
+
import { usePolicies as te } from "../hooks/usePolicies.js";
|
|
18
|
+
import { useBucket as y, useChildBuckets as ne, useDeleteBucket as re, useUpdateBucket as ie } from "../hooks/useBuckets.js";
|
|
10
19
|
import "../hooks/index.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { ArrowLeft as C, Bot as w, Folder as T, FolderOpen as E, MessageSquare as D, Shield as O, Users as k } from "lucide-react";
|
|
20
|
+
import { formatRelativeTime as ae } from "../utils/formatters.js";
|
|
21
|
+
import { useState as b } from "react";
|
|
22
|
+
import { PagePurpose as oe } from "@burdenoff/fe-libs/ui";
|
|
23
|
+
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
24
|
+
import { Link as w, useNavigate as se, useParams as T } from "react-router";
|
|
25
|
+
import { ArrowLeft as E, Bot as D, Folder as O, FolderOpen as ce, MessageSquare as le, Pencil as ue, Shield as k, Trash2 as A, Users as j } from "lucide-react";
|
|
26
|
+
import { toast as M } from "sonner";
|
|
19
27
|
// src/botlit/pages/BucketDetailPage.tsx
|
|
20
|
-
var
|
|
28
|
+
var N = ({ title: e, icon: t, loading: n, error: r, onRetry: o, children: l }) => /* @__PURE__ */ C(i, { children: [/* @__PURE__ */ S(s, { children: /* @__PURE__ */ C(c, {
|
|
21
29
|
className: "flex items-center gap-2",
|
|
22
30
|
children: [t, e]
|
|
23
|
-
}) }), /* @__PURE__ */
|
|
31
|
+
}) }), /* @__PURE__ */ S(a, { children: n ? /* @__PURE__ */ S("div", {
|
|
24
32
|
className: "space-y-2",
|
|
25
|
-
children: [1, 2].map((e) => /* @__PURE__ */
|
|
26
|
-
}) : r ? /* @__PURE__ */
|
|
33
|
+
children: [1, 2].map((e) => /* @__PURE__ */ S("div", { className: "h-9 bg-bg-sunken motion-safe:animate-vc-shimmer rounded" }, e))
|
|
34
|
+
}) : r ? /* @__PURE__ */ S(f, {
|
|
27
35
|
resource: e.toLowerCase(),
|
|
28
36
|
error: r,
|
|
29
37
|
onRetry: () => void o()
|
|
30
|
-
}) : l })] }),
|
|
31
|
-
let { bucketId:
|
|
32
|
-
if (
|
|
38
|
+
}) : l })] }), P = () => {
|
|
39
|
+
let { bucketId: P } = T(), { getPath: F } = e(), I = se(), L = g(), [R, z] = b(!1), [B, V] = b(!1), [H, U] = ie(), [de, fe] = re(), { data: W, loading: pe, error: G, refetch: K } = y(P), { data: me, loading: he, error: q, refetch: ge, hasMore: _e, loadingMore: ve, loadMore: ye } = ne(W?.id), J = y(W?.parentBucketId ?? void 0), Y = r(W?.id ? { bucketId: W.id } : void 0), X = n(W?.id ? { bucketId: W.id } : void 0), Z = v(W?.id ? { bucketId: W.id } : void 0), Q = te(W?.id ? { bucketId: W.id } : void 0);
|
|
40
|
+
if (pe) return /* @__PURE__ */ S(t, {
|
|
33
41
|
title: "Bucket",
|
|
34
|
-
children: /* @__PURE__ */
|
|
42
|
+
children: /* @__PURE__ */ S("div", {
|
|
35
43
|
className: "space-y-4",
|
|
36
44
|
children: [
|
|
37
45
|
1,
|
|
38
46
|
2,
|
|
39
47
|
3
|
|
40
|
-
].map((e) => /* @__PURE__ */
|
|
48
|
+
].map((e) => /* @__PURE__ */ S("div", { className: "h-24 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" }, e))
|
|
41
49
|
})
|
|
42
50
|
});
|
|
43
|
-
if (
|
|
51
|
+
if (G) return /* @__PURE__ */ S(t, {
|
|
44
52
|
title: "Bucket",
|
|
45
|
-
children: /* @__PURE__ */
|
|
53
|
+
children: /* @__PURE__ */ S(f, {
|
|
46
54
|
resource: "bucket",
|
|
47
|
-
error:
|
|
48
|
-
onRetry: () => void
|
|
55
|
+
error: G,
|
|
56
|
+
onRetry: () => void K()
|
|
49
57
|
})
|
|
50
58
|
});
|
|
51
|
-
if (!
|
|
59
|
+
if (!W) return /* @__PURE__ */ S(t, {
|
|
52
60
|
title: "Bucket not found",
|
|
53
|
-
children: /* @__PURE__ */
|
|
61
|
+
children: /* @__PURE__ */ S(ee, {
|
|
54
62
|
illustration: "empty-search",
|
|
55
63
|
title: "Bucket not found",
|
|
56
64
|
description: "This bucket may have been deleted, or the link is out of date.",
|
|
57
|
-
action: /* @__PURE__ */
|
|
58
|
-
leftIcon: /* @__PURE__ */
|
|
59
|
-
children: /* @__PURE__ */
|
|
60
|
-
to:
|
|
65
|
+
action: /* @__PURE__ */ S(d, {
|
|
66
|
+
leftIcon: /* @__PURE__ */ S(E, { size: 16 }),
|
|
67
|
+
children: /* @__PURE__ */ S(w, {
|
|
68
|
+
to: F("buckets"),
|
|
61
69
|
children: "Back to Buckets"
|
|
62
70
|
})
|
|
63
71
|
})
|
|
64
72
|
})
|
|
65
73
|
});
|
|
66
|
-
let
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
let be = W.metadata && typeof W.metadata.visibility == "string" ? W.metadata.visibility : null, $ = me.filter((e) => e.id !== W.id), xe = async (e) => {
|
|
75
|
+
try {
|
|
76
|
+
await H({
|
|
77
|
+
bucketId: W.id,
|
|
78
|
+
input: {
|
|
79
|
+
name: e.name,
|
|
80
|
+
description: e.description,
|
|
81
|
+
...e.parentBucketId === (W.parentBucketId ?? null) ? {} : { parentBucketId: e.parentBucketId }
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
} catch (e) {
|
|
85
|
+
return M.error(e instanceof Error ? e.message : L("botlit.buckets.toast.updateFailed", "Could not save the bucket.")), !1;
|
|
86
|
+
}
|
|
87
|
+
return M.success(L("botlit.buckets.toast.updated", "Bucket \"{{name}}\" saved", { name: e.name })), K(), !0;
|
|
88
|
+
}, Se = async () => {
|
|
89
|
+
try {
|
|
90
|
+
await de(W.id);
|
|
91
|
+
} catch (e) {
|
|
92
|
+
M.error(e instanceof Error ? e.message : L("botlit.buckets.toast.deleteFailed", "Could not delete the bucket."));
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
M.success(L("botlit.buckets.toast.deleted", "Bucket \"{{name}}\" deleted", { name: W.name })), V(!1), I(F("buckets"));
|
|
96
|
+
};
|
|
97
|
+
return /* @__PURE__ */ C(t, {
|
|
98
|
+
title: W.name,
|
|
99
|
+
description: W.path,
|
|
100
|
+
actions: /* @__PURE__ */ C("div", {
|
|
101
|
+
className: "flex flex-wrap gap-2",
|
|
80
102
|
children: [
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
|
|
83
|
-
|
|
103
|
+
/* @__PURE__ */ S(d, {
|
|
104
|
+
variant: "outline",
|
|
105
|
+
leftIcon: /* @__PURE__ */ S(E, { size: 16 }),
|
|
106
|
+
children: /* @__PURE__ */ S(w, {
|
|
107
|
+
to: F("buckets"),
|
|
108
|
+
children: "Back to Buckets"
|
|
109
|
+
})
|
|
110
|
+
}),
|
|
111
|
+
/* @__PURE__ */ S(u, {
|
|
112
|
+
permission: l.BUCKET_UPDATE,
|
|
113
|
+
children: /* @__PURE__ */ S(d, {
|
|
114
|
+
variant: "outline",
|
|
115
|
+
leftIcon: /* @__PURE__ */ S(ue, { size: 16 }),
|
|
116
|
+
onClick: () => z(!0),
|
|
117
|
+
children: L("botlit.buckets.detail.edit", "Edit or move")
|
|
118
|
+
})
|
|
84
119
|
}),
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
|
|
87
|
-
children:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
children:
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
120
|
+
/* @__PURE__ */ S(u, {
|
|
121
|
+
permission: l.BUCKET_DELETE,
|
|
122
|
+
children: /* @__PURE__ */ S(d, {
|
|
123
|
+
variant: "destructive",
|
|
124
|
+
leftIcon: /* @__PURE__ */ S(A, { size: 16 }),
|
|
125
|
+
onClick: () => V(!0),
|
|
126
|
+
children: L("botlit.buckets.detail.delete", "Delete")
|
|
127
|
+
})
|
|
128
|
+
})
|
|
129
|
+
]
|
|
130
|
+
}),
|
|
131
|
+
children: [
|
|
132
|
+
/* @__PURE__ */ C("div", {
|
|
133
|
+
className: "space-y-6",
|
|
134
|
+
children: [
|
|
135
|
+
/* @__PURE__ */ S(oe, {
|
|
136
|
+
icon: /* @__PURE__ */ S(O, { size: 18 }),
|
|
137
|
+
children: L("botlit.buckets.detail.purpose", "Buckets group your agents, bots, channels and policies. This page lists this bucket’s sub-buckets and the resources assigned directly to it.")
|
|
138
|
+
}),
|
|
139
|
+
/* @__PURE__ */ C(i, { children: [/* @__PURE__ */ C(s, { children: [/* @__PURE__ */ S(c, { children: "Details" }), /* @__PURE__ */ S(o, { children: W.description ?? "No description" })] }), /* @__PURE__ */ S(a, { children: /* @__PURE__ */ C("dl", {
|
|
140
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
141
|
+
children: [
|
|
142
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("dt", {
|
|
143
|
+
className: "text-xs text-text-secondary",
|
|
144
|
+
children: "Slug"
|
|
145
|
+
}), /* @__PURE__ */ S("dd", {
|
|
146
|
+
className: "mt-1 text-sm font-medium",
|
|
147
|
+
children: W.slug
|
|
148
|
+
})] }),
|
|
149
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("dt", {
|
|
150
|
+
className: "text-xs text-text-secondary",
|
|
151
|
+
children: "Visibility"
|
|
152
|
+
}), /* @__PURE__ */ S("dd", {
|
|
153
|
+
className: "mt-1 text-sm font-medium",
|
|
154
|
+
children: be ?? "—"
|
|
155
|
+
})] }),
|
|
156
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("dt", {
|
|
157
|
+
className: "text-xs text-text-secondary",
|
|
158
|
+
children: "Created"
|
|
159
|
+
}), /* @__PURE__ */ S("dd", {
|
|
160
|
+
className: "mt-1 text-sm font-medium",
|
|
161
|
+
children: ae(W.createdAt)
|
|
162
|
+
})] }),
|
|
163
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("dt", {
|
|
164
|
+
className: "text-xs text-text-secondary",
|
|
165
|
+
children: "Parent bucket"
|
|
166
|
+
}), /* @__PURE__ */ S("dd", {
|
|
167
|
+
className: "mt-1 text-sm font-medium",
|
|
168
|
+
children: W.parentBucketId ? J.data ? /* @__PURE__ */ S(w, {
|
|
169
|
+
to: F(`buckets/${J.data.id}`),
|
|
170
|
+
className: "text-primary hover:underline",
|
|
171
|
+
children: J.data.name
|
|
172
|
+
}) : "—" : "Top level"
|
|
173
|
+
})] })
|
|
174
|
+
]
|
|
175
|
+
}) })] }),
|
|
176
|
+
/* @__PURE__ */ C(i, { children: [/* @__PURE__ */ C(s, { children: [/* @__PURE__ */ C(c, {
|
|
177
|
+
className: "flex items-center gap-2",
|
|
178
|
+
children: [/* @__PURE__ */ S(ce, { size: 18 }), "Sub-buckets"]
|
|
179
|
+
}), /* @__PURE__ */ S(o, { children: "Direct children of this bucket" })] }), /* @__PURE__ */ S(a, { children: he ? /* @__PURE__ */ S("div", {
|
|
180
|
+
className: "space-y-2",
|
|
181
|
+
children: [1, 2].map((e) => /* @__PURE__ */ S("div", { className: "h-9 bg-bg-sunken motion-safe:animate-vc-shimmer rounded" }, e))
|
|
182
|
+
}) : q ? /* @__PURE__ */ S(f, {
|
|
183
|
+
resource: "sub-buckets",
|
|
184
|
+
error: q,
|
|
185
|
+
onRetry: () => void ge()
|
|
186
|
+
}) : $.length > 0 ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S("ul", {
|
|
187
|
+
className: "divide-y divide-border-subtle",
|
|
188
|
+
children: $.map((e) => /* @__PURE__ */ S("li", { children: /* @__PURE__ */ C(w, {
|
|
189
|
+
to: F(`buckets/${e.id}`),
|
|
190
|
+
className: "flex items-center gap-2 py-2 text-sm hover:text-primary",
|
|
191
|
+
children: [
|
|
192
|
+
/* @__PURE__ */ S(O, {
|
|
193
|
+
size: 16,
|
|
194
|
+
className: "text-text-secondary"
|
|
195
|
+
}),
|
|
196
|
+
/* @__PURE__ */ S("span", {
|
|
197
|
+
className: "font-medium",
|
|
198
|
+
children: e.name
|
|
199
|
+
}),
|
|
200
|
+
/* @__PURE__ */ S("span", {
|
|
201
|
+
className: "text-xs text-text-secondary",
|
|
202
|
+
children: e.path
|
|
203
|
+
})
|
|
204
|
+
]
|
|
205
|
+
}) }, e.id))
|
|
206
|
+
}), /* @__PURE__ */ S(p, {
|
|
207
|
+
hasMore: _e,
|
|
208
|
+
loadingMore: ve,
|
|
209
|
+
onLoadMore: () => void ye(),
|
|
210
|
+
loadedCount: $.length
|
|
211
|
+
})] }) : /* @__PURE__ */ S("p", {
|
|
212
|
+
className: "text-sm text-text-secondary",
|
|
213
|
+
children: "No sub-buckets."
|
|
214
|
+
}) })] }),
|
|
215
|
+
/* @__PURE__ */ C("div", {
|
|
216
|
+
className: "grid grid-cols-1 gap-6 lg:grid-cols-2",
|
|
137
217
|
children: [
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
|
|
140
|
-
|
|
218
|
+
/* @__PURE__ */ S(N, {
|
|
219
|
+
title: "Agents",
|
|
220
|
+
icon: /* @__PURE__ */ S(D, { size: 18 }),
|
|
221
|
+
loading: Y.loading,
|
|
222
|
+
error: Y.error,
|
|
223
|
+
onRetry: Y.refetch,
|
|
224
|
+
children: Y.data.length > 0 ? /* @__PURE__ */ S("ul", {
|
|
225
|
+
className: "divide-y divide-border-subtle",
|
|
226
|
+
children: Y.data.map((e) => /* @__PURE__ */ S("li", { children: /* @__PURE__ */ C(w, {
|
|
227
|
+
to: F(`agents/${e.id}`),
|
|
228
|
+
className: "flex items-center justify-between gap-2 py-2 text-sm hover:text-primary",
|
|
229
|
+
children: [/* @__PURE__ */ S("span", {
|
|
230
|
+
className: "font-medium",
|
|
231
|
+
children: e.name
|
|
232
|
+
}), /* @__PURE__ */ S(_, { status: e.status })]
|
|
233
|
+
}) }, e.id))
|
|
234
|
+
}) : /* @__PURE__ */ S("p", {
|
|
235
|
+
className: "text-sm text-text-secondary",
|
|
236
|
+
children: "No agents in this bucket."
|
|
237
|
+
})
|
|
141
238
|
}),
|
|
142
|
-
/* @__PURE__ */
|
|
143
|
-
|
|
144
|
-
|
|
239
|
+
/* @__PURE__ */ S(N, {
|
|
240
|
+
title: "Bots",
|
|
241
|
+
icon: /* @__PURE__ */ S(j, { size: 18 }),
|
|
242
|
+
loading: X.loading,
|
|
243
|
+
error: X.error,
|
|
244
|
+
onRetry: X.refetch,
|
|
245
|
+
children: X.data.length > 0 ? /* @__PURE__ */ S("ul", {
|
|
246
|
+
className: "divide-y divide-border-subtle",
|
|
247
|
+
children: X.data.map((e) => /* @__PURE__ */ S("li", { children: /* @__PURE__ */ C(w, {
|
|
248
|
+
to: F(`bots/${e.id}`),
|
|
249
|
+
className: "flex items-center justify-between gap-2 py-2 text-sm hover:text-primary",
|
|
250
|
+
children: [/* @__PURE__ */ S("span", {
|
|
251
|
+
className: "font-medium",
|
|
252
|
+
children: e.name
|
|
253
|
+
}), /* @__PURE__ */ S(_, { status: e.status })]
|
|
254
|
+
}) }, e.id))
|
|
255
|
+
}) : /* @__PURE__ */ S("p", {
|
|
256
|
+
className: "text-sm text-text-secondary",
|
|
257
|
+
children: "No bots in this bucket."
|
|
258
|
+
})
|
|
145
259
|
}),
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
|
|
148
|
-
|
|
260
|
+
/* @__PURE__ */ S(N, {
|
|
261
|
+
title: "Channels",
|
|
262
|
+
icon: /* @__PURE__ */ S(le, { size: 18 }),
|
|
263
|
+
loading: Z.loading,
|
|
264
|
+
error: Z.error,
|
|
265
|
+
onRetry: Z.refetch,
|
|
266
|
+
children: Z.data.length > 0 ? /* @__PURE__ */ S("ul", {
|
|
267
|
+
className: "divide-y divide-border-subtle",
|
|
268
|
+
children: Z.data.map((e) => /* @__PURE__ */ S("li", { children: /* @__PURE__ */ C(w, {
|
|
269
|
+
to: F(`channels/${e.id}`),
|
|
270
|
+
className: "flex items-center justify-between gap-2 py-2 text-sm hover:text-primary",
|
|
271
|
+
children: [/* @__PURE__ */ S("span", {
|
|
272
|
+
className: "font-medium",
|
|
273
|
+
children: e.name
|
|
274
|
+
}), /* @__PURE__ */ S(_, { status: e.status })]
|
|
275
|
+
}) }, e.id))
|
|
276
|
+
}) : /* @__PURE__ */ S("p", {
|
|
277
|
+
className: "text-sm text-text-secondary",
|
|
278
|
+
children: "No channels in this bucket."
|
|
279
|
+
})
|
|
280
|
+
}),
|
|
281
|
+
/* @__PURE__ */ S(N, {
|
|
282
|
+
title: "Policies",
|
|
283
|
+
icon: /* @__PURE__ */ S(k, { size: 18 }),
|
|
284
|
+
loading: Q.loading,
|
|
285
|
+
error: Q.error,
|
|
286
|
+
onRetry: Q.refetch,
|
|
287
|
+
children: Q.data.length > 0 ? /* @__PURE__ */ S("ul", {
|
|
288
|
+
className: "divide-y divide-border-subtle",
|
|
289
|
+
children: Q.data.map((e) => /* @__PURE__ */ S("li", { children: /* @__PURE__ */ C(w, {
|
|
290
|
+
to: F(`policies/${e.id}`),
|
|
291
|
+
className: "flex items-center justify-between gap-2 py-2 text-sm hover:text-primary",
|
|
292
|
+
children: [/* @__PURE__ */ S("span", {
|
|
293
|
+
className: "font-medium",
|
|
294
|
+
children: e.name
|
|
295
|
+
}), /* @__PURE__ */ S(_, { status: e.status })]
|
|
296
|
+
}) }, e.id))
|
|
297
|
+
}) : /* @__PURE__ */ S("p", {
|
|
298
|
+
className: "text-sm text-text-secondary",
|
|
299
|
+
children: "No policies in this bucket."
|
|
300
|
+
})
|
|
149
301
|
})
|
|
150
302
|
]
|
|
151
|
-
})
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
className: "flex items-center justify-between gap-2 py-2 text-sm hover:text-primary",
|
|
170
|
-
children: [/* @__PURE__ */ y("span", {
|
|
171
|
-
className: "font-medium",
|
|
172
|
-
children: e.name
|
|
173
|
-
}), /* @__PURE__ */ y(f, { status: e.status })]
|
|
174
|
-
}) }, e.id))
|
|
175
|
-
}) : /* @__PURE__ */ y("p", {
|
|
176
|
-
className: "text-sm text-text-secondary",
|
|
177
|
-
children: "No agents in this bucket."
|
|
178
|
-
})
|
|
179
|
-
}),
|
|
180
|
-
/* @__PURE__ */ y(A, {
|
|
181
|
-
title: "Bots",
|
|
182
|
-
icon: /* @__PURE__ */ y(k, { size: 18 }),
|
|
183
|
-
loading: U.loading,
|
|
184
|
-
error: U.error,
|
|
185
|
-
onRetry: U.refetch,
|
|
186
|
-
children: U.data.length > 0 ? /* @__PURE__ */ y("ul", {
|
|
187
|
-
className: "divide-y divide-border-subtle",
|
|
188
|
-
children: U.data.map((e) => /* @__PURE__ */ y("li", { children: /* @__PURE__ */ b(x, {
|
|
189
|
-
to: M(`bots/${e.id}`),
|
|
190
|
-
className: "flex items-center justify-between gap-2 py-2 text-sm hover:text-primary",
|
|
191
|
-
children: [/* @__PURE__ */ y("span", {
|
|
192
|
-
className: "font-medium",
|
|
193
|
-
children: e.name
|
|
194
|
-
}), /* @__PURE__ */ y(f, { status: e.status })]
|
|
195
|
-
}) }, e.id))
|
|
196
|
-
}) : /* @__PURE__ */ y("p", {
|
|
197
|
-
className: "text-sm text-text-secondary",
|
|
198
|
-
children: "No bots in this bucket."
|
|
199
|
-
})
|
|
200
|
-
}),
|
|
201
|
-
/* @__PURE__ */ y(A, {
|
|
202
|
-
title: "Channels",
|
|
203
|
-
icon: /* @__PURE__ */ y(D, { size: 18 }),
|
|
204
|
-
loading: W.loading,
|
|
205
|
-
error: W.error,
|
|
206
|
-
onRetry: W.refetch,
|
|
207
|
-
children: W.data.length > 0 ? /* @__PURE__ */ y("ul", {
|
|
208
|
-
className: "divide-y divide-border-subtle",
|
|
209
|
-
children: W.data.map((e) => /* @__PURE__ */ y("li", { children: /* @__PURE__ */ b(x, {
|
|
210
|
-
to: M(`channels/${e.id}`),
|
|
211
|
-
className: "flex items-center justify-between gap-2 py-2 text-sm hover:text-primary",
|
|
212
|
-
children: [/* @__PURE__ */ y("span", {
|
|
213
|
-
className: "font-medium",
|
|
214
|
-
children: e.name
|
|
215
|
-
}), /* @__PURE__ */ y(f, { status: e.status })]
|
|
216
|
-
}) }, e.id))
|
|
217
|
-
}) : /* @__PURE__ */ y("p", {
|
|
218
|
-
className: "text-sm text-text-secondary",
|
|
219
|
-
children: "No channels in this bucket."
|
|
220
|
-
})
|
|
221
|
-
}),
|
|
222
|
-
/* @__PURE__ */ y(A, {
|
|
223
|
-
title: "Policies",
|
|
224
|
-
icon: /* @__PURE__ */ y(O, { size: 18 }),
|
|
225
|
-
loading: G.loading,
|
|
226
|
-
error: G.error,
|
|
227
|
-
onRetry: G.refetch,
|
|
228
|
-
children: G.data.length > 0 ? /* @__PURE__ */ y("ul", {
|
|
229
|
-
className: "divide-y divide-border-subtle",
|
|
230
|
-
children: G.data.map((e) => /* @__PURE__ */ y("li", { children: /* @__PURE__ */ b(x, {
|
|
231
|
-
to: M(`policies/${e.id}`),
|
|
232
|
-
className: "flex items-center justify-between gap-2 py-2 text-sm hover:text-primary",
|
|
233
|
-
children: [/* @__PURE__ */ y("span", {
|
|
234
|
-
className: "font-medium",
|
|
235
|
-
children: e.name
|
|
236
|
-
}), /* @__PURE__ */ y(f, { status: e.status })]
|
|
237
|
-
}) }, e.id))
|
|
238
|
-
}) : /* @__PURE__ */ y("p", {
|
|
239
|
-
className: "text-sm text-text-secondary",
|
|
240
|
-
children: "No policies in this bucket."
|
|
241
|
-
})
|
|
242
|
-
})
|
|
243
|
-
]
|
|
244
|
-
})
|
|
245
|
-
]
|
|
246
|
-
})
|
|
303
|
+
})
|
|
304
|
+
]
|
|
305
|
+
}),
|
|
306
|
+
/* @__PURE__ */ S(m, {
|
|
307
|
+
mode: "edit",
|
|
308
|
+
open: R,
|
|
309
|
+
bucket: W,
|
|
310
|
+
saving: U.loading,
|
|
311
|
+
onSubmit: xe,
|
|
312
|
+
onClose: () => z(!1)
|
|
313
|
+
}),
|
|
314
|
+
/* @__PURE__ */ S(h, {
|
|
315
|
+
bucket: B ? W : null,
|
|
316
|
+
deleting: fe.loading,
|
|
317
|
+
onConfirm: () => void Se(),
|
|
318
|
+
onClose: () => V(!1)
|
|
319
|
+
})
|
|
320
|
+
]
|
|
247
321
|
});
|
|
248
322
|
};
|
|
249
|
-
export {
|
|
323
|
+
export { P as BucketDetailPage };
|
|
250
324
|
|
|
251
325
|
//# sourceMappingURL=BucketDetailPage.js.map
|