@datatechsolutions/ui 3.6.0 → 3.6.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/dist/astrlabe/index.js +106 -106
- package/dist/astrlabe/index.mjs +2 -2
- package/dist/astrlabe/workflow-canvas.js +2 -2
- package/dist/astrlabe/workflow-canvas.mjs +1 -1
- package/dist/{chunk-I63NFWIA.mjs → chunk-3Z66NXEB.mjs} +3 -3
- package/dist/{chunk-I63NFWIA.mjs.map → chunk-3Z66NXEB.mjs.map} +1 -1
- package/dist/{chunk-XTXLRQ3H.mjs → chunk-4JDJRGAB.mjs} +27 -28
- package/dist/chunk-4JDJRGAB.mjs.map +1 -0
- package/dist/{chunk-WEZ722BS.mjs → chunk-5ZAZ2C7A.mjs} +4 -4
- package/dist/{chunk-WEZ722BS.mjs.map → chunk-5ZAZ2C7A.mjs.map} +1 -1
- package/dist/{chunk-UWSMHKOF.js → chunk-6ZMTJSQF.js} +78 -78
- package/dist/chunk-6ZMTJSQF.js.map +1 -0
- package/dist/{chunk-VPOIX2DY.js → chunk-DRORQGN2.js} +27 -27
- package/dist/{chunk-VPOIX2DY.js.map → chunk-DRORQGN2.js.map} +1 -1
- package/dist/{chunk-QTA5I6FC.mjs → chunk-KDFBN2L2.mjs} +34 -31
- package/dist/chunk-KDFBN2L2.mjs.map +1 -0
- package/dist/{chunk-QHP2MR2F.js → chunk-KEWRLEYV.js} +4 -4
- package/dist/{chunk-QHP2MR2F.js.map → chunk-KEWRLEYV.js.map} +1 -1
- package/dist/{chunk-DYWSG42B.mjs → chunk-MQNXKBFP.mjs} +8 -8
- package/dist/chunk-MQNXKBFP.mjs.map +1 -0
- package/dist/{chunk-3WXMBAGN.js → chunk-MUOTTGCX.js} +27 -28
- package/dist/chunk-MUOTTGCX.js.map +1 -0
- package/dist/{chunk-S7AV6XEY.js → chunk-SQZGQOKU.js} +32 -29
- package/dist/chunk-SQZGQOKU.js.map +1 -0
- package/dist/platform/agents-workspace.js +4 -4
- package/dist/platform/agents-workspace.mjs +3 -3
- package/dist/platform/index.js +15 -15
- package/dist/platform/index.mjs +6 -6
- package/dist/platform/pages/index.js +325 -320
- package/dist/platform/pages/index.js.map +1 -1
- package/dist/platform/pages/index.mjs +320 -315
- package/dist/platform/pages/index.mjs.map +1 -1
- package/dist/platform/workflow-canvas-shell.js +3 -3
- package/dist/platform/workflow-canvas-shell.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-3WXMBAGN.js.map +0 -1
- package/dist/chunk-DYWSG42B.mjs.map +0 -1
- package/dist/chunk-QTA5I6FC.mjs.map +0 -1
- package/dist/chunk-S7AV6XEY.js.map +0 -1
- package/dist/chunk-UWSMHKOF.js.map +0 -1
- package/dist/chunk-XTXLRQ3H.mjs.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { adaptWorkflowGraphToUi, formatDurationMs } from '../../chunk-UQXVCVAN.mjs';
|
|
3
|
-
import { WorkflowWorkspace } from '../../chunk-
|
|
4
|
-
export { RolesPageView, UsersPageView } from '../../chunk-
|
|
3
|
+
import { WorkflowWorkspace } from '../../chunk-4JDJRGAB.mjs';
|
|
4
|
+
export { RolesPageView, UsersPageView } from '../../chunk-4JDJRGAB.mjs';
|
|
5
5
|
import { DatasourceModal, findCategory, DIALECT_CATEGORIES } from '../../chunk-HGWVJ3VB.mjs';
|
|
6
6
|
export { DIALECT_CATEGORIES, DatasourceFormModal, DatasourceModal, findCategory, findDialect } from '../../chunk-HGWVJ3VB.mjs';
|
|
7
|
-
import { defaultRuleForm, RuleForm, ExecutionTimelinePanel } from '../../chunk-
|
|
7
|
+
import { defaultRuleForm, RuleForm, ExecutionTimelinePanel } from '../../chunk-MQNXKBFP.mjs';
|
|
8
8
|
import '../../chunk-JB6RNAD2.mjs';
|
|
9
9
|
import '../../chunk-LEXBTVGM.mjs';
|
|
10
|
-
import '../../chunk-
|
|
11
|
-
import { HeroSection,
|
|
10
|
+
import '../../chunk-KDFBN2L2.mjs';
|
|
11
|
+
import { HeroSection, PageLoadingState, PageEmptyState, SearchBar, EntityCard, Badge, ManagementPageLayout, CreateActionButton, Button, GlassModal, FormGrid, FormSelect, FormInput, FormTextarea, SectionHeader, Text, Form, FormActionsRow, Table, TableHead, TableRow, TableHeader, TableBody, TableCell, InlineForm, CopyableId } from '../../chunk-4OFG6POC.mjs';
|
|
12
12
|
import '../../chunk-D2JF6C3E.mjs';
|
|
13
13
|
import '../../chunk-7VJ7CMMT.mjs';
|
|
14
14
|
import { useLink } from '../../chunk-QWG2FMUN.mjs';
|
|
@@ -32,29 +32,30 @@ function AgentsModelsPageView({ labels, models, loading }) {
|
|
|
32
32
|
label: labels.title,
|
|
33
33
|
title: labels.title,
|
|
34
34
|
subtitle: labels.subtitle,
|
|
35
|
-
gradient: "from-emerald-500 to-teal-700"
|
|
36
|
-
toolbar: !isEmpty ? /* @__PURE__ */ jsx(
|
|
37
|
-
SearchBar,
|
|
38
|
-
{
|
|
39
|
-
searchTerm,
|
|
40
|
-
onSearchChange: setSearchTerm,
|
|
41
|
-
placeholder: labels.searchPlaceholder ?? labels.title,
|
|
42
|
-
noBorder: true
|
|
43
|
-
}
|
|
44
|
-
) : void 0
|
|
35
|
+
gradient: "from-emerald-500 to-teal-700"
|
|
45
36
|
}
|
|
46
37
|
);
|
|
47
|
-
const content = loading ? /* @__PURE__ */ jsx(PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsx(PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
model
|
|
57
|
-
|
|
38
|
+
const content = loading ? /* @__PURE__ */ jsx(PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsx(PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
39
|
+
/* @__PURE__ */ jsx(
|
|
40
|
+
SearchBar,
|
|
41
|
+
{
|
|
42
|
+
searchTerm,
|
|
43
|
+
onSearchChange: setSearchTerm,
|
|
44
|
+
placeholder: labels.searchPlaceholder ?? labels.title
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredModels.map((model) => /* @__PURE__ */ jsx(
|
|
48
|
+
EntityCard,
|
|
49
|
+
{
|
|
50
|
+
accentGradient: "from-emerald-500 to-teal-700",
|
|
51
|
+
icon: /* @__PURE__ */ jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-emerald-500/10 text-emerald-600 dark:bg-emerald-500/20 dark:text-emerald-400", children: /* @__PURE__ */ jsx(CubeTransparentIcon, { className: "h-6 w-6" }) }),
|
|
52
|
+
title: model.name,
|
|
53
|
+
subtitle: `${labels.provider}: ${model.provider}`,
|
|
54
|
+
status: /* @__PURE__ */ jsx(Badge, { color: model.enabled ? "emerald" : "zinc", children: model.enabled ? labels.enabled : labels.disabled })
|
|
55
|
+
},
|
|
56
|
+
model.id
|
|
57
|
+
)) })
|
|
58
|
+
] });
|
|
58
59
|
return /* @__PURE__ */ jsx(ManagementPageLayout, { hero, content });
|
|
59
60
|
}
|
|
60
61
|
function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpdate, onDelete }) {
|
|
@@ -241,16 +242,7 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
|
|
|
241
242
|
title: labels.title,
|
|
242
243
|
subtitle: labels.subtitle,
|
|
243
244
|
gradient: "from-sky-500 to-blue-700",
|
|
244
|
-
toolbar:
|
|
245
|
-
SearchBar,
|
|
246
|
-
{
|
|
247
|
-
searchTerm,
|
|
248
|
-
onSearchChange: setSearchTerm,
|
|
249
|
-
placeholder: labels.searchPlaceholder ?? labels.title,
|
|
250
|
-
noBorder: true
|
|
251
|
-
}
|
|
252
|
-
) : void 0,
|
|
253
|
-
actions: /* @__PURE__ */ jsx(
|
|
245
|
+
toolbar: /* @__PURE__ */ jsx(
|
|
254
246
|
CreateActionButton,
|
|
255
247
|
{
|
|
256
248
|
mode: "desktop",
|
|
@@ -270,37 +262,47 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
|
|
|
270
262
|
accent: "sky"
|
|
271
263
|
}
|
|
272
264
|
);
|
|
273
|
-
const content = loading ? /* @__PURE__ */ jsx(PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsx(PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
return /* @__PURE__ */ jsx(
|
|
277
|
-
EntityCard,
|
|
265
|
+
const content = loading ? /* @__PURE__ */ jsx(PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsx(PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
266
|
+
/* @__PURE__ */ jsx(
|
|
267
|
+
SearchBar,
|
|
278
268
|
{
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
269
|
+
searchTerm,
|
|
270
|
+
onSearchChange: setSearchTerm,
|
|
271
|
+
placeholder: labels.searchPlaceholder ?? labels.title
|
|
272
|
+
}
|
|
273
|
+
),
|
|
274
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredPrompts.map((prompt) => {
|
|
275
|
+
const agentName = agentNameById.get(prompt.agentId) ?? prompt.agentId;
|
|
276
|
+
const key = `${prompt.agentId}:${prompt.locale}:${prompt.version}`;
|
|
277
|
+
return /* @__PURE__ */ jsx(
|
|
278
|
+
EntityCard,
|
|
279
|
+
{
|
|
280
|
+
accentGradient: "from-sky-500 to-blue-700",
|
|
281
|
+
icon: /* @__PURE__ */ jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-sky-500/10 text-sky-600 dark:bg-sky-500/20 dark:text-sky-400", children: /* @__PURE__ */ jsx(ChatBubbleLeftEllipsisIcon, { className: "h-6 w-6" }) }),
|
|
282
|
+
title: agentName,
|
|
283
|
+
subtitle: `${prompt.locale} \xB7 v${prompt.version}`,
|
|
284
|
+
status: prompt.isActive ? /* @__PURE__ */ jsx(Badge, { color: "emerald", children: labels.isActive }) : null,
|
|
285
|
+
footer: /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
286
|
+
!prompt.isActive && /* @__PURE__ */ jsx(Button, { type: "button", size: "sm", outline: true, onClick: () => onActivate(prompt), children: labels.activate }),
|
|
287
|
+
/* @__PURE__ */ jsx(
|
|
288
|
+
Button,
|
|
289
|
+
{
|
|
290
|
+
type: "button",
|
|
291
|
+
size: "sm",
|
|
292
|
+
color: "rose",
|
|
293
|
+
onClick: () => {
|
|
294
|
+
if (window.confirm(labels.deleteConfirm)) onDelete(prompt);
|
|
295
|
+
},
|
|
296
|
+
children: labels.delete
|
|
297
|
+
}
|
|
298
|
+
)
|
|
299
|
+
] }),
|
|
300
|
+
children: prompt.prompt && /* @__PURE__ */ jsx("p", { className: "mt-1 line-clamp-3 text-xs text-slate-500 dark:text-slate-400", children: prompt.prompt })
|
|
301
|
+
},
|
|
302
|
+
key
|
|
303
|
+
);
|
|
304
|
+
}) })
|
|
305
|
+
] });
|
|
304
306
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
305
307
|
/* @__PURE__ */ jsx(ManagementPageLayout, { hero, content, mobileAction }),
|
|
306
308
|
/* @__PURE__ */ jsx(
|
|
@@ -385,16 +387,7 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
|
|
|
385
387
|
title: labels.title,
|
|
386
388
|
subtitle: labels.subtitle,
|
|
387
389
|
gradient: "from-amber-500 to-orange-700",
|
|
388
|
-
toolbar:
|
|
389
|
-
SearchBar,
|
|
390
|
-
{
|
|
391
|
-
searchTerm,
|
|
392
|
-
onSearchChange: setSearchTerm,
|
|
393
|
-
placeholder: labels.searchPlaceholder ?? labels.title,
|
|
394
|
-
noBorder: true
|
|
395
|
-
}
|
|
396
|
-
) : void 0,
|
|
397
|
-
actions: /* @__PURE__ */ jsx(
|
|
390
|
+
toolbar: /* @__PURE__ */ jsx(
|
|
398
391
|
CreateActionButton,
|
|
399
392
|
{
|
|
400
393
|
mode: "desktop",
|
|
@@ -414,33 +407,43 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
|
|
|
414
407
|
accent: "amber"
|
|
415
408
|
}
|
|
416
409
|
);
|
|
417
|
-
const content = loading ? /* @__PURE__ */ jsx(PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsx(PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
410
|
+
const content = loading ? /* @__PURE__ */ jsx(PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsx(PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
411
|
+
/* @__PURE__ */ jsx(
|
|
412
|
+
SearchBar,
|
|
413
|
+
{
|
|
414
|
+
searchTerm,
|
|
415
|
+
onSearchChange: setSearchTerm,
|
|
416
|
+
placeholder: labels.searchPlaceholder ?? labels.title
|
|
417
|
+
}
|
|
418
|
+
),
|
|
419
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredTools.map((tool) => /* @__PURE__ */ jsx(
|
|
420
|
+
EntityCard,
|
|
421
|
+
{
|
|
422
|
+
accentGradient: "from-amber-500 to-orange-700",
|
|
423
|
+
icon: /* @__PURE__ */ jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-amber-500/10 text-amber-600 dark:bg-amber-500/20 dark:text-amber-400", children: /* @__PURE__ */ jsx(WrenchScrewdriverIcon, { className: "h-6 w-6" }) }),
|
|
424
|
+
title: tool.name,
|
|
425
|
+
subtitle: toolTypeLabel(tool),
|
|
426
|
+
status: /* @__PURE__ */ jsx(Badge, { color: tool.enabled ? "emerald" : "zinc", children: tool.enabled ? labels.enabled : labels.disabled }),
|
|
427
|
+
footer: /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
428
|
+
/* @__PURE__ */ jsx(Button, { type: "button", size: "sm", outline: true, onClick: () => setEditing(tool), children: labels.edit }),
|
|
429
|
+
/* @__PURE__ */ jsx(
|
|
430
|
+
Button,
|
|
431
|
+
{
|
|
432
|
+
type: "button",
|
|
433
|
+
size: "sm",
|
|
434
|
+
color: "rose",
|
|
435
|
+
onClick: () => {
|
|
436
|
+
if (window.confirm(labels.deleteConfirm)) onDelete(tool);
|
|
437
|
+
},
|
|
438
|
+
children: labels.delete
|
|
439
|
+
}
|
|
440
|
+
)
|
|
441
|
+
] }),
|
|
442
|
+
children: tool.description && /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: tool.description })
|
|
443
|
+
},
|
|
444
|
+
tool.agentToolId
|
|
445
|
+
)) })
|
|
446
|
+
] });
|
|
444
447
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
445
448
|
/* @__PURE__ */ jsx(ManagementPageLayout, { hero, content, mobileAction }),
|
|
446
449
|
createOpen && /* @__PURE__ */ jsx(
|
|
@@ -940,16 +943,7 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete })
|
|
|
940
943
|
title: labels.title,
|
|
941
944
|
subtitle: labels.subtitle,
|
|
942
945
|
gradient: "from-fuchsia-500 to-purple-700",
|
|
943
|
-
toolbar:
|
|
944
|
-
SearchBar,
|
|
945
|
-
{
|
|
946
|
-
searchTerm,
|
|
947
|
-
onSearchChange: setSearchTerm,
|
|
948
|
-
placeholder: labels.searchPlaceholder ?? labels.title,
|
|
949
|
-
noBorder: true
|
|
950
|
-
}
|
|
951
|
-
) : void 0,
|
|
952
|
-
actions: /* @__PURE__ */ jsx(
|
|
946
|
+
toolbar: /* @__PURE__ */ jsx(
|
|
953
947
|
CreateActionButton,
|
|
954
948
|
{
|
|
955
949
|
mode: "desktop",
|
|
@@ -969,33 +963,43 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete })
|
|
|
969
963
|
accent: "fuchsia"
|
|
970
964
|
}
|
|
971
965
|
);
|
|
972
|
-
const content = loading ? /* @__PURE__ */ jsx(PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsx(PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
966
|
+
const content = loading ? /* @__PURE__ */ jsx(PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsx(PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
967
|
+
/* @__PURE__ */ jsx(
|
|
968
|
+
SearchBar,
|
|
969
|
+
{
|
|
970
|
+
searchTerm,
|
|
971
|
+
onSearchChange: setSearchTerm,
|
|
972
|
+
placeholder: labels.searchPlaceholder ?? labels.title
|
|
973
|
+
}
|
|
974
|
+
),
|
|
975
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredRules.map((rule) => /* @__PURE__ */ jsx(
|
|
976
|
+
EntityCard,
|
|
977
|
+
{
|
|
978
|
+
accentGradient: "from-fuchsia-500 to-purple-700",
|
|
979
|
+
icon: /* @__PURE__ */ jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-fuchsia-500/10 text-fuchsia-600 dark:bg-fuchsia-500/20 dark:text-fuchsia-400", children: /* @__PURE__ */ jsx(AdjustmentsHorizontalIcon, { className: "h-6 w-6" }) }),
|
|
980
|
+
title: rule.name,
|
|
981
|
+
subtitle: `${labels.order}: ${rule.order ?? 0}`,
|
|
982
|
+
status: /* @__PURE__ */ jsx(Badge, { color: rule.enabled ? "emerald" : "zinc", children: rule.enabled ? labels.enabled : labels.disabled }),
|
|
983
|
+
footer: /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
984
|
+
/* @__PURE__ */ jsx(Button, { type: "button", size: "sm", outline: true, onClick: () => setEditing(rule), children: labels.edit }),
|
|
985
|
+
/* @__PURE__ */ jsx(
|
|
986
|
+
Button,
|
|
987
|
+
{
|
|
988
|
+
type: "button",
|
|
989
|
+
size: "sm",
|
|
990
|
+
color: "rose",
|
|
991
|
+
onClick: () => {
|
|
992
|
+
if (window.confirm(labels.deleteConfirm)) onDelete(rule);
|
|
993
|
+
},
|
|
994
|
+
children: labels.delete
|
|
995
|
+
}
|
|
996
|
+
)
|
|
997
|
+
] }),
|
|
998
|
+
children: rule.description && /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: rule.description })
|
|
999
|
+
},
|
|
1000
|
+
rule.ruleId
|
|
1001
|
+
)) })
|
|
1002
|
+
] });
|
|
999
1003
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1000
1004
|
/* @__PURE__ */ jsx(ManagementPageLayout, { hero, content, mobileAction }),
|
|
1001
1005
|
createOpen && /* @__PURE__ */ jsx(
|
|
@@ -1273,16 +1277,7 @@ function DatasourcesPageView({
|
|
|
1273
1277
|
title: labels.title,
|
|
1274
1278
|
subtitle: labels.subtitle,
|
|
1275
1279
|
gradient: "from-amber-500 to-orange-600",
|
|
1276
|
-
toolbar:
|
|
1277
|
-
SearchBar,
|
|
1278
|
-
{
|
|
1279
|
-
searchTerm,
|
|
1280
|
-
onSearchChange: setSearchTerm,
|
|
1281
|
-
placeholder: labels.searchPlaceholder ?? labels.title,
|
|
1282
|
-
noBorder: true
|
|
1283
|
-
}
|
|
1284
|
-
) : void 0,
|
|
1285
|
-
actions: /* @__PURE__ */ jsx(
|
|
1280
|
+
toolbar: /* @__PURE__ */ jsx(
|
|
1286
1281
|
CreateActionButton,
|
|
1287
1282
|
{
|
|
1288
1283
|
mode: "desktop",
|
|
@@ -1302,6 +1297,14 @@ function DatasourcesPageView({
|
|
|
1302
1297
|
accent: "amber"
|
|
1303
1298
|
}
|
|
1304
1299
|
),
|
|
1300
|
+
!isEmpty && /* @__PURE__ */ jsx(
|
|
1301
|
+
SearchBar,
|
|
1302
|
+
{
|
|
1303
|
+
searchTerm,
|
|
1304
|
+
onSearchChange: setSearchTerm,
|
|
1305
|
+
placeholder: labels.searchPlaceholder ?? labels.title
|
|
1306
|
+
}
|
|
1307
|
+
),
|
|
1305
1308
|
isEmpty ? /* @__PURE__ */ jsx(
|
|
1306
1309
|
PageEmptyState,
|
|
1307
1310
|
{
|
|
@@ -1325,7 +1328,7 @@ function DatasourcesPageView({
|
|
|
1325
1328
|
subtitle: dialectLabel,
|
|
1326
1329
|
status: /* @__PURE__ */ jsx(Badge, { color: ds.enabled ? "emerald" : "zinc", children: ds.enabled ? labels.enabled : labels.disabled }),
|
|
1327
1330
|
footer: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-xs text-slate-500 dark:text-slate-400", children: [
|
|
1328
|
-
ds.readOnly && /* @__PURE__ */ jsx(
|
|
1331
|
+
ds.readOnly && /* @__PURE__ */ jsx(Badge, { color: "blue", size: "xs", children: "Read-only" }),
|
|
1329
1332
|
ds.timeoutMs && /* @__PURE__ */ jsxs("span", { children: [
|
|
1330
1333
|
ds.timeoutMs / 1e3,
|
|
1331
1334
|
"s timeout"
|
|
@@ -1382,30 +1385,31 @@ function AgentsIndexPageView({ labels }) {
|
|
|
1382
1385
|
label: labels.title,
|
|
1383
1386
|
title: labels.title,
|
|
1384
1387
|
subtitle: labels.subtitle,
|
|
1385
|
-
gradient: "from-violet-500 to-indigo-700"
|
|
1386
|
-
toolbar: !isEmpty ? /* @__PURE__ */ jsx(
|
|
1387
|
-
SearchBar,
|
|
1388
|
-
{
|
|
1389
|
-
searchTerm,
|
|
1390
|
-
onSearchChange: setSearchTerm,
|
|
1391
|
-
placeholder: labels.searchPlaceholder ?? labels.title,
|
|
1392
|
-
noBorder: true
|
|
1393
|
-
}
|
|
1394
|
-
) : void 0
|
|
1388
|
+
gradient: "from-violet-500 to-indigo-700"
|
|
1395
1389
|
}
|
|
1396
1390
|
);
|
|
1397
|
-
const content = /* @__PURE__ */
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
EntityCard,
|
|
1391
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1392
|
+
!isEmpty && /* @__PURE__ */ jsx(
|
|
1393
|
+
SearchBar,
|
|
1401
1394
|
{
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
children: /* @__PURE__ */ jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: tile.subtitle })
|
|
1395
|
+
searchTerm,
|
|
1396
|
+
onSearchChange: setSearchTerm,
|
|
1397
|
+
placeholder: labels.searchPlaceholder ?? labels.title
|
|
1406
1398
|
}
|
|
1407
|
-
)
|
|
1408
|
-
|
|
1399
|
+
),
|
|
1400
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4", children: filteredTiles.map((tile) => {
|
|
1401
|
+
const Icon = tile.icon;
|
|
1402
|
+
return /* @__PURE__ */ jsx(Link, { href: tile.href, className: "block focus:outline-none", children: /* @__PURE__ */ jsx(
|
|
1403
|
+
EntityCard,
|
|
1404
|
+
{
|
|
1405
|
+
accentGradient: tile.gradient,
|
|
1406
|
+
icon: /* @__PURE__ */ jsx("div", { className: `flex h-11 w-11 items-center justify-center rounded-lg bg-gradient-to-br ${tile.gradient} shadow-lg`, children: /* @__PURE__ */ jsx(Icon, { className: "h-6 w-6 text-white" }) }),
|
|
1407
|
+
title: tile.title,
|
|
1408
|
+
children: /* @__PURE__ */ jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: tile.subtitle })
|
|
1409
|
+
}
|
|
1410
|
+
) }, tile.id);
|
|
1411
|
+
}) })
|
|
1412
|
+
] });
|
|
1409
1413
|
return /* @__PURE__ */ jsx(ManagementPageLayout, { hero, content });
|
|
1410
1414
|
}
|
|
1411
1415
|
function WorkflowsPageView({ labels, workflows, onCreate, onUpdateMeta, onPublish }) {
|
|
@@ -1535,55 +1539,54 @@ function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onVie
|
|
|
1535
1539
|
title: labels.title,
|
|
1536
1540
|
subtitle: labels.subtitle,
|
|
1537
1541
|
gradient: "from-indigo-500 to-sky-700",
|
|
1538
|
-
toolbar: /* @__PURE__ */
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
/* @__PURE__ */ jsx("div", { className: "w-full sm:w-48", children: /* @__PURE__ */ jsx(
|
|
1549
|
-
FormSelect,
|
|
1550
|
-
{
|
|
1551
|
-
name: "statusFilter",
|
|
1552
|
-
label: labels.filterStatus,
|
|
1553
|
-
options: statusOptions,
|
|
1554
|
-
value: statusFilter,
|
|
1555
|
-
onValueChange: setStatusFilter
|
|
1556
|
-
}
|
|
1557
|
-
) })
|
|
1558
|
-
] })
|
|
1542
|
+
toolbar: /* @__PURE__ */ jsx("div", { className: "w-full sm:w-48", children: /* @__PURE__ */ jsx(
|
|
1543
|
+
FormSelect,
|
|
1544
|
+
{
|
|
1545
|
+
name: "statusFilter",
|
|
1546
|
+
label: labels.filterStatus,
|
|
1547
|
+
options: statusOptions,
|
|
1548
|
+
value: statusFilter,
|
|
1549
|
+
onValueChange: setStatusFilter
|
|
1550
|
+
}
|
|
1551
|
+
) })
|
|
1559
1552
|
}
|
|
1560
1553
|
);
|
|
1561
|
-
const content = loading ? /* @__PURE__ */ jsx(PageLoadingState, {}) : filteredRuns.length === 0 ? /* @__PURE__ */ jsx(PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
/* @__PURE__ */ jsx("
|
|
1580
|
-
/* @__PURE__ */ jsx(
|
|
1554
|
+
const content = loading ? /* @__PURE__ */ jsx(PageLoadingState, {}) : filteredRuns.length === 0 ? /* @__PURE__ */ jsx(PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1555
|
+
!isEmpty && /* @__PURE__ */ jsx(
|
|
1556
|
+
SearchBar,
|
|
1557
|
+
{
|
|
1558
|
+
searchTerm,
|
|
1559
|
+
onSearchChange: setSearchTerm,
|
|
1560
|
+
placeholder: labels.searchPlaceholder ?? labels.title
|
|
1561
|
+
}
|
|
1562
|
+
),
|
|
1563
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredRuns.map((run) => /* @__PURE__ */ jsxs(
|
|
1564
|
+
EntityCard,
|
|
1565
|
+
{
|
|
1566
|
+
accentGradient: "from-indigo-500 to-sky-700",
|
|
1567
|
+
icon: /* @__PURE__ */ jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-indigo-500/10 text-indigo-600 dark:bg-indigo-500/20 dark:text-indigo-400", children: /* @__PURE__ */ jsx(ClockIcon, { className: "h-6 w-6" }) }),
|
|
1568
|
+
title: run.id.slice(0, 8),
|
|
1569
|
+
subtitle: `${labels.startedAt}: ${new Date(run.createdAt).toLocaleString()}`,
|
|
1570
|
+
status: /* @__PURE__ */ jsx(Badge, { color: BADGE_COLOR[run.status] ?? "zinc", children: statusLabelFor(run.status) }),
|
|
1571
|
+
footer: /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
1572
|
+
onView && /* @__PURE__ */ jsx(Button, { type: "button", size: "sm", outline: true, onClick: () => onView(run), children: labels.view }),
|
|
1573
|
+
onViewTimeline && labels.timeline && /* @__PURE__ */ jsx(Button, { type: "button", size: "sm", outline: true, onClick: () => onViewTimeline(run), children: labels.timeline }),
|
|
1574
|
+
/* @__PURE__ */ jsx(Button, { type: "button", size: "sm", outline: true, onClick: () => onReplay(run), children: labels.replay }),
|
|
1575
|
+
run.status === "running" && /* @__PURE__ */ jsx(Button, { type: "button", size: "sm", color: "rose", onClick: () => onCancel(run), children: labels.cancel })
|
|
1581
1576
|
] }),
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1577
|
+
children: [
|
|
1578
|
+
/* @__PURE__ */ jsxs("dl", { className: "mt-1 grid grid-cols-2 gap-1 text-xs text-slate-500 dark:text-slate-400", children: [
|
|
1579
|
+
/* @__PURE__ */ jsx("dt", { children: labels.duration }),
|
|
1580
|
+
/* @__PURE__ */ jsx("dd", { className: "text-right", children: formatDurationMs(run.totalDurationMs) }),
|
|
1581
|
+
/* @__PURE__ */ jsx("dt", { children: labels.triggeredBy }),
|
|
1582
|
+
/* @__PURE__ */ jsx("dd", { className: "text-right truncate", children: run.triggeredBy || "\u2014" })
|
|
1583
|
+
] }),
|
|
1584
|
+
run.error && /* @__PURE__ */ jsx("p", { className: "mt-1 line-clamp-2 text-xs text-rose-600 dark:text-rose-400", children: run.error })
|
|
1585
|
+
]
|
|
1586
|
+
},
|
|
1587
|
+
run.id
|
|
1588
|
+
)) })
|
|
1589
|
+
] });
|
|
1587
1590
|
return /* @__PURE__ */ jsx(ManagementPageLayout, { hero, content });
|
|
1588
1591
|
}
|
|
1589
1592
|
function RunTimelinePageView({ labels, entries, loading, runId }) {
|
|
@@ -1707,16 +1710,7 @@ function ConnectionsPageView({
|
|
|
1707
1710
|
title: labels.title,
|
|
1708
1711
|
subtitle: labels.subtitle,
|
|
1709
1712
|
gradient: "from-sky-500 to-indigo-600",
|
|
1710
|
-
toolbar:
|
|
1711
|
-
SearchBar,
|
|
1712
|
-
{
|
|
1713
|
-
searchTerm,
|
|
1714
|
-
onSearchChange: setSearchTerm,
|
|
1715
|
-
placeholder: labels.searchPlaceholder ?? labels.title,
|
|
1716
|
-
noBorder: true
|
|
1717
|
-
}
|
|
1718
|
-
) : void 0,
|
|
1719
|
-
actions: /* @__PURE__ */ jsx(
|
|
1713
|
+
toolbar: /* @__PURE__ */ jsx(
|
|
1720
1714
|
CreateActionButton,
|
|
1721
1715
|
{
|
|
1722
1716
|
mode: "desktop",
|
|
@@ -1736,40 +1730,50 @@ function ConnectionsPageView({
|
|
|
1736
1730
|
accent: "sky"
|
|
1737
1731
|
}
|
|
1738
1732
|
);
|
|
1739
|
-
const content = loading ? /* @__PURE__ */ jsx(PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsx(PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
/* @__PURE__ */ jsx(
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1733
|
+
const content = loading ? /* @__PURE__ */ jsx(PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsx(PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1734
|
+
/* @__PURE__ */ jsx(
|
|
1735
|
+
SearchBar,
|
|
1736
|
+
{
|
|
1737
|
+
searchTerm,
|
|
1738
|
+
onSearchChange: setSearchTerm,
|
|
1739
|
+
placeholder: labels.searchPlaceholder ?? labels.title
|
|
1740
|
+
}
|
|
1741
|
+
),
|
|
1742
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredConnections.map((conn) => /* @__PURE__ */ jsx(
|
|
1743
|
+
EntityCard,
|
|
1744
|
+
{
|
|
1745
|
+
accentGradient: "from-sky-500 to-indigo-600",
|
|
1746
|
+
icon: /* @__PURE__ */ jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-sky-500/10 text-sky-600 dark:bg-sky-500/20 dark:text-sky-400", children: /* @__PURE__ */ jsx(LinkIcon, { className: "h-6 w-6" }) }),
|
|
1747
|
+
title: conn.name,
|
|
1748
|
+
subtitle: providerLabel(conn.providerSlug),
|
|
1749
|
+
status: /* @__PURE__ */ jsxs("div", { className: "flex gap-1", children: [
|
|
1750
|
+
/* @__PURE__ */ jsx(Badge, { color: conn.enabled ? "emerald" : "zinc", children: conn.enabled ? labels.enable : labels.disable }),
|
|
1751
|
+
conn.credentialRef ? /* @__PURE__ */ jsx(Badge, { color: "indigo", children: "Secret set" }) : /* @__PURE__ */ jsx(Badge, { color: "amber", children: "No secret" })
|
|
1752
|
+
] }),
|
|
1753
|
+
footer: /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
1754
|
+
/* @__PURE__ */ jsx(Button, { type: "button", size: "sm", outline: true, onClick: () => setEditing(conn), children: labels.edit }),
|
|
1755
|
+
/* @__PURE__ */ jsx(
|
|
1756
|
+
Button,
|
|
1757
|
+
{
|
|
1758
|
+
type: "button",
|
|
1759
|
+
size: "sm",
|
|
1760
|
+
color: "rose",
|
|
1761
|
+
onClick: async () => {
|
|
1762
|
+
if (window.confirm(labels.deleteConfirm)) await onDelete(conn);
|
|
1763
|
+
},
|
|
1764
|
+
children: labels.delete
|
|
1765
|
+
}
|
|
1766
|
+
)
|
|
1767
|
+
] }),
|
|
1768
|
+
children: /* @__PURE__ */ jsxs("dl", { className: "mt-1 space-y-0.5 text-xs text-slate-500 dark:text-slate-400", children: [
|
|
1769
|
+
conn.region && /* @__PURE__ */ jsx(Row, { label: "Region", value: conn.region }),
|
|
1770
|
+
conn.endpoint && /* @__PURE__ */ jsx(Row, { label: "Endpoint", value: conn.endpoint }),
|
|
1771
|
+
conn.modelFilter && conn.modelFilter.length > 0 && /* @__PURE__ */ jsx(Row, { label: "Models", value: conn.modelFilter.join(", ") })
|
|
1772
|
+
] })
|
|
1773
|
+
},
|
|
1774
|
+
conn.id
|
|
1775
|
+
)) })
|
|
1776
|
+
] });
|
|
1773
1777
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1774
1778
|
/* @__PURE__ */ jsx(ManagementPageLayout, { hero, content, mobileAction }),
|
|
1775
1779
|
createOpen && /* @__PURE__ */ jsx(
|
|
@@ -2040,16 +2044,7 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2040
2044
|
title: labels.title,
|
|
2041
2045
|
subtitle: labels.subtitle,
|
|
2042
2046
|
gradient: "from-rose-500 to-orange-600",
|
|
2043
|
-
toolbar:
|
|
2044
|
-
SearchBar,
|
|
2045
|
-
{
|
|
2046
|
-
searchTerm,
|
|
2047
|
-
onSearchChange: setSearchTerm,
|
|
2048
|
-
placeholder: labels.searchPlaceholder ?? labels.title,
|
|
2049
|
-
noBorder: true
|
|
2050
|
-
}
|
|
2051
|
-
) : void 0,
|
|
2052
|
-
actions: /* @__PURE__ */ jsx(
|
|
2047
|
+
toolbar: /* @__PURE__ */ jsx(
|
|
2053
2048
|
CreateActionButton,
|
|
2054
2049
|
{
|
|
2055
2050
|
mode: "desktop",
|
|
@@ -2069,50 +2064,60 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
|
|
|
2069
2064
|
accent: "rose"
|
|
2070
2065
|
}
|
|
2071
2066
|
);
|
|
2072
|
-
const content = loading ? /* @__PURE__ */ jsx(PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsx(PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2067
|
+
const content = loading ? /* @__PURE__ */ jsx(PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsx(PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2068
|
+
/* @__PURE__ */ jsx(
|
|
2069
|
+
SearchBar,
|
|
2070
|
+
{
|
|
2071
|
+
searchTerm,
|
|
2072
|
+
onSearchChange: setSearchTerm,
|
|
2073
|
+
placeholder: labels.searchPlaceholder ?? labels.title
|
|
2074
|
+
}
|
|
2075
|
+
),
|
|
2076
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredCredentials.map((secret) => /* @__PURE__ */ jsxs(
|
|
2077
|
+
EntityCard,
|
|
2078
|
+
{
|
|
2079
|
+
accentGradient: "from-rose-500 to-orange-700",
|
|
2080
|
+
icon: /* @__PURE__ */ jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-rose-500/10 text-rose-600 dark:bg-rose-500/20 dark:text-rose-400", children: /* @__PURE__ */ jsx(KeyIcon, { className: "h-6 w-6" }) }),
|
|
2081
|
+
title: secret.name,
|
|
2082
|
+
subtitle: secret.secretType,
|
|
2083
|
+
status: /* @__PURE__ */ jsx(Badge, { color: secret.disabled ? "zinc" : "emerald", children: secret.disabled ? labels.disable : "Active" }),
|
|
2084
|
+
footer: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
2085
|
+
/* @__PURE__ */ jsx(CopyableId, { id: secret.secretId }),
|
|
2086
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
2087
|
+
/* @__PURE__ */ jsxs(Button, { type: "button", size: "sm", outline: true, onClick: () => setRotateFor(secret), children: [
|
|
2088
|
+
/* @__PURE__ */ jsx(ArrowPathIcon, { className: "mr-1 h-3.5 w-3.5" }),
|
|
2089
|
+
labels.rotate
|
|
2090
|
+
] }),
|
|
2091
|
+
!secret.disabled && /* @__PURE__ */ jsxs(
|
|
2092
|
+
Button,
|
|
2093
|
+
{
|
|
2094
|
+
type: "button",
|
|
2095
|
+
size: "sm",
|
|
2096
|
+
color: "rose",
|
|
2097
|
+
onClick: () => {
|
|
2098
|
+
if (window.confirm(labels.disableConfirm)) onDisable(secret);
|
|
2099
|
+
},
|
|
2100
|
+
children: [
|
|
2101
|
+
/* @__PURE__ */ jsx(TrashIcon, { className: "mr-1 h-3.5 w-3.5" }),
|
|
2102
|
+
labels.disable
|
|
2103
|
+
]
|
|
2104
|
+
}
|
|
2105
|
+
)
|
|
2106
|
+
] })
|
|
2107
|
+
] }),
|
|
2108
|
+
children: [
|
|
2109
|
+
secret.description && /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: secret.description }),
|
|
2110
|
+
/* @__PURE__ */ jsxs("dl", { className: "mt-2 grid grid-cols-2 gap-1 text-xs text-slate-500 dark:text-slate-400", children: [
|
|
2111
|
+
/* @__PURE__ */ jsx("dt", { children: labels.createdAt }),
|
|
2112
|
+
/* @__PURE__ */ jsx("dd", { className: "text-right", children: new Date(secret.createdAt).toLocaleDateString() }),
|
|
2113
|
+
/* @__PURE__ */ jsx("dt", { children: labels.expiresAt }),
|
|
2114
|
+
/* @__PURE__ */ jsx("dd", { className: "text-right", children: secret.expiresAt ? new Date(secret.expiresAt).toLocaleDateString() : labels.neverExpires })
|
|
2115
|
+
] })
|
|
2116
|
+
]
|
|
2117
|
+
},
|
|
2118
|
+
secret.secretId
|
|
2119
|
+
)) })
|
|
2120
|
+
] });
|
|
2116
2121
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2117
2122
|
/* @__PURE__ */ jsx(ManagementPageLayout, { hero, content, mobileAction }),
|
|
2118
2123
|
/* @__PURE__ */ jsx(
|