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