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