@overvis/hmi-workspace-ui 0.1.0 → 0.1.2
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/alarm-list-DKFio0hg.js +414 -0
- package/dist/alarm-rule-dialog-mb4_nHRW.js +417 -0
- package/dist/{alarm-rule-lists-C5v1Kf7A.js → alarm-rule-lists-CfZXTWkK.js} +123 -125
- package/dist/{alarm-rules-page-CqFzofPd.js → alarm-rules-page-DBLSkrrG.js} +15 -18
- package/dist/alert-dialog-D_iDv2lQ.js +891 -0
- package/dist/{base-revision-YCO27zR4.js → base-revision-DLF9EnGV.js} +26 -29
- package/dist/{breadcrumbs-0cjsV2cq.js → breadcrumbs-D5R6Fz74.js} +6 -7
- package/dist/{catalog-list-DjZojYLJ.js → catalog-list-BkWosvh1.js} +2 -4
- package/dist/{code-editor-BVimvjDV.js → code-editor-DCM0KdMJ.js} +9 -6
- package/dist/dashboard-bindings.js +1 -2
- package/dist/{dashboards-page-BlrJguNz.js → dashboards-page-DLc11Vzu.js} +335 -359
- package/dist/{de-14WdmJxZ.js → de-Z2er-E5v.js} +4 -2
- package/dist/diagnostic-text-CYZFPiND.js +116 -0
- package/dist/{dialogs-D_v1LeH4.js → dialogs-BX023zml.js} +2523 -2590
- package/dist/{dialogs-B6BRnf3Q.js → dialogs-DEOg9lxy.js} +219 -227
- package/dist/{display-DmOo23mi.js → display-VYGzneE0.js} +4 -6
- package/dist/{editor-language-To9MxloY.js → editor-language-CGENZxbI.js} +3 -5
- package/dist/editor-page-CaN52OQh.js +1337 -0
- package/dist/{en-BgercpT0.js → en-CKPPL6bQ.js} +4 -2
- package/dist/entity-controls-DJT47yeV.js +71 -0
- package/dist/errors-BAWoH_5w.js +25 -0
- package/dist/{footer-DC-Q0052.js → footer-CbPMP8aq.js} +2404 -2515
- package/dist/host.js +8254 -675
- package/dist/{i18n-BgzakKoC.js → i18n-ChjEbYEg.js} +77 -90
- package/dist/i18n.js +1 -2
- package/dist/index.js +5168 -5353
- package/dist/{lat-lng-B12P7QyY.js → lat-lng-Bl77AGSO.js} +1 -2
- package/dist/{list-page-CvsdZb86.js → list-page-Fa29SkaJ.js} +116 -123
- package/dist/{location-map-renderer-DO5yfdSU.js → location-map-renderer-DvXIYc1Z.js} +6 -6
- package/dist/{location-picker-renderer-CjCxg6ai.js → location-picker-renderer-B1_-n8lf.js} +3 -4
- package/dist/{model-B8gGi4OK.js → model-tpg_xpFB.js} +1 -2
- package/dist/{notice-card-DyGywFsW.js → notice-card-V_0K0lO0.js} +54 -58
- package/dist/page-B5te_1Lc.js +449 -0
- package/dist/{page-v6LCwswN.js → page-BorlLnMX.js} +92 -100
- package/dist/page-DxF7FOve.js +507 -0
- package/dist/panel-DuZD-cBP.js +949 -0
- package/dist/parameter-values.js +3 -16
- package/dist/{pl-lQ9HXV9k.js → pl-DVABrn5G.js} +4 -2
- package/dist/presence-code-DsabLTZs.js +73 -0
- package/dist/{query-gate-DVhNIkge.js → query-gate-BbIo1Xrj.js} +6 -6
- package/dist/{provider-DoEpKcQ-.js → quick-report-BcZsfkCZ.js} +9423 -5102
- package/dist/{retention-BYXNpYmR.js → retention-C7EZsq8u.js} +4 -6
- package/dist/retention-note-CmMeHV_u.js +40 -0
- package/dist/{rolldown-runtime-Dy4uBu1J.js → rolldown-runtime-CGnMp29N.js} +1 -2
- package/dist/{ru-qTKINoUj.js → ru-CBRLC_xM.js} +8 -6
- package/dist/run-text-CDdfbKbg.js +112 -0
- package/dist/{search-D4rDnE9T.js → search-C6xQ_Hvo.js} +26 -29
- package/dist/{sections-kCOyc4NR.js → sections-D_SBfVzV.js} +2 -3
- package/dist/{select-BKiOWdSr.js → select-nNLG-AMz.js} +17 -23
- package/dist/{spinner-C-HPNxOc.js → spinner-B-KLtBjp.js} +182 -201
- package/dist/src/code-editor/code-editor.d.ts +3 -0
- package/dist/src/code-editor/taskfile-language.d.ts +22 -2
- package/dist/src/i18n/catalogs/de/edge-program.d.ts +3 -0
- package/dist/src/i18n/catalogs/de.d.ts +3 -0
- package/dist/src/i18n/catalogs/en/edge-program.d.ts +3 -0
- package/dist/src/i18n/catalogs/en.d.ts +3 -0
- package/dist/src/i18n/catalogs/pl/edge-program.d.ts +3 -0
- package/dist/src/i18n/catalogs/pl.d.ts +3 -0
- package/dist/src/i18n/catalogs/ru/edge-program.d.ts +5 -2
- package/dist/src/i18n/catalogs/ru/graphics.d.ts +2 -2
- package/dist/src/i18n/catalogs/ru.d.ts +7 -4
- package/dist/src/i18n/catalogs/uk/edge-program.d.ts +5 -2
- package/dist/src/i18n/catalogs/uk/graphics.d.ts +2 -2
- package/dist/src/i18n/catalogs/uk.d.ts +7 -4
- package/dist/src/version.d.ts +1 -1
- package/dist/src/workspace/graphics/inspector/item.d.ts +6 -6
- package/dist/src/workspace/local-workspace-app.d.ts +1 -1
- package/dist/src/workspace/routes.d.ts +1 -1
- package/dist/{starter-fields-BRLX0z-v.js → starter-fields-7S3LmtGa.js} +154 -157
- package/dist/{starter-handoff-BA3ucMKL.js → starter-handoff-BaK8Ss8I.js} +1 -2
- package/dist/styles.css +1 -1
- package/dist/ui.js +334 -374
- package/dist/{uk-CwpJAxmx.js → uk-17pbVYZa.js} +8 -6
- package/dist/{wireguard-docs-AfU6NzTL.js → wireguard-docs-Clb-7xRY.js} +14 -17
- package/package.json +15 -9
- package/dist/alarm-list-BL3xQ5Lf.js +0 -423
- package/dist/alarm-rule-dialog-S1ZUg-74.js +0 -423
- package/dist/alert-B8MAoIO8.js +0 -45
- package/dist/alert-dialog-CYkuMg5D.js +0 -129
- package/dist/api-error-9rQmUN5L.js +0 -93
- package/dist/breadcrumb-DzVL1yHa.js +0 -74
- package/dist/button-6SxPBYMz.js +0 -44
- package/dist/context-u9KJQmdB.js +0 -102
- package/dist/copyable-id-DYGiAcnq.js +0 -40
- package/dist/dashboard-context-CBfG6DoT.js +0 -191
- package/dist/date-time-picker-C3FhMXk6.js +0 -266
- package/dist/diagnostic-text-BAkzW0SE.js +0 -111
- package/dist/diagnostic-text-DiKd2i1w.js +0 -76
- package/dist/dialog-BIhQXcZC.js +0 -237
- package/dist/dialog-BqyIxMD-.js +0 -54
- package/dist/dropdown-menu-DSzbBq3v.js +0 -136
- package/dist/editor-page-BiSZJz5b.js +0 -1353
- package/dist/empty-B-QJ-06w.js +0 -59
- package/dist/entity-controls-D1K4Ot3O.js +0 -76
- package/dist/errors-CcsvDHu8.js +0 -26
- package/dist/history-page-sAAhG54V.js +0 -1400
- package/dist/icon-D-pR9htW.js +0 -57
- package/dist/index-page-DMH82fZe.js +0 -214
- package/dist/item-B5SaTFQU.js +0 -120
- package/dist/mutation-form-validators-BNz5bsv1.js +0 -2408
- package/dist/mutations-THtGG6Ai.js +0 -240
- package/dist/page-2KPemaAj.js +0 -328
- package/dist/page-6rIoTg2L.js +0 -459
- package/dist/page-C6giEoEd.js +0 -1935
- package/dist/page-DCbTxKsi.js +0 -313
- package/dist/page-DWO427hT.js +0 -208
- package/dist/page-LXu_2zm3.js +0 -137
- package/dist/page-aaUiVOnk.js +0 -513
- package/dist/page-header-RB2YFWlE.js +0 -55
- package/dist/page-title-CdCbiLt8.js +0 -14
- package/dist/panel-DDy8tUNR.js +0 -338
- package/dist/presence-code-BfSXr50g.js +0 -83
- package/dist/progress-C7cxNJA1.js +0 -83
- package/dist/provider-BOeYHi0n.js +0 -134
- package/dist/quick-report-CUVJnbKP.js +0 -416
- package/dist/radio-group-CZGqVbkJ.js +0 -26
- package/dist/retention-note-CHhA6gjY.js +0 -42
- package/dist/run-text-DvaO8LDF.js +0 -113
- package/dist/select-eNgZdZ30.js +0 -521
- package/dist/skeleton-6yk8Tdh5.js +0 -19
- package/dist/slider-DorDsoF8.js +0 -37
- package/dist/status-page-DAHiKM9P.js +0 -3286
- package/dist/switch-BqD0RH_G.js +0 -18
- package/dist/table-Q2-voLuw.js +0 -65
- package/dist/tabs-CSIucYFP.js +0 -57
- package/dist/theme-provider-BkRohQFU.js +0 -61
- package/dist/toggle-group-9Bs0Mm3r.js +0 -82
- package/dist/trpc-CvJUuUXp.js +0 -153
- package/dist/utils-CX-Pz5p6.js +0 -8
- package/dist/writability-BuH-spxv.js +0 -57
|
@@ -0,0 +1,507 @@
|
|
|
1
|
+
import { Pr as e, ii as t } from "./quick-report-BcZsfkCZ.js";
|
|
2
|
+
import { f as n, h as r, m as i, n as a } from "./i18n-ChjEbYEg.js";
|
|
3
|
+
import { B as o, R as s, _t as c, dt as l, ft as u, gt as d, jt as f, mt as p, rt as m, tt as h, vt as g, xt as _ } from "./alert-dialog-D_iDv2lQ.js";
|
|
4
|
+
import { c as v, l as y } from "./spinner-B-KLtBjp.js";
|
|
5
|
+
import { a as b, c as x, d as S, o as C, s as w, u as T } from "./notice-card-V_0K0lO0.js";
|
|
6
|
+
import { b as E } from "./panel-DuZD-cBP.js";
|
|
7
|
+
import { t as D } from "./query-gate-BbIo1Xrj.js";
|
|
8
|
+
import { t as O } from "./breadcrumbs-D5R6Fz74.js";
|
|
9
|
+
import { l as k, n as ee } from "./catalog-list-BkWosvh1.js";
|
|
10
|
+
import { a as A, i as j, n as te, o as M, t as ne } from "./retention-C7EZsq8u.js";
|
|
11
|
+
import { a as re, i as ie, n as ae, r as oe, t as se } from "./dialogs-DEOg9lxy.js";
|
|
12
|
+
import { useEffect as N, useMemo as ce, useState as P } from "react";
|
|
13
|
+
import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
|
|
14
|
+
import { FolderIcon as le, HardDriveIcon as ue, PencilIcon as R, PlusIcon as de, Trash2Icon as z, TriangleAlertIcon as B } from "lucide-react";
|
|
15
|
+
import { formatAppDateTime as V, resolveLocalized as fe } from "@overvis/hmi-shared";
|
|
16
|
+
import { canManageWorkspace as pe } from "@overvis/hmi-shared/workspace";
|
|
17
|
+
import { Link as H } from "@tanstack/react-router";
|
|
18
|
+
// src/workspace/setup/storage/page.tsx
|
|
19
|
+
function U(e) {
|
|
20
|
+
return e == null ? "—" : V(e);
|
|
21
|
+
}
|
|
22
|
+
function me({ deletion: e, onEnded: n }) {
|
|
23
|
+
let o = i(), s = r(), c = a(), l = t.useUtils(), u = t.jobs.wait.useQuery({ jobId: e.jobId }, {
|
|
24
|
+
refetchInterval: (e) => e.state.data == null || e.state.data.status === "running" ? 2e3 : !1,
|
|
25
|
+
refetchIntervalInBackground: !0
|
|
26
|
+
}).data;
|
|
27
|
+
return N(() => {
|
|
28
|
+
if (u != null && u.status !== "running") {
|
|
29
|
+
if (u.status === "failed") c.error(o("storage_deletion_failed"));
|
|
30
|
+
else if (u.status === "interrupted") c.warning(o("storage_deletion_interrupted"));
|
|
31
|
+
else {
|
|
32
|
+
let e = "result" in u ? u.result : void 0, t = typeof e == "object" && e && "records" in e ? Number(e.records) : 0;
|
|
33
|
+
c.success(o("storage_deletion_done", { records: A(t, s) }));
|
|
34
|
+
}
|
|
35
|
+
l.storage.invalidate(), n();
|
|
36
|
+
}
|
|
37
|
+
}, [
|
|
38
|
+
s,
|
|
39
|
+
n,
|
|
40
|
+
u,
|
|
41
|
+
o,
|
|
42
|
+
c,
|
|
43
|
+
l
|
|
44
|
+
]), /* @__PURE__ */ I(h, { children: /* @__PURE__ */ I(m, { children: o("storage_deletion_running") }) });
|
|
45
|
+
}
|
|
46
|
+
function W({ label: e, value: t, detail: n }) {
|
|
47
|
+
return /* @__PURE__ */ L(b, {
|
|
48
|
+
size: "sm",
|
|
49
|
+
children: [/* @__PURE__ */ L(T, { children: [/* @__PURE__ */ I(x, { children: e }), /* @__PURE__ */ I(S, {
|
|
50
|
+
className: "text-2xl tabular-nums",
|
|
51
|
+
children: t
|
|
52
|
+
})] }), /* @__PURE__ */ I(w, {
|
|
53
|
+
className: "text-xs text-muted-foreground",
|
|
54
|
+
children: n
|
|
55
|
+
})]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function he(e) {
|
|
59
|
+
switch (e) {
|
|
60
|
+
case "dashboards": return n("storage_area_dashboards");
|
|
61
|
+
case "builds": return n("storage_area_builds");
|
|
62
|
+
case "templates": return n("storage_area_templates");
|
|
63
|
+
case "uploads": return n("storage_area_uploads");
|
|
64
|
+
case "other": return n("storage_area_other");
|
|
65
|
+
case "history": return n("storage_area_history");
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function ge({ workspaceId: e, area: t }) {
|
|
69
|
+
let n = i(), r = "\n text-primary\n hover:underline\n ";
|
|
70
|
+
switch (t) {
|
|
71
|
+
case "dashboards":
|
|
72
|
+
case "builds": return /* @__PURE__ */ I(H, {
|
|
73
|
+
to: "/workspace/$workspaceId/setup/dashboards",
|
|
74
|
+
params: { workspaceId: e },
|
|
75
|
+
className: r,
|
|
76
|
+
children: n("setup_menu_dashboards")
|
|
77
|
+
});
|
|
78
|
+
case "uploads": return /* @__PURE__ */ I(H, {
|
|
79
|
+
to: "/workspace/$workspaceId/setup/files",
|
|
80
|
+
params: { workspaceId: e },
|
|
81
|
+
className: r,
|
|
82
|
+
children: n("setup_menu_files")
|
|
83
|
+
});
|
|
84
|
+
case "history": return /* @__PURE__ */ I(H, {
|
|
85
|
+
to: "/workspace/$workspaceId/audit",
|
|
86
|
+
params: { workspaceId: e },
|
|
87
|
+
className: r,
|
|
88
|
+
children: n("audit_menu")
|
|
89
|
+
});
|
|
90
|
+
case "templates":
|
|
91
|
+
case "other": return /* @__PURE__ */ I("span", {
|
|
92
|
+
className: "text-muted-foreground",
|
|
93
|
+
children: n("storage_area_cli")
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
function G({ workspaceId: n }) {
|
|
98
|
+
let a = i(), v = r(), N = t.storage.usage.useQuery({ workspaceId: n }), B = t.storage.retention.useQuery({ workspaceId: n }), H = t.parameter.listTree.useQuery({ workspaceId: n }), [G, K] = P(null), [q, ve] = P(null), [ye, be] = P(""), J = pe(e().access), Y = N.data, X = B.data, Z = H.data, Q = ce(() => ({
|
|
99
|
+
parameters: new Map((Z?.parameters ?? []).map((e) => [e.id, fe(e.name, v)])),
|
|
100
|
+
branches: new Map((Z?.branches ?? []).map((e) => [e.id, fe(e.name, v)]))
|
|
101
|
+
}), [v, Z]), xe = ce(() => X == null || Z == null ? null : te(X, Z), [X, Z]), Se = (e) => Q.branches.get(e) ?? a("storage_deleted_branch"), Ce = (e) => Q.parameters.get(e.parameterId) ?? e.name ?? a("storage_deleted_parameter"), $ = () => {
|
|
102
|
+
K(null);
|
|
103
|
+
}, we = (e) => {
|
|
104
|
+
K(null), ve({ jobId: e });
|
|
105
|
+
}, Te = N.isLoading || B.isLoading || H.isLoading, Ee = N.isError || B.isError || H.isError;
|
|
106
|
+
return /* @__PURE__ */ L(k, { children: [
|
|
107
|
+
/* @__PURE__ */ I(E, {
|
|
108
|
+
icon: /* @__PURE__ */ I(ue, {}),
|
|
109
|
+
breadcrumbs: /* @__PURE__ */ I(O, { workspaceId: n }),
|
|
110
|
+
title: a("storage_title"),
|
|
111
|
+
description: a("storage_description")
|
|
112
|
+
}),
|
|
113
|
+
/* @__PURE__ */ L(ee, {
|
|
114
|
+
className: "flex flex-col gap-4",
|
|
115
|
+
children: [
|
|
116
|
+
J ? null : /* @__PURE__ */ I(h, { children: /* @__PURE__ */ I(m, { children: a("storage_manage_admin_only") }) }),
|
|
117
|
+
q == null ? null : /* @__PURE__ */ I(me, {
|
|
118
|
+
deletion: q,
|
|
119
|
+
onEnded: () => {
|
|
120
|
+
ve(null);
|
|
121
|
+
}
|
|
122
|
+
}),
|
|
123
|
+
Ee ? /* @__PURE__ */ I(D, { message: a("error_request_failed") }) : Te || Y == null || X == null || Z == null || xe == null ? /* @__PURE__ */ L("div", {
|
|
124
|
+
className: "space-y-2",
|
|
125
|
+
children: [/* @__PURE__ */ I(_, { className: "h-24 w-full" }), /* @__PURE__ */ I(_, { className: "h-48 w-full" })]
|
|
126
|
+
}) : /* @__PURE__ */ L(F, { children: [
|
|
127
|
+
/* @__PURE__ */ L("p", {
|
|
128
|
+
className: "text-sm text-muted-foreground",
|
|
129
|
+
children: [Y.billedAt == null ? null : /* @__PURE__ */ L(F, { children: [a("storage_billed_at", { at: V(Y.billedAt) }), " "] }), Y.measuredAt == null ? a("storage_measured_never") : a("storage_measured_at", { at: V(Y.measuredAt) })]
|
|
130
|
+
}),
|
|
131
|
+
/* @__PURE__ */ L("div", {
|
|
132
|
+
className: "\n grid gap-3\n sm:grid-cols-2\n lg:grid-cols-4\n ",
|
|
133
|
+
children: [
|
|
134
|
+
/* @__PURE__ */ I(W, {
|
|
135
|
+
label: a("storage_readings_title"),
|
|
136
|
+
value: A(Y.readings.records, v),
|
|
137
|
+
detail: a("storage_records_unit")
|
|
138
|
+
}),
|
|
139
|
+
/* @__PURE__ */ I(W, {
|
|
140
|
+
label: a("storage_history_title"),
|
|
141
|
+
value: A(Y.audit.records, v),
|
|
142
|
+
detail: a("storage_records_unit")
|
|
143
|
+
}),
|
|
144
|
+
/* @__PURE__ */ I(W, {
|
|
145
|
+
label: a("storage_alarm_log_title"),
|
|
146
|
+
value: A(Y.alarmLog.records, v),
|
|
147
|
+
detail: a("storage_records_unit")
|
|
148
|
+
}),
|
|
149
|
+
/* @__PURE__ */ I(W, {
|
|
150
|
+
label: a("storage_files_title"),
|
|
151
|
+
value: j(Y.files.bytes, v),
|
|
152
|
+
detail: a("storage_files_unit")
|
|
153
|
+
})
|
|
154
|
+
]
|
|
155
|
+
}),
|
|
156
|
+
/* @__PURE__ */ L(b, { children: [/* @__PURE__ */ L(T, { children: [/* @__PURE__ */ I(S, { children: a("storage_retention_title") }), /* @__PURE__ */ I(x, { children: a("storage_retention_description") })] }), /* @__PURE__ */ L(w, {
|
|
157
|
+
className: "flex flex-col gap-3",
|
|
158
|
+
children: [
|
|
159
|
+
/* @__PURE__ */ L("div", {
|
|
160
|
+
className: "flex flex-wrap items-center justify-between gap-2",
|
|
161
|
+
children: [/* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
|
|
162
|
+
className: "text-sm font-medium",
|
|
163
|
+
children: a("storage_default_label")
|
|
164
|
+
}), /* @__PURE__ */ I("p", {
|
|
165
|
+
className: "text-sm text-muted-foreground",
|
|
166
|
+
children: M(X.readingsKeepDays)
|
|
167
|
+
})] }), J ? /* @__PURE__ */ L(f, {
|
|
168
|
+
type: "button",
|
|
169
|
+
size: "sm",
|
|
170
|
+
variant: "outline",
|
|
171
|
+
onClick: () => {
|
|
172
|
+
K({
|
|
173
|
+
kind: "default",
|
|
174
|
+
target: "readings"
|
|
175
|
+
});
|
|
176
|
+
},
|
|
177
|
+
children: [/* @__PURE__ */ I(R, { "data-icon": "inline-start" }), a("storage_change")]
|
|
178
|
+
}) : null]
|
|
179
|
+
}),
|
|
180
|
+
X.overrides.map((e, t) => /* @__PURE__ */ L("div", {
|
|
181
|
+
className: "flex flex-wrap items-start justify-between gap-2 border-t pt-3",
|
|
182
|
+
children: [/* @__PURE__ */ L("div", {
|
|
183
|
+
className: "flex min-w-0 flex-col gap-1",
|
|
184
|
+
children: [/* @__PURE__ */ L("p", {
|
|
185
|
+
className: "text-sm font-medium",
|
|
186
|
+
children: [
|
|
187
|
+
a("storage_rule_label", { n: String(t + 1) }),
|
|
188
|
+
" · ",
|
|
189
|
+
M(e.keepDays)
|
|
190
|
+
]
|
|
191
|
+
}), /* @__PURE__ */ L("div", {
|
|
192
|
+
className: "flex flex-wrap gap-1",
|
|
193
|
+
children: [e.branchIds.map((e) => /* @__PURE__ */ L(y, {
|
|
194
|
+
variant: "secondary",
|
|
195
|
+
children: [/* @__PURE__ */ I(le, { "data-icon": "inline-start" }), Se(e)]
|
|
196
|
+
}, e)), e.parameterIds.map((e) => /* @__PURE__ */ I(y, {
|
|
197
|
+
variant: "outline",
|
|
198
|
+
children: Q.parameters.get(e) ?? a("storage_deleted_parameter")
|
|
199
|
+
}, e))]
|
|
200
|
+
})]
|
|
201
|
+
}), J ? /* @__PURE__ */ L("div", {
|
|
202
|
+
className: "flex gap-1",
|
|
203
|
+
children: [/* @__PURE__ */ I(f, {
|
|
204
|
+
type: "button",
|
|
205
|
+
size: "icon-sm",
|
|
206
|
+
variant: "ghost",
|
|
207
|
+
"aria-label": a("storage_rule_edit_title"),
|
|
208
|
+
onClick: () => {
|
|
209
|
+
K({
|
|
210
|
+
kind: "rule",
|
|
211
|
+
override: e
|
|
212
|
+
});
|
|
213
|
+
},
|
|
214
|
+
children: /* @__PURE__ */ I(R, {})
|
|
215
|
+
}), /* @__PURE__ */ I(f, {
|
|
216
|
+
type: "button",
|
|
217
|
+
size: "icon-sm",
|
|
218
|
+
variant: "ghost",
|
|
219
|
+
"aria-label": a("storage_rule_delete_title"),
|
|
220
|
+
onClick: () => {
|
|
221
|
+
K({
|
|
222
|
+
kind: "delete-rule",
|
|
223
|
+
override: e
|
|
224
|
+
});
|
|
225
|
+
},
|
|
226
|
+
children: /* @__PURE__ */ I(z, {})
|
|
227
|
+
})]
|
|
228
|
+
}) : null]
|
|
229
|
+
}, e.id)),
|
|
230
|
+
J ? /* @__PURE__ */ I("div", {
|
|
231
|
+
className: "border-t pt-3",
|
|
232
|
+
children: /* @__PURE__ */ L(f, {
|
|
233
|
+
type: "button",
|
|
234
|
+
size: "sm",
|
|
235
|
+
variant: "outline",
|
|
236
|
+
onClick: () => {
|
|
237
|
+
K({
|
|
238
|
+
kind: "rule",
|
|
239
|
+
override: null
|
|
240
|
+
});
|
|
241
|
+
},
|
|
242
|
+
children: [/* @__PURE__ */ I(de, { "data-icon": "inline-start" }), a("storage_rule_add")]
|
|
243
|
+
})
|
|
244
|
+
}) : null
|
|
245
|
+
]
|
|
246
|
+
})] }),
|
|
247
|
+
/* @__PURE__ */ I(_e, {
|
|
248
|
+
usage: Y,
|
|
249
|
+
filter: ye,
|
|
250
|
+
onFilterChange: be,
|
|
251
|
+
deleting: q != null,
|
|
252
|
+
name: Ce,
|
|
253
|
+
applied: (e) => {
|
|
254
|
+
let t = xe.parameter(e);
|
|
255
|
+
return {
|
|
256
|
+
short: M(t.keepDays),
|
|
257
|
+
text: ne(t, Se)
|
|
258
|
+
};
|
|
259
|
+
},
|
|
260
|
+
onDelete: J ? (e) => {
|
|
261
|
+
K({
|
|
262
|
+
kind: "delete-readings",
|
|
263
|
+
scope: e
|
|
264
|
+
});
|
|
265
|
+
} : null
|
|
266
|
+
}),
|
|
267
|
+
/* @__PURE__ */ L(b, { children: [/* @__PURE__ */ L(T, { children: [
|
|
268
|
+
/* @__PURE__ */ I(S, { children: a("storage_history_title") }),
|
|
269
|
+
/* @__PURE__ */ I(x, { children: a("storage_history_description") }),
|
|
270
|
+
J ? /* @__PURE__ */ I(C, { children: /* @__PURE__ */ L(f, {
|
|
271
|
+
type: "button",
|
|
272
|
+
size: "sm",
|
|
273
|
+
variant: "outline",
|
|
274
|
+
disabled: q != null,
|
|
275
|
+
onClick: () => {
|
|
276
|
+
K({
|
|
277
|
+
kind: "delete-history",
|
|
278
|
+
target: "audit"
|
|
279
|
+
});
|
|
280
|
+
},
|
|
281
|
+
children: [/* @__PURE__ */ I(z, { "data-icon": "inline-start" }), a("storage_delete_history_action")]
|
|
282
|
+
}) }) : null
|
|
283
|
+
] }), /* @__PURE__ */ L(w, {
|
|
284
|
+
className: "flex flex-wrap items-center justify-between gap-2",
|
|
285
|
+
children: [/* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
|
|
286
|
+
className: "text-sm",
|
|
287
|
+
children: a("storage_history_summary", {
|
|
288
|
+
records: A(Y.audit.records, v),
|
|
289
|
+
since: U(Y.audit.firstAt)
|
|
290
|
+
})
|
|
291
|
+
}), /* @__PURE__ */ I("p", {
|
|
292
|
+
className: "text-sm text-muted-foreground",
|
|
293
|
+
children: M(X.auditKeepDays)
|
|
294
|
+
})] }), J ? /* @__PURE__ */ L(f, {
|
|
295
|
+
type: "button",
|
|
296
|
+
size: "sm",
|
|
297
|
+
variant: "outline",
|
|
298
|
+
onClick: () => {
|
|
299
|
+
K({
|
|
300
|
+
kind: "default",
|
|
301
|
+
target: "audit"
|
|
302
|
+
});
|
|
303
|
+
},
|
|
304
|
+
children: [/* @__PURE__ */ I(R, { "data-icon": "inline-start" }), a("storage_change")]
|
|
305
|
+
}) : null]
|
|
306
|
+
})] }),
|
|
307
|
+
/* @__PURE__ */ L(b, { children: [/* @__PURE__ */ L(T, { children: [
|
|
308
|
+
/* @__PURE__ */ I(S, { children: a("storage_alarm_log_title") }),
|
|
309
|
+
/* @__PURE__ */ I(x, { children: a("storage_alarm_log_description") }),
|
|
310
|
+
J ? /* @__PURE__ */ I(C, { children: /* @__PURE__ */ L(f, {
|
|
311
|
+
type: "button",
|
|
312
|
+
size: "sm",
|
|
313
|
+
variant: "outline",
|
|
314
|
+
disabled: q != null,
|
|
315
|
+
onClick: () => {
|
|
316
|
+
K({
|
|
317
|
+
kind: "delete-history",
|
|
318
|
+
target: "alarm_log"
|
|
319
|
+
});
|
|
320
|
+
},
|
|
321
|
+
children: [/* @__PURE__ */ I(z, { "data-icon": "inline-start" }), a("storage_delete_alarm_log_action")]
|
|
322
|
+
}) }) : null
|
|
323
|
+
] }), /* @__PURE__ */ L(w, {
|
|
324
|
+
className: "flex flex-wrap items-center justify-between gap-2",
|
|
325
|
+
children: [/* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
|
|
326
|
+
className: "text-sm",
|
|
327
|
+
children: a("storage_alarm_log_summary", {
|
|
328
|
+
records: A(Y.alarmLog.records, v),
|
|
329
|
+
since: U(Y.alarmLog.firstAt)
|
|
330
|
+
})
|
|
331
|
+
}), /* @__PURE__ */ I("p", {
|
|
332
|
+
className: "text-sm text-muted-foreground",
|
|
333
|
+
children: M(X.alarmLogKeepDays)
|
|
334
|
+
})] }), J ? /* @__PURE__ */ L(f, {
|
|
335
|
+
type: "button",
|
|
336
|
+
size: "sm",
|
|
337
|
+
variant: "outline",
|
|
338
|
+
onClick: () => {
|
|
339
|
+
K({
|
|
340
|
+
kind: "default",
|
|
341
|
+
target: "alarm_log"
|
|
342
|
+
});
|
|
343
|
+
},
|
|
344
|
+
children: [/* @__PURE__ */ I(R, { "data-icon": "inline-start" }), a("storage_change")]
|
|
345
|
+
}) : null]
|
|
346
|
+
})] }),
|
|
347
|
+
/* @__PURE__ */ L(b, { children: [/* @__PURE__ */ L(T, { children: [/* @__PURE__ */ I(S, { children: a("storage_files_title") }), /* @__PURE__ */ I(x, { children: a("storage_files_description") })] }), /* @__PURE__ */ I(w, { children: Y.files.areas.length === 0 ? /* @__PURE__ */ I("p", {
|
|
348
|
+
className: "text-sm text-muted-foreground",
|
|
349
|
+
children: a("storage_files_empty")
|
|
350
|
+
}) : /* @__PURE__ */ L(l, { children: [/* @__PURE__ */ I(c, { children: /* @__PURE__ */ L(g, { children: [
|
|
351
|
+
/* @__PURE__ */ I(d, { children: a("storage_files_area") }),
|
|
352
|
+
/* @__PURE__ */ I(d, {
|
|
353
|
+
className: "text-right",
|
|
354
|
+
children: a("storage_files_count")
|
|
355
|
+
}),
|
|
356
|
+
/* @__PURE__ */ I(d, {
|
|
357
|
+
className: "text-right",
|
|
358
|
+
children: a("storage_files_size")
|
|
359
|
+
}),
|
|
360
|
+
/* @__PURE__ */ I(d, { children: a("storage_files_managed") })
|
|
361
|
+
] }) }), /* @__PURE__ */ I(u, { children: Y.files.areas.map((e) => /* @__PURE__ */ L(g, { children: [
|
|
362
|
+
/* @__PURE__ */ I(p, { children: he(e.area) }),
|
|
363
|
+
/* @__PURE__ */ I(p, {
|
|
364
|
+
className: "text-right tabular-nums",
|
|
365
|
+
children: A(e.files, v)
|
|
366
|
+
}),
|
|
367
|
+
/* @__PURE__ */ I(p, {
|
|
368
|
+
className: "text-right tabular-nums",
|
|
369
|
+
children: j(e.bytes, v)
|
|
370
|
+
}),
|
|
371
|
+
/* @__PURE__ */ I(p, { children: /* @__PURE__ */ I(ge, {
|
|
372
|
+
workspaceId: n,
|
|
373
|
+
area: e.area
|
|
374
|
+
}) })
|
|
375
|
+
] }, e.area)) })] }) })] })
|
|
376
|
+
] })
|
|
377
|
+
]
|
|
378
|
+
}),
|
|
379
|
+
/* @__PURE__ */ I(s, {
|
|
380
|
+
open: G != null,
|
|
381
|
+
onOpenChange: (e) => {
|
|
382
|
+
e || $();
|
|
383
|
+
},
|
|
384
|
+
children: /* @__PURE__ */ I(o, { children: G == null || X == null || Z == null ? null : G.kind === "default" ? /* @__PURE__ */ I(ie, {
|
|
385
|
+
workspaceId: n,
|
|
386
|
+
kind: G.target,
|
|
387
|
+
retention: X,
|
|
388
|
+
onCancel: $,
|
|
389
|
+
onDone: $
|
|
390
|
+
}) : G.kind === "rule" ? /* @__PURE__ */ I(re, {
|
|
391
|
+
workspaceId: n,
|
|
392
|
+
retention: X,
|
|
393
|
+
override: G.override,
|
|
394
|
+
tree: Z,
|
|
395
|
+
onCancel: $,
|
|
396
|
+
onDone: $
|
|
397
|
+
}) : G.kind === "delete-rule" ? /* @__PURE__ */ I(oe, {
|
|
398
|
+
workspaceId: n,
|
|
399
|
+
override: G.override,
|
|
400
|
+
onCancel: $,
|
|
401
|
+
onDone: $
|
|
402
|
+
}) : G.kind === "delete-readings" ? /* @__PURE__ */ I(ae, {
|
|
403
|
+
workspaceId: n,
|
|
404
|
+
scope: G.scope,
|
|
405
|
+
onCancel: $,
|
|
406
|
+
onStarted: we
|
|
407
|
+
}) : /* @__PURE__ */ I(se, {
|
|
408
|
+
workspaceId: n,
|
|
409
|
+
kind: G.target,
|
|
410
|
+
onCancel: $,
|
|
411
|
+
onStarted: we
|
|
412
|
+
}) })
|
|
413
|
+
})
|
|
414
|
+
] });
|
|
415
|
+
}
|
|
416
|
+
function _e({ usage: e, filter: t, onFilterChange: n, deleting: a, name: o, applied: s, onDelete: _ }) {
|
|
417
|
+
let y = i(), E = r(), D = t.trim().toLocaleLowerCase(E), O = (e) => D === "" || o(e).toLocaleLowerCase(E).includes(D), k = e.readings.parameters.filter((e) => e.live && O(e)), ee = e.readings.parameters.filter((e) => !e.live && O(e)), j = (e, t) => /* @__PURE__ */ L(l, { children: [/* @__PURE__ */ I(c, { children: /* @__PURE__ */ L(g, { children: [
|
|
418
|
+
/* @__PURE__ */ I(d, { children: y("storage_column_parameter") }),
|
|
419
|
+
/* @__PURE__ */ I(d, {
|
|
420
|
+
className: "text-right",
|
|
421
|
+
children: y("storage_column_records")
|
|
422
|
+
}),
|
|
423
|
+
/* @__PURE__ */ I(d, { children: y("storage_column_oldest") }),
|
|
424
|
+
/* @__PURE__ */ I(d, { children: y("storage_column_newest") }),
|
|
425
|
+
t ? /* @__PURE__ */ I(d, { children: y("storage_column_retention") }) : null,
|
|
426
|
+
_ == null ? null : /* @__PURE__ */ I(d, { className: "w-10" })
|
|
427
|
+
] }) }), /* @__PURE__ */ I(u, { children: e.map((e) => /* @__PURE__ */ L(g, { children: [
|
|
428
|
+
/* @__PURE__ */ I(p, {
|
|
429
|
+
className: "max-w-64 truncate",
|
|
430
|
+
children: o(e)
|
|
431
|
+
}),
|
|
432
|
+
/* @__PURE__ */ I(p, {
|
|
433
|
+
className: "text-right tabular-nums",
|
|
434
|
+
children: A(e.records, E)
|
|
435
|
+
}),
|
|
436
|
+
/* @__PURE__ */ I(p, {
|
|
437
|
+
className: "tabular-nums",
|
|
438
|
+
children: U(e.firstAt)
|
|
439
|
+
}),
|
|
440
|
+
/* @__PURE__ */ I(p, {
|
|
441
|
+
className: "tabular-nums",
|
|
442
|
+
children: U(e.lastAt)
|
|
443
|
+
}),
|
|
444
|
+
t ? /* @__PURE__ */ I(p, {
|
|
445
|
+
className: "text-muted-foreground",
|
|
446
|
+
title: s(e.parameterId).text,
|
|
447
|
+
children: s(e.parameterId).short
|
|
448
|
+
}) : null,
|
|
449
|
+
_ == null ? null : /* @__PURE__ */ I(p, { children: /* @__PURE__ */ I(f, {
|
|
450
|
+
type: "button",
|
|
451
|
+
size: "icon-sm",
|
|
452
|
+
variant: "ghost",
|
|
453
|
+
disabled: a,
|
|
454
|
+
"aria-label": y("storage_delete_readings_title", { name: o(e) }),
|
|
455
|
+
onClick: () => {
|
|
456
|
+
_({
|
|
457
|
+
kind: "parameters",
|
|
458
|
+
parameterIds: [e.parameterId],
|
|
459
|
+
label: o(e)
|
|
460
|
+
});
|
|
461
|
+
},
|
|
462
|
+
children: /* @__PURE__ */ I(z, {})
|
|
463
|
+
}) })
|
|
464
|
+
] }, e.parameterId)) })] });
|
|
465
|
+
return /* @__PURE__ */ L(b, { children: [/* @__PURE__ */ L(T, { children: [
|
|
466
|
+
/* @__PURE__ */ I(S, { children: y("storage_readings_title") }),
|
|
467
|
+
/* @__PURE__ */ I(x, { children: y("storage_readings_description") }),
|
|
468
|
+
_ == null ? null : /* @__PURE__ */ I(C, { children: /* @__PURE__ */ L(f, {
|
|
469
|
+
type: "button",
|
|
470
|
+
size: "sm",
|
|
471
|
+
variant: "outline",
|
|
472
|
+
disabled: a,
|
|
473
|
+
onClick: () => {
|
|
474
|
+
_({ kind: "workspace" });
|
|
475
|
+
},
|
|
476
|
+
children: [/* @__PURE__ */ I(z, { "data-icon": "inline-start" }), y("storage_delete_readings_action")]
|
|
477
|
+
}) })
|
|
478
|
+
] }), /* @__PURE__ */ I(w, {
|
|
479
|
+
className: "flex flex-col gap-3",
|
|
480
|
+
children: e.readings.parameters.length === 0 ? /* @__PURE__ */ I("p", {
|
|
481
|
+
className: "text-sm text-muted-foreground",
|
|
482
|
+
children: y("storage_readings_empty")
|
|
483
|
+
}) : /* @__PURE__ */ L(F, { children: [
|
|
484
|
+
/* @__PURE__ */ I(v, {
|
|
485
|
+
value: t,
|
|
486
|
+
placeholder: y("storage_filter_placeholder"),
|
|
487
|
+
className: "\n h-8\n sm:max-w-xs\n ",
|
|
488
|
+
onChange: (e) => {
|
|
489
|
+
n(e.target.value);
|
|
490
|
+
}
|
|
491
|
+
}),
|
|
492
|
+
k.length > 0 ? j(k, !0) : null,
|
|
493
|
+
ee.length > 0 ? /* @__PURE__ */ L("div", {
|
|
494
|
+
className: "flex flex-col gap-2",
|
|
495
|
+
children: [
|
|
496
|
+
/* @__PURE__ */ I("p", {
|
|
497
|
+
className: "text-sm font-medium",
|
|
498
|
+
children: y("storage_deleted_title")
|
|
499
|
+
}),
|
|
500
|
+
/* @__PURE__ */ L(h, { children: [/* @__PURE__ */ I(B, {}), /* @__PURE__ */ I(m, { children: y("storage_deleted_warning") })] }),
|
|
501
|
+
j(ee, !1)
|
|
502
|
+
]
|
|
503
|
+
}) : null
|
|
504
|
+
] })
|
|
505
|
+
})] });
|
|
506
|
+
}
|
|
507
|
+
export { G as SetupStoragePage };
|