@chenyqthu/tp-mobile-ui-kit 0.2.0 → 0.3.0

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.
Files changed (50) hide show
  1. package/README.md +11 -9
  2. package/dist/assets.js +5 -5
  3. package/dist/catalog.json +1956 -131
  4. package/dist/chunks/OmadaAppDemo-BxWPBACn.js +7359 -0
  5. package/dist/chunks/{TPPrompt-DLd32rsN.js → TPInfoSheet-DozlNuGj.js} +1658 -1043
  6. package/dist/chunks/asset-icons-BLfOEHzP.js +10434 -0
  7. package/dist/chunks/{asset-illustrations-YHXzEd7z.js → asset-illustrations-CslT-sgf.js} +28 -2051
  8. package/dist/chunks/{asset-logos-DAyGwOLj.js → asset-logos-B18ywOgH.js} +2 -2
  9. package/dist/chunks/{asset-motion-D7fWh_JS.js → asset-motion-CxM2f5Ft.js} +307 -70
  10. package/dist/core.js +3 -3
  11. package/dist/index.js +7 -7
  12. package/dist/omada.js +7 -7
  13. package/dist/standalone.js +2090 -622
  14. package/dist/style.css +1 -1
  15. package/dist/types/assets-lib/TPIcon.d.ts +3 -0
  16. package/dist/types/assets-lib/iconsManifest.d.ts +2 -0
  17. package/dist/types/assets-lib/motionsManifest.d.ts +1 -1
  18. package/dist/types/core/components/TPDatePicker.d.ts +1 -1
  19. package/dist/types/core/components/TPInfoSheet.d.ts +11 -0
  20. package/dist/types/core/components/TPLiquidGlass.d.ts +3 -2
  21. package/dist/types/core/components/TPLiquidGlassBackdrop.d.ts +32 -0
  22. package/dist/types/core/components/TPLoadMore.d.ts +7 -0
  23. package/dist/types/core/index.d.ts +3 -0
  24. package/dist/types/core/types.d.ts +97 -8
  25. package/dist/types/core/utils/liquidGlassEngine.d.ts +37 -0
  26. package/dist/types/omada/blocks/OmadaChartCard.d.ts +53 -0
  27. package/dist/types/omada/blocks/OmadaClientListBlock.d.ts +34 -0
  28. package/dist/types/omada/blocks/OmadaDeviceListBlock.d.ts +15 -2
  29. package/dist/types/omada/blocks/OmadaFormRepeaterBlock.d.ts +48 -0
  30. package/dist/types/omada/blocks/OmadaPortPanelBlock.d.ts +21 -3
  31. package/dist/types/omada/blocks/OmadaPortSelectorBlock.d.ts +23 -0
  32. package/dist/types/omada/blocks/OmadaSidebarDrawer.d.ts +27 -0
  33. package/dist/types/omada/blocks/OmadaSiteListBlock.d.ts +26 -0
  34. package/dist/types/omada/blocks/OmadaVoucherPreviewCard.d.ts +21 -0
  35. package/dist/types/omada/components/OmadaStandardInput.d.ts +3 -2
  36. package/dist/types/omada/index.d.ts +14 -2
  37. package/dist/types/omada/pages/OmadaAccessibilitySettingsPage.d.ts +12 -0
  38. package/dist/types/omada/pages/OmadaAppDemo.d.ts +6 -3
  39. package/dist/types/omada/pages/OmadaConfigFormPage.d.ts +24 -0
  40. package/dist/types/omada/pages/OmadaLanSettingsPage.d.ts +25 -0
  41. package/dist/types/omada/pages/OmadaPortDetailPage.d.ts +16 -0
  42. package/dist/types/omada/pages/OmadaPrivacyPolicyPage.d.ts +18 -0
  43. package/dist/types/theme/TPThemeProvider.d.ts +9 -0
  44. package/dist/types/theme/index.d.ts +1 -1
  45. package/dist/types/theme/tokens.d.ts +24 -0
  46. package/package.json +2 -2
  47. package/skills/tp-mobile-ui-kit/SKILL.md +17 -14
  48. package/skills/tp-mobile-ui-kit/references/catalog.json +1956 -131
  49. package/dist/chunks/OmadaAppDemo-BO8a6A-m.js +0 -4910
  50. package/dist/chunks/asset-icons-BIenKvAh.js +0 -7613
@@ -1,4910 +0,0 @@
1
- import { $ as e, A as t, E as n, I as r, J as i, K as a, P as o, Q as s, R as c, U as l, V as u, W as d, X as f, Z as p, c as m, d as h, et as g, g as _, j as v, s as y, t as b, w as x } from "./TPPrompt-DLd32rsN.js";
2
- import { t as S } from "./asset-icons-BIenKvAh.js";
3
- import { t as C } from "./asset-motion-D7fWh_JS.js";
4
- import w, { useEffect as T, useId as E, useMemo as D, useRef as O, useState as k } from "react";
5
- import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
6
- // src/omada/components/OmadaStandardInput.tsx
7
- var N = 4, P = 6;
8
- function F(e) {
9
- let t = e.split(".").slice(0, N);
10
- for (; t.length < N;) t.push("");
11
- return t.map((e) => e.replace(/[^0-9]/g, "").slice(0, 3));
12
- }
13
- function I(e) {
14
- let t = e.replace(/[^0-9a-fA-F-:\s]/g, ""), n = (t.includes("-") || t.includes(":") ? t.split(/[-:]/) : t.replace(/[^0-9a-fA-F]/g, "").match(/.{1,2}/g) ?? []).slice(0, P);
15
- for (; n.length < P;) n.push("");
16
- return n.map((e) => e.replace(/[^0-9a-fA-F]/g, "").toUpperCase().slice(0, 2));
17
- }
18
- function L(e) {
19
- for (let t of e) {
20
- if (t === "") continue;
21
- let e = Number(t);
22
- if (!Number.isInteger(e) || e < 0 || e > 255) return "Each IPv4 octet must be between 0 and 255";
23
- }
24
- }
25
- function R(e) {
26
- if (!e.trim()) return;
27
- let t = Number(e);
28
- if (!Number.isInteger(t) || t < 1 || t > 65535) return "Port must be between 1 and 65535";
29
- }
30
- var z = ({ type: e = "text", label: t, value: n, defaultValue: r = "", onChange: i, placeholder: a, error: o, helperText: s, disabled: c = !1, readOnly: l = !1, id: u, name: d, className: f = "", style: p }) => {
31
- let m = E(), h = u ?? `tp-omada-std-${m}`, [g, _] = k(r);
32
- T(() => {
33
- n !== void 0 && _(n);
34
- }, [n]);
35
- let v = n === void 0 ? g : n, y = O([]), b = O([]), x = D(() => e === "ip" ? F(v) : [], [e, v]), S = D(() => e === "mac" ? I(v) : [], [e, v]), C = D(() => {
36
- if (e === "ip") return L(x);
37
- if (e === "port") return R(v);
38
- }, [
39
- e,
40
- x,
41
- v
42
- ]), A = o ?? C, N = typeof t == "string" ? t : e.toUpperCase(), P = (e) => {
43
- n === void 0 && _(e), i?.(e);
44
- }, z = (e, t) => {
45
- if (c || l) return;
46
- if (t.includes(".")) {
47
- let n = F(t);
48
- if (t.split(".").length >= 2 && e === 0) {
49
- P(n.join("."));
50
- let e = Math.min(3, t.split(".").length - 1);
51
- y.current[e]?.focus();
52
- return;
53
- }
54
- let r = t.replace(/[^0-9]/g, "").slice(0, 3), i = [...x];
55
- i[e] = r, P(i.join(".")), e < 3 && y.current[e + 1]?.focus();
56
- return;
57
- }
58
- let n = t.replace(/[^0-9]/g, "").slice(0, 3), r = [...x];
59
- r[e] = n, P(r.join(".")), n.length === 3 && Number(n) <= 255 && e < 3 && y.current[e + 1]?.focus();
60
- }, B = (e, t) => {
61
- if (c || l) return;
62
- let n = t.replace(/[^0-9a-fA-F]/g, "").toUpperCase();
63
- if (n.length > 2) {
64
- let e = I(t);
65
- P(e.join("-"));
66
- let r = Math.min(5, Math.floor((n.length - 1) / 2));
67
- b.current[r]?.focus();
68
- return;
69
- }
70
- let r = [...S];
71
- r[e] = n.slice(0, 2), P(r.join("-")), n.length === 2 && e < 5 && b.current[e + 1]?.focus();
72
- }, V = (e, t, n, r) => {
73
- e.key === "Backspace" && n[t] === "" && t > 0 || e.key === "ArrowLeft" && e.currentTarget.selectionStart === 0 && t > 0 ? r.current[t - 1]?.focus() : e.key === "ArrowRight" && e.currentTarget.selectionStart === e.currentTarget.value.length && t < n.length - 1 && r.current[t + 1]?.focus();
74
- }, H = [
75
- "tp-omada-std-input-shell",
76
- A ? "tp-omada-std-input-shell--error" : "",
77
- c ? "tp-omada-std-input-shell--disabled" : ""
78
- ].filter(Boolean).join(" ");
79
- return /* @__PURE__ */ M("div", {
80
- className: `tp-omada-std-input ${f}`.trim(),
81
- "data-omada-input-type": e,
82
- style: p,
83
- children: [
84
- t !== void 0 && /* @__PURE__ */ j("label", {
85
- htmlFor: e === "text" || e === "port" ? h : `${h}-0`,
86
- className: "tp-omada-std-input-label",
87
- children: t
88
- }),
89
- e === "ip" && /* @__PURE__ */ j("div", {
90
- className: H,
91
- role: "group",
92
- "aria-label": N,
93
- children: x.map((e, t) => /* @__PURE__ */ M(w.Fragment, { children: [/* @__PURE__ */ j("input", {
94
- ref: (e) => {
95
- y.current[t] = e;
96
- },
97
- id: `${h}-${t}`,
98
- name: d ? `${d}-${t}` : void 0,
99
- type: "text",
100
- inputMode: "numeric",
101
- maxLength: 3,
102
- value: e,
103
- placeholder: "0",
104
- disabled: c,
105
- readOnly: l,
106
- "aria-label": `${N} octet ${t + 1}`,
107
- "aria-invalid": !!A,
108
- className: "tp-omada-std-seg-input",
109
- onChange: (e) => z(t, e.target.value),
110
- onKeyDown: (e) => V(e, t, x, y)
111
- }), t < 3 && /* @__PURE__ */ j("span", {
112
- className: "tp-omada-std-sep",
113
- "aria-hidden": "true",
114
- children: "."
115
- })] }, t))
116
- }),
117
- e === "mac" && /* @__PURE__ */ j("div", {
118
- className: H,
119
- role: "group",
120
- "aria-label": N,
121
- children: S.map((e, t) => /* @__PURE__ */ M(w.Fragment, { children: [/* @__PURE__ */ j("input", {
122
- ref: (e) => {
123
- b.current[t] = e;
124
- },
125
- id: `${h}-${t}`,
126
- name: d ? `${d}-${t}` : void 0,
127
- type: "text",
128
- maxLength: 2,
129
- value: e,
130
- placeholder: "00",
131
- disabled: c,
132
- readOnly: l,
133
- "aria-label": `${N} byte ${t + 1}`,
134
- "aria-invalid": !!A,
135
- className: "tp-omada-std-seg-input",
136
- onChange: (e) => B(t, e.target.value),
137
- onKeyDown: (e) => V(e, t, S, b)
138
- }), t < 5 && /* @__PURE__ */ j("span", {
139
- className: "tp-omada-std-sep",
140
- "aria-hidden": "true",
141
- children: "-"
142
- })] }, t))
143
- }),
144
- (e === "text" || e === "port") && /* @__PURE__ */ j("div", {
145
- className: H,
146
- children: /* @__PURE__ */ j("input", {
147
- id: h,
148
- name: d,
149
- type: "text",
150
- inputMode: e === "port" ? "numeric" : "text",
151
- value: v,
152
- placeholder: a ?? (e === "port" ? "1–65535" : ""),
153
- disabled: c,
154
- readOnly: l,
155
- "aria-invalid": !!A,
156
- className: "tp-omada-std-seg-input tp-omada-std-seg-input--text",
157
- onChange: (t) => {
158
- if (c || l) return;
159
- let n = e === "port" ? t.target.value.replace(/[^0-9]/g, "").slice(0, 5) : t.target.value;
160
- P(n);
161
- }
162
- })
163
- }),
164
- A ? /* @__PURE__ */ j("div", {
165
- className: "tp-omada-std-error",
166
- role: "alert",
167
- children: A
168
- }) : s ? /* @__PURE__ */ j("div", {
169
- className: "tp-omada-std-helper",
170
- children: s
171
- }) : null
172
- ]
173
- });
174
- }, B = [
175
- {
176
- key: "dashboard",
177
- label: "Dashboard",
178
- icon: "tabbar-dashboard-off",
179
- activeIcon: "tabbar-dashboard-on"
180
- },
181
- {
182
- key: "insights",
183
- label: "Insights",
184
- icon: "tabbar-statistics-off",
185
- activeIcon: "tabbar-statistics-on"
186
- },
187
- {
188
- key: "devices",
189
- label: "Devices",
190
- icon: "tabbar-device-off",
191
- activeIcon: "tabbar-device-on"
192
- },
193
- {
194
- key: "clients",
195
- label: "Clients",
196
- icon: "tabbar-client-off",
197
- activeIcon: "tabbar-client-on"
198
- },
199
- {
200
- key: "settings",
201
- label: "Settings",
202
- icon: "tabbar-settings-off",
203
- activeIcon: "tabbar-settings-on"
204
- }
205
- ], V = [
206
- {
207
- id: "dev-gw-1",
208
- mac: "8C-86-DD-A6-A7-5F",
209
- name: "8C-86-DD-A6-A7-5F",
210
- model: "ER7212PC",
211
- type: "gateway",
212
- status: "connected",
213
- ip: "192.168.0.1",
214
- healthLabel: "Good-10",
215
- healthTone: "good",
216
- upgradeAvailable: !1,
217
- firmwareVersion: "v6.3.0.63",
218
- uptime: "18d 04h 22m",
219
- cpuPct: 3,
220
- memoryPct: 31
221
- },
222
- {
223
- id: "dev-ap-1",
224
- mac: "3C-78-95-F0-45-F1",
225
- name: "3C-78-95-F0-45-F1",
226
- model: "EAP723",
227
- type: "ap",
228
- status: "connected",
229
- ip: "192.168.0.2",
230
- healthLabel: "Good-10",
231
- healthTone: "good",
232
- upgradeAvailable: !0,
233
- firmwareVersion: "v1.2.0",
234
- targetVersion: "v1.3.2",
235
- uptime: "14d 11h 09m",
236
- cpuPct: 6,
237
- memoryPct: 42
238
- },
239
- {
240
- id: "dev-ap-2",
241
- mac: "3C-78-95-F0-46-0C",
242
- name: "3C-78-95-F0-46-0C",
243
- model: "EAP723",
244
- type: "ap",
245
- status: "connected",
246
- ip: "192.168.0.3",
247
- healthLabel: "Good-10",
248
- healthTone: "good",
249
- upgradeAvailable: !0,
250
- firmwareVersion: "v1.2.0",
251
- targetVersion: "v1.3.2",
252
- uptime: "14d 11h 04m",
253
- cpuPct: 5,
254
- memoryPct: 39
255
- }
256
- ], H = ({ type: e, size: t = 38 }) => e === "ap" ? /* @__PURE__ */ j("span", {
257
- style: {
258
- display: "inline-flex",
259
- alignItems: "center",
260
- justifyContent: "center",
261
- width: t,
262
- height: t,
263
- color: "#EBEBF0"
264
- },
265
- children: /* @__PURE__ */ j(S, {
266
- name: "client-ap",
267
- size: t,
268
- color: "#EBEBF0"
269
- })
270
- }) : /* @__PURE__ */ j(S, {
271
- name: "client-switch",
272
- size: t
273
- }), U = {
274
- connected: "Connected",
275
- disconnected: "Disconnected",
276
- pending: "Pending"
277
- }, W = {
278
- gateway: "Gateway",
279
- switch: "Switches",
280
- ap: "Access Points"
281
- }, G = ({ devices: e = V, grouped: t = !1, onSelectDevice: n, emptyTitle: i = "No Devices Found", emptyDescription: a = "Try adjusting your search query or status filter.", className: o = "", style: s }) => {
282
- if (e.length === 0) return /* @__PURE__ */ j(r, {
283
- illustration: "no-devices",
284
- title: i,
285
- description: a,
286
- compact: !0,
287
- className: o,
288
- style: s
289
- });
290
- let c = (e) => {
291
- let t = e.status === "connected" ? "tp-omada-status-line--good" : e.status === "pending" ? "tp-omada-status-line--warn" : "tp-omada-status-line--alert", r = e.healthTone === "alert" ? "tp-omada-dot--alert" : e.healthTone === "warn" ? "tp-omada-dot--warn" : "";
292
- return /* @__PURE__ */ j(l, {
293
- leading: /* @__PURE__ */ j(H, {
294
- type: e.type,
295
- size: 38
296
- }),
297
- title: /* @__PURE__ */ M("span", {
298
- style: {
299
- display: "inline-flex",
300
- alignItems: "center",
301
- gap: 6
302
- },
303
- children: [/* @__PURE__ */ j("span", { children: e.mac }), e.upgradeAvailable && /* @__PURE__ */ j("span", {
304
- className: "tp-omada-upgrade-badge",
305
- title: "Firmware upgrade available",
306
- "aria-label": "Firmware upgrade available",
307
- children: /* @__PURE__ */ j("svg", {
308
- width: "10",
309
- height: "10",
310
- viewBox: "0 0 12 12",
311
- fill: "none",
312
- "aria-hidden": "true",
313
- children: /* @__PURE__ */ j("path", {
314
- d: "M6 9.5V2.5M6 2.5L2.75 5.75M6 2.5L9.25 5.75",
315
- stroke: "currentColor",
316
- strokeWidth: "1.6",
317
- strokeLinecap: "round",
318
- strokeLinejoin: "round"
319
- })
320
- })
321
- })]
322
- }),
323
- subtitle: e.model,
324
- trailing: /* @__PURE__ */ M("div", {
325
- className: "tp-omada-row-metrics",
326
- children: [
327
- /* @__PURE__ */ j("span", {
328
- className: `tp-omada-status-line ${t}`,
329
- children: U[e.status]
330
- }),
331
- /* @__PURE__ */ j("span", { children: e.ip }),
332
- /* @__PURE__ */ M("span", {
333
- className: "tp-omada-health-dot-row",
334
- children: [/* @__PURE__ */ j("span", {
335
- className: `tp-omada-dot ${r}`.trim(),
336
- "aria-hidden": "true"
337
- }), /* @__PURE__ */ j("span", { children: e.healthLabel })]
338
- })
339
- ]
340
- }),
341
- onClick: n ? () => n(e) : void 0
342
- }, e.id);
343
- };
344
- if (!t) return /* @__PURE__ */ j(d, {
345
- divided: !0,
346
- className: o,
347
- style: s,
348
- children: e.map(c)
349
- });
350
- let f = [
351
- "gateway",
352
- "switch",
353
- "ap"
354
- ];
355
- return /* @__PURE__ */ j("div", {
356
- className: o,
357
- style: {
358
- display: "flex",
359
- flexDirection: "column",
360
- gap: 12,
361
- ...s
362
- },
363
- children: f.map((t) => {
364
- let n = e.filter((e) => e.type === t);
365
- return n.length === 0 ? null : /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j(u, {
366
- title: W[t],
367
- count: n.length
368
- }), /* @__PURE__ */ j(d, {
369
- divided: !0,
370
- children: n.map(c)
371
- })] }, t);
372
- })
373
- });
374
- }, ee = [
375
- {
376
- key: "2.4G",
377
- label: "2.4 GHz"
378
- },
379
- {
380
- key: "5G",
381
- label: "5 GHz"
382
- },
383
- {
384
- key: "6G",
385
- label: "6 GHz"
386
- }
387
- ], te = [
388
- "WPA3-Personal",
389
- "WPA2/WPA3",
390
- "WPA2-Personal",
391
- "Open"
392
- ], K = ({ initialConfig: e, showHeader: t = !0, onBack: r, onSave: o, className: f = "", style: p }) => {
393
- let [m, h] = k(e?.ssid ?? "Sara Banday"), [g, _] = k(e?.enabled ?? !0), [v, y] = k(e?.bands ?? [
394
- "2.4G",
395
- "5G",
396
- "6G"
397
- ]), [b, x] = k(e?.security ?? "WPA3-Personal"), [w, T] = k(e?.vlanId ?? "10"), [E, D] = k(e?.aclGatewayIp ?? "192.168.0.1"), [O, A] = k(e?.aclMacAddress ?? "8C-86-DD-A6-A7-5F"), [N, P] = k(!1), [F, I] = k(!1), L = (e) => {
398
- y((t) => t.includes(e) ? t.length > 1 ? t.filter((t) => t !== e) : t : [...t, e]);
399
- };
400
- return /* @__PURE__ */ M("div", {
401
- className: `tp-omada-screen ${f}`.trim(),
402
- style: p,
403
- children: [
404
- t && /* @__PURE__ */ j("div", {
405
- className: "tp-omada-header-wrap",
406
- children: /* @__PURE__ */ j(s, {
407
- variant: "floating",
408
- title: "Wireless Networks",
409
- subtitle: "SSID & Access Control",
410
- left: r ? /* @__PURE__ */ j("button", {
411
- type: "button",
412
- className: "tp-header-icon-btn",
413
- onClick: r,
414
- "aria-label": "Back",
415
- children: /* @__PURE__ */ j(S, {
416
- name: "nav-back",
417
- size: 20
418
- })
419
- }) : void 0
420
- })
421
- }),
422
- /* @__PURE__ */ j("div", {
423
- className: "tp-omada-scroll",
424
- children: /* @__PURE__ */ M("div", {
425
- className: `tp-omada-body ${t ? "" : "tp-omada-body--no-header"}`.trim(),
426
- children: [
427
- /* @__PURE__ */ j(u, { title: "Basic Wireless Settings" }),
428
- /* @__PURE__ */ M(d, {
429
- divided: !0,
430
- children: [
431
- /* @__PURE__ */ j("div", {
432
- style: { padding: "12px 16px" },
433
- children: /* @__PURE__ */ j(z, {
434
- type: "text",
435
- label: "Network Name (SSID)",
436
- value: m,
437
- onChange: h,
438
- placeholder: "Enter SSID"
439
- })
440
- }),
441
- /* @__PURE__ */ j(l, {
442
- leading: /* @__PURE__ */ j(S, {
443
- name: "qa-ssid",
444
- size: 22
445
- }),
446
- title: "Enable WLAN",
447
- subtitle: g ? "Broadcasting on selected bands" : "Disabled",
448
- trailing: /* @__PURE__ */ j(a, {
449
- checked: g,
450
- onChange: _,
451
- ariaLabel: "Enable Wireless Network"
452
- })
453
- }),
454
- /* @__PURE__ */ M("div", {
455
- style: {
456
- padding: "12px 16px",
457
- display: "flex",
458
- flexDirection: "column",
459
- gap: 10
460
- },
461
- children: [/* @__PURE__ */ j("span", {
462
- className: "tp-omada-std-input-label",
463
- children: "Frequency Band"
464
- }), /* @__PURE__ */ j("div", {
465
- className: "tp-omada-chip-group",
466
- children: ee.map((e) => /* @__PURE__ */ j(c, {
467
- selected: v.includes(e.key),
468
- onClick: () => L(e.key),
469
- children: e.label
470
- }, e.key))
471
- })]
472
- }),
473
- /* @__PURE__ */ M("div", {
474
- style: {
475
- padding: "12px 16px",
476
- display: "flex",
477
- flexDirection: "column",
478
- gap: 10
479
- },
480
- children: [/* @__PURE__ */ j("span", {
481
- className: "tp-omada-std-input-label",
482
- children: "Security"
483
- }), /* @__PURE__ */ j("div", {
484
- className: "tp-omada-chip-group",
485
- children: te.map((e) => /* @__PURE__ */ j(c, {
486
- selected: b === e,
487
- onClick: () => x(e),
488
- children: e
489
- }, e))
490
- })]
491
- }),
492
- /* @__PURE__ */ j("div", {
493
- style: { padding: "12px 16px" },
494
- children: /* @__PURE__ */ j(z, {
495
- type: "port",
496
- label: "VLAN ID",
497
- value: w,
498
- onChange: T,
499
- helperText: "Valid IEEE 802.1Q VLAN ID (1–4094)"
500
- })
501
- })
502
- ]
503
- }),
504
- /* @__PURE__ */ j(u, { title: "IP / MAC Access Control (ACL)" }),
505
- /* @__PURE__ */ j(d, {
506
- divided: !0,
507
- children: /* @__PURE__ */ M("div", {
508
- style: {
509
- padding: "12px 16px",
510
- display: "flex",
511
- flexDirection: "column",
512
- gap: 14
513
- },
514
- children: [/* @__PURE__ */ j(z, {
515
- type: "ip",
516
- label: "Allowed Gateway IP",
517
- value: E,
518
- onChange: D
519
- }), /* @__PURE__ */ j(z, {
520
- type: "mac",
521
- label: "MAC Filter Allowlist",
522
- value: O,
523
- onChange: A
524
- })]
525
- })
526
- }),
527
- /* @__PURE__ */ j("div", {
528
- style: { marginTop: 4 },
529
- children: /* @__PURE__ */ j(i, {
530
- variant: "primary",
531
- block: !0,
532
- onClick: () => {
533
- let e = {
534
- ssid: m,
535
- enabled: g,
536
- bands: v,
537
- security: b,
538
- vlanId: w,
539
- aclGatewayIp: E,
540
- aclMacAddress: O
541
- };
542
- I(!1), P(!0), o?.(e);
543
- },
544
- children: "Save & Deploy Configuration"
545
- })
546
- })
547
- ]
548
- })
549
- }),
550
- /* @__PURE__ */ j(n, {
551
- open: N,
552
- title: F ? "Configuration Applied" : "Deploying Configuration",
553
- subtitle: `SSID: ${m || "Unnamed"} • ${v.join(" / ")}`,
554
- onClose: () => P(!1),
555
- children: /* @__PURE__ */ M("div", {
556
- style: {
557
- display: "flex",
558
- flexDirection: "column",
559
- alignItems: "center",
560
- gap: 14,
561
- padding: "8px 0 12px"
562
- },
563
- children: [
564
- /* @__PURE__ */ j(C, {
565
- name: "deploy-config",
566
- width: 112,
567
- height: 112,
568
- playing: !F
569
- }),
570
- /* @__PURE__ */ j("div", {
571
- style: {
572
- textAlign: "center",
573
- fontSize: 14,
574
- color: "var(--tp-text-secondary-alt)"
575
- },
576
- children: F ? `Synced ${b} profile (VLAN ${w || "1"}) to 2 EAP723 access points.` : `Pushing ${b} policy and ACL rules (${E}) to site APs…`
577
- }),
578
- /* @__PURE__ */ j("div", {
579
- style: {
580
- display: "flex",
581
- gap: 10,
582
- width: "100%"
583
- },
584
- children: F ? /* @__PURE__ */ j(i, {
585
- variant: "secondary",
586
- block: !0,
587
- onClick: () => P(!1),
588
- children: "Done"
589
- }) : /* @__PURE__ */ j(i, {
590
- variant: "primary",
591
- block: !0,
592
- onClick: () => I(!0),
593
- children: "Confirm Provisioning"
594
- })
595
- })
596
- ]
597
- })
598
- })
599
- ]
600
- });
601
- }, q = [
602
- {
603
- id: "log-1",
604
- category: "alert",
605
- severity: "warning",
606
- title: "Firmware Update Available (v1.3.2)",
607
- description: "EAP723 (3C-78-95-F0-45-F1, 3C-78-95-F0-46-0C) pending upgrade.",
608
- timestamp: "10:42 AM",
609
- unread: !0
610
- },
611
- {
612
- id: "log-2",
613
- category: "device",
614
- severity: "info",
615
- title: "ER7212PC WAN3 Link Up",
616
- description: "192.168.0.1 negotiated 1000 Mbps Full Duplex on WAN3.",
617
- timestamp: "09:18 AM",
618
- unread: !1
619
- },
620
- {
621
- id: "log-3",
622
- category: "client",
623
- severity: "info",
624
- title: "Client Roamed to 3C-78-95-F0-45-F1",
625
- description: "92-Sarabande (192.168.0.12) connected to Sara Banday (-28 dBm).",
626
- timestamp: "08:51 AM",
627
- unread: !1
628
- },
629
- {
630
- id: "log-4",
631
- category: "operation",
632
- severity: "info",
633
- title: "Site Health Score Evaluated",
634
- description: "Site 92 scored 100 across Device, Wi-Fi, and WAN checks.",
635
- timestamp: "Yesterday",
636
- unread: !1
637
- }
638
- ], ne = {
639
- alert: "status-warning-solid",
640
- device: "log-device",
641
- client: "log-clients",
642
- operation: "log-operation"
643
- }, re = [
644
- {
645
- key: "all",
646
- label: "All"
647
- },
648
- {
649
- key: "alert",
650
- label: "Alerts"
651
- },
652
- {
653
- key: "device",
654
- label: "Device"
655
- },
656
- {
657
- key: "client",
658
- label: "Client"
659
- },
660
- {
661
- key: "operation",
662
- label: "Operation"
663
- }
664
- ], ie = ({ incidents: e = q, showHeader: t = !0, onBack: n, onUnreadCountChange: a, className: o = "", style: f }) => {
665
- let [p, m] = k([...e]), [h, g] = k("all"), _ = D(() => p.filter((e) => e.unread).length, [p]), v = D(() => h === "all" ? p : p.filter((e) => e.category === h), [p, h]), y = () => {
666
- m((e) => e.map((e) => ({
667
- ...e,
668
- unread: !1
669
- }))), a?.(0);
670
- };
671
- return /* @__PURE__ */ M("div", {
672
- className: `tp-omada-screen ${o}`.trim(),
673
- style: f,
674
- children: [t && /* @__PURE__ */ j("div", {
675
- className: "tp-omada-header-wrap",
676
- children: /* @__PURE__ */ j(s, {
677
- variant: "floating",
678
- title: "Logs",
679
- subtitle: "Alerts & Site Events",
680
- left: n ? /* @__PURE__ */ j("button", {
681
- type: "button",
682
- className: "tp-header-icon-btn",
683
- onClick: n,
684
- "aria-label": "Back",
685
- children: /* @__PURE__ */ j(S, {
686
- name: "nav-back",
687
- size: 20
688
- })
689
- }) : void 0,
690
- right: _ > 0 ? /* @__PURE__ */ j(i, {
691
- variant: "text",
692
- size: "sm",
693
- onClick: y,
694
- children: "Mark All Read"
695
- }) : void 0
696
- })
697
- }), /* @__PURE__ */ j("div", {
698
- className: "tp-omada-scroll",
699
- children: /* @__PURE__ */ M("div", {
700
- className: `tp-omada-body ${t ? "" : "tp-omada-body--no-header"}`.trim(),
701
- children: [
702
- /* @__PURE__ */ j("div", {
703
- className: "tp-omada-chip-group",
704
- children: re.map((e) => /* @__PURE__ */ j(c, {
705
- selected: h === e.key,
706
- onClick: () => g(e.key),
707
- children: e.label
708
- }, e.key))
709
- }),
710
- /* @__PURE__ */ j(u, {
711
- title: "Event Timeline",
712
- count: v.length,
713
- action: _ > 0 ? /* @__PURE__ */ M("button", {
714
- type: "button",
715
- onClick: y,
716
- style: {
717
- border: "none",
718
- background: "transparent",
719
- color: "var(--tp-focus)",
720
- fontSize: 13,
721
- cursor: "pointer",
722
- padding: 0
723
- },
724
- children: [
725
- "Mark All Read (",
726
- _,
727
- ")"
728
- ]
729
- }) : void 0
730
- }),
731
- v.length === 0 ? /* @__PURE__ */ j(r, {
732
- illustration: "no-data",
733
- title: "No Events",
734
- description: "No logs match the selected category.",
735
- compact: !0
736
- }) : /* @__PURE__ */ j(d, {
737
- divided: !0,
738
- children: v.map((e) => /* @__PURE__ */ j(l, {
739
- leading: /* @__PURE__ */ j(S, {
740
- name: e.severity === "error" ? "status-error-solid" : ne[e.category],
741
- size: 22
742
- }),
743
- title: /* @__PURE__ */ M("span", {
744
- style: {
745
- display: "inline-flex",
746
- alignItems: "center",
747
- gap: 6
748
- },
749
- children: [/* @__PURE__ */ j("span", { children: e.title }), e.unread && /* @__PURE__ */ j("span", { className: "tp-omada-dot tp-omada-dot--alert" })]
750
- }),
751
- subtitle: e.description,
752
- value: e.timestamp,
753
- onClick: () => {
754
- e.unread && m((t) => {
755
- let n = t.map((t) => t.id === e.id ? {
756
- ...t,
757
- unread: !1
758
- } : t);
759
- return a?.(n.filter((e) => e.unread).length), n;
760
- });
761
- }
762
- }, e.id))
763
- })
764
- ]
765
- })
766
- })]
767
- });
768
- }, ae = [
769
- {
770
- id: "sch-1",
771
- name: "Nighttime Wi-Fi Off (Guest)",
772
- target: "wlan",
773
- enabled: !0,
774
- days: [
775
- "mon",
776
- "tue",
777
- "wed",
778
- "thu",
779
- "fri"
780
- ],
781
- startTime: {
782
- hour: 23,
783
- minute: 0
784
- },
785
- endTime: {
786
- hour: 7,
787
- minute: 0
788
- }
789
- },
790
- {
791
- id: "sch-2",
792
- name: "PoE Power Saving — Desk APs",
793
- target: "poe",
794
- enabled: !1,
795
- days: ["sat", "sun"],
796
- startTime: {
797
- hour: 20,
798
- minute: 30
799
- },
800
- endTime: {
801
- hour: 8,
802
- minute: 0
803
- }
804
- },
805
- {
806
- id: "sch-3",
807
- name: "Weekly Gateway Auto-Reboot",
808
- target: "reboot",
809
- enabled: !0,
810
- days: ["sun"],
811
- startTime: {
812
- hour: 4,
813
- minute: 0
814
- }
815
- }
816
- ];
817
- function oe(e) {
818
- return `${String(e.hour).padStart(2, "0")}:${String(e.minute).padStart(2, "0")}`;
819
- }
820
- var J = ({ rules: e = ae, showHeader: r = !0, onBack: o, onChange: f, className: p = "", style: m }) => {
821
- let [h, g] = k(() => e.map((e) => ({
822
- ...e,
823
- days: [...e.days],
824
- startTime: { ...e.startTime }
825
- }))), [_, y] = k(null), b = h.find((e) => e.id === _) ?? null, x = (e) => {
826
- g(e), f?.(e);
827
- }, C = (e, t) => {
828
- x(h.map((n) => n.id === e ? {
829
- ...n,
830
- enabled: t
831
- } : n));
832
- }, w = (e) => {
833
- b && x(h.map((t) => t.id === b.id ? {
834
- ...t,
835
- days: e
836
- } : t));
837
- }, T = (e) => {
838
- b && x(h.map((t) => t.id === b.id ? {
839
- ...t,
840
- startTime: {
841
- hour: e.hour,
842
- minute: e.minute
843
- }
844
- } : t));
845
- }, E = () => {
846
- let e = {
847
- id: `sch-${h.length + 1}`,
848
- name: `Custom PoE Window #${h.length + 1}`,
849
- target: "poe",
850
- enabled: !0,
851
- days: [
852
- "mon",
853
- "wed",
854
- "fri"
855
- ],
856
- startTime: {
857
- hour: 22,
858
- minute: 0
859
- },
860
- endTime: {
861
- hour: 6,
862
- minute: 30
863
- }
864
- };
865
- x([...h, e]), y(e.id);
866
- };
867
- return /* @__PURE__ */ M("div", {
868
- className: `tp-omada-screen ${p}`.trim(),
869
- "data-testid": "omada-schedule-block",
870
- style: m,
871
- children: [
872
- r && /* @__PURE__ */ j("div", {
873
- className: "tp-omada-header-wrap",
874
- children: /* @__PURE__ */ j(s, {
875
- variant: "floating",
876
- title: "Schedules",
877
- subtitle: "WLAN • PoE • Reboot",
878
- left: o ? /* @__PURE__ */ j("button", {
879
- type: "button",
880
- className: "tp-header-icon-btn",
881
- "aria-label": "Back",
882
- onClick: o,
883
- children: /* @__PURE__ */ j(S, {
884
- name: "nav-back",
885
- size: 20
886
- })
887
- }) : void 0,
888
- right: /* @__PURE__ */ j("button", {
889
- type: "button",
890
- className: "tp-header-icon-btn",
891
- "aria-label": "Add schedule",
892
- onClick: E,
893
- children: /* @__PURE__ */ j(S, {
894
- name: "nav-add",
895
- size: 20
896
- })
897
- })
898
- })
899
- }),
900
- /* @__PURE__ */ j("div", {
901
- className: "tp-omada-scroll",
902
- children: /* @__PURE__ */ M("div", {
903
- className: `tp-omada-body ${r ? "" : "tp-omada-body--no-header"}`.trim(),
904
- children: [
905
- /* @__PURE__ */ j(u, {
906
- title: "Active Policies",
907
- count: h.length
908
- }),
909
- /* @__PURE__ */ j(d, {
910
- divided: !0,
911
- children: h.map((e) => /* @__PURE__ */ j(l, {
912
- leading: /* @__PURE__ */ j(c, {
913
- tone: e.target === "poe" ? "warning" : "focus",
914
- size: "sm",
915
- children: e.target.toUpperCase()
916
- }),
917
- title: e.name,
918
- subtitle: `${e.days.map((e) => e.toUpperCase()).join(", ") || "Once"} • ${oe(e.startTime)}${e.endTime ? `–${oe(e.endTime)}` : ""}`,
919
- switchProps: {
920
- checked: e.enabled,
921
- onChange: (t) => C(e.id, t),
922
- ariaLabel: `Toggle ${e.name}`
923
- },
924
- onClick: () => y(e.id)
925
- }, e.id))
926
- }),
927
- /* @__PURE__ */ j(i, {
928
- variant: "secondary",
929
- block: !0,
930
- onClick: E,
931
- children: "+ Add Schedule Rule"
932
- })
933
- ]
934
- })
935
- }),
936
- /* @__PURE__ */ j(n, {
937
- open: !!b,
938
- title: b?.name ?? "Edit Schedule",
939
- subtitle: "Select active weekdays and start time",
940
- onClose: () => y(null),
941
- children: b && /* @__PURE__ */ M("div", {
942
- style: {
943
- display: "flex",
944
- flexDirection: "column",
945
- gap: 14
946
- },
947
- children: [
948
- /* @__PURE__ */ j(d, {
949
- divided: !0,
950
- children: /* @__PURE__ */ j(l, {
951
- title: "Enable Schedule",
952
- trailing: /* @__PURE__ */ j(a, {
953
- checked: b.enabled,
954
- onChange: (e) => C(b.id, e),
955
- ariaLabel: "Enable rule"
956
- })
957
- })
958
- }),
959
- /* @__PURE__ */ j(u, { title: "Repeat Days" }),
960
- /* @__PURE__ */ j(t, {
961
- value: b.days,
962
- onChange: w
963
- }),
964
- /* @__PURE__ */ j(u, { title: "Trigger Start Time" }),
965
- /* @__PURE__ */ j(v, {
966
- use12Hour: !1,
967
- minuteStep: 5,
968
- value: b.startTime,
969
- onChange: T
970
- }),
971
- /* @__PURE__ */ j(i, {
972
- variant: "primary",
973
- block: !0,
974
- onClick: () => y(null),
975
- children: "Save Schedule"
976
- })
977
- ]
978
- })
979
- })
980
- ]
981
- });
982
- }, se = [
983
- {
984
- id: "sfp1",
985
- label: "SFP1",
986
- media: "sfp",
987
- speed: "Down",
988
- vlanProfile: "WAN1",
989
- rxBytes: "0 B",
990
- txBytes: "0 B"
991
- },
992
- {
993
- id: "sfp2",
994
- label: "SFP2",
995
- media: "sfp",
996
- speed: "Down",
997
- vlanProfile: "WAN2",
998
- rxBytes: "0 B",
999
- txBytes: "0 B"
1000
- },
1001
- {
1002
- id: "wan3",
1003
- label: "WAN3",
1004
- media: "rj45",
1005
- speed: "1000M",
1006
- vlanProfile: "ISP WAN3",
1007
- rxBytes: "18.6 GB",
1008
- txBytes: "6.4 GB"
1009
- },
1010
- {
1011
- id: "lan4",
1012
- label: "LAN4",
1013
- media: "rj45",
1014
- speed: "1000M",
1015
- vlanProfile: "LAN (1)",
1016
- rxBytes: "2.1 GB",
1017
- txBytes: "1.9 GB"
1018
- },
1019
- {
1020
- id: "lan5",
1021
- label: "LAN5",
1022
- media: "rj45",
1023
- speed: "2.5G",
1024
- poeCapable: !0,
1025
- poeEnabled: !0,
1026
- poeWatts: 12.4,
1027
- vlanProfile: "Trunk (1,10)",
1028
- rxBytes: "1.8 GB",
1029
- txBytes: "4.1 GB"
1030
- },
1031
- {
1032
- id: "lan6",
1033
- label: "LAN6",
1034
- media: "rj45",
1035
- speed: "2.5G",
1036
- poeCapable: !0,
1037
- poeEnabled: !0,
1038
- poeWatts: 11.8,
1039
- vlanProfile: "Trunk (1,10)",
1040
- rxBytes: "1.2 GB",
1041
- txBytes: "2.7 GB"
1042
- },
1043
- {
1044
- id: "lan7",
1045
- label: "LAN7",
1046
- media: "rj45",
1047
- speed: "Down",
1048
- poeCapable: !0,
1049
- poeEnabled: !1,
1050
- poeWatts: 0,
1051
- vlanProfile: "LAN (1)",
1052
- rxBytes: "0 B",
1053
- txBytes: "0 B"
1054
- },
1055
- {
1056
- id: "lan8",
1057
- label: "LAN8",
1058
- media: "rj45",
1059
- speed: "100M",
1060
- poeCapable: !0,
1061
- poeEnabled: !0,
1062
- poeWatts: 4.2,
1063
- vlanProfile: "IoT (VLAN 20)",
1064
- rxBytes: "410 MB",
1065
- txBytes: "128 MB"
1066
- }
1067
- ], ce = [
1068
- "LAN (1)",
1069
- "Trunk (1,10)",
1070
- "IoT (VLAN 20)",
1071
- "ISP WAN3"
1072
- ], Y = ({ deviceModel: e = "ER7212PC", ports: t = se, showHeader: n = !1, onBack: r, onPortUpdate: i, className: o = "", style: f }) => {
1073
- let [p, m] = k(() => t.map((e) => ({ ...e }))), [h, g] = k(t[4]?.id ?? t[0]?.id ?? "wan3"), _ = p.find((e) => e.id === h) ?? p[0], v = (e) => {
1074
- if (!_) return;
1075
- let t = {
1076
- ..._,
1077
- ...e
1078
- };
1079
- m((e) => e.map((e) => e.id === t.id ? t : e)), i?.(t);
1080
- }, y = p.reduce((e, t) => e + (t.poeEnabled ? t.poeWatts ?? 0 : 0), 0);
1081
- return /* @__PURE__ */ M("div", {
1082
- className: n ? `tp-omada-screen ${o}`.trim() : o,
1083
- "data-testid": "omada-port-panel-block",
1084
- style: f,
1085
- children: [n && /* @__PURE__ */ j("div", {
1086
- className: "tp-omada-header-wrap",
1087
- children: /* @__PURE__ */ j(s, {
1088
- variant: "floating",
1089
- title: `${e} Ports`,
1090
- subtitle: `PoE Budget ${y.toFixed(1)} W / 110 W`,
1091
- left: r ? /* @__PURE__ */ j("button", {
1092
- type: "button",
1093
- className: "tp-header-icon-btn",
1094
- "aria-label": "Back",
1095
- onClick: r,
1096
- children: /* @__PURE__ */ j(S, {
1097
- name: "nav-back",
1098
- size: 20
1099
- })
1100
- }) : void 0
1101
- })
1102
- }), /* @__PURE__ */ j("div", {
1103
- className: n ? "tp-omada-scroll" : void 0,
1104
- children: /* @__PURE__ */ M("div", {
1105
- className: n ? "tp-omada-body" : void 0,
1106
- style: n ? void 0 : {
1107
- display: "flex",
1108
- flexDirection: "column",
1109
- gap: 12
1110
- },
1111
- children: [
1112
- /* @__PURE__ */ j(u, {
1113
- title: `${e} Port Faceplate`,
1114
- action: /* @__PURE__ */ M("span", {
1115
- style: { fontSize: 12 },
1116
- children: [y.toFixed(1), " W PoE"]
1117
- })
1118
- }),
1119
- /* @__PURE__ */ j("section", {
1120
- className: "tp-omada-chassis",
1121
- "aria-label": `${e} physical port matrix`,
1122
- children: /* @__PURE__ */ j("div", {
1123
- className: "tp-omada-chassis-grid",
1124
- children: p.map((e) => {
1125
- let t = e.id === _?.id, n = e.speed === "Down" ? "down" : e.speed === "100M" ? "warn" : "up";
1126
- return /* @__PURE__ */ M("button", {
1127
- type: "button",
1128
- "aria-pressed": t,
1129
- className: `tp-omada-chassis-port ${t ? "tp-omada-chassis-port--selected" : ""}`.trim(),
1130
- onClick: () => g(e.id),
1131
- children: [
1132
- /* @__PURE__ */ j("span", { className: `tp-omada-port-led tp-omada-port-led--${n}` }),
1133
- /* @__PURE__ */ j(S, {
1134
- name: e.media === "sfp" ? "port-sfp2" : e.poeEnabled ? "port-poe" : "port-lan",
1135
- size: 20
1136
- }),
1137
- /* @__PURE__ */ j("span", {
1138
- className: "tp-omada-port-name",
1139
- children: e.label
1140
- }),
1141
- /* @__PURE__ */ j("span", {
1142
- className: "tp-omada-port-speed",
1143
- children: e.speed
1144
- }),
1145
- e.poeEnabled && e.poeWatts !== void 0 && /* @__PURE__ */ M("span", {
1146
- className: "tp-omada-port-poe",
1147
- children: [
1148
- "⚡ ",
1149
- e.poeWatts,
1150
- "W"
1151
- ]
1152
- })
1153
- ]
1154
- }, e.id);
1155
- })
1156
- })
1157
- }),
1158
- _ && /* @__PURE__ */ M("section", {
1159
- className: "tp-omada-card",
1160
- "aria-label": "Selected Port Configuration",
1161
- children: [
1162
- /* @__PURE__ */ M("div", {
1163
- style: {
1164
- display: "flex",
1165
- alignItems: "center",
1166
- gap: 12,
1167
- marginBottom: 10
1168
- },
1169
- children: [/* @__PURE__ */ j(C, {
1170
- name: "port-card-expand",
1171
- width: 68,
1172
- height: 68,
1173
- playing: !0
1174
- }, _.id), /* @__PURE__ */ M("div", {
1175
- style: {
1176
- flex: 1,
1177
- minWidth: 0
1178
- },
1179
- children: [
1180
- /* @__PURE__ */ j("div", {
1181
- style: {
1182
- fontSize: 16,
1183
- fontWeight: 600
1184
- },
1185
- children: _.label
1186
- }),
1187
- /* @__PURE__ */ M("div", {
1188
- style: {
1189
- fontSize: 13,
1190
- color: "var(--tp-color-green)",
1191
- marginTop: 2
1192
- },
1193
- children: ["Link: ", _.speed === "Down" ? "Link Down" : `${_.speed} Full Duplex`]
1194
- }),
1195
- /* @__PURE__ */ M("div", {
1196
- style: {
1197
- fontSize: 12,
1198
- color: "var(--tp-text-secondary)",
1199
- marginTop: 2
1200
- },
1201
- children: ["Profile: ", _.vlanProfile]
1202
- })
1203
- ]
1204
- })]
1205
- }),
1206
- /* @__PURE__ */ M(d, {
1207
- divided: !0,
1208
- children: [_.poeCapable && /* @__PURE__ */ j(l, {
1209
- title: "PoE Power Output",
1210
- subtitle: _.poeEnabled ? `Supplying ${_.poeWatts ?? 0} W (802.3at)` : "PoE Disabled",
1211
- trailing: /* @__PURE__ */ j(a, {
1212
- checked: !!_.poeEnabled,
1213
- onChange: (e) => v({
1214
- poeEnabled: e,
1215
- poeWatts: e ? _.poeWatts || 11.5 : 0
1216
- }),
1217
- ariaLabel: `Toggle PoE on ${_.label}`
1218
- })
1219
- }), /* @__PURE__ */ j(l, {
1220
- title: "Rx / Tx Counters",
1221
- value: `${_.rxBytes} / ${_.txBytes}`
1222
- })]
1223
- }),
1224
- /* @__PURE__ */ M("div", {
1225
- style: {
1226
- marginTop: 10,
1227
- display: "flex",
1228
- flexDirection: "column",
1229
- gap: 8
1230
- },
1231
- children: [/* @__PURE__ */ j("span", {
1232
- className: "tp-omada-std-input-label",
1233
- children: "Assign VLAN Profile"
1234
- }), /* @__PURE__ */ j("div", {
1235
- className: "tp-omada-chip-group",
1236
- children: ce.map((e) => /* @__PURE__ */ j(c, {
1237
- size: "sm",
1238
- selected: _.vlanProfile === e,
1239
- onClick: () => v({ vlanProfile: e }),
1240
- children: e
1241
- }, e))
1242
- })]
1243
- })
1244
- ]
1245
- })
1246
- ]
1247
- })
1248
- })]
1249
- });
1250
- }, le = [
1251
- {
1252
- id: "topo-gw",
1253
- role: "gateway",
1254
- name: "ER7212PC (Gateway)",
1255
- modelOrDetail: "8C-86-DD-A6-A7-5F • WAN3 Up",
1256
- ip: "192.168.0.1",
1257
- linkLabel: "1000M",
1258
- status: "online"
1259
- },
1260
- {
1261
- id: "topo-ap1",
1262
- role: "ap",
1263
- name: "EAP723 (3C-78-95-F0-45-F1)",
1264
- modelOrDetail: "LAN5 PoE 12.4W • 3 Clients",
1265
- ip: "192.168.0.2",
1266
- linkLabel: "2.5G PoE+",
1267
- status: "online"
1268
- },
1269
- {
1270
- id: "topo-ap2",
1271
- role: "ap",
1272
- name: "EAP723 (3C-78-95-F0-46-0C)",
1273
- modelOrDetail: "LAN6 PoE 11.8W • 1 Client",
1274
- ip: "192.168.0.3",
1275
- linkLabel: "2.5G PoE+",
1276
- status: "online"
1277
- }
1278
- ], X = ({ siteName: e = "92", nodes: t = le, showHeader: n = !1, onBack: r, onSelectNode: i, className: a = "", style: o }) => {
1279
- let [u, f] = k(t[0]?.id ?? "topo-gw"), p = t.find((e) => e.id === u) ?? t[0], m = t.find((e) => e.role === "gateway") ?? t[0], h = t.filter((e) => e.id !== m?.id), g = (e) => {
1280
- f(e.id), i?.(e);
1281
- };
1282
- return /* @__PURE__ */ M("div", {
1283
- className: n ? `tp-omada-screen ${a}`.trim() : a,
1284
- "data-testid": "omada-topology-block",
1285
- style: o,
1286
- children: [n && /* @__PURE__ */ j("div", {
1287
- className: "tp-omada-header-wrap",
1288
- children: /* @__PURE__ */ j(s, {
1289
- variant: "floating",
1290
- title: `Site ${e} Topology`,
1291
- subtitle: "Loopback Detection: Active",
1292
- left: r ? /* @__PURE__ */ j("button", {
1293
- type: "button",
1294
- className: "tp-header-icon-btn",
1295
- "aria-label": "Back",
1296
- onClick: r,
1297
- children: /* @__PURE__ */ j(S, {
1298
- name: "nav-back",
1299
- size: 20
1300
- })
1301
- }) : void 0
1302
- })
1303
- }), /* @__PURE__ */ j("div", {
1304
- className: n ? "tp-omada-scroll" : void 0,
1305
- children: /* @__PURE__ */ j("div", {
1306
- className: n ? "tp-omada-body" : void 0,
1307
- children: /* @__PURE__ */ M("div", {
1308
- className: "tp-omada-topo-tree",
1309
- children: [
1310
- /* @__PURE__ */ M("div", {
1311
- style: {
1312
- display: "flex",
1313
- alignItems: "center",
1314
- gap: 8
1315
- },
1316
- children: [/* @__PURE__ */ j(c, {
1317
- tone: "success",
1318
- size: "sm",
1319
- children: "WAN3 Connected"
1320
- }), /* @__PURE__ */ j(c, {
1321
- tone: "info",
1322
- size: "sm",
1323
- children: "Loop Protection On"
1324
- })]
1325
- }),
1326
- m && /* @__PURE__ */ M("button", {
1327
- type: "button",
1328
- className: `tp-omada-topo-node ${p?.id === m.id ? "tp-omada-topo-node--active" : ""}`.trim(),
1329
- onClick: () => g(m),
1330
- children: [
1331
- /* @__PURE__ */ j(S, {
1332
- name: "client-switch",
1333
- size: 32
1334
- }),
1335
- /* @__PURE__ */ M("div", {
1336
- style: {
1337
- flex: 1,
1338
- textAlign: "left"
1339
- },
1340
- children: [/* @__PURE__ */ j("div", {
1341
- style: {
1342
- fontSize: 14,
1343
- fontWeight: 600
1344
- },
1345
- children: m.name
1346
- }), /* @__PURE__ */ M("div", {
1347
- style: {
1348
- fontSize: 12,
1349
- color: "var(--tp-text-secondary)"
1350
- },
1351
- children: [
1352
- m.ip,
1353
- " • ",
1354
- m.modelOrDetail
1355
- ]
1356
- })]
1357
- }),
1358
- /* @__PURE__ */ j("span", {
1359
- className: "tp-omada-status-line tp-omada-status-line--good",
1360
- children: m.linkLabel
1361
- })
1362
- ]
1363
- }),
1364
- /* @__PURE__ */ j("svg", {
1365
- width: "240",
1366
- height: "24",
1367
- viewBox: "0 0 240 24",
1368
- "aria-hidden": "true",
1369
- children: /* @__PURE__ */ j("path", {
1370
- d: "M120 0 V10 M46 10 H194 M46 10 V24 M194 10 V24",
1371
- stroke: "var(--tp-color-green)",
1372
- strokeWidth: "2",
1373
- fill: "none",
1374
- strokeLinecap: "round"
1375
- })
1376
- }),
1377
- h.map((e) => /* @__PURE__ */ M("button", {
1378
- type: "button",
1379
- className: `tp-omada-topo-node ${p?.id === e.id ? "tp-omada-topo-node--active" : ""}`.trim(),
1380
- onClick: () => g(e),
1381
- children: [
1382
- /* @__PURE__ */ j(S, {
1383
- name: "client-ap",
1384
- size: 30,
1385
- color: "#EBEBF0"
1386
- }),
1387
- /* @__PURE__ */ M("div", {
1388
- style: {
1389
- flex: 1,
1390
- textAlign: "left"
1391
- },
1392
- children: [/* @__PURE__ */ j("div", {
1393
- style: {
1394
- fontSize: 14,
1395
- fontWeight: 500
1396
- },
1397
- children: e.name
1398
- }), /* @__PURE__ */ M("div", {
1399
- style: {
1400
- fontSize: 12,
1401
- color: "var(--tp-text-secondary)"
1402
- },
1403
- children: [
1404
- e.ip,
1405
- " • ",
1406
- e.modelOrDetail
1407
- ]
1408
- })]
1409
- }),
1410
- /* @__PURE__ */ j("span", {
1411
- className: "tp-omada-status-line tp-omada-status-line--good",
1412
- children: e.linkLabel
1413
- })
1414
- ]
1415
- }, e.id)),
1416
- p && /* @__PURE__ */ j("div", {
1417
- style: {
1418
- width: "100%",
1419
- marginTop: 4
1420
- },
1421
- children: /* @__PURE__ */ M(d, {
1422
- divided: !0,
1423
- children: [
1424
- /* @__PURE__ */ j(l, {
1425
- title: "Selected Node",
1426
- value: p.name
1427
- }),
1428
- /* @__PURE__ */ j(l, {
1429
- title: "Uplink Negotiation",
1430
- value: p.linkLabel
1431
- }),
1432
- /* @__PURE__ */ j(l, {
1433
- title: "Management IP",
1434
- value: p.ip
1435
- })
1436
- ]
1437
- })
1438
- })
1439
- ]
1440
- })
1441
- })
1442
- })]
1443
- });
1444
- }, ue = [{
1445
- id: "fw-ap1",
1446
- model: "EAP723",
1447
- mac: "3C-78-95-F0-45-F1",
1448
- currentVersion: "v1.2.0",
1449
- targetVersion: "v1.3.2"
1450
- }, {
1451
- id: "fw-ap2",
1452
- model: "EAP723",
1453
- mac: "3C-78-95-F0-46-0C",
1454
- currentVersion: "v1.2.0",
1455
- targetVersion: "v1.3.2"
1456
- }], Z = ({ candidates: e = ue, showHeader: t = !0, onBack: n, onUpgradeStart: r, className: a = "", style: o }) => {
1457
- let [c, l] = k(() => e.map((e) => e.id)), [f, p] = k("idle"), [g, v] = k(0), b = (e, t) => {
1458
- l((n) => t ? n.includes(e) ? n : [...n, e] : n.filter((t) => t !== e));
1459
- };
1460
- return /* @__PURE__ */ M("div", {
1461
- className: t ? `tp-omada-screen ${a}`.trim() : a,
1462
- "data-testid": "omada-firmware-update-block",
1463
- style: o,
1464
- children: [t && /* @__PURE__ */ j("div", {
1465
- className: "tp-omada-header-wrap",
1466
- children: /* @__PURE__ */ j(s, {
1467
- variant: "floating",
1468
- title: "Firmware Updates",
1469
- subtitle: `${e.length} updates available`,
1470
- left: n ? /* @__PURE__ */ j("button", {
1471
- type: "button",
1472
- className: "tp-header-icon-btn",
1473
- "aria-label": "Back",
1474
- onClick: n,
1475
- children: /* @__PURE__ */ j(S, {
1476
- name: "nav-back",
1477
- size: 20
1478
- })
1479
- }) : void 0
1480
- })
1481
- }), /* @__PURE__ */ j("div", {
1482
- className: t ? "tp-omada-scroll" : void 0,
1483
- children: /* @__PURE__ */ M("div", {
1484
- className: `tp-omada-body ${t ? "" : "tp-omada-body--no-header"}`.trim(),
1485
- children: [
1486
- /* @__PURE__ */ j(h, {
1487
- status: f === "done" ? "success" : "info",
1488
- message: f === "done" ? "Selected Access Points upgraded to v1.3.2." : "New signed EAP723 release v1.3.2 verified via Cloud."
1489
- }),
1490
- /* @__PURE__ */ j(u, { title: "Release Highlights" }),
1491
- /* @__PURE__ */ j("section", {
1492
- className: "tp-omada-card",
1493
- children: /* @__PURE__ */ j(m, {
1494
- variant: "bullet",
1495
- items: [{ text: "Improves 6 GHz Multi-Link Operation (MLO) roaming latency by 32%." }, { text: "Adds AFC power coordination and Loopback Detection telemetry." }]
1496
- })
1497
- }),
1498
- /* @__PURE__ */ j(u, {
1499
- title: "Eligible Devices",
1500
- count: c.length
1501
- }),
1502
- /* @__PURE__ */ j(d, {
1503
- divided: !0,
1504
- padding: "md",
1505
- children: /* @__PURE__ */ j("div", {
1506
- style: {
1507
- display: "flex",
1508
- flexDirection: "column",
1509
- gap: 12
1510
- },
1511
- children: e.map((e) => /* @__PURE__ */ j(_, {
1512
- checked: c.includes(e.id),
1513
- disabled: f === "running",
1514
- label: `${e.model} (${e.mac})`,
1515
- description: `${e.currentVersion} → ${e.targetVersion}`,
1516
- onChange: (t) => b(e.id, t)
1517
- }, e.id))
1518
- })
1519
- }),
1520
- f !== "idle" && /* @__PURE__ */ M("section", {
1521
- className: "tp-omada-card",
1522
- style: {
1523
- display: "flex",
1524
- flexDirection: "column",
1525
- gap: 10
1526
- },
1527
- children: [/* @__PURE__ */ M("div", {
1528
- style: {
1529
- display: "flex",
1530
- alignItems: "center",
1531
- gap: 12
1532
- },
1533
- children: [/* @__PURE__ */ j(C, {
1534
- name: "update-network",
1535
- width: 56,
1536
- height: 56,
1537
- playing: f === "running"
1538
- }), /* @__PURE__ */ j("div", {
1539
- style: { flex: 1 },
1540
- children: /* @__PURE__ */ j(y, {
1541
- percent: f === "done" ? 100 : g,
1542
- tone: f === "done" ? "success" : "focus",
1543
- label: f === "done" ? "Firmware Applied" : "Downloading & Flashing…"
1544
- })
1545
- })]
1546
- }), f === "running" && /* @__PURE__ */ j(i, {
1547
- variant: "tonal",
1548
- size: "sm",
1549
- onClick: () => {
1550
- v(100), p("done");
1551
- },
1552
- children: "Complete Verification"
1553
- })]
1554
- }),
1555
- /* @__PURE__ */ j(i, {
1556
- variant: "primary",
1557
- block: !0,
1558
- disabled: c.length === 0 || f === "done",
1559
- loading: f === "running",
1560
- onClick: () => {
1561
- c.length !== 0 && (p("running"), v(72), r?.(c));
1562
- },
1563
- children: f === "done" ? "All Selected Devices Up to Date" : `Upgrade Selected (${c.length})`
1564
- })
1565
- ]
1566
- })
1567
- })]
1568
- });
1569
- }, de = ({ siteName: e = "92", controllerName: t = "62", upgradeVersion: n = "V2.5.2", activeTab: r = "dashboard", onTabChange: i, onBackToGlobal: a, onOpenLogs: o, onUpgrade: c, onToolkitClick: l, showUpgradeBanner: u = !0, showTabBar: d = !0, showFloatingAction: f = !0, className: m = "", style: h }) => {
1570
- let [g, _] = k(u);
1571
- return /* @__PURE__ */ M("div", {
1572
- className: `tp-omada-screen ${d ? "tp-omada-screen--standalone" : ""} ${m}`.trim(),
1573
- "data-testid": "omada-launch-loading-page",
1574
- style: h,
1575
- children: [
1576
- /* @__PURE__ */ j("div", {
1577
- className: "tp-omada-header-wrap",
1578
- children: /* @__PURE__ */ j(s, {
1579
- variant: "floating",
1580
- title: e,
1581
- subtitle: t,
1582
- titleDropdown: !0,
1583
- left: /* @__PURE__ */ j("button", {
1584
- type: "button",
1585
- className: "tp-header-icon-btn",
1586
- "aria-label": "Back to controllers",
1587
- onClick: a,
1588
- children: /* @__PURE__ */ j(S, {
1589
- name: "nav-back-to-global",
1590
- size: 20
1591
- })
1592
- }),
1593
- right: /* @__PURE__ */ j("button", {
1594
- type: "button",
1595
- className: "tp-header-icon-btn",
1596
- "aria-label": "Logs",
1597
- onClick: o,
1598
- children: /* @__PURE__ */ j(S, {
1599
- name: "nav-log",
1600
- size: 20
1601
- })
1602
- })
1603
- })
1604
- }),
1605
- /* @__PURE__ */ j("div", {
1606
- className: "tp-omada-scroll",
1607
- children: /* @__PURE__ */ M("div", {
1608
- className: `tp-omada-body ${d ? "tp-omada-body--with-tabbar" : ""}`.trim(),
1609
- children: [
1610
- g && /* @__PURE__ */ j(b, {
1611
- tone: "info",
1612
- className: "tp-omada-upgrade-prompt",
1613
- title: `New version found: ${n}`,
1614
- actionLabel: "Upgrade Now",
1615
- onAction: c,
1616
- closable: !0,
1617
- onClose: () => _(!1)
1618
- }),
1619
- /* @__PURE__ */ M("div", {
1620
- className: "tp-omada-skeleton-card",
1621
- "aria-label": "Loading site summary",
1622
- children: [
1623
- /* @__PURE__ */ j("div", {
1624
- className: "tp-omada-skeleton-block",
1625
- style: {
1626
- height: 22,
1627
- width: "100%"
1628
- }
1629
- }),
1630
- /* @__PURE__ */ j("div", {
1631
- className: "tp-omada-skeleton-block",
1632
- style: {
1633
- height: 18,
1634
- width: "100%"
1635
- }
1636
- }),
1637
- /* @__PURE__ */ M("div", {
1638
- className: "tp-omada-skeleton-tiles",
1639
- children: [
1640
- /* @__PURE__ */ j("div", {
1641
- className: "tp-omada-skeleton-block",
1642
- style: {
1643
- height: 62,
1644
- borderRadius: 10
1645
- }
1646
- }),
1647
- /* @__PURE__ */ j("div", {
1648
- className: "tp-omada-skeleton-block",
1649
- style: {
1650
- height: 62,
1651
- borderRadius: 10
1652
- }
1653
- }),
1654
- /* @__PURE__ */ j("div", {
1655
- className: "tp-omada-skeleton-block",
1656
- style: {
1657
- height: 62,
1658
- borderRadius: 10
1659
- }
1660
- }),
1661
- /* @__PURE__ */ j("div", {
1662
- className: "tp-omada-skeleton-block",
1663
- style: {
1664
- height: 62,
1665
- borderRadius: 10
1666
- }
1667
- })
1668
- ]
1669
- }),
1670
- /* @__PURE__ */ M("div", {
1671
- style: {
1672
- display: "flex",
1673
- flexDirection: "column",
1674
- gap: 10,
1675
- marginTop: 8
1676
- },
1677
- children: [
1678
- /* @__PURE__ */ j("div", {
1679
- className: "tp-omada-skeleton-block",
1680
- style: {
1681
- height: 6,
1682
- width: "100%"
1683
- }
1684
- }),
1685
- /* @__PURE__ */ j("div", {
1686
- className: "tp-omada-skeleton-block",
1687
- style: {
1688
- height: 6,
1689
- width: "100%"
1690
- }
1691
- }),
1692
- /* @__PURE__ */ j("div", {
1693
- className: "tp-omada-skeleton-block",
1694
- style: {
1695
- height: 6,
1696
- width: "100%"
1697
- }
1698
- }),
1699
- /* @__PURE__ */ j("div", {
1700
- className: "tp-omada-skeleton-block",
1701
- style: {
1702
- height: 6,
1703
- width: "100%"
1704
- }
1705
- })
1706
- ]
1707
- })
1708
- ]
1709
- }),
1710
- /* @__PURE__ */ M("div", {
1711
- className: "tp-omada-skeleton-card",
1712
- "aria-label": "Loading site health",
1713
- children: [
1714
- /* @__PURE__ */ j("div", {
1715
- className: "tp-omada-skeleton-block",
1716
- style: {
1717
- height: 22,
1718
- width: "100%"
1719
- }
1720
- }),
1721
- /* @__PURE__ */ M("div", {
1722
- style: {
1723
- display: "flex",
1724
- justifyContent: "space-between",
1725
- gap: 12
1726
- },
1727
- children: [/* @__PURE__ */ j("div", {
1728
- className: "tp-omada-skeleton-block",
1729
- style: {
1730
- height: 16,
1731
- width: "38%"
1732
- }
1733
- }), /* @__PURE__ */ j("div", {
1734
- className: "tp-omada-skeleton-block",
1735
- style: {
1736
- height: 16,
1737
- width: "38%"
1738
- }
1739
- })]
1740
- }),
1741
- /* @__PURE__ */ j("div", {
1742
- className: "tp-omada-skeleton-block",
1743
- style: {
1744
- height: 112,
1745
- width: "100%",
1746
- borderRadius: 8
1747
- }
1748
- })
1749
- ]
1750
- }),
1751
- /* @__PURE__ */ M("div", {
1752
- className: "tp-omada-skeleton-card",
1753
- "aria-label": "Loading ISP activity",
1754
- children: [/* @__PURE__ */ j("div", {
1755
- className: "tp-omada-skeleton-block",
1756
- style: {
1757
- height: 16,
1758
- width: "36%"
1759
- }
1760
- }), /* @__PURE__ */ j("div", {
1761
- className: "tp-omada-skeleton-block",
1762
- style: {
1763
- height: 104,
1764
- width: "100%",
1765
- borderRadius: 8
1766
- }
1767
- })]
1768
- })
1769
- ]
1770
- })
1771
- }),
1772
- f && /* @__PURE__ */ j("button", {
1773
- type: "button",
1774
- className: "tp-omada-fab tp-omada-standalone-fab",
1775
- "aria-label": "Network Toolkit",
1776
- onClick: l,
1777
- children: /* @__PURE__ */ j(S, {
1778
- name: "settings-network-tools",
1779
- size: 22,
1780
- color: "#FFFFFF"
1781
- })
1782
- }),
1783
- d && /* @__PURE__ */ j("div", {
1784
- className: "tp-omada-standalone-tabbar",
1785
- children: /* @__PURE__ */ j(p, {
1786
- variant: "floating-pill",
1787
- items: B,
1788
- activeKey: r,
1789
- onChange: (e) => i?.(e)
1790
- })
1791
- })
1792
- ]
1793
- });
1794
- }, fe = [
1795
- {
1796
- id: "ctrl-1",
1797
- name: "26-PD自测-CBC-MSP",
1798
- edition: "Omada Standard",
1799
- version: "v6.3.0.200",
1800
- kind: "cloud",
1801
- systemGroup: "Cloud Management"
1802
- },
1803
- {
1804
- id: "ctrl-2",
1805
- name: "26楼-PD自测-MSP",
1806
- edition: "Omada Standard",
1807
- version: "v6.2.10.17",
1808
- kind: "software",
1809
- ips: "192.168.22.11, 192.168.40.1, 192.168.174.1",
1810
- systemGroup: "Cloud Management"
1811
- },
1812
- {
1813
- id: "ctrl-3",
1814
- name: "62",
1815
- edition: "ER7212PC",
1816
- version: "v6.3.0.63",
1817
- kind: "hardware",
1818
- ips: "192.168.0.1, 192.168.1.203",
1819
- systemGroup: "Cloud Management"
1820
- },
1821
- {
1822
- id: "ctrl-4",
1823
- name: "Omada Controller_F84012",
1824
- edition: "Omada Essentials",
1825
- version: "v6.3.0.200",
1826
- kind: "cloud",
1827
- systemGroup: "Cloud Management"
1828
- },
1829
- {
1830
- id: "ctrl-5",
1831
- name: "Omada Controller_office",
1832
- edition: "Omada Standard",
1833
- version: "v6.3.0.200",
1834
- kind: "cloud",
1835
- systemGroup: "Cloud Management"
1836
- }
1837
- ], pe = () => /* @__PURE__ */ M("svg", {
1838
- width: "38",
1839
- height: "38",
1840
- viewBox: "0 0 40 40",
1841
- fill: "none",
1842
- "aria-hidden": "true",
1843
- children: [
1844
- /* @__PURE__ */ j("defs", { children: /* @__PURE__ */ M("linearGradient", {
1845
- id: "tpOmadaCloudBody",
1846
- x1: "20",
1847
- y1: "10",
1848
- x2: "20",
1849
- y2: "30",
1850
- gradientUnits: "userSpaceOnUse",
1851
- children: [/* @__PURE__ */ j("stop", { stopColor: "#E4E4E7" }), /* @__PURE__ */ j("stop", {
1852
- offset: "1",
1853
- stopColor: "#8E8E93"
1854
- })]
1855
- }) }),
1856
- /* @__PURE__ */ j("path", {
1857
- d: "M12.5 28.5H28.5C32.09 28.5 35 25.68 35 22.2C35 18.96 32.47 16.31 29.22 15.96C28.14 11.98 24.48 9.05 20.12 9.05C14.88 9.05 10.64 13.18 10.64 18.28C10.64 18.42 10.64 18.56 10.65 18.7C7.46 19.27 5 22.02 5 25.35C5 27.1 5.95 28.5 12.5 28.5Z",
1858
- fill: "url(#tpOmadaCloudBody)"
1859
- }),
1860
- /* @__PURE__ */ j("rect", {
1861
- x: "17",
1862
- y: "22",
1863
- width: "6",
1864
- height: "2",
1865
- rx: "1",
1866
- fill: "#00A870"
1867
- })
1868
- ]
1869
- }), me = ({ kind: e }) => e === "software" ? /* @__PURE__ */ j("span", {
1870
- style: {
1871
- color: "#8E8E93",
1872
- display: "inline-flex"
1873
- },
1874
- children: /* @__PURE__ */ j(S, {
1875
- name: "client-controller",
1876
- size: 38,
1877
- color: "#8E8E93"
1878
- })
1879
- }) : e === "hardware" ? /* @__PURE__ */ M("span", {
1880
- className: "tp-omada-ctrl-thumb-wrap",
1881
- children: [/* @__PURE__ */ j(S, {
1882
- name: "client-switch",
1883
- size: 38
1884
- }), /* @__PURE__ */ j("span", {
1885
- className: "tp-omada-ctrl-mini-badge",
1886
- "aria-hidden": "true",
1887
- children: /* @__PURE__ */ M("svg", {
1888
- width: "8",
1889
- height: "8",
1890
- viewBox: "0 0 10 10",
1891
- fill: "none",
1892
- children: [
1893
- /* @__PURE__ */ j("rect", {
1894
- x: "1",
1895
- y: "1",
1896
- width: "3",
1897
- height: "3",
1898
- rx: "0.6",
1899
- fill: "currentColor"
1900
- }),
1901
- /* @__PURE__ */ j("rect", {
1902
- x: "6",
1903
- y: "1",
1904
- width: "3",
1905
- height: "3",
1906
- rx: "0.6",
1907
- fill: "currentColor"
1908
- }),
1909
- /* @__PURE__ */ j("rect", {
1910
- x: "1",
1911
- y: "6",
1912
- width: "3",
1913
- height: "3",
1914
- rx: "0.6",
1915
- fill: "currentColor"
1916
- }),
1917
- /* @__PURE__ */ j("rect", {
1918
- x: "6",
1919
- y: "6",
1920
- width: "3",
1921
- height: "3",
1922
- rx: "0.6",
1923
- fill: "currentColor"
1924
- })
1925
- ]
1926
- })
1927
- })]
1928
- }) : /* @__PURE__ */ j(pe, {}), he = [
1929
- {
1930
- key: "all",
1931
- label: "All Systems"
1932
- },
1933
- {
1934
- key: "standard",
1935
- label: "Omada Standard"
1936
- },
1937
- {
1938
- key: "essentials",
1939
- label: "Omada Essentials"
1940
- },
1941
- {
1942
- key: "hardware",
1943
- label: "Hardware Controllers"
1944
- }
1945
- ], ge = ({ controllers: e = fe, onSelectController: t, onAddController: a, onAvatarClick: c, className: f = "", style: p }) => {
1946
- let [m, h] = k(""), [g, _] = k("all"), [v, y] = k(!1), [b, C] = k(!1), [w, T] = k("192.168.0.10"), E = he.find((e) => e.key === g)?.label ?? "All Systems", O = D(() => he.map((e) => ({
1947
- key: e.key,
1948
- label: e.label,
1949
- selected: g === e.key
1950
- })), [g]), A = D(() => {
1951
- let t = m.trim().toLowerCase();
1952
- return e.filter((e) => g === "standard" && e.edition !== "Omada Standard" || g === "essentials" && e.edition !== "Omada Essentials" || g === "hardware" && e.kind !== "hardware" ? !1 : !t || e.name.toLowerCase().includes(t) || e.edition.toLowerCase().includes(t) || e.version.toLowerCase().includes(t) || (e.ips ? e.ips.toLowerCase().includes(t) : !1));
1953
- }, [
1954
- e,
1955
- m,
1956
- g
1957
- ]);
1958
- return /* @__PURE__ */ M("div", {
1959
- className: `tp-omada-screen ${f}`.trim(),
1960
- "data-testid": "omada-controller-list-page",
1961
- style: p,
1962
- children: [
1963
- /* @__PURE__ */ M("div", {
1964
- className: "tp-omada-header-wrap",
1965
- children: [/* @__PURE__ */ j(s, {
1966
- variant: "floating",
1967
- title: E,
1968
- titleDropdown: !0,
1969
- onTitleClick: () => y((e) => !e),
1970
- left: /* @__PURE__ */ j("button", {
1971
- type: "button",
1972
- className: "tp-header-icon-btn",
1973
- "aria-label": "Account profile",
1974
- onClick: c,
1975
- children: /* @__PURE__ */ j("span", {
1976
- className: "tp-omada-avatar-c",
1977
- children: "C"
1978
- })
1979
- }),
1980
- right: /* @__PURE__ */ j("button", {
1981
- type: "button",
1982
- className: "tp-header-icon-btn",
1983
- "aria-label": "Add controller",
1984
- onClick: () => {
1985
- a ? a() : C(!0);
1986
- },
1987
- children: /* @__PURE__ */ j(S, {
1988
- name: "nav-add",
1989
- size: 20
1990
- })
1991
- })
1992
- }), /* @__PURE__ */ j(x, {
1993
- open: v,
1994
- align: "center",
1995
- items: O,
1996
- onSelect: (e) => _(e.key),
1997
- onClose: () => y(!1)
1998
- })]
1999
- }),
2000
- /* @__PURE__ */ j("div", {
2001
- className: "tp-omada-scroll",
2002
- children: /* @__PURE__ */ M("div", {
2003
- className: "tp-omada-body",
2004
- children: [
2005
- /* @__PURE__ */ j(o, {
2006
- value: m,
2007
- placeholder: "Search",
2008
- onChange: h,
2009
- onSearch: h
2010
- }),
2011
- /* @__PURE__ */ j(u, {
2012
- title: "Cloud Management",
2013
- count: A.length
2014
- }),
2015
- A.length === 0 ? /* @__PURE__ */ j(r, {
2016
- illustration: "no-controllers",
2017
- title: "No Controllers Found",
2018
- description: "No matching Omada controllers found.",
2019
- compact: !0
2020
- }) : /* @__PURE__ */ j(d, {
2021
- divided: !0,
2022
- children: A.map((e) => /* @__PURE__ */ j(l, {
2023
- leading: /* @__PURE__ */ j(me, { kind: e.kind }),
2024
- title: e.name,
2025
- subtitle: `${e.edition} | ${e.version}`,
2026
- description: e.ips,
2027
- onClick: () => t?.(e)
2028
- }, e.id))
2029
- })
2030
- ]
2031
- })
2032
- }),
2033
- /* @__PURE__ */ j(n, {
2034
- open: b,
2035
- title: "Add Controller",
2036
- subtitle: "Connect via Cloud Access or Local IP",
2037
- onClose: () => C(!1),
2038
- children: /* @__PURE__ */ M("div", {
2039
- style: {
2040
- display: "flex",
2041
- flexDirection: "column",
2042
- gap: 14
2043
- },
2044
- children: [/* @__PURE__ */ j(z, {
2045
- type: "ip",
2046
- label: "Controller IP Address",
2047
- value: w,
2048
- onChange: T
2049
- }), /* @__PURE__ */ j(i, {
2050
- variant: "primary",
2051
- block: !0,
2052
- onClick: () => C(!1),
2053
- children: "Connect Controller"
2054
- })]
2055
- })
2056
- })
2057
- ]
2058
- });
2059
- }, _e = [
2060
- "92",
2061
- "92-Lab",
2062
- "Branch-West",
2063
- "HQ-Core"
2064
- ], ve = [
2065
- {
2066
- key: "speed",
2067
- label: "Speed Test",
2068
- icon: "tool-speed-test",
2069
- summary: "WAN3: 942 Mbps ↓ / 418 Mbps ↑"
2070
- },
2071
- {
2072
- key: "ping",
2073
- label: "Ping Test",
2074
- icon: "tool-ping-test",
2075
- summary: "1.1.1.1 avg 3.2 ms • 0% loss"
2076
- },
2077
- {
2078
- key: "tracert",
2079
- label: "Traceroute",
2080
- icon: "tool-tracert",
2081
- summary: "4 hops to edge POP (3.4 ms)"
2082
- },
2083
- {
2084
- key: "wifi-scan",
2085
- label: "Wi-Fi Scan",
2086
- icon: "tool-wi-fi-scan",
2087
- summary: "5 GHz Ch 36 optimal (12% util)"
2088
- },
2089
- {
2090
- key: "roaming",
2091
- label: "Roaming Test",
2092
- icon: "tool-roaming-test",
2093
- summary: "802.11k/v/r fast transition < 18 ms"
2094
- },
2095
- {
2096
- key: "iface",
2097
- label: "Port Detect",
2098
- icon: "tool-interface-detection",
2099
- summary: "ER7212PC WAN3 1000M Full"
2100
- }
2101
- ], ye = ({ siteName: e = "92", controllerName: t = "62", unreadLogsCount: r = 1, activeTab: a = "dashboard", onTabChange: o, onSiteChange: c, onBackToGlobal: l, onOpenLogs: u, onOpenHealthDetail: d, onOpenInsights: f, onOpenDevices: m, onOpenClients: h, onToolkitClick: g, showTabBar: _ = !0, showFloatingAction: v = !0, className: y = "", style: b }) => {
2102
- let [C, w] = k(e), [T, E] = k(!1), [O, A] = k(!1), [N, P] = k(!1), [F, I] = k(null), L = D(() => _e.map((e) => ({
2103
- key: e,
2104
- label: e,
2105
- selected: C === e
2106
- })), [C]);
2107
- return /* @__PURE__ */ M("div", {
2108
- className: `tp-omada-screen ${_ ? "tp-omada-screen--standalone" : ""} ${y}`.trim(),
2109
- "data-testid": "omada-site-dashboard-page",
2110
- style: b,
2111
- children: [
2112
- /* @__PURE__ */ M("div", {
2113
- className: "tp-omada-header-wrap",
2114
- children: [/* @__PURE__ */ j(s, {
2115
- variant: "floating",
2116
- title: C,
2117
- subtitle: t,
2118
- titleDropdown: !0,
2119
- onTitleClick: () => E((e) => !e),
2120
- rightBadge: r > 0 ? r : void 0,
2121
- left: /* @__PURE__ */ j("button", {
2122
- type: "button",
2123
- className: "tp-header-icon-btn",
2124
- "aria-label": "Back to controllers",
2125
- onClick: l,
2126
- children: /* @__PURE__ */ j(S, {
2127
- name: "nav-back-to-global",
2128
- size: 20
2129
- })
2130
- }),
2131
- right: /* @__PURE__ */ j("button", {
2132
- type: "button",
2133
- className: "tp-header-icon-btn",
2134
- "aria-label": "Site logs",
2135
- onClick: u,
2136
- children: /* @__PURE__ */ j(S, {
2137
- name: "nav-log",
2138
- size: 20
2139
- })
2140
- })
2141
- }), /* @__PURE__ */ j(x, {
2142
- open: T,
2143
- align: "center",
2144
- items: L,
2145
- onSelect: (e) => {
2146
- w(e.key), c?.(e.key);
2147
- },
2148
- onClose: () => E(!1)
2149
- })]
2150
- }),
2151
- /* @__PURE__ */ j("div", {
2152
- className: "tp-omada-scroll",
2153
- children: /* @__PURE__ */ M("div", {
2154
- className: `tp-omada-body ${_ ? "tp-omada-body--with-tabbar" : ""}`.trim(),
2155
- children: [
2156
- /* @__PURE__ */ M("section", {
2157
- className: "tp-omada-card",
2158
- "aria-label": "Site inventory summary",
2159
- children: [/* @__PURE__ */ M("div", {
2160
- className: "tp-omada-kpi-grid",
2161
- children: [
2162
- /* @__PURE__ */ M("button", {
2163
- type: "button",
2164
- className: "tp-omada-kpi-tile",
2165
- onClick: m,
2166
- children: [/* @__PURE__ */ j("span", {
2167
- className: "tp-omada-adapt-svg",
2168
- children: /* @__PURE__ */ j(S, {
2169
- name: "dashboard-gateway",
2170
- size: 38
2171
- })
2172
- }), /* @__PURE__ */ j("span", {
2173
- className: "tp-omada-kpi-count",
2174
- children: "1"
2175
- })]
2176
- }),
2177
- /* @__PURE__ */ M("button", {
2178
- type: "button",
2179
- className: "tp-omada-kpi-tile",
2180
- onClick: m,
2181
- children: [/* @__PURE__ */ j("span", {
2182
- className: "tp-omada-adapt-svg",
2183
- children: /* @__PURE__ */ j(S, {
2184
- name: "dashboard-switch",
2185
- size: 38
2186
- })
2187
- }), /* @__PURE__ */ j("span", {
2188
- className: "tp-omada-kpi-count",
2189
- children: "0"
2190
- })]
2191
- }),
2192
- /* @__PURE__ */ M("button", {
2193
- type: "button",
2194
- className: "tp-omada-kpi-tile",
2195
- onClick: m,
2196
- children: [/* @__PURE__ */ j("span", {
2197
- className: "tp-omada-adapt-svg",
2198
- children: /* @__PURE__ */ j(S, {
2199
- name: "dashboard-ap",
2200
- size: 38
2201
- })
2202
- }), /* @__PURE__ */ j("span", {
2203
- className: "tp-omada-kpi-count",
2204
- children: "2"
2205
- })]
2206
- }),
2207
- /* @__PURE__ */ M("button", {
2208
- type: "button",
2209
- className: "tp-omada-kpi-tile",
2210
- onClick: h,
2211
- children: [/* @__PURE__ */ j("span", {
2212
- className: "tp-omada-adapt-svg",
2213
- children: /* @__PURE__ */ j(S, {
2214
- name: "dashboard-client",
2215
- size: 38
2216
- })
2217
- }), /* @__PURE__ */ j("span", {
2218
- className: "tp-omada-kpi-count",
2219
- children: "4"
2220
- })]
2221
- })
2222
- ]
2223
- }), /* @__PURE__ */ M("button", {
2224
- type: "button",
2225
- className: "tp-omada-topo-btn",
2226
- onClick: () => A(!0),
2227
- children: [/* @__PURE__ */ j(S, {
2228
- name: "btn-omada-topo",
2229
- size: 18
2230
- }), /* @__PURE__ */ j("span", { children: "Topology" })]
2231
- })]
2232
- }),
2233
- /* @__PURE__ */ M("section", {
2234
- className: "tp-omada-card tp-omada-card--interactive",
2235
- "aria-label": "Site Health Score",
2236
- role: d ? "button" : void 0,
2237
- tabIndex: d ? 0 : void 0,
2238
- onClick: d,
2239
- onKeyDown: (e) => {
2240
- d && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), d());
2241
- },
2242
- children: [
2243
- /* @__PURE__ */ M("div", {
2244
- className: "tp-omada-card-header",
2245
- children: [/* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("h3", {
2246
- className: "tp-omada-card-title",
2247
- children: "Site Health Score"
2248
- }), /* @__PURE__ */ j("div", {
2249
- className: "tp-omada-card-subtitle",
2250
- children: "Nov 23, 06:30 PM-Nov 23, 06:40 PM"
2251
- })] }), /* @__PURE__ */ j("span", {
2252
- className: "tp-omada-health-score-value",
2253
- children: "100"
2254
- })]
2255
- }),
2256
- /* @__PURE__ */ M("div", {
2257
- className: "tp-omada-health-subgrid",
2258
- children: [
2259
- /* @__PURE__ */ M("div", {
2260
- className: "tp-omada-health-subcard",
2261
- children: [/* @__PURE__ */ M("div", {
2262
- className: "tp-omada-health-subcard-label",
2263
- children: [/* @__PURE__ */ M("svg", {
2264
- width: "13",
2265
- height: "13",
2266
- viewBox: "0 0 16 16",
2267
- fill: "none",
2268
- "aria-hidden": "true",
2269
- children: [/* @__PURE__ */ j("rect", {
2270
- x: "2",
2271
- y: "5",
2272
- width: "12",
2273
- height: "7",
2274
- rx: "1.2",
2275
- stroke: "currentColor",
2276
- strokeWidth: "1.2"
2277
- }), /* @__PURE__ */ j("path", {
2278
- d: "M5 5V3M11 5V3",
2279
- stroke: "currentColor",
2280
- strokeWidth: "1.2",
2281
- strokeLinecap: "round"
2282
- })]
2283
- }), /* @__PURE__ */ j("span", { children: "Device" })]
2284
- }), /* @__PURE__ */ j("span", {
2285
- className: "tp-omada-health-subcard-num",
2286
- children: "100"
2287
- })]
2288
- }),
2289
- /* @__PURE__ */ M("div", {
2290
- className: "tp-omada-health-subcard",
2291
- children: [/* @__PURE__ */ M("div", {
2292
- className: "tp-omada-health-subcard-label",
2293
- children: [/* @__PURE__ */ j("svg", {
2294
- width: "13",
2295
- height: "13",
2296
- viewBox: "0 0 16 16",
2297
- fill: "none",
2298
- "aria-hidden": "true",
2299
- children: /* @__PURE__ */ j("path", {
2300
- d: "M2.5 6.2C5.6 3.5 10.4 3.5 13.5 6.2M4.8 8.8C6.6 7.2 9.4 7.2 11.2 8.8M7.2 11.4C7.7 11 8.3 11 8.8 11.4",
2301
- stroke: "currentColor",
2302
- strokeWidth: "1.2",
2303
- strokeLinecap: "round"
2304
- })
2305
- }), /* @__PURE__ */ j("span", { children: "Wi-Fi" })]
2306
- }), /* @__PURE__ */ j("span", {
2307
- className: "tp-omada-health-subcard-num",
2308
- children: "100"
2309
- })]
2310
- }),
2311
- /* @__PURE__ */ M("div", {
2312
- className: "tp-omada-health-subcard",
2313
- children: [/* @__PURE__ */ M("div", {
2314
- className: "tp-omada-health-subcard-label",
2315
- children: [/* @__PURE__ */ M("svg", {
2316
- width: "13",
2317
- height: "13",
2318
- viewBox: "0 0 16 16",
2319
- fill: "none",
2320
- "aria-hidden": "true",
2321
- children: [
2322
- /* @__PURE__ */ j("circle", {
2323
- cx: "8",
2324
- cy: "8",
2325
- r: "5.5",
2326
- stroke: "currentColor",
2327
- strokeWidth: "1.2"
2328
- }),
2329
- /* @__PURE__ */ j("ellipse", {
2330
- cx: "8",
2331
- cy: "8",
2332
- rx: "2.4",
2333
- ry: "5.5",
2334
- stroke: "currentColor",
2335
- strokeWidth: "1.1"
2336
- }),
2337
- /* @__PURE__ */ j("path", {
2338
- d: "M2.6 8H13.4",
2339
- stroke: "currentColor",
2340
- strokeWidth: "1.1"
2341
- })
2342
- ]
2343
- }), /* @__PURE__ */ j("span", { children: "WAN" })]
2344
- }), /* @__PURE__ */ j("span", {
2345
- className: "tp-omada-health-subcard-num",
2346
- children: "100"
2347
- })]
2348
- })
2349
- ]
2350
- }),
2351
- /* @__PURE__ */ M("div", {
2352
- className: "tp-omada-health-timeline",
2353
- "aria-hidden": "true",
2354
- children: [[
2355
- "Device",
2356
- "Wi-Fi",
2357
- "WAN"
2358
- ].map((e) => /* @__PURE__ */ M("div", {
2359
- className: "tp-omada-health-bar-row",
2360
- children: [/* @__PURE__ */ j("span", {
2361
- className: "tp-omada-health-bar-icon",
2362
- children: /* @__PURE__ */ j("span", { className: "tp-omada-dot" })
2363
- }), /* @__PURE__ */ j("div", {
2364
- className: "tp-omada-health-bar-track",
2365
- children: /* @__PURE__ */ j("div", {
2366
- className: "tp-omada-health-bar-fill",
2367
- style: { width: "94%" }
2368
- })
2369
- })]
2370
- }, e)), /* @__PURE__ */ j("div", {
2371
- className: "tp-omada-health-scrubber-line",
2372
- style: { left: "94%" },
2373
- children: /* @__PURE__ */ j("span", { className: "tp-omada-health-scrubber-thumb" })
2374
- })]
2375
- })
2376
- ]
2377
- }),
2378
- /* @__PURE__ */ M("section", {
2379
- className: "tp-omada-card tp-omada-card--interactive",
2380
- "aria-label": "ISP Activity",
2381
- onClick: f,
2382
- children: [/* @__PURE__ */ M("div", {
2383
- className: "tp-omada-card-header",
2384
- children: [/* @__PURE__ */ j("h3", {
2385
- className: "tp-omada-card-title",
2386
- children: "ISP Activity"
2387
- }), /* @__PURE__ */ j(S, {
2388
- name: "arrow-list",
2389
- size: 14,
2390
- color: "var(--tp-text-secondary)"
2391
- })]
2392
- }), /* @__PURE__ */ M("div", {
2393
- className: "tp-omada-isp-list",
2394
- children: [/* @__PURE__ */ M("div", {
2395
- className: "tp-omada-isp-row",
2396
- children: [/* @__PURE__ */ j("span", {
2397
- className: "tp-omada-isp-name",
2398
- children: "SFP WAN/LAN1"
2399
- }), /* @__PURE__ */ M("span", {
2400
- className: "tp-omada-isp-rates",
2401
- children: [/* @__PURE__ */ M("span", {
2402
- className: "tp-omada-rate-item",
2403
- children: [/* @__PURE__ */ j(S, {
2404
- name: "upload",
2405
- size: 13
2406
- }), /* @__PURE__ */ j("span", { children: "0 bps" })]
2407
- }), /* @__PURE__ */ M("span", {
2408
- className: "tp-omada-rate-item",
2409
- children: [/* @__PURE__ */ j(S, {
2410
- name: "download",
2411
- size: 13
2412
- }), /* @__PURE__ */ j("span", { children: "0 bps" })]
2413
- })]
2414
- })]
2415
- }), /* @__PURE__ */ M("div", {
2416
- className: "tp-omada-isp-row",
2417
- children: [/* @__PURE__ */ j("span", {
2418
- className: "tp-omada-isp-name",
2419
- children: "WAN3"
2420
- }), /* @__PURE__ */ M("span", {
2421
- className: "tp-omada-isp-rates",
2422
- children: [/* @__PURE__ */ M("span", {
2423
- className: "tp-omada-rate-item",
2424
- children: [/* @__PURE__ */ j(S, {
2425
- name: "upload",
2426
- size: 13
2427
- }), /* @__PURE__ */ j("span", { children: "0 bps" })]
2428
- }), /* @__PURE__ */ M("span", {
2429
- className: "tp-omada-rate-item",
2430
- children: [/* @__PURE__ */ j(S, {
2431
- name: "download",
2432
- size: 13
2433
- }), /* @__PURE__ */ j("span", { children: "8 Kbps" })]
2434
- })]
2435
- })]
2436
- })]
2437
- })]
2438
- }),
2439
- /* @__PURE__ */ M("section", {
2440
- className: "tp-omada-card tp-omada-card--interactive",
2441
- "aria-label": "Internet Activity",
2442
- onClick: f,
2443
- children: [
2444
- /* @__PURE__ */ M("div", {
2445
- className: "tp-omada-card-header",
2446
- children: [/* @__PURE__ */ j("h3", {
2447
- className: "tp-omada-card-title",
2448
- children: "Internet Activity"
2449
- }), /* @__PURE__ */ j(S, {
2450
- name: "arrow-list",
2451
- size: 14,
2452
- color: "var(--tp-text-secondary)"
2453
- })]
2454
- }),
2455
- /* @__PURE__ */ M("div", {
2456
- className: "tp-omada-legend-col",
2457
- children: [/* @__PURE__ */ M("div", {
2458
- className: "tp-omada-legend-row",
2459
- children: [/* @__PURE__ */ M("span", {
2460
- className: "tp-omada-legend-item",
2461
- children: [/* @__PURE__ */ j("svg", {
2462
- width: "14",
2463
- height: "10",
2464
- viewBox: "0 0 14 10",
2465
- fill: "none",
2466
- "aria-hidden": "true",
2467
- children: /* @__PURE__ */ j("path", {
2468
- d: "M1 8L4.5 3.5L7.5 7L10 2L13 8",
2469
- stroke: "var(--tp-omada-upload)",
2470
- strokeWidth: "1.4",
2471
- strokeLinecap: "round",
2472
- strokeLinejoin: "round"
2473
- })
2474
- }), /* @__PURE__ */ j("span", { children: "Upload" })]
2475
- }), /* @__PURE__ */ M("span", {
2476
- className: "tp-omada-legend-item",
2477
- children: [/* @__PURE__ */ j("svg", {
2478
- width: "14",
2479
- height: "10",
2480
- viewBox: "0 0 14 10",
2481
- fill: "none",
2482
- "aria-hidden": "true",
2483
- children: /* @__PURE__ */ j("path", {
2484
- d: "M1 8L4.5 3.5L7.5 7L10 2L13 8",
2485
- stroke: "var(--tp-omada-download)",
2486
- strokeWidth: "1.4",
2487
- strokeLinecap: "round",
2488
- strokeLinejoin: "round"
2489
- })
2490
- }), /* @__PURE__ */ j("span", { children: "Download" })]
2491
- })]
2492
- }), /* @__PURE__ */ M("div", {
2493
- className: "tp-omada-legend-row",
2494
- children: [/* @__PURE__ */ M("span", {
2495
- className: "tp-omada-legend-item",
2496
- children: [/* @__PURE__ */ j("span", {
2497
- className: "tp-omada-legend-dot",
2498
- style: { background: "var(--tp-omada-upload)" }
2499
- }), /* @__PURE__ */ j("span", { children: "Wired Clients" })]
2500
- }), /* @__PURE__ */ M("span", {
2501
- className: "tp-omada-legend-item",
2502
- children: [/* @__PURE__ */ j("span", {
2503
- className: "tp-omada-legend-dot",
2504
- style: { background: "var(--tp-color-green)" }
2505
- }), /* @__PURE__ */ j("span", { children: "Wireless Clients" })]
2506
- })]
2507
- })]
2508
- }),
2509
- /* @__PURE__ */ M("div", {
2510
- style: { marginTop: 10 },
2511
- children: [/* @__PURE__ */ M("div", {
2512
- className: "tp-omada-chart-axis-row",
2513
- children: [/* @__PURE__ */ j("span", { children: "24 Mbps" }), /* @__PURE__ */ j("span", { children: "12 Clients" })]
2514
- }), /* @__PURE__ */ M("svg", {
2515
- viewBox: "0 0 320 96",
2516
- width: "100%",
2517
- height: "96",
2518
- preserveAspectRatio: "none",
2519
- "aria-label": "Internet traffic and client waveform chart",
2520
- style: {
2521
- display: "block",
2522
- marginTop: 4
2523
- },
2524
- children: [
2525
- /* @__PURE__ */ M("defs", { children: [/* @__PURE__ */ M("linearGradient", {
2526
- id: "tpOmadaDlArea",
2527
- x1: "0",
2528
- y1: "0",
2529
- x2: "0",
2530
- y2: "1",
2531
- children: [/* @__PURE__ */ j("stop", {
2532
- offset: "0%",
2533
- stopColor: "#E57DFA",
2534
- stopOpacity: "0.28"
2535
- }), /* @__PURE__ */ j("stop", {
2536
- offset: "100%",
2537
- stopColor: "#E57DFA",
2538
- stopOpacity: "0.02"
2539
- })]
2540
- }), /* @__PURE__ */ M("linearGradient", {
2541
- id: "tpOmadaUlArea",
2542
- x1: "0",
2543
- y1: "0",
2544
- x2: "0",
2545
- y2: "1",
2546
- children: [/* @__PURE__ */ j("stop", {
2547
- offset: "0%",
2548
- stopColor: "#33A0E9",
2549
- stopOpacity: "0.22"
2550
- }), /* @__PURE__ */ j("stop", {
2551
- offset: "100%",
2552
- stopColor: "#33A0E9",
2553
- stopOpacity: "0.02"
2554
- })]
2555
- })] }),
2556
- /* @__PURE__ */ j("line", {
2557
- x1: "0",
2558
- y1: "10",
2559
- x2: "320",
2560
- y2: "10",
2561
- stroke: "var(--tp-omada-chart-grid)",
2562
- strokeDasharray: "3 3"
2563
- }),
2564
- /* @__PURE__ */ j("line", {
2565
- x1: "0",
2566
- y1: "48",
2567
- x2: "320",
2568
- y2: "48",
2569
- stroke: "var(--tp-omada-chart-grid)",
2570
- strokeDasharray: "3 3"
2571
- }),
2572
- /* @__PURE__ */ j("line", {
2573
- x1: "0",
2574
- y1: "86",
2575
- x2: "320",
2576
- y2: "86",
2577
- stroke: "var(--tp-omada-chart-grid)"
2578
- }),
2579
- /* @__PURE__ */ j("path", {
2580
- d: "M0,84 L120,84 L132,76 L142,84 L158,40 L166,78 L176,82 L188,18 L196,68 L208,34 L216,74 L228,82 L240,30 L248,68 L262,80 L278,42 L286,74 L300,82 L320,82 L320,86 L0,86 Z",
2581
- fill: "url(#tpOmadaDlArea)"
2582
- }),
2583
- /* @__PURE__ */ j("path", {
2584
- d: "M0,84 L120,84 L132,76 L142,84 L158,40 L166,78 L176,82 L188,18 L196,68 L208,34 L216,74 L228,82 L240,30 L248,68 L262,80 L278,42 L286,74 L300,82 L320,82",
2585
- fill: "none",
2586
- stroke: "var(--tp-omada-download)",
2587
- strokeWidth: "1.5"
2588
- }),
2589
- /* @__PURE__ */ j("path", {
2590
- d: "M0,85 L140,85 L154,66 L166,82 L188,52 L198,80 L214,60 L226,82 L242,58 L254,82 L280,68 L294,84 L320,84 L320,86 L0,86 Z",
2591
- fill: "url(#tpOmadaUlArea)"
2592
- }),
2593
- /* @__PURE__ */ j("path", {
2594
- d: "M0,85 L140,85 L154,66 L166,82 L188,52 L198,80 L214,60 L226,82 L242,58 L254,82 L280,68 L294,84 L320,84",
2595
- fill: "none",
2596
- stroke: "var(--tp-omada-upload)",
2597
- strokeWidth: "1.4"
2598
- })
2599
- ]
2600
- })]
2601
- })
2602
- ]
2603
- })
2604
- ]
2605
- })
2606
- }),
2607
- v && /* @__PURE__ */ j("button", {
2608
- type: "button",
2609
- className: "tp-omada-fab tp-omada-standalone-fab",
2610
- "aria-label": "Network Toolkit",
2611
- onClick: () => {
2612
- g ? g() : P(!0);
2613
- },
2614
- children: /* @__PURE__ */ j(S, {
2615
- name: "settings-network-tools",
2616
- size: 22,
2617
- color: "#FFFFFF"
2618
- })
2619
- }),
2620
- _ && /* @__PURE__ */ j("div", {
2621
- className: "tp-omada-standalone-tabbar",
2622
- children: /* @__PURE__ */ j(p, {
2623
- variant: "floating-pill",
2624
- items: B,
2625
- activeKey: a,
2626
- onChange: (e) => o?.(e)
2627
- })
2628
- }),
2629
- /* @__PURE__ */ j(n, {
2630
- open: O,
2631
- title: `Site ${C} Topology`,
2632
- subtitle: "1 Gateway • 2 Access Points • 4 Clients",
2633
- onClose: () => A(!1),
2634
- children: /* @__PURE__ */ M("div", {
2635
- style: {
2636
- display: "flex",
2637
- flexDirection: "column",
2638
- gap: 12
2639
- },
2640
- children: [/* @__PURE__ */ j(X, {
2641
- siteName: C,
2642
- showHeader: !1
2643
- }), /* @__PURE__ */ j(i, {
2644
- variant: "secondary",
2645
- block: !0,
2646
- onClick: () => {
2647
- A(!1), m?.();
2648
- },
2649
- children: "Inspect Devices"
2650
- })]
2651
- })
2652
- }),
2653
- /* @__PURE__ */ j(n, {
2654
- open: N,
2655
- title: "Network Toolkit",
2656
- subtitle: `Diagnostics for Site ${C}`,
2657
- onClose: () => P(!1),
2658
- children: /* @__PURE__ */ M("div", {
2659
- style: {
2660
- display: "flex",
2661
- flexDirection: "column",
2662
- gap: 12
2663
- },
2664
- children: [/* @__PURE__ */ j("div", {
2665
- className: "tp-omada-tool-grid",
2666
- children: ve.map((e) => /* @__PURE__ */ M("button", {
2667
- type: "button",
2668
- className: "tp-omada-tool-tile",
2669
- onClick: () => I(`${e.label}: ${e.summary}`),
2670
- children: [/* @__PURE__ */ j(S, {
2671
- name: e.icon,
2672
- size: 30
2673
- }), /* @__PURE__ */ j("span", { children: e.label })]
2674
- }, e.key))
2675
- }), F && /* @__PURE__ */ j("div", {
2676
- style: {
2677
- padding: "10px 12px",
2678
- borderRadius: 8,
2679
- background: "var(--tp-focus-10)",
2680
- color: "var(--tp-focus)",
2681
- fontSize: 13
2682
- },
2683
- children: F
2684
- })]
2685
- })
2686
- })
2687
- ]
2688
- });
2689
- }, be = [
2690
- {
2691
- key: "wired",
2692
- label: "Wired"
2693
- },
2694
- {
2695
- key: "wireless",
2696
- label: "Wireless"
2697
- },
2698
- {
2699
- key: "client",
2700
- label: "Client"
2701
- },
2702
- {
2703
- key: "apps",
2704
- label: "Apps"
2705
- }
2706
- ], Q = [
2707
- {
2708
- key: "24h",
2709
- label: "Last 24 Hours",
2710
- start: "Nov 22, 06:55 PM",
2711
- end: "Nov 23, 06:45 PM"
2712
- },
2713
- {
2714
- key: "7d",
2715
- label: "Last 7 Days",
2716
- start: "Nov 16, 06:55 PM",
2717
- end: "Nov 23, 06:45 PM"
2718
- },
2719
- {
2720
- key: "30d",
2721
- label: "Last 30 Days",
2722
- start: "Oct 24, 06:55 PM",
2723
- end: "Nov 23, 06:45 PM"
2724
- }
2725
- ], xe = [
2726
- "WAN3",
2727
- "SFP WAN/LAN1",
2728
- "All WANs"
2729
- ], Se = [
2730
- 3,
2731
- 4,
2732
- 3,
2733
- 5,
2734
- 3,
2735
- 4,
2736
- 6,
2737
- 4,
2738
- 3,
2739
- 4,
2740
- 3,
2741
- 4,
2742
- 3,
2743
- 5,
2744
- 4,
2745
- 3,
2746
- 4,
2747
- 3,
2748
- 4,
2749
- 6,
2750
- 8,
2751
- 5,
2752
- 11,
2753
- 14,
2754
- 18,
2755
- 12,
2756
- 22,
2757
- 26,
2758
- 34,
2759
- 48,
2760
- 28,
2761
- 18,
2762
- 22,
2763
- 16,
2764
- 20,
2765
- 14,
2766
- 18,
2767
- 24,
2768
- 15,
2769
- 20,
2770
- 16,
2771
- 26,
2772
- 30,
2773
- 19,
2774
- 14,
2775
- 12,
2776
- 16,
2777
- 11,
2778
- 8,
2779
- 6
2780
- ], Ce = ({ activeTab: e = "insights", onTabChange: t, showTabBar: n = !0, className: r = "", style: i }) => {
2781
- let [a, o] = k("wired"), [c, l] = k("WAN3"), [u, d] = k(!1), [m, h] = k("24h"), [g, _] = k(!1), v = Q.find((e) => e.key === m) ?? Q[0], y = D(() => Q.map((e) => ({
2782
- key: e.key,
2783
- label: e.label,
2784
- selected: e.key === m
2785
- })), [m]), b = D(() => xe.map((e) => ({
2786
- key: e,
2787
- label: e,
2788
- selected: e === c
2789
- })), [c]);
2790
- return /* @__PURE__ */ M("div", {
2791
- className: `tp-omada-screen ${n ? "tp-omada-screen--standalone" : ""} ${r}`.trim(),
2792
- "data-testid": "omada-site-insights-page",
2793
- style: i,
2794
- children: [
2795
- /* @__PURE__ */ M("div", {
2796
- className: "tp-omada-header-wrap",
2797
- children: [
2798
- /* @__PURE__ */ j(s, {
2799
- variant: "floating",
2800
- title: "Insights",
2801
- right: /* @__PURE__ */ j("button", {
2802
- type: "button",
2803
- className: "tp-header-icon-btn",
2804
- "aria-label": "Select date range",
2805
- onClick: () => _((e) => !e),
2806
- children: /* @__PURE__ */ j(S, {
2807
- name: "nav-calendar",
2808
- size: 19
2809
- })
2810
- })
2811
- }),
2812
- /* @__PURE__ */ j(x, {
2813
- open: g,
2814
- align: "right",
2815
- items: y,
2816
- onSelect: (e) => h(e.key),
2817
- onClose: () => _(!1)
2818
- }),
2819
- /* @__PURE__ */ j("div", {
2820
- className: "tp-omada-header-subbar",
2821
- children: /* @__PURE__ */ j(f, {
2822
- variant: "underline",
2823
- fullWidth: !0,
2824
- options: be,
2825
- value: a,
2826
- onChange: (e) => o(e)
2827
- })
2828
- })
2829
- ]
2830
- }),
2831
- /* @__PURE__ */ j("div", {
2832
- className: "tp-omada-scroll",
2833
- children: /* @__PURE__ */ M("div", {
2834
- className: `tp-omada-body tp-omada-body--with-subbar ${n ? "tp-omada-body--with-tabbar" : ""}`.trim(),
2835
- children: [
2836
- a === "wired" && /* @__PURE__ */ M(A, { children: [
2837
- /* @__PURE__ */ M("section", {
2838
- className: "tp-omada-card",
2839
- "aria-label": "ISP Load",
2840
- children: [
2841
- /* @__PURE__ */ M("div", {
2842
- className: "tp-omada-card-header",
2843
- style: { position: "relative" },
2844
- children: [
2845
- /* @__PURE__ */ j("h3", {
2846
- className: "tp-omada-card-title",
2847
- children: "ISP Load"
2848
- }),
2849
- /* @__PURE__ */ M("button", {
2850
- type: "button",
2851
- onClick: () => d((e) => !e),
2852
- style: {
2853
- display: "inline-flex",
2854
- alignItems: "center",
2855
- gap: 4,
2856
- border: "none",
2857
- background: "transparent",
2858
- color: "var(--tp-color-green)",
2859
- fontSize: 13,
2860
- fontWeight: 500,
2861
- cursor: "pointer",
2862
- padding: 0
2863
- },
2864
- children: [/* @__PURE__ */ j("span", { children: c }), /* @__PURE__ */ j("svg", {
2865
- width: "12",
2866
- height: "12",
2867
- viewBox: "0 0 12 12",
2868
- fill: "none",
2869
- "aria-hidden": "true",
2870
- children: /* @__PURE__ */ j("path", {
2871
- d: "M3 4.5L6 7.5L9 4.5",
2872
- stroke: "currentColor",
2873
- strokeWidth: "1.4",
2874
- strokeLinecap: "round",
2875
- strokeLinejoin: "round"
2876
- })
2877
- })]
2878
- }),
2879
- /* @__PURE__ */ j(x, {
2880
- open: u,
2881
- align: "right",
2882
- items: b,
2883
- onSelect: (e) => l(e.key),
2884
- onClose: () => d(!1)
2885
- })
2886
- ]
2887
- }),
2888
- /* @__PURE__ */ j("div", {
2889
- className: "tp-omada-legend-col",
2890
- style: { marginTop: 8 },
2891
- children: /* @__PURE__ */ M("div", {
2892
- className: "tp-omada-legend-row",
2893
- children: [/* @__PURE__ */ M("span", {
2894
- className: "tp-omada-legend-item",
2895
- children: [/* @__PURE__ */ j("span", {
2896
- className: "tp-omada-legend-dot",
2897
- style: { background: "var(--tp-color-green)" }
2898
- }), /* @__PURE__ */ j("span", { children: "Throughput" })]
2899
- }), /* @__PURE__ */ M("span", {
2900
- className: "tp-omada-legend-item",
2901
- children: [/* @__PURE__ */ j("svg", {
2902
- width: "14",
2903
- height: "10",
2904
- viewBox: "0 0 14 10",
2905
- fill: "none",
2906
- "aria-hidden": "true",
2907
- children: /* @__PURE__ */ j("path", {
2908
- d: "M1 8L4.5 3.5L7.5 7L10 2L13 8",
2909
- stroke: "#4D94FF",
2910
- strokeWidth: "1.4",
2911
- strokeLinecap: "round",
2912
- strokeLinejoin: "round"
2913
- })
2914
- }), /* @__PURE__ */ j("span", { children: "Latency" })]
2915
- })]
2916
- })
2917
- }),
2918
- /* @__PURE__ */ M("div", {
2919
- style: { marginTop: 8 },
2920
- children: [
2921
- /* @__PURE__ */ M("div", {
2922
- className: "tp-omada-chart-axis-row",
2923
- children: [/* @__PURE__ */ j("span", { children: "20 Mbps" }), /* @__PURE__ */ j("span", { children: "4 msec" })]
2924
- }),
2925
- /* @__PURE__ */ M("div", {
2926
- style: {
2927
- position: "relative",
2928
- marginTop: 4
2929
- },
2930
- children: [/* @__PURE__ */ M("svg", {
2931
- viewBox: "0 0 320 110",
2932
- width: "100%",
2933
- height: "110",
2934
- preserveAspectRatio: "none",
2935
- "aria-label": "ISP Load Throughput and Latency chart",
2936
- style: { display: "block" },
2937
- children: [
2938
- /* @__PURE__ */ j("line", {
2939
- x1: "0",
2940
- y1: "12",
2941
- x2: "320",
2942
- y2: "12",
2943
- stroke: "var(--tp-omada-chart-grid)",
2944
- strokeDasharray: "3 3"
2945
- }),
2946
- /* @__PURE__ */ j("line", {
2947
- x1: "0",
2948
- y1: "58",
2949
- x2: "320",
2950
- y2: "58",
2951
- stroke: "var(--tp-omada-chart-grid)",
2952
- strokeDasharray: "3 3"
2953
- }),
2954
- /* @__PURE__ */ j("line", {
2955
- x1: "0",
2956
- y1: "104",
2957
- x2: "320",
2958
- y2: "104",
2959
- stroke: "var(--tp-omada-chart-grid)"
2960
- }),
2961
- Se.map((e, t) => {
2962
- let n = 14 + t * 5.8, r = c === "SFP WAN/LAN1" ? Math.max(2, e * .25) : e * 1.45;
2963
- return /* @__PURE__ */ j("rect", {
2964
- x: n,
2965
- y: 104 - r,
2966
- width: "2.4",
2967
- height: r,
2968
- fill: "#00A870",
2969
- fillOpacity: "0.45"
2970
- }, t);
2971
- }),
2972
- /* @__PURE__ */ j("polyline", {
2973
- fill: "none",
2974
- stroke: "#4D94FF",
2975
- strokeWidth: "1.35",
2976
- points: "0,34 10,34 12,56 16,34 28,34 31,12 34,34 42,34 45,56 48,34 54,10 58,34 72,34 75,56 79,34 86,56 90,34 104,34 107,56 111,34 114,56 118,34 134,34 137,56 141,34 148,56 152,34 174,34 177,56 181,34 196,34 200,56 204,34 208,56 212,34 224,34 227,56 231,34 246,34 249,56 253,34 266,34 269,56 273,34 286,34 289,56 293,34 320,34"
2977
- })
2978
- ]
2979
- }), /* @__PURE__ */ M("div", {
2980
- style: {
2981
- position: "absolute",
2982
- left: 0,
2983
- right: 0,
2984
- top: 40,
2985
- display: "flex",
2986
- justifyContent: "space-between",
2987
- fontSize: 11,
2988
- color: "var(--tp-text-secondary)",
2989
- pointerEvents: "none"
2990
- },
2991
- children: [/* @__PURE__ */ j("span", { children: "10" }), /* @__PURE__ */ j("span", { children: "2" })]
2992
- })]
2993
- }),
2994
- /* @__PURE__ */ M("div", {
2995
- className: "tp-omada-chart-axis-row",
2996
- style: { marginTop: 2 },
2997
- children: [/* @__PURE__ */ j("span", { children: "0" }), /* @__PURE__ */ j("span", { children: "0" })]
2998
- }),
2999
- /* @__PURE__ */ M("div", {
3000
- className: "tp-omada-chart-axis-row",
3001
- style: { marginTop: 4 },
3002
- children: [/* @__PURE__ */ j("span", { children: v.start }), /* @__PURE__ */ j("span", { children: v.end })]
3003
- })
3004
- ]
3005
- })
3006
- ]
3007
- }),
3008
- /* @__PURE__ */ M("section", {
3009
- className: "tp-omada-card",
3010
- "aria-label": "WAN Health Trend",
3011
- children: [
3012
- /* @__PURE__ */ M("div", {
3013
- className: "tp-omada-card-header",
3014
- children: [/* @__PURE__ */ j("h3", {
3015
- className: "tp-omada-card-title",
3016
- children: "WAN Health Trend"
3017
- }), /* @__PURE__ */ M("div", {
3018
- style: {
3019
- display: "inline-flex",
3020
- alignItems: "center",
3021
- gap: 5,
3022
- fontSize: 11,
3023
- color: "var(--tp-text-secondary)"
3024
- },
3025
- children: [
3026
- /* @__PURE__ */ j("span", { children: "1" }),
3027
- /* @__PURE__ */ j("span", { style: {
3028
- display: "inline-block",
3029
- width: 44,
3030
- height: 5,
3031
- borderRadius: 999,
3032
- background: "linear-gradient(90deg, #00A870 0%, #FF8C27 62%, #EE385C 100%)"
3033
- } }),
3034
- /* @__PURE__ */ j("span", { children: "10" })
3035
- ]
3036
- })]
3037
- }),
3038
- /* @__PURE__ */ M("div", {
3039
- style: {
3040
- display: "flex",
3041
- alignItems: "center",
3042
- gap: 10,
3043
- marginTop: 14
3044
- },
3045
- children: [/* @__PURE__ */ j("span", {
3046
- style: {
3047
- fontSize: 12,
3048
- color: "var(--tp-text-secondary)",
3049
- width: 38
3050
- },
3051
- children: "WAN3"
3052
- }), /* @__PURE__ */ j("div", { style: {
3053
- flex: 1,
3054
- height: 6,
3055
- borderRadius: 999,
3056
- background: "var(--tp-color-green)"
3057
- } })]
3058
- }),
3059
- /* @__PURE__ */ M("div", {
3060
- className: "tp-omada-chart-axis-row",
3061
- style: {
3062
- marginTop: 6,
3063
- paddingLeft: 48
3064
- },
3065
- children: [/* @__PURE__ */ j("span", { children: "Nov 22, 07:00 PM" }), /* @__PURE__ */ j("span", { children: "Nov 23, 06:40 PM" })]
3066
- })
3067
- ]
3068
- }),
3069
- /* @__PURE__ */ M("section", {
3070
- className: "tp-omada-card",
3071
- "aria-label": "Gateway Utilization",
3072
- children: [
3073
- /* @__PURE__ */ j("div", {
3074
- className: "tp-omada-card-header",
3075
- children: /* @__PURE__ */ j("h3", {
3076
- className: "tp-omada-card-title",
3077
- children: "Gateway Utilization"
3078
- })
3079
- }),
3080
- /* @__PURE__ */ M("div", {
3081
- className: "tp-omada-legend-row",
3082
- style: { marginTop: 6 },
3083
- children: [/* @__PURE__ */ M("span", {
3084
- className: "tp-omada-legend-item",
3085
- children: [/* @__PURE__ */ j("svg", {
3086
- width: "14",
3087
- height: "10",
3088
- viewBox: "0 0 14 10",
3089
- fill: "none",
3090
- "aria-hidden": "true",
3091
- children: /* @__PURE__ */ j("path", {
3092
- d: "M1 8L4.5 3.5L7.5 7L10 2L13 8",
3093
- stroke: "var(--tp-color-green)",
3094
- strokeWidth: "1.4",
3095
- strokeLinecap: "round",
3096
- strokeLinejoin: "round"
3097
- })
3098
- }), /* @__PURE__ */ j("span", { children: "CPU" })]
3099
- }), /* @__PURE__ */ M("span", {
3100
- className: "tp-omada-legend-item",
3101
- children: [/* @__PURE__ */ j("svg", {
3102
- width: "14",
3103
- height: "10",
3104
- viewBox: "0 0 14 10",
3105
- fill: "none",
3106
- "aria-hidden": "true",
3107
- children: /* @__PURE__ */ j("path", {
3108
- d: "M1 8L4.5 3.5L7.5 7L10 2L13 8",
3109
- stroke: "#4D94FF",
3110
- strokeWidth: "1.4",
3111
- strokeLinecap: "round",
3112
- strokeLinejoin: "round"
3113
- })
3114
- }), /* @__PURE__ */ j("span", { children: "Memory" })]
3115
- })]
3116
- }),
3117
- /* @__PURE__ */ M("div", {
3118
- style: { marginTop: 6 },
3119
- children: [
3120
- /* @__PURE__ */ M("div", {
3121
- className: "tp-omada-chart-axis-row",
3122
- children: [/* @__PURE__ */ j("span", { children: "100%" }), /* @__PURE__ */ j("span", {})]
3123
- }),
3124
- /* @__PURE__ */ M("div", {
3125
- style: { position: "relative" },
3126
- children: [/* @__PURE__ */ M("svg", {
3127
- viewBox: "0 0 320 90",
3128
- width: "100%",
3129
- height: "90",
3130
- preserveAspectRatio: "none",
3131
- "aria-label": "Gateway CPU and Memory utilization chart",
3132
- style: { display: "block" },
3133
- children: [
3134
- /* @__PURE__ */ j("line", {
3135
- x1: "0",
3136
- y1: "8",
3137
- x2: "320",
3138
- y2: "8",
3139
- stroke: "var(--tp-omada-chart-grid)",
3140
- strokeDasharray: "3 3"
3141
- }),
3142
- /* @__PURE__ */ j("line", {
3143
- x1: "0",
3144
- y1: "44",
3145
- x2: "320",
3146
- y2: "44",
3147
- stroke: "var(--tp-omada-chart-grid)",
3148
- strokeDasharray: "3 3"
3149
- }),
3150
- /* @__PURE__ */ j("line", {
3151
- x1: "0",
3152
- y1: "82",
3153
- x2: "320",
3154
- y2: "82",
3155
- stroke: "var(--tp-omada-chart-grid)"
3156
- }),
3157
- /* @__PURE__ */ j("polyline", {
3158
- fill: "none",
3159
- stroke: "#4D94FF",
3160
- strokeWidth: "1.5",
3161
- points: "0,58 84,58 88,54 92,58 100,55 104,58 112,55 116,58 124,55 128,58 320,58"
3162
- }),
3163
- /* @__PURE__ */ j("polyline", {
3164
- fill: "none",
3165
- stroke: "#00A870",
3166
- strokeWidth: "1.4",
3167
- points: "0,81 56,81 60,76 63,81 68,74 71,81 200,81 204,76 208,81 264,81 268,75 272,81 320,81"
3168
- })
3169
- ]
3170
- }), /* @__PURE__ */ j("span", {
3171
- style: {
3172
- position: "absolute",
3173
- left: 0,
3174
- top: 32,
3175
- fontSize: 11,
3176
- color: "var(--tp-text-secondary)"
3177
- },
3178
- children: "50%"
3179
- })]
3180
- }),
3181
- /* @__PURE__ */ M("div", {
3182
- className: "tp-omada-chart-axis-row",
3183
- children: [/* @__PURE__ */ j("span", { children: "0%" }), /* @__PURE__ */ j("span", {})]
3184
- }),
3185
- /* @__PURE__ */ M("div", {
3186
- className: "tp-omada-chart-axis-row",
3187
- style: { marginTop: 4 },
3188
- children: [/* @__PURE__ */ j("span", { children: v.start }), /* @__PURE__ */ j("span", { children: v.end })]
3189
- })
3190
- ]
3191
- })
3192
- ]
3193
- }),
3194
- /* @__PURE__ */ M("section", {
3195
- className: "tp-omada-card",
3196
- "aria-label": "Switch Health Trend",
3197
- children: [/* @__PURE__ */ j("div", {
3198
- className: "tp-omada-card-header",
3199
- children: /* @__PURE__ */ j("h3", {
3200
- className: "tp-omada-card-title",
3201
- children: "Switch Health Trend"
3202
- })
3203
- }), /* @__PURE__ */ M("div", {
3204
- className: "tp-omada-legend-row",
3205
- style: { marginTop: 8 },
3206
- children: [
3207
- /* @__PURE__ */ M("span", {
3208
- className: "tp-omada-legend-item",
3209
- children: [/* @__PURE__ */ j("span", {
3210
- className: "tp-omada-legend-dot",
3211
- style: { background: "var(--tp-color-green)" }
3212
- }), /* @__PURE__ */ j("span", { children: "Good" })]
3213
- }),
3214
- /* @__PURE__ */ M("span", {
3215
- className: "tp-omada-legend-item",
3216
- children: [/* @__PURE__ */ j("span", {
3217
- className: "tp-omada-legend-dot",
3218
- style: { background: "var(--tp-color-yellow)" }
3219
- }), /* @__PURE__ */ j("span", { children: "Fair" })]
3220
- }),
3221
- /* @__PURE__ */ M("span", {
3222
- className: "tp-omada-legend-item",
3223
- children: [/* @__PURE__ */ j("span", {
3224
- className: "tp-omada-legend-dot",
3225
- style: { background: "var(--tp-color-alert)" }
3226
- }), /* @__PURE__ */ j("span", { children: "Poor" })]
3227
- }),
3228
- /* @__PURE__ */ M("span", {
3229
- className: "tp-omada-legend-item",
3230
- children: [/* @__PURE__ */ j("span", {
3231
- className: "tp-omada-legend-dot",
3232
- style: { background: "var(--tp-text-disabled)" }
3233
- }), /* @__PURE__ */ j("span", { children: "No Data" })]
3234
- })
3235
- ]
3236
- })]
3237
- })
3238
- ] }),
3239
- a === "wireless" && /* @__PURE__ */ M("section", {
3240
- className: "tp-omada-card",
3241
- children: [
3242
- /* @__PURE__ */ j("h3", {
3243
- className: "tp-omada-card-title",
3244
- children: "Wi-Fi Channel Utilization"
3245
- }),
3246
- /* @__PURE__ */ j("div", {
3247
- className: "tp-omada-card-subtitle",
3248
- children: "EAP723 (2 APs active across 2.4 / 5 / 6 GHz)"
3249
- }),
3250
- /* @__PURE__ */ j("div", {
3251
- style: {
3252
- display: "flex",
3253
- flexDirection: "column",
3254
- gap: 12,
3255
- marginTop: 14
3256
- },
3257
- children: [
3258
- {
3259
- band: "2.4 GHz (Ch 6)",
3260
- util: 28,
3261
- color: "var(--tp-color-yellow)"
3262
- },
3263
- {
3264
- band: "5 GHz (Ch 36)",
3265
- util: 14,
3266
- color: "var(--tp-color-green)"
3267
- },
3268
- {
3269
- band: "6 GHz (Ch 37)",
3270
- util: 6,
3271
- color: "var(--tp-color-green)"
3272
- }
3273
- ].map((e) => /* @__PURE__ */ M("div", {
3274
- style: {
3275
- display: "flex",
3276
- flexDirection: "column",
3277
- gap: 5
3278
- },
3279
- children: [/* @__PURE__ */ M("div", {
3280
- className: "tp-omada-chart-axis-row",
3281
- children: [/* @__PURE__ */ j("span", { children: e.band }), /* @__PURE__ */ M("span", { children: [e.util, "%"] })]
3282
- }), /* @__PURE__ */ j("div", {
3283
- className: "tp-omada-health-bar-track",
3284
- style: { height: 7 },
3285
- children: /* @__PURE__ */ j("div", { style: {
3286
- width: `${e.util}%`,
3287
- height: "100%",
3288
- background: e.color,
3289
- borderRadius: 999
3290
- } })
3291
- })]
3292
- }, e.band))
3293
- })
3294
- ]
3295
- }),
3296
- a === "client" && /* @__PURE__ */ M("section", {
3297
- className: "tp-omada-card",
3298
- children: [
3299
- /* @__PURE__ */ j("h3", {
3300
- className: "tp-omada-card-title",
3301
- children: "Top Clients by Traffic"
3302
- }),
3303
- /* @__PURE__ */ M("div", {
3304
- className: "tp-omada-card-subtitle",
3305
- children: ["Active clients during ", v.label]
3306
- }),
3307
- /* @__PURE__ */ j("div", {
3308
- className: "tp-omada-isp-list",
3309
- children: [
3310
- {
3311
- name: "Mac (192.168.0.13)",
3312
- traffic: "1.84 GB"
3313
- },
3314
- {
3315
- name: "appleiPad (192.168.0.8)",
3316
- traffic: "642 MB"
3317
- },
3318
- {
3319
- name: "92-Sarabande (192.168.0.12)",
3320
- traffic: "118 MB"
3321
- },
3322
- {
3323
- name: "ChimePro-19 (192.168.0.11)",
3324
- traffic: "24 MB"
3325
- }
3326
- ].map((e) => /* @__PURE__ */ M("div", {
3327
- className: "tp-omada-isp-row",
3328
- children: [/* @__PURE__ */ j("span", { children: e.name }), /* @__PURE__ */ j("span", {
3329
- style: {
3330
- color: "var(--tp-color-green)",
3331
- fontWeight: 500
3332
- },
3333
- children: e.traffic
3334
- })]
3335
- }, e.name))
3336
- })
3337
- ]
3338
- }),
3339
- a === "apps" && /* @__PURE__ */ M("section", {
3340
- className: "tp-omada-card",
3341
- children: [
3342
- /* @__PURE__ */ j("h3", {
3343
- className: "tp-omada-card-title",
3344
- children: "Application Traffic"
3345
- }),
3346
- /* @__PURE__ */ j("div", {
3347
- className: "tp-omada-card-subtitle",
3348
- children: "DPI protocol classification"
3349
- }),
3350
- /* @__PURE__ */ j("div", {
3351
- className: "tp-omada-isp-list",
3352
- children: [
3353
- {
3354
- app: "HTTPS / TLS",
3355
- share: "54%"
3356
- },
3357
- {
3358
- app: "Video Streaming",
3359
- share: "24%"
3360
- },
3361
- {
3362
- app: "Cloud Backup",
3363
- share: "14%"
3364
- },
3365
- {
3366
- app: "DNS / NTP",
3367
- share: "8%"
3368
- }
3369
- ].map((e) => /* @__PURE__ */ M("div", {
3370
- className: "tp-omada-isp-row",
3371
- children: [/* @__PURE__ */ j("span", { children: e.app }), /* @__PURE__ */ j("span", {
3372
- style: { color: "var(--tp-text-secondary)" },
3373
- children: e.share
3374
- })]
3375
- }, e.app))
3376
- })
3377
- ]
3378
- })
3379
- ]
3380
- })
3381
- }),
3382
- n && /* @__PURE__ */ j("div", {
3383
- className: "tp-omada-standalone-tabbar",
3384
- children: /* @__PURE__ */ j(p, {
3385
- variant: "floating-pill",
3386
- items: B,
3387
- activeKey: e,
3388
- onChange: (e) => t?.(e)
3389
- })
3390
- })
3391
- ]
3392
- });
3393
- }, we = [{
3394
- key: "list",
3395
- label: "Device List"
3396
- }, {
3397
- key: "group",
3398
- label: "Device Group"
3399
- }], Te = ({ devices: e = V, activeTab: t = "devices", onTabChange: r, onSelectDevice: a, showTabBar: l = !0, className: u = "", style: d }) => {
3400
- let [m, h] = k(""), [g, _] = k("list"), [v, y] = k("all"), [b, C] = k("all"), [w, T] = k(!1), [E, O] = k(!1), [N, P] = k(!1), [F, I] = k("8C-86-DD-A6-A7-99"), L = [
3401
- {
3402
- key: "adopt",
3403
- label: "Batch Adopt"
3404
- },
3405
- {
3406
- key: "upgrade",
3407
- label: "Batch Upgrade"
3408
- },
3409
- {
3410
- key: "refresh",
3411
- label: "Refresh Device List"
3412
- }
3413
- ], R = D(() => {
3414
- let t = m.trim().toLowerCase();
3415
- return e.filter((e) => v !== "all" && e.type !== v || b === "connected" && e.status !== "connected" || b === "disconnected" && e.status !== "disconnected" || b === "upgrade" && !e.upgradeAvailable ? !1 : !t || e.mac.toLowerCase().includes(t) || e.model.toLowerCase().includes(t) || e.ip.toLowerCase().includes(t) || e.status.toLowerCase().includes(t));
3416
- }, [
3417
- e,
3418
- m,
3419
- v,
3420
- b
3421
- ]), H = b === "all" ? "All Status" : b === "connected" ? "Connected" : b === "upgrade" ? "Upgrade Ready" : "Disconnected";
3422
- return /* @__PURE__ */ M("div", {
3423
- className: `tp-omada-screen ${l ? "tp-omada-screen--standalone" : ""} ${u}`.trim(),
3424
- "data-testid": "omada-site-devices-page",
3425
- style: d,
3426
- children: [
3427
- /* @__PURE__ */ M("div", {
3428
- className: "tp-omada-header-wrap",
3429
- children: [/* @__PURE__ */ j(s, {
3430
- variant: "floating",
3431
- title: "Devices",
3432
- right: /* @__PURE__ */ M("div", {
3433
- className: "tp-omada-capsule-inner",
3434
- children: [/* @__PURE__ */ j("button", {
3435
- type: "button",
3436
- className: "tp-omada-glass-capsule-item",
3437
- "aria-label": "Add device",
3438
- onClick: () => P(!0),
3439
- children: /* @__PURE__ */ j(S, {
3440
- name: "nav-add",
3441
- size: 18
3442
- })
3443
- }), /* @__PURE__ */ j("button", {
3444
- type: "button",
3445
- className: "tp-omada-glass-capsule-item",
3446
- "aria-label": "More device actions",
3447
- onClick: () => O((e) => !e),
3448
- children: /* @__PURE__ */ j(S, {
3449
- name: "nav-more",
3450
- size: 18
3451
- })
3452
- })]
3453
- })
3454
- }), /* @__PURE__ */ j(x, {
3455
- open: E,
3456
- align: "right",
3457
- items: L,
3458
- onSelect: (e) => {
3459
- e.key === "upgrade" ? C("upgrade") : e.key === "refresh" && (y("all"), C("all"));
3460
- },
3461
- onClose: () => O(!1)
3462
- })]
3463
- }),
3464
- /* @__PURE__ */ j("div", {
3465
- className: "tp-omada-scroll",
3466
- children: /* @__PURE__ */ M("div", {
3467
- className: `tp-omada-body ${l ? "tp-omada-body--with-tabbar" : ""}`.trim(),
3468
- children: [
3469
- /* @__PURE__ */ j(o, {
3470
- value: m,
3471
- placeholder: "Search",
3472
- onChange: h,
3473
- onSearch: h
3474
- }),
3475
- /* @__PURE__ */ j(f, {
3476
- variant: "underline",
3477
- fullWidth: !0,
3478
- options: we,
3479
- value: g,
3480
- onChange: (e) => _(e)
3481
- }),
3482
- /* @__PURE__ */ M("div", {
3483
- className: "tp-omada-chip-row",
3484
- children: [/* @__PURE__ */ M("div", {
3485
- className: "tp-omada-chip-group",
3486
- children: [
3487
- /* @__PURE__ */ j(c, {
3488
- selected: v === "all",
3489
- onClick: () => y("all"),
3490
- children: "All"
3491
- }),
3492
- /* @__PURE__ */ j(c, {
3493
- selected: !0,
3494
- onClick: () => C((e) => e === "all" ? "upgrade" : e === "upgrade" ? "connected" : "all"),
3495
- children: H
3496
- }),
3497
- w && /* @__PURE__ */ M(A, { children: [
3498
- /* @__PURE__ */ j(c, {
3499
- selected: v === "gateway",
3500
- onClick: () => y("gateway"),
3501
- children: "Gateway"
3502
- }),
3503
- /* @__PURE__ */ j(c, {
3504
- selected: v === "switch",
3505
- onClick: () => y("switch"),
3506
- children: "Switch"
3507
- }),
3508
- /* @__PURE__ */ j(c, {
3509
- selected: v === "ap",
3510
- onClick: () => y("ap"),
3511
- children: "AP"
3512
- })
3513
- ] })
3514
- ]
3515
- }), /* @__PURE__ */ j("button", {
3516
- type: "button",
3517
- className: "tp-omada-chip-expand-btn",
3518
- "aria-label": w ? "Collapse filters" : "Expand filters",
3519
- onClick: () => T((e) => !e),
3520
- children: /* @__PURE__ */ j(S, {
3521
- name: w ? "arrow-arrow-sm-up" : "arrow-arrow-sm-down",
3522
- size: 18
3523
- })
3524
- })]
3525
- }),
3526
- /* @__PURE__ */ j(G, {
3527
- devices: R,
3528
- grouped: g === "group",
3529
- onSelectDevice: a
3530
- })
3531
- ]
3532
- })
3533
- }),
3534
- l && /* @__PURE__ */ j("div", {
3535
- className: "tp-omada-standalone-tabbar",
3536
- children: /* @__PURE__ */ j(p, {
3537
- variant: "floating-pill",
3538
- items: B,
3539
- activeKey: t,
3540
- onChange: (e) => r?.(e)
3541
- })
3542
- }),
3543
- /* @__PURE__ */ j(n, {
3544
- open: N,
3545
- title: "Adopt Standalone Device",
3546
- subtitle: "Enter MAC address or scan QR code on hardware label",
3547
- onClose: () => P(!1),
3548
- children: /* @__PURE__ */ M("div", {
3549
- style: {
3550
- display: "flex",
3551
- flexDirection: "column",
3552
- gap: 14
3553
- },
3554
- children: [/* @__PURE__ */ j(z, {
3555
- type: "mac",
3556
- label: "Device MAC Address",
3557
- value: F,
3558
- onChange: I
3559
- }), /* @__PURE__ */ j(i, {
3560
- variant: "primary",
3561
- block: !0,
3562
- onClick: () => P(!1),
3563
- children: "Discover & Adopt"
3564
- })]
3565
- })
3566
- })
3567
- ]
3568
- });
3569
- }, Ee = [
3570
- {
3571
- id: "cli-1",
3572
- name: "92-Sarabande",
3573
- ip: "192.168.0.12",
3574
- mac: "A4-83-E7-92-10-44",
3575
- rssiDbm: -28,
3576
- networkName: "Sara Banday",
3577
- status: "online",
3578
- linkType: "wireless",
3579
- customThumb: "thermostat"
3580
- },
3581
- {
3582
- id: "cli-2",
3583
- name: "ChimePro-19",
3584
- ip: "192.168.0.11",
3585
- mac: "5C-AA-FD-19-82-0B",
3586
- rssiDbm: -46,
3587
- networkName: "Sara Banday",
3588
- status: "online",
3589
- linkType: "wireless",
3590
- iconName: "client-other"
3591
- },
3592
- {
3593
- id: "cli-3",
3594
- name: "Mac",
3595
- ip: "192.168.0.13",
3596
- mac: "38-F9-D3-41-2C-8E",
3597
- rssiDbm: -73,
3598
- networkName: "Omada",
3599
- status: "online",
3600
- linkType: "wireless",
3601
- iconName: "client-macbook"
3602
- },
3603
- {
3604
- id: "cli-4",
3605
- name: "appleiPad",
3606
- ip: "192.168.0.8",
3607
- mac: "F0-98-9D-77-1B-C4",
3608
- rssiDbm: -74,
3609
- networkName: "Omada",
3610
- status: "online",
3611
- linkType: "wireless",
3612
- iconName: "client-pad"
3613
- }
3614
- ], De = () => /* @__PURE__ */ M("svg", {
3615
- width: "38",
3616
- height: "38",
3617
- viewBox: "0 0 40 40",
3618
- fill: "none",
3619
- "aria-hidden": "true",
3620
- children: [
3621
- /* @__PURE__ */ j("rect", {
3622
- x: "6",
3623
- y: "6",
3624
- width: "28",
3625
- height: "28",
3626
- rx: "6",
3627
- fill: "#E5E5EA"
3628
- }),
3629
- /* @__PURE__ */ j("rect", {
3630
- x: "12",
3631
- y: "11",
3632
- width: "16",
3633
- height: "12",
3634
- rx: "2",
3635
- fill: "#D1D1D6",
3636
- stroke: "#AEAEB2",
3637
- strokeWidth: "1"
3638
- }),
3639
- /* @__PURE__ */ j("text", {
3640
- x: "20",
3641
- y: "19",
3642
- textAnchor: "middle",
3643
- fill: "#3A3A3C",
3644
- fontSize: "6",
3645
- fontWeight: "600",
3646
- fontFamily: "sans-serif",
3647
- children: "24.0"
3648
- })
3649
- ]
3650
- }), Oe = [
3651
- {
3652
- key: "online",
3653
- label: "Online"
3654
- },
3655
- {
3656
- key: "offline",
3657
- label: "Offline"
3658
- },
3659
- {
3660
- key: "blocked",
3661
- label: "Blocked"
3662
- },
3663
- {
3664
- key: "all",
3665
- label: "All"
3666
- }
3667
- ], ke = ({ clients: e = Ee, activeTab: t = "clients", onTabChange: a, onSelectClient: u, showTabBar: m = !0, className: h = "", style: g }) => {
3668
- let [_, v] = k([...e]), [y, b] = k(""), [C, w] = k("online"), [T, E] = k("all"), [O, A] = k(!1), [N, P] = k(null), F = [{
3669
- key: "sort-signal",
3670
- label: "Sort by Signal Strength"
3671
- }, {
3672
- key: "reset-filters",
3673
- label: "Reset Filters"
3674
- }], I = D(() => {
3675
- let e = y.trim().toLowerCase();
3676
- return _.filter((t) => C !== "all" && t.status !== C || T !== "all" && t.linkType !== T ? !1 : !e || t.name.toLowerCase().includes(e) || t.ip.toLowerCase().includes(e) || t.networkName.toLowerCase().includes(e) || t.mac.toLowerCase().includes(e));
3677
- }, [
3678
- _,
3679
- y,
3680
- C,
3681
- T
3682
- ]), L = (e) => {
3683
- let t = e.status === "blocked" ? "online" : "blocked";
3684
- v((n) => n.map((n) => n.id === e.id ? {
3685
- ...n,
3686
- status: t
3687
- } : n)), P(null);
3688
- };
3689
- return /* @__PURE__ */ M("div", {
3690
- className: `tp-omada-screen ${m ? "tp-omada-screen--standalone" : ""} ${h}`.trim(),
3691
- "data-testid": "omada-site-clients-page",
3692
- style: g,
3693
- children: [
3694
- /* @__PURE__ */ M("div", {
3695
- className: "tp-omada-header-wrap",
3696
- children: [/* @__PURE__ */ j(s, {
3697
- variant: "floating",
3698
- title: "Clients",
3699
- right: /* @__PURE__ */ M("div", {
3700
- className: "tp-omada-capsule-inner",
3701
- children: [/* @__PURE__ */ j("button", {
3702
- type: "button",
3703
- className: "tp-omada-glass-capsule-item",
3704
- "aria-label": "Filter clients",
3705
- onClick: () => E((e) => e === "all" ? "wireless" : e === "wireless" ? "wired" : "all"),
3706
- children: /* @__PURE__ */ j(S, {
3707
- name: "filter",
3708
- size: 18
3709
- })
3710
- }), /* @__PURE__ */ j("button", {
3711
- type: "button",
3712
- className: "tp-omada-glass-capsule-item",
3713
- "aria-label": "More client options",
3714
- onClick: () => A((e) => !e),
3715
- children: /* @__PURE__ */ j(S, {
3716
- name: "nav-more",
3717
- size: 18
3718
- })
3719
- })]
3720
- })
3721
- }), /* @__PURE__ */ j(x, {
3722
- open: O,
3723
- align: "right",
3724
- items: F,
3725
- onSelect: (e) => {
3726
- e.key === "sort-signal" ? v((e) => [...e].sort((e, t) => (t.rssiDbm ?? -99) - (e.rssiDbm ?? -99))) : (E("all"), w("online"), b(""));
3727
- },
3728
- onClose: () => A(!1)
3729
- })]
3730
- }),
3731
- /* @__PURE__ */ j("div", {
3732
- className: "tp-omada-scroll",
3733
- children: /* @__PURE__ */ M("div", {
3734
- className: `tp-omada-body ${m ? "tp-omada-body--with-tabbar" : ""}`.trim(),
3735
- children: [
3736
- /* @__PURE__ */ j(o, {
3737
- value: y,
3738
- placeholder: "Search",
3739
- onChange: b,
3740
- onSearch: b
3741
- }),
3742
- /* @__PURE__ */ j(f, {
3743
- variant: "underline",
3744
- fullWidth: !0,
3745
- options: Oe,
3746
- value: C,
3747
- onChange: (e) => w(e)
3748
- }),
3749
- /* @__PURE__ */ M("div", {
3750
- className: "tp-omada-chip-group",
3751
- children: [
3752
- /* @__PURE__ */ j(c, {
3753
- selected: T === "all",
3754
- onClick: () => E("all"),
3755
- children: "All"
3756
- }),
3757
- /* @__PURE__ */ j(c, {
3758
- selected: T === "wired",
3759
- onClick: () => E("wired"),
3760
- children: "Wired"
3761
- }),
3762
- /* @__PURE__ */ j(c, {
3763
- selected: T === "wireless",
3764
- onClick: () => E("wireless"),
3765
- children: "Wireless"
3766
- })
3767
- ]
3768
- }),
3769
- I.length === 0 ? /* @__PURE__ */ j(r, {
3770
- illustration: "no-clients",
3771
- title: C === "blocked" ? "No Blocked Clients" : C === "offline" ? "No Offline Clients" : "No Matching Clients",
3772
- description: "Connected wired and wireless clients will appear here.",
3773
- compact: !0
3774
- }) : /* @__PURE__ */ j(d, {
3775
- divided: !0,
3776
- children: I.map((e) => {
3777
- let t = (e.rssiDbm ?? -40) <= -68 ? "var(--tp-color-yellow)" : "var(--tp-color-green)";
3778
- return /* @__PURE__ */ j(l, {
3779
- leading: e.customThumb === "thermostat" ? /* @__PURE__ */ j(De, {}) : e.iconName ? /* @__PURE__ */ j(S, {
3780
- name: e.iconName,
3781
- size: 38
3782
- }) : /* @__PURE__ */ j(S, {
3783
- name: "client-other",
3784
- size: 38
3785
- }),
3786
- title: e.name,
3787
- subtitle: e.ip,
3788
- trailing: /* @__PURE__ */ M("div", {
3789
- className: "tp-omada-row-metrics",
3790
- children: [/* @__PURE__ */ j("span", {
3791
- className: "tp-omada-status-line",
3792
- style: { color: t },
3793
- children: e.rssiDbm === void 0 ? e.status : `${e.rssiDbm} dBm`
3794
- }), /* @__PURE__ */ j("span", { children: e.networkName })]
3795
- }),
3796
- onClick: () => {
3797
- u?.(e), P(e);
3798
- }
3799
- }, e.id);
3800
- })
3801
- })
3802
- ]
3803
- })
3804
- }),
3805
- m && /* @__PURE__ */ j("div", {
3806
- className: "tp-omada-standalone-tabbar",
3807
- children: /* @__PURE__ */ j(p, {
3808
- variant: "floating-pill",
3809
- items: B,
3810
- activeKey: t,
3811
- onChange: (e) => a?.(e)
3812
- })
3813
- }),
3814
- /* @__PURE__ */ j(n, {
3815
- open: !!N,
3816
- title: N?.name,
3817
- subtitle: N ? `${N.ip} • ${N.mac}` : void 0,
3818
- onClose: () => P(null),
3819
- children: N && /* @__PURE__ */ M("div", {
3820
- style: {
3821
- display: "flex",
3822
- flexDirection: "column",
3823
- gap: 12
3824
- },
3825
- children: [/* @__PURE__ */ M(d, {
3826
- divided: !0,
3827
- children: [
3828
- /* @__PURE__ */ j(l, {
3829
- title: "Network / SSID",
3830
- value: N.networkName
3831
- }),
3832
- /* @__PURE__ */ j(l, {
3833
- title: "Signal Strength",
3834
- value: N.rssiDbm === void 0 ? "Wired" : `${N.rssiDbm} dBm`
3835
- }),
3836
- /* @__PURE__ */ j(l, {
3837
- title: "Status",
3838
- value: N.status
3839
- })
3840
- ]
3841
- }), /* @__PURE__ */ j(i, {
3842
- variant: N.status === "blocked" ? "primary" : "alert",
3843
- block: !0,
3844
- onClick: () => L(N),
3845
- children: N.status === "blocked" ? "Unblock Client" : "Block Client"
3846
- })]
3847
- })
3848
- })
3849
- ]
3850
- });
3851
- }, Ae = [
3852
- [
3853
- {
3854
- key: "internet",
3855
- label: "Internet Settings",
3856
- icon: "settings-internet-settings"
3857
- },
3858
- {
3859
- key: "lan",
3860
- label: "LAN Settings",
3861
- icon: "settings-lan-settings"
3862
- },
3863
- {
3864
- key: "wireless",
3865
- label: "Wireless Networks",
3866
- icon: "settings-wireless-settings"
3867
- }
3868
- ],
3869
- [
3870
- {
3871
- key: "vpn",
3872
- label: "VPN",
3873
- icon: "settings-vpn"
3874
- },
3875
- {
3876
- key: "security",
3877
- label: "Network Security",
3878
- icon: "settings-network-security"
3879
- },
3880
- {
3881
- key: "transmission",
3882
- label: "Transmission",
3883
- icon: "settings-transmission"
3884
- },
3885
- {
3886
- key: "authentication",
3887
- label: "Authentication",
3888
- icon: "settings-authentication"
3889
- },
3890
- {
3891
- key: "ddns",
3892
- label: "Dynamic DNS",
3893
- icon: "settings-ddns"
3894
- }
3895
- ],
3896
- [
3897
- {
3898
- key: "profiles",
3899
- label: "Profiles",
3900
- icon: "settings-groups"
3901
- },
3902
- {
3903
- key: "site",
3904
- label: "Site Settings",
3905
- icon: "settings-site-settings"
3906
- },
3907
- {
3908
- key: "schedule",
3909
- label: "Schedules",
3910
- icon: "nav-calendar"
3911
- },
3912
- {
3913
- key: "firmware",
3914
- label: "Firmware Updates",
3915
- icon: "nav-refresh"
3916
- }
3917
- ],
3918
- [{
3919
- key: "logs",
3920
- label: "Logs",
3921
- icon: "settings-log",
3922
- hasCount: !0
3923
- }]
3924
- ], je = ({ logsCount: e = 1, activeTab: t = "settings", onTabChange: i, onOpenWirelessNetworks: a, onOpenSchedule: c, onOpenFirmware: u, onOpenLogs: f, onSelectSetting: m, showTabBar: h = !0, className: g = "", style: _ }) => {
3925
- let [v, y] = k(""), [b, x] = k(!1), [C, w] = k(!1), [T, E] = k(!1), [O, A] = k(null), N = D(() => {
3926
- let e = v.trim().toLowerCase();
3927
- return e ? Ae.map((t) => t.filter((t) => t.label.toLowerCase().includes(e))).filter((e) => e.length > 0) : Ae;
3928
- }, [v]), P = (e) => {
3929
- m?.(e.key), e.key === "wireless" ? a ? a() : x(!0) : e.key === "schedule" ? c ? c() : w(!0) : e.key === "firmware" ? u ? u() : E(!0) : e.key === "logs" && f ? f() : A(e);
3930
- };
3931
- return /* @__PURE__ */ M("div", {
3932
- className: `tp-omada-screen ${h ? "tp-omada-screen--standalone" : ""} ${g}`.trim(),
3933
- "data-testid": "omada-site-settings-page",
3934
- style: _,
3935
- children: [
3936
- /* @__PURE__ */ j("div", {
3937
- className: "tp-omada-header-wrap",
3938
- children: /* @__PURE__ */ j(s, {
3939
- variant: "floating",
3940
- title: "Settings"
3941
- })
3942
- }),
3943
- /* @__PURE__ */ j("div", {
3944
- className: "tp-omada-scroll",
3945
- children: /* @__PURE__ */ M("div", {
3946
- className: `tp-omada-body ${h ? "tp-omada-body--with-tabbar" : ""}`.trim(),
3947
- children: [/* @__PURE__ */ j(o, {
3948
- value: v,
3949
- placeholder: "Search",
3950
- onChange: y,
3951
- onSearch: y
3952
- }), N.length === 0 ? /* @__PURE__ */ j(r, {
3953
- illustration: "no-search",
3954
- title: "No Matching Settings",
3955
- description: `No setting rows matched "${v}".`,
3956
- compact: !0
3957
- }) : N.map((t, n) => /* @__PURE__ */ j(d, {
3958
- divided: !0,
3959
- children: t.map((t) => /* @__PURE__ */ j(l, {
3960
- leading: /* @__PURE__ */ j("span", {
3961
- style: {
3962
- color: "var(--tp-text-primary)",
3963
- display: "inline-flex"
3964
- },
3965
- children: /* @__PURE__ */ j(S, {
3966
- name: t.icon,
3967
- size: 22
3968
- })
3969
- }),
3970
- title: t.label,
3971
- value: t.hasCount && e > 0 ? e : void 0,
3972
- arrow: !0,
3973
- onClick: () => P(t)
3974
- }, t.key))
3975
- }, n))]
3976
- })
3977
- }),
3978
- h && /* @__PURE__ */ j("div", {
3979
- className: "tp-omada-standalone-tabbar",
3980
- children: /* @__PURE__ */ j(p, {
3981
- variant: "floating-pill",
3982
- items: B,
3983
- activeKey: t,
3984
- onChange: (e) => i?.(e)
3985
- })
3986
- }),
3987
- /* @__PURE__ */ j(n, {
3988
- open: b,
3989
- title: "Wireless Networks",
3990
- subtitle: "Configure SSID & ACL",
3991
- onClose: () => x(!1),
3992
- children: /* @__PURE__ */ j(K, { showHeader: !1 })
3993
- }),
3994
- /* @__PURE__ */ j(n, {
3995
- open: C,
3996
- title: "Schedules",
3997
- subtitle: "WLAN • PoE • Reboot Policies",
3998
- onClose: () => w(!1),
3999
- children: /* @__PURE__ */ j(J, { showHeader: !1 })
4000
- }),
4001
- /* @__PURE__ */ j(n, {
4002
- open: T,
4003
- title: "Firmware Updates",
4004
- subtitle: "Site 92 • v1.3.2 Release",
4005
- onClose: () => E(!1),
4006
- children: /* @__PURE__ */ j(Z, { showHeader: !1 })
4007
- }),
4008
- /* @__PURE__ */ j(n, {
4009
- open: !!O,
4010
- title: O?.label,
4011
- subtitle: "Site 92 • Controller 62",
4012
- onClose: () => A(null),
4013
- children: O && /* @__PURE__ */ M(d, {
4014
- divided: !0,
4015
- children: [
4016
- /* @__PURE__ */ j(l, {
4017
- title: "Profile Status",
4018
- value: "Synced"
4019
- }),
4020
- /* @__PURE__ */ j(l, {
4021
- title: "Target Gateway",
4022
- value: "ER7212PC (192.168.0.1)"
4023
- }),
4024
- /* @__PURE__ */ j(l, {
4025
- title: "Managed APs",
4026
- value: "2 × EAP723"
4027
- })
4028
- ]
4029
- })
4030
- })
4031
- ]
4032
- });
4033
- }, Me = ({ siteName: e = "92", score: t = 100, deviceScore: n = 100, wifiScore: r = 100, wanScore: i = 100, onBack: a, className: o = "", style: c }) => {
4034
- let f = 2 * Math.PI * 46, p = Math.max(0, Math.min(100, t)), m = f * (1 - p / 100);
4035
- return /* @__PURE__ */ M("div", {
4036
- className: `tp-omada-screen ${o}`.trim(),
4037
- "data-testid": "omada-health-detail-page",
4038
- style: c,
4039
- children: [/* @__PURE__ */ j("div", {
4040
- className: "tp-omada-header-wrap",
4041
- children: /* @__PURE__ */ j(s, {
4042
- variant: "floating",
4043
- title: "Site Health Score",
4044
- subtitle: `Site ${e}`,
4045
- left: a ? /* @__PURE__ */ j("button", {
4046
- type: "button",
4047
- className: "tp-header-icon-btn",
4048
- "aria-label": "Back",
4049
- onClick: a,
4050
- children: /* @__PURE__ */ j(S, {
4051
- name: "nav-back",
4052
- size: 20
4053
- })
4054
- }) : void 0
4055
- })
4056
- }), /* @__PURE__ */ j("div", {
4057
- className: "tp-omada-scroll",
4058
- children: /* @__PURE__ */ M("div", {
4059
- className: "tp-omada-body",
4060
- children: [
4061
- /* @__PURE__ */ M("section", {
4062
- className: "tp-omada-card",
4063
- children: [/* @__PURE__ */ M("div", {
4064
- className: "tp-omada-gauge-wrap",
4065
- children: [/* @__PURE__ */ M("svg", {
4066
- width: "124",
4067
- height: "124",
4068
- viewBox: "0 0 120 120",
4069
- "aria-label": `Health score ${p}`,
4070
- children: [
4071
- /* @__PURE__ */ j("circle", {
4072
- cx: "60",
4073
- cy: "60",
4074
- r: 46,
4075
- fill: "none",
4076
- stroke: "var(--tp-divider)",
4077
- strokeWidth: "9"
4078
- }),
4079
- /* @__PURE__ */ j("circle", {
4080
- cx: "60",
4081
- cy: "60",
4082
- r: 46,
4083
- fill: "none",
4084
- stroke: "var(--tp-color-green)",
4085
- strokeWidth: "9",
4086
- strokeLinecap: "round",
4087
- strokeDasharray: f,
4088
- strokeDashoffset: m,
4089
- transform: "rotate(-90 60 60)"
4090
- }),
4091
- /* @__PURE__ */ j("text", {
4092
- x: "60",
4093
- y: "58",
4094
- textAnchor: "middle",
4095
- fill: "var(--tp-color-green)",
4096
- fontSize: "28",
4097
- fontWeight: "600",
4098
- children: p
4099
- }),
4100
- /* @__PURE__ */ j("text", {
4101
- x: "60",
4102
- y: "78",
4103
- textAnchor: "middle",
4104
- fill: "var(--tp-text-secondary)",
4105
- fontSize: "12",
4106
- children: "Good"
4107
- })
4108
- ]
4109
- }), /* @__PURE__ */ j("div", {
4110
- style: {
4111
- fontSize: 12,
4112
- color: "var(--tp-text-secondary)"
4113
- },
4114
- children: "Nov 23, 06:30 PM - Nov 23, 06:40 PM"
4115
- })]
4116
- }), /* @__PURE__ */ M("div", {
4117
- className: "tp-omada-health-subgrid",
4118
- children: [
4119
- /* @__PURE__ */ M("div", {
4120
- className: "tp-omada-health-subcard",
4121
- children: [/* @__PURE__ */ j("div", {
4122
- className: "tp-omada-health-subcard-label",
4123
- children: "Device"
4124
- }), /* @__PURE__ */ j("span", {
4125
- className: "tp-omada-health-subcard-num",
4126
- children: n
4127
- })]
4128
- }),
4129
- /* @__PURE__ */ M("div", {
4130
- className: "tp-omada-health-subcard",
4131
- children: [/* @__PURE__ */ j("div", {
4132
- className: "tp-omada-health-subcard-label",
4133
- children: "Wi-Fi"
4134
- }), /* @__PURE__ */ j("span", {
4135
- className: "tp-omada-health-subcard-num",
4136
- children: r
4137
- })]
4138
- }),
4139
- /* @__PURE__ */ M("div", {
4140
- className: "tp-omada-health-subcard",
4141
- children: [/* @__PURE__ */ j("div", {
4142
- className: "tp-omada-health-subcard-label",
4143
- children: "WAN"
4144
- }), /* @__PURE__ */ j("span", {
4145
- className: "tp-omada-health-subcard-num",
4146
- children: i
4147
- })]
4148
- })
4149
- ]
4150
- })]
4151
- }),
4152
- /* @__PURE__ */ M("section", {
4153
- className: "tp-omada-card",
4154
- children: [
4155
- /* @__PURE__ */ M("div", {
4156
- className: "tp-omada-card-header",
4157
- children: [/* @__PURE__ */ j("h3", {
4158
- className: "tp-omada-card-title",
4159
- children: "24-Hour Health Trend"
4160
- }), /* @__PURE__ */ j("span", {
4161
- style: {
4162
- fontSize: 12,
4163
- color: "var(--tp-color-green)"
4164
- },
4165
- children: "100 Avg"
4166
- })]
4167
- }),
4168
- /* @__PURE__ */ M("svg", {
4169
- viewBox: "0 0 320 80",
4170
- width: "100%",
4171
- height: "80",
4172
- preserveAspectRatio: "none",
4173
- style: {
4174
- display: "block",
4175
- marginTop: 10
4176
- },
4177
- "aria-label": "24-hour site health score chart",
4178
- children: [
4179
- /* @__PURE__ */ j("line", {
4180
- x1: "0",
4181
- y1: "10",
4182
- x2: "320",
4183
- y2: "10",
4184
- stroke: "var(--tp-omada-chart-grid)",
4185
- strokeDasharray: "3 3"
4186
- }),
4187
- /* @__PURE__ */ j("line", {
4188
- x1: "0",
4189
- y1: "42",
4190
- x2: "320",
4191
- y2: "42",
4192
- stroke: "var(--tp-omada-chart-grid)",
4193
- strokeDasharray: "3 3"
4194
- }),
4195
- /* @__PURE__ */ j("line", {
4196
- x1: "0",
4197
- y1: "74",
4198
- x2: "320",
4199
- y2: "74",
4200
- stroke: "var(--tp-omada-chart-grid)"
4201
- }),
4202
- /* @__PURE__ */ j("path", {
4203
- d: "M0,12 L110,12 L120,15 L132,12 L240,12 L252,14 L264,12 L320,12",
4204
- fill: "none",
4205
- stroke: "var(--tp-color-green)",
4206
- strokeWidth: "2.2"
4207
- })
4208
- ]
4209
- }),
4210
- /* @__PURE__ */ M("div", {
4211
- className: "tp-omada-chart-axis-row",
4212
- style: { marginTop: 4 },
4213
- children: [/* @__PURE__ */ j("span", { children: "Nov 22, 06:40 PM" }), /* @__PURE__ */ j("span", { children: "Nov 23, 06:40 PM" })]
4214
- })
4215
- ]
4216
- }),
4217
- /* @__PURE__ */ j(u, { title: "Diagnostic Checks" }),
4218
- /* @__PURE__ */ M(d, {
4219
- divided: !0,
4220
- children: [
4221
- /* @__PURE__ */ j(l, {
4222
- leading: /* @__PURE__ */ j(S, {
4223
- name: "status-success-solid",
4224
- size: 20
4225
- }),
4226
- title: "Gateway & AP Availability",
4227
- subtitle: "1 ER7212PC and 2 EAP723 online",
4228
- value: "100%"
4229
- }),
4230
- /* @__PURE__ */ j(l, {
4231
- leading: /* @__PURE__ */ j(S, {
4232
- name: "status-success-solid",
4233
- size: 20
4234
- }),
4235
- title: "Wi-Fi Interference & Retry Rate",
4236
- subtitle: "5 GHz / 6 GHz channels clear",
4237
- value: "98%"
4238
- }),
4239
- /* @__PURE__ */ j(l, {
4240
- leading: /* @__PURE__ */ j(S, {
4241
- name: "status-success-solid",
4242
- size: 20
4243
- }),
4244
- title: "WAN3 Latency & Packet Loss",
4245
- subtitle: "Ping 3 ms • 0.0% packet loss",
4246
- value: "100%"
4247
- })
4248
- ]
4249
- })
4250
- ]
4251
- })
4252
- })]
4253
- });
4254
- }, Ne = [
4255
- {
4256
- key: "overview",
4257
- label: "Overview"
4258
- },
4259
- {
4260
- key: "ports",
4261
- label: "Ports"
4262
- },
4263
- {
4264
- key: "config",
4265
- label: "Config"
4266
- }
4267
- ];
4268
- function Pe(e) {
4269
- return e.type === "ap" ? [{
4270
- id: "eth1",
4271
- label: "ETH1 (2.5G)",
4272
- icon: "port-poe",
4273
- link: "2500M Full",
4274
- poe: "12.4 W (802.3at)",
4275
- vlan: "VLAN 1, 10",
4276
- rx: "4.12 GB",
4277
- tx: "1.88 GB"
4278
- }, {
4279
- id: "eth2",
4280
- label: "ETH2",
4281
- icon: "port-lan",
4282
- link: "Link Down",
4283
- poe: "Disabled",
4284
- vlan: "VLAN 1",
4285
- rx: "0 B",
4286
- tx: "0 B"
4287
- }] : [
4288
- {
4289
- id: "sfp1",
4290
- label: "SFP1",
4291
- icon: "port-sfp2",
4292
- link: "Link Down",
4293
- poe: "N/A",
4294
- vlan: "WAN1",
4295
- rx: "0 B",
4296
- tx: "0 B"
4297
- },
4298
- {
4299
- id: "sfp2",
4300
- label: "SFP2",
4301
- icon: "port-sfp2",
4302
- link: "Link Down",
4303
- poe: "N/A",
4304
- vlan: "WAN2",
4305
- rx: "0 B",
4306
- tx: "0 B"
4307
- },
4308
- {
4309
- id: "wan3",
4310
- label: "WAN3",
4311
- icon: "port-wan",
4312
- link: "1000M Full",
4313
- poe: "N/A",
4314
- vlan: "ISP WAN3",
4315
- rx: "18.6 GB",
4316
- tx: "6.4 GB"
4317
- },
4318
- {
4319
- id: "lan4",
4320
- label: "WAN/LAN4",
4321
- icon: "port-lan",
4322
- link: "1000M Full",
4323
- poe: "N/A",
4324
- vlan: "LAN",
4325
- rx: "2.1 GB",
4326
- tx: "1.9 GB"
4327
- },
4328
- {
4329
- id: "lan5",
4330
- label: "LAN5",
4331
- icon: "port-poe",
4332
- link: "1000M Full",
4333
- poe: "12.4 W",
4334
- vlan: "Trunk (1,10)",
4335
- rx: "1.8 GB",
4336
- tx: "4.1 GB"
4337
- },
4338
- {
4339
- id: "lan6",
4340
- label: "LAN6",
4341
- icon: "port-poe",
4342
- link: "1000M Full",
4343
- poe: "11.8 W",
4344
- vlan: "Trunk (1,10)",
4345
- rx: "1.2 GB",
4346
- tx: "2.7 GB"
4347
- },
4348
- {
4349
- id: "lan7",
4350
- label: "LAN7",
4351
- icon: "port-lan",
4352
- link: "Link Down",
4353
- poe: "0 W",
4354
- vlan: "VLAN 1",
4355
- rx: "0 B",
4356
- tx: "0 B"
4357
- },
4358
- {
4359
- id: "lan8",
4360
- label: "LAN8",
4361
- icon: "port-lan",
4362
- link: "Link Down",
4363
- poe: "0 W",
4364
- vlan: "VLAN 1",
4365
- rx: "0 B",
4366
- tx: "0 B"
4367
- }
4368
- ];
4369
- }
4370
- var $ = ({ device: e = V[1], onBack: t, onSaveConfig: r, className: o = "", style: c }) => {
4371
- let [p, m] = k("overview"), h = D(() => Pe(e), [e]), [g, _] = k(h[0]?.id ?? "eth1"), [v, y] = k(e.name ?? e.mac), [b, x] = k(e.ip), [w, T] = k(e.mac), [E, O] = k("443"), [N, P] = k(!0), [F, I] = k(!1), [L, R] = k(!1), [B, U] = k(!1), W = h.find((e) => e.id === g) ?? h[0];
4372
- return /* @__PURE__ */ M("div", {
4373
- className: `tp-omada-screen ${o}`.trim(),
4374
- "data-testid": "omada-device-detail-page",
4375
- style: c,
4376
- children: [
4377
- /* @__PURE__ */ M("div", {
4378
- className: "tp-omada-header-wrap",
4379
- children: [/* @__PURE__ */ j(s, {
4380
- variant: "floating",
4381
- title: v,
4382
- subtitle: `${e.model} • ${e.ip}`,
4383
- left: t ? /* @__PURE__ */ j("button", {
4384
- type: "button",
4385
- className: "tp-header-icon-btn",
4386
- "aria-label": "Back",
4387
- onClick: t,
4388
- children: /* @__PURE__ */ j(S, {
4389
- name: "nav-back",
4390
- size: 20
4391
- })
4392
- }) : void 0,
4393
- right: /* @__PURE__ */ j("button", {
4394
- type: "button",
4395
- className: "tp-header-icon-btn",
4396
- "aria-label": "Upgrade firmware",
4397
- onClick: () => {
4398
- U(!1), R(!0);
4399
- },
4400
- children: /* @__PURE__ */ j(S, {
4401
- name: "nav-refresh",
4402
- size: 19
4403
- })
4404
- })
4405
- }), /* @__PURE__ */ j("div", {
4406
- className: "tp-omada-header-subbar",
4407
- children: /* @__PURE__ */ j(f, {
4408
- variant: "underline",
4409
- fullWidth: !0,
4410
- options: Ne,
4411
- value: p,
4412
- onChange: (e) => m(e)
4413
- })
4414
- })]
4415
- }),
4416
- /* @__PURE__ */ j("div", {
4417
- className: "tp-omada-scroll",
4418
- children: /* @__PURE__ */ M("div", {
4419
- className: "tp-omada-body tp-omada-body--with-subbar",
4420
- children: [
4421
- p === "overview" && /* @__PURE__ */ M(A, { children: [
4422
- /* @__PURE__ */ M("section", {
4423
- className: "tp-omada-card",
4424
- children: [/* @__PURE__ */ M("div", {
4425
- style: {
4426
- display: "flex",
4427
- alignItems: "center",
4428
- gap: 14
4429
- },
4430
- children: [
4431
- /* @__PURE__ */ j(H, {
4432
- type: e.type,
4433
- size: 48
4434
- }),
4435
- /* @__PURE__ */ M("div", {
4436
- style: {
4437
- flex: 1,
4438
- minWidth: 0
4439
- },
4440
- children: [/* @__PURE__ */ j("div", {
4441
- style: {
4442
- fontSize: 16,
4443
- fontWeight: 600
4444
- },
4445
- children: e.model
4446
- }), /* @__PURE__ */ M("div", {
4447
- style: {
4448
- fontSize: 13,
4449
- color: "var(--tp-text-secondary)",
4450
- marginTop: 2
4451
- },
4452
- children: ["MAC: ", e.mac]
4453
- })]
4454
- }),
4455
- /* @__PURE__ */ j("span", {
4456
- className: "tp-omada-status-line tp-omada-status-line--good",
4457
- children: "Connected"
4458
- })
4459
- ]
4460
- }), e.upgradeAvailable && /* @__PURE__ */ j("div", {
4461
- style: { marginTop: 14 },
4462
- children: /* @__PURE__ */ j(i, {
4463
- variant: "primary",
4464
- size: "md",
4465
- block: !0,
4466
- onClick: () => {
4467
- U(!1), R(!0);
4468
- },
4469
- children: `Upgrade Firmware (${e.firmwareVersion ?? "v1.2.0"} → ${e.targetVersion ?? "v1.3.2"})`
4470
- })
4471
- })]
4472
- }),
4473
- /* @__PURE__ */ j(u, { title: "Device Telemetry" }),
4474
- /* @__PURE__ */ M(d, {
4475
- divided: !0,
4476
- children: [
4477
- /* @__PURE__ */ j(l, {
4478
- title: "IP Address",
4479
- value: b
4480
- }),
4481
- /* @__PURE__ */ j(l, {
4482
- title: "Health",
4483
- value: e.healthLabel
4484
- }),
4485
- /* @__PURE__ */ j(l, {
4486
- title: "Firmware Version",
4487
- value: B ? e.targetVersion ?? "v1.3.2" : e.firmwareVersion ?? "v6.3.0.63"
4488
- }),
4489
- /* @__PURE__ */ j(l, {
4490
- title: "Uptime",
4491
- value: e.uptime ?? "14d 11h 09m"
4492
- }),
4493
- /* @__PURE__ */ j(l, {
4494
- title: "CPU Utilization",
4495
- value: `${e.cpuPct ?? 5}%`
4496
- }),
4497
- /* @__PURE__ */ j(l, {
4498
- title: "Memory Utilization",
4499
- value: `${e.memoryPct ?? 39}%`
4500
- })
4501
- ]
4502
- })
4503
- ] }),
4504
- p === "ports" && (e.type === "ap" ? /* @__PURE__ */ M(A, { children: [
4505
- /* @__PURE__ */ j(u, { title: "Select a Port to Inspect" }),
4506
- /* @__PURE__ */ j("section", {
4507
- className: "tp-omada-card",
4508
- children: /* @__PURE__ */ j("div", {
4509
- className: "tp-omada-port-grid",
4510
- children: h.map((e) => {
4511
- let t = e.id === W.id;
4512
- return /* @__PURE__ */ M("button", {
4513
- type: "button",
4514
- className: `tp-omada-port-tile ${t ? "tp-omada-port-tile--active" : ""}`.trim(),
4515
- onClick: () => _(e.id),
4516
- children: [
4517
- /* @__PURE__ */ j(S, {
4518
- name: e.icon,
4519
- size: 20
4520
- }),
4521
- /* @__PURE__ */ j("span", {
4522
- style: { fontWeight: 500 },
4523
- children: e.label
4524
- }),
4525
- /* @__PURE__ */ j("span", {
4526
- style: {
4527
- fontSize: 10,
4528
- color: "var(--tp-text-secondary)"
4529
- },
4530
- children: e.link === "Link Down" ? "Down" : "Up"
4531
- })
4532
- ]
4533
- }, e.id);
4534
- })
4535
- })
4536
- }),
4537
- W && /* @__PURE__ */ M("section", {
4538
- className: "tp-omada-card",
4539
- "aria-label": "Selected Port Details",
4540
- children: [/* @__PURE__ */ M("div", {
4541
- style: {
4542
- display: "flex",
4543
- alignItems: "center",
4544
- gap: 12,
4545
- marginBottom: 10
4546
- },
4547
- children: [/* @__PURE__ */ j(C, {
4548
- name: "port-card-expand",
4549
- width: 76,
4550
- height: 76,
4551
- playing: !0
4552
- }, W.id), /* @__PURE__ */ M("div", {
4553
- style: { flex: 1 },
4554
- children: [
4555
- /* @__PURE__ */ j("div", {
4556
- style: {
4557
- fontSize: 16,
4558
- fontWeight: 600
4559
- },
4560
- children: W.label
4561
- }),
4562
- /* @__PURE__ */ j("div", {
4563
- style: {
4564
- fontSize: 13,
4565
- color: "var(--tp-color-green)",
4566
- marginTop: 2
4567
- },
4568
- children: W.link
4569
- }),
4570
- /* @__PURE__ */ M("div", {
4571
- style: {
4572
- fontSize: 12,
4573
- color: "var(--tp-text-secondary)",
4574
- marginTop: 2
4575
- },
4576
- children: [
4577
- W.vlan,
4578
- " • PoE: ",
4579
- W.poe
4580
- ]
4581
- })
4582
- ]
4583
- })]
4584
- }), /* @__PURE__ */ M(d, {
4585
- divided: !0,
4586
- children: [/* @__PURE__ */ j(l, {
4587
- title: "Rx Bytes",
4588
- value: W.rx
4589
- }), /* @__PURE__ */ j(l, {
4590
- title: "Tx Bytes",
4591
- value: W.tx
4592
- })]
4593
- })]
4594
- })
4595
- ] }) : /* @__PURE__ */ j(Y, {
4596
- showHeader: !1,
4597
- deviceModel: e.model
4598
- })),
4599
- p === "config" && /* @__PURE__ */ M(A, { children: [
4600
- /* @__PURE__ */ j(u, { title: "Static IP & Management" }),
4601
- /* @__PURE__ */ M(d, {
4602
- divided: !0,
4603
- children: [/* @__PURE__ */ M("div", {
4604
- style: {
4605
- padding: "12px 16px",
4606
- display: "flex",
4607
- flexDirection: "column",
4608
- gap: 14
4609
- },
4610
- children: [
4611
- /* @__PURE__ */ j(z, {
4612
- type: "text",
4613
- label: "Device Name",
4614
- value: v,
4615
- onChange: y
4616
- }),
4617
- /* @__PURE__ */ j(z, {
4618
- type: "ip",
4619
- label: "Static IP Address",
4620
- value: b,
4621
- onChange: x
4622
- }),
4623
- /* @__PURE__ */ j(z, {
4624
- type: "mac",
4625
- label: "Management MAC",
4626
- value: w,
4627
- onChange: T
4628
- }),
4629
- /* @__PURE__ */ j(z, {
4630
- type: "port",
4631
- label: "Management Port",
4632
- value: E,
4633
- onChange: O
4634
- })
4635
- ]
4636
- }), /* @__PURE__ */ j(l, {
4637
- title: "Device LED",
4638
- subtitle: N ? "Status LED On" : "Status LED Off",
4639
- trailing: /* @__PURE__ */ j(a, {
4640
- checked: N,
4641
- onChange: P,
4642
- ariaLabel: "Device LED"
4643
- })
4644
- })]
4645
- }),
4646
- /* @__PURE__ */ j(i, {
4647
- variant: "primary",
4648
- block: !0,
4649
- onClick: () => {
4650
- I(!0), r?.({
4651
- ...e,
4652
- name: v,
4653
- ip: b,
4654
- mac: w
4655
- });
4656
- },
4657
- children: "Save Configuration"
4658
- }),
4659
- F && /* @__PURE__ */ M("div", {
4660
- style: {
4661
- padding: "10px 12px",
4662
- borderRadius: 8,
4663
- background: "var(--tp-focus-10)",
4664
- color: "var(--tp-focus)",
4665
- fontSize: 13,
4666
- textAlign: "center"
4667
- },
4668
- children: [
4669
- "Saved configuration for ",
4670
- v,
4671
- " (",
4672
- b,
4673
- ")"
4674
- ]
4675
- })
4676
- ] })
4677
- ]
4678
- })
4679
- }),
4680
- /* @__PURE__ */ j(n, {
4681
- open: L,
4682
- title: B ? "Firmware Up to Date" : `Upgrade ${e.model}`,
4683
- subtitle: `${e.firmwareVersion ?? "v1.2.0"} → ${e.targetVersion ?? "v1.3.2"}`,
4684
- onClose: () => R(!1),
4685
- children: /* @__PURE__ */ M("div", {
4686
- style: {
4687
- display: "flex",
4688
- flexDirection: "column",
4689
- alignItems: "center",
4690
- gap: 14,
4691
- padding: "8px 0 12px"
4692
- },
4693
- children: [
4694
- /* @__PURE__ */ j(C, {
4695
- name: "update-network",
4696
- width: 112,
4697
- height: 112,
4698
- playing: !B
4699
- }),
4700
- /* @__PURE__ */ j("div", {
4701
- style: {
4702
- fontSize: 14,
4703
- textAlign: "center",
4704
- color: "var(--tp-text-secondary-alt)"
4705
- },
4706
- children: B ? `${e.model} (${e.mac}) is now running ${e.targetVersion ?? "v1.3.2"}.` : `Downloading and verifying signed firmware image for ${e.mac}…`
4707
- }),
4708
- B ? /* @__PURE__ */ j(i, {
4709
- variant: "secondary",
4710
- block: !0,
4711
- onClick: () => R(!1),
4712
- children: "Done"
4713
- }) : /* @__PURE__ */ j(i, {
4714
- variant: "primary",
4715
- block: !0,
4716
- onClick: () => U(!0),
4717
- children: "Apply Firmware Update"
4718
- })
4719
- ]
4720
- })
4721
- })
4722
- ]
4723
- });
4724
- }, Fe = [
4725
- "launch",
4726
- "dashboard",
4727
- "insights",
4728
- "devices",
4729
- "clients",
4730
- "settings"
4731
- ], Ie = [
4732
- {
4733
- key: "speed",
4734
- label: "Speed Test",
4735
- icon: "tool-speed-test",
4736
- summary: "WAN3: 942 Mbps ↓ / 418 Mbps ↑"
4737
- },
4738
- {
4739
- key: "ping",
4740
- label: "Ping Test",
4741
- icon: "tool-ping-test",
4742
- summary: "1.1.1.1 avg 3.2 ms • 0% loss"
4743
- },
4744
- {
4745
- key: "tracert",
4746
- label: "Traceroute",
4747
- icon: "tool-tracert",
4748
- summary: "4 hops to edge POP (3.4 ms)"
4749
- },
4750
- {
4751
- key: "wifi-scan",
4752
- label: "Wi-Fi Scan",
4753
- icon: "tool-wi-fi-scan",
4754
- summary: "5 GHz Ch 36 optimal (12% util)"
4755
- },
4756
- {
4757
- key: "roaming",
4758
- label: "Roaming Test",
4759
- icon: "tool-roaming-test",
4760
- summary: "802.11k/v/r fast transition < 18 ms"
4761
- },
4762
- {
4763
- key: "iface",
4764
- label: "Port Detect",
4765
- icon: "tool-interface-detection",
4766
- summary: "ER7212PC WAN3 1000M Full"
4767
- }
4768
- ], Le = ({ initialScreen: t = "dashboard", screen: r, onScreenChange: i, device: a = "iphone16pro", showFrame: o = !0, className: s = "", style: c }) => {
4769
- let [l, u] = k(t), d = r ?? l, [f, m] = k("92"), [h, _] = k("62"), [v, y] = k(V[0]), [b, x] = k(1), [C, w] = k("dashboard"), [T, E] = k(!1), [D, O] = k(null), N = (e) => {
4770
- w(d), r === void 0 && u(e), i?.(e);
4771
- }, P = Fe.includes(d);
4772
- return /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ j(g, {
4773
- device: a,
4774
- showFrame: o,
4775
- overlayTop: !0,
4776
- overlayBottom: P,
4777
- className: s,
4778
- style: c,
4779
- statusBar: /* @__PURE__ */ j(e, {
4780
- time: "10:51",
4781
- transparent: !0,
4782
- muted: d !== "controllers",
4783
- locationActive: d === "controllers"
4784
- }),
4785
- floatingAction: d === "launch" || d === "dashboard" ? /* @__PURE__ */ j("button", {
4786
- type: "button",
4787
- className: "tp-omada-fab",
4788
- "aria-label": "Network Toolkit",
4789
- onClick: () => E(!0),
4790
- children: /* @__PURE__ */ j(S, {
4791
- name: "settings-network-tools",
4792
- size: 22,
4793
- color: "#FFFFFF"
4794
- })
4795
- }) : void 0,
4796
- bottomBar: P ? /* @__PURE__ */ j(p, {
4797
- variant: "floating-pill",
4798
- items: B,
4799
- activeKey: d === "launch" ? "dashboard" : d,
4800
- onChange: (e) => N(e)
4801
- }) : void 0,
4802
- children: (() => {
4803
- switch (d) {
4804
- case "launch": return /* @__PURE__ */ j(de, {
4805
- siteName: f,
4806
- controllerName: h,
4807
- showTabBar: !1,
4808
- showFloatingAction: !1,
4809
- onBackToGlobal: () => N("controllers"),
4810
- onOpenLogs: () => N("incidents"),
4811
- onUpgrade: () => N("dashboard"),
4812
- onTabChange: (e) => N(e)
4813
- });
4814
- case "controllers": return /* @__PURE__ */ j(ge, { onSelectController: (e) => {
4815
- _(e.name), N("dashboard");
4816
- } });
4817
- case "dashboard": return /* @__PURE__ */ j(ye, {
4818
- siteName: f,
4819
- controllerName: h,
4820
- unreadLogsCount: b,
4821
- showTabBar: !1,
4822
- showFloatingAction: !1,
4823
- onSiteChange: m,
4824
- onBackToGlobal: () => N("controllers"),
4825
- onOpenLogs: () => N("incidents"),
4826
- onOpenHealthDetail: () => N("health-detail"),
4827
- onOpenInsights: () => N("insights"),
4828
- onOpenDevices: () => N("devices"),
4829
- onOpenClients: () => N("clients")
4830
- });
4831
- case "insights": return /* @__PURE__ */ j(Ce, { showTabBar: !1 });
4832
- case "devices": return /* @__PURE__ */ j(Te, {
4833
- showTabBar: !1,
4834
- onSelectDevice: (e) => {
4835
- y(e), N("device-detail");
4836
- }
4837
- });
4838
- case "clients": return /* @__PURE__ */ j(ke, { showTabBar: !1 });
4839
- case "settings": return /* @__PURE__ */ j(je, {
4840
- logsCount: b,
4841
- showTabBar: !1,
4842
- onOpenWirelessNetworks: () => N("wireless-settings"),
4843
- onOpenSchedule: () => N("schedule"),
4844
- onOpenFirmware: () => N("firmware"),
4845
- onOpenLogs: () => N("incidents")
4846
- });
4847
- case "health-detail": return /* @__PURE__ */ j(Me, {
4848
- siteName: f,
4849
- onBack: () => N("dashboard")
4850
- });
4851
- case "device-detail": return /* @__PURE__ */ j($, {
4852
- device: v,
4853
- onBack: () => N("devices")
4854
- });
4855
- case "wireless-settings": return /* @__PURE__ */ j(K, { onBack: () => N("settings") });
4856
- case "incidents": return /* @__PURE__ */ j(ie, {
4857
- onUnreadCountChange: x,
4858
- onBack: () => N(C === "settings" ? "settings" : "dashboard")
4859
- });
4860
- case "schedule": return /* @__PURE__ */ j(J, { onBack: () => N("settings") });
4861
- case "firmware": return /* @__PURE__ */ j(Z, { onBack: () => N("settings") });
4862
- case "topology": return /* @__PURE__ */ j(X, {
4863
- siteName: f,
4864
- showHeader: !0,
4865
- onBack: () => N("dashboard")
4866
- });
4867
- case "port-panel": return /* @__PURE__ */ j(Y, {
4868
- deviceModel: "ER7212PC",
4869
- showHeader: !0,
4870
- onBack: () => N("devices")
4871
- });
4872
- default: return null;
4873
- }
4874
- })()
4875
- }), /* @__PURE__ */ j(n, {
4876
- open: T,
4877
- title: "Network Toolkit",
4878
- subtitle: `Diagnostics for Site ${f}`,
4879
- onClose: () => E(!1),
4880
- children: /* @__PURE__ */ M("div", {
4881
- style: {
4882
- display: "flex",
4883
- flexDirection: "column",
4884
- gap: 12
4885
- },
4886
- children: [/* @__PURE__ */ j("div", {
4887
- className: "tp-omada-tool-grid",
4888
- children: Ie.map((e) => /* @__PURE__ */ M("button", {
4889
- type: "button",
4890
- className: "tp-omada-tool-tile",
4891
- onClick: () => O(`${e.label}: ${e.summary}`),
4892
- children: [/* @__PURE__ */ j(S, {
4893
- name: e.icon,
4894
- size: 30
4895
- }), /* @__PURE__ */ j("span", { children: e.label })]
4896
- }, e.key))
4897
- }), D && /* @__PURE__ */ j("div", {
4898
- style: {
4899
- padding: "10px 12px",
4900
- borderRadius: 8,
4901
- background: "var(--tp-focus-10)",
4902
- color: "var(--tp-focus)",
4903
- fontSize: 13
4904
- },
4905
- children: D
4906
- })]
4907
- })
4908
- })] });
4909
- };
4910
- export { K as C, H as D, G as E, z as O, ie as S, B as T, se as _, Ee as a, J as b, Ce as c, ge as d, de as f, X as g, le as h, je as i, ye as l, Z as m, $ as n, ke as o, ue as p, Me as r, Te as s, Le as t, fe as u, Y as v, V as w, q as x, ae as y };