@kiteapps/lite-ui 0.0.0-stage → 0.1.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.
- package/README.md +114 -2
- package/dist/index.cjs +792 -0
- package/dist/index.css +2070 -0
- package/dist/index.mjs +760 -0
- package/dist/pages.cjs +1319 -0
- package/dist/pages.css +2070 -0
- package/dist/pages.mjs +1287 -0
- package/package.json +53 -4
package/dist/pages.mjs
ADDED
|
@@ -0,0 +1,1287 @@
|
|
|
1
|
+
// src/pages/DashboardPage.jsx
|
|
2
|
+
import React6, { useState as useState6 } from "react";
|
|
3
|
+
|
|
4
|
+
// src/widgets/Primitives.jsx
|
|
5
|
+
import React, { useId, useState } from "react";
|
|
6
|
+
import { CircleHelp, Info, X } from "lucide-react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
function Button({ children, variant = "neutral", icon: Icon, className = "", ...props }) {
|
|
9
|
+
return /* @__PURE__ */ jsxs("button", { className: `ad-button ad-button--${variant} ${className}`, ...props, children: [
|
|
10
|
+
Icon && /* @__PURE__ */ jsx(Icon, { size: 13, strokeWidth: 1.8 }),
|
|
11
|
+
children
|
|
12
|
+
] });
|
|
13
|
+
}
|
|
14
|
+
function IconButton({ icon: Icon, label, ...props }) {
|
|
15
|
+
return /* @__PURE__ */ jsx("button", { type: "button", className: "ad-icon-button", "aria-label": label, title: label, ...props, children: /* @__PURE__ */ jsx(Icon, { size: 15, strokeWidth: 1.8 }) });
|
|
16
|
+
}
|
|
17
|
+
function TextField({ label, hint, id, className = "", ...props }) {
|
|
18
|
+
const generated = useId();
|
|
19
|
+
const inputId = id || generated;
|
|
20
|
+
return /* @__PURE__ */ jsxs("div", { className: `ad-field ${className}`, children: [
|
|
21
|
+
label && /* @__PURE__ */ jsx("label", { htmlFor: inputId, children: label }),
|
|
22
|
+
/* @__PURE__ */ jsx("input", { id: inputId, className: "ad-input", ...props }),
|
|
23
|
+
hint && /* @__PURE__ */ jsx("span", { className: "ad-hint", children: hint })
|
|
24
|
+
] });
|
|
25
|
+
}
|
|
26
|
+
function CheckRow({ children, defaultChecked = false, checked, onChange, disabled = false, help, className = "" }) {
|
|
27
|
+
const [local, setLocal] = useState(defaultChecked);
|
|
28
|
+
const isChecked = checked === void 0 ? local : checked;
|
|
29
|
+
return /* @__PURE__ */ jsxs("label", { className: `ad-check-row ${disabled ? "is-disabled" : ""} ${className}`, children: [
|
|
30
|
+
/* @__PURE__ */ jsx("input", { type: "checkbox", checked: isChecked, disabled, onChange: (e) => {
|
|
31
|
+
setLocal(e.target.checked);
|
|
32
|
+
onChange?.(e.target.checked);
|
|
33
|
+
} }),
|
|
34
|
+
/* @__PURE__ */ jsx("span", { className: "ad-check-box", "aria-hidden": "true" }),
|
|
35
|
+
/* @__PURE__ */ jsx("span", { children }),
|
|
36
|
+
help && /* @__PURE__ */ jsx(HelpTip, { text: help })
|
|
37
|
+
] });
|
|
38
|
+
}
|
|
39
|
+
function RadioRow({ name, value, checked, onChange, children, disabled }) {
|
|
40
|
+
return /* @__PURE__ */ jsxs("label", { className: `ad-radio-row ${disabled ? "is-disabled" : ""}`, children: [
|
|
41
|
+
/* @__PURE__ */ jsx("input", { type: "radio", name, value, checked, disabled, onChange: () => onChange?.(value) }),
|
|
42
|
+
/* @__PURE__ */ jsx("span", { className: "ad-radio-mark", "aria-hidden": "true" }),
|
|
43
|
+
children
|
|
44
|
+
] });
|
|
45
|
+
}
|
|
46
|
+
function HelpTip({ text }) {
|
|
47
|
+
return /* @__PURE__ */ jsx("span", { className: "ad-help", title: text, "aria-label": text, children: /* @__PURE__ */ jsx(CircleHelp, { size: 12 }) });
|
|
48
|
+
}
|
|
49
|
+
function TextLink({ children, onClick, ...props }) {
|
|
50
|
+
return /* @__PURE__ */ jsx("button", { type: "button", className: "ad-text-link", onClick, ...props, children });
|
|
51
|
+
}
|
|
52
|
+
function Tabs({ tabs = [], active, onChange, ariaLabel = "Tabs" }) {
|
|
53
|
+
return /* @__PURE__ */ jsx("div", { className: "ad-tabs", role: "tablist", "aria-label": ariaLabel, children: tabs.map((raw) => {
|
|
54
|
+
const tab = typeof raw === "string" ? { id: raw, label: raw } : raw;
|
|
55
|
+
return /* @__PURE__ */ jsx("button", { type: "button", className: `ad-tab ${tab.id === active ? "is-active" : ""}`, role: "tab", "aria-selected": tab.id === active, onClick: () => onChange?.(tab.id, tab), children: tab.label }, tab.id);
|
|
56
|
+
}) });
|
|
57
|
+
}
|
|
58
|
+
function PageHeader({ title, action, help }) {
|
|
59
|
+
return /* @__PURE__ */ jsxs("div", { className: "ad-page-header", children: [
|
|
60
|
+
/* @__PURE__ */ jsxs("h1", { children: [
|
|
61
|
+
title,
|
|
62
|
+
" ",
|
|
63
|
+
help && /* @__PURE__ */ jsx(HelpTip, { text: help })
|
|
64
|
+
] }),
|
|
65
|
+
action && /* @__PURE__ */ jsx("div", { className: "ad-header-action", children: action })
|
|
66
|
+
] });
|
|
67
|
+
}
|
|
68
|
+
function Panel({ children, className = "" }) {
|
|
69
|
+
return /* @__PURE__ */ jsx("section", { className: `ad-panel ${className}`, children });
|
|
70
|
+
}
|
|
71
|
+
function SectionTitle({ children }) {
|
|
72
|
+
return /* @__PURE__ */ jsx("h2", { className: "ad-section-title", children });
|
|
73
|
+
}
|
|
74
|
+
function FormRow({ label, children, required = false, hint }) {
|
|
75
|
+
return /* @__PURE__ */ jsxs("div", { className: "ad-form-row", children: [
|
|
76
|
+
/* @__PURE__ */ jsxs("div", { className: "ad-form-label", children: [
|
|
77
|
+
required && /* @__PURE__ */ jsx("b", { children: "* " }),
|
|
78
|
+
label
|
|
79
|
+
] }),
|
|
80
|
+
/* @__PURE__ */ jsxs("div", { className: "ad-form-control", children: [
|
|
81
|
+
children,
|
|
82
|
+
hint && /* @__PURE__ */ jsx("div", { className: "ad-hint", children: hint })
|
|
83
|
+
] })
|
|
84
|
+
] });
|
|
85
|
+
}
|
|
86
|
+
function ActionBar({ onSave, onCancel, saveLabel = "Save", cancelLabel = "Cancel", status }) {
|
|
87
|
+
return /* @__PURE__ */ jsxs("div", { className: "ad-action-bar", children: [
|
|
88
|
+
/* @__PURE__ */ jsx(Button, { variant: "primary", onClick: onSave, children: saveLabel }),
|
|
89
|
+
onCancel && /* @__PURE__ */ jsx(Button, { onClick: onCancel, children: cancelLabel }),
|
|
90
|
+
status && /* @__PURE__ */ jsx("span", { className: "ad-status", role: "status", children: status })
|
|
91
|
+
] });
|
|
92
|
+
}
|
|
93
|
+
function Notice({ children, tone = "info" }) {
|
|
94
|
+
return /* @__PURE__ */ jsxs("div", { className: `ad-notice ad-notice--${tone}`, children: [
|
|
95
|
+
/* @__PURE__ */ jsx(Info, { size: 15 }),
|
|
96
|
+
/* @__PURE__ */ jsx("div", { children })
|
|
97
|
+
] });
|
|
98
|
+
}
|
|
99
|
+
function DataTable({ columns = [], rows = [], empty = "No Data Available", onRowClick, getRowId = (row, index) => row.id ?? index }) {
|
|
100
|
+
return /* @__PURE__ */ jsx("div", { className: "ad-table-wrap", children: /* @__PURE__ */ jsxs("table", { className: "ad-table", children: [
|
|
101
|
+
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { children: columns.map((raw, index) => {
|
|
102
|
+
const column = typeof raw === "string" ? { key: index, label: raw } : raw;
|
|
103
|
+
return /* @__PURE__ */ jsx("th", { children: column.label }, column.key ?? index);
|
|
104
|
+
}) }) }),
|
|
105
|
+
/* @__PURE__ */ jsx("tbody", { children: rows.length ? rows.map((row, index) => /* @__PURE__ */ jsx("tr", { onClick: () => onRowClick?.(row, index), children: columns.map((raw, columnIndex) => {
|
|
106
|
+
const column = typeof raw === "string" ? { key: columnIndex, label: raw } : raw;
|
|
107
|
+
return /* @__PURE__ */ jsx("td", { children: column.render ? column.render(row, index) : Array.isArray(row) ? row[columnIndex] : row[column.key] }, column.key ?? columnIndex);
|
|
108
|
+
}) }, getRowId(row, index))) : /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { className: "ad-empty", colSpan: columns.length, children: empty }) }) })
|
|
109
|
+
] }) });
|
|
110
|
+
}
|
|
111
|
+
function Modal({ title, children, open, onClose, footer, closeLabel = "Close" }) {
|
|
112
|
+
if (!open) return null;
|
|
113
|
+
return /* @__PURE__ */ jsx("div", { className: "ad-modal-backdrop", onMouseDown: onClose, children: /* @__PURE__ */ jsxs("div", { className: "ad-modal", role: "dialog", "aria-modal": "true", "aria-label": title, onMouseDown: (e) => e.stopPropagation(), children: [
|
|
114
|
+
/* @__PURE__ */ jsxs("div", { className: "ad-modal-head", children: [
|
|
115
|
+
/* @__PURE__ */ jsx("strong", { children: title }),
|
|
116
|
+
/* @__PURE__ */ jsx(IconButton, { icon: X, label: closeLabel, onClick: onClose })
|
|
117
|
+
] }),
|
|
118
|
+
/* @__PURE__ */ jsx("div", { className: "ad-modal-body", children }),
|
|
119
|
+
footer && /* @__PURE__ */ jsx("div", { className: "ad-modal-footer", children: footer })
|
|
120
|
+
] }) });
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// src/widgets/DashboardWidgets.jsx
|
|
124
|
+
import React2, { useState as useState2 } from "react";
|
|
125
|
+
import { Clock3, UserRoundPlus, Files, AppWindow, Maximize2, MoreHorizontal, RefreshCw, Settings, X as X2 } from "lucide-react";
|
|
126
|
+
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
127
|
+
var DASHBOARD_METRICS = [
|
|
128
|
+
{ title: "Password Expiration", value: "0 / 62", caption: "Soon-to-expire / Expired Passwords", icon: Clock3, tone: "rose", report: "4" },
|
|
129
|
+
{ title: "Enrollment Status", value: "37 / 38", caption: "Enrolled / Non Enrolled Users", icon: UserRoundPlus, tone: "blue", report: "15" },
|
|
130
|
+
{ title: "License Usage", value: "59 / 4941", caption: "Used / Remaining Licenses", icon: Files, tone: "orange", report: "17" },
|
|
131
|
+
{ title: "Endpoint MFA", value: "1 / 4999", caption: "Used / Remaining Licenses", icon: AppWindow, tone: "green", report: "301" }
|
|
132
|
+
];
|
|
133
|
+
var DASHBOARD_SHORTCUTS = [
|
|
134
|
+
{ title: "Highlights", links: ["Password Reset / Unlock Account", "Self Update/Change Password", "Password Expiry Notification", "Password Sync/Single Sign On", "Conditional Access"] },
|
|
135
|
+
{ title: "Multi-factor Authentication", links: ["Security Question & Answer", "Email Verification", "SMS Verification", "Google Authenticator", "Microsoft Authenticator", "Microsoft Entra ID MFA", "Duo Security", "RSA SecurID", "RADIUS Authentication", "Push Notification Authentication", "Biometric Authentication", "QR Code Based Authentication", "TOTP Authentication", "SAML Authentication", "AD Security Questions", "Yubikey Authenticator", "Zoho OneAuth TOTP", "Smart Card Authentication", "Custom TOTP Authenticator", "FIDO2 Passkeys"] },
|
|
136
|
+
{ title: "Other Features", links: ["Mobile App Deployment", "Employee Search/Org Chart", "Mail Group Subscription", "Self-Service Approval Workflow", "Update Cached Credential"] },
|
|
137
|
+
{ title: "Password Self-Service Modes", links: ["Via Web Portal", "Mobile Access", "GINA/Mac/Linux (Ctrl+Alt+Del)", "Automatic Reset & Unlock"] }
|
|
138
|
+
];
|
|
139
|
+
var DIRECTORY_REPORT_DATA = [
|
|
140
|
+
{ id: "2", label: "Locked Out Users", value: 0 },
|
|
141
|
+
{ id: "3", label: "Soon-To-Expire Users", value: 0 },
|
|
142
|
+
{ id: "4", label: "Password Expired Users", value: 62 }
|
|
143
|
+
];
|
|
144
|
+
var MFA_REPORT_DATA = [
|
|
145
|
+
{ id: "15", label: "Enrolled Users", value: 37, color: "#8864b4" },
|
|
146
|
+
{ id: "16", label: "Non-Enrolled Users", value: 38, color: "#397dd5" }
|
|
147
|
+
];
|
|
148
|
+
var SELF_SERVICE_REPORT_DATA = [
|
|
149
|
+
{ id: "6", label: "Reset Password", value: 35 },
|
|
150
|
+
{ id: "7", label: "Unlock Account", value: 0 },
|
|
151
|
+
{ id: "8", label: "Self Update", value: 0 },
|
|
152
|
+
{ id: "9", label: "Change Password", value: 0 },
|
|
153
|
+
{ id: "1210", label: "MFA Failures", value: 0 }
|
|
154
|
+
];
|
|
155
|
+
function MetricWidget({ title, value, caption, icon: Icon = Clock3, tone = "blue", iconSize = 43, onClick, className = "", ...props }) {
|
|
156
|
+
return /* @__PURE__ */ jsxs2("button", { type: "button", className: `dash-metric ${className}`, onClick, ...props, children: [
|
|
157
|
+
/* @__PURE__ */ jsx2("span", { className: "dash-metric-title", children: title }),
|
|
158
|
+
/* @__PURE__ */ jsx2("strong", { children: value }),
|
|
159
|
+
/* @__PURE__ */ jsx2("small", { children: caption }),
|
|
160
|
+
Icon && /* @__PURE__ */ jsx2(Icon, { className: `dash-metric-icon is-${tone}`, size: iconSize, strokeWidth: 1.05 })
|
|
161
|
+
] });
|
|
162
|
+
}
|
|
163
|
+
function WidgetFrame({ title, children, onExpand, onRefresh, onMore, tools, showTools = true, labels = {}, className = "" }) {
|
|
164
|
+
const [refreshing, setRefreshing] = useState2(false);
|
|
165
|
+
return /* @__PURE__ */ jsxs2("section", { className: `dash-widget ${className}`, "aria-label": title, children: [
|
|
166
|
+
/* @__PURE__ */ jsxs2("div", { className: "dash-widget-heading", children: [
|
|
167
|
+
/* @__PURE__ */ jsx2("strong", { children: title }),
|
|
168
|
+
showTools && /* @__PURE__ */ jsx2("div", { className: "dash-widget-tools", children: tools || /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
169
|
+
/* @__PURE__ */ jsx2("button", { type: "button", "aria-label": `${labels.maximize || "Maximize"} ${title}`, onClick: onExpand, children: /* @__PURE__ */ jsx2(Maximize2, { size: 14 }) }),
|
|
170
|
+
/* @__PURE__ */ jsx2("button", { type: "button", "aria-label": `${labels.refresh || "Refresh"} ${title}`, onClick: () => {
|
|
171
|
+
onRefresh?.();
|
|
172
|
+
setRefreshing(true);
|
|
173
|
+
window.setTimeout(() => setRefreshing(false), 500);
|
|
174
|
+
}, children: /* @__PURE__ */ jsx2(RefreshCw, { size: 14, className: refreshing ? "is-spinning" : "" }) }),
|
|
175
|
+
/* @__PURE__ */ jsx2("button", { type: "button", "aria-label": `${labels.more || "More options for"} ${title}`, onClick: onMore, children: /* @__PURE__ */ jsx2(MoreHorizontal, { size: 16 }) })
|
|
176
|
+
] }) })
|
|
177
|
+
] }),
|
|
178
|
+
children
|
|
179
|
+
] });
|
|
180
|
+
}
|
|
181
|
+
function ActiveDirectoryChart({ data = DIRECTORY_REPORT_DATA, max = 80, ticks, axisLabel = "No. Of Users", unit = "users", color = "#46c0f2", onSelect }) {
|
|
182
|
+
const ceiling = Math.max(1, Number(max));
|
|
183
|
+
const marks = ticks || [ceiling, ceiling * 0.75, ceiling * 0.5, ceiling * 0.25, 0];
|
|
184
|
+
return /* @__PURE__ */ jsxs2("div", { className: "dash-column-chart", children: [
|
|
185
|
+
/* @__PURE__ */ jsx2("span", { className: "dash-axis-title", children: axisLabel }),
|
|
186
|
+
/* @__PURE__ */ jsx2("div", { className: "dash-y-labels", children: marks.map((n, i) => /* @__PURE__ */ jsx2("span", { children: n }, i)) }),
|
|
187
|
+
/* @__PURE__ */ jsxs2("div", { className: "dash-plot", children: [
|
|
188
|
+
marks.map((_, i) => /* @__PURE__ */ jsx2("div", { className: "dash-gridline" }, i)),
|
|
189
|
+
/* @__PURE__ */ jsx2("div", { className: "dash-columns", style: { gridTemplateColumns: `repeat(${Math.max(data.length, 1)},1fr)` }, children: data.map((item, i) => /* @__PURE__ */ jsxs2("button", { type: "button", "aria-label": `${item.label}: ${item.value} ${unit}`, onClick: () => onSelect?.(item.id, item), children: [
|
|
190
|
+
/* @__PURE__ */ jsx2("span", { className: "dash-column", style: { height: `${Math.min(100, Math.max(0, Number(item.value) / ceiling * 100))}%`, background: item.color || color } }),
|
|
191
|
+
/* @__PURE__ */ jsx2("span", { className: "dash-column-label", title: item.label, children: item.label })
|
|
192
|
+
] }, item.id ?? i)) })
|
|
193
|
+
] })
|
|
194
|
+
] });
|
|
195
|
+
}
|
|
196
|
+
function MfaChart({ data = MFA_REPORT_DATA, onSelect, ariaLabel }) {
|
|
197
|
+
const total = data.reduce((sum, item) => sum + Number(item.value || 0), 0);
|
|
198
|
+
let current = 0;
|
|
199
|
+
const palette = ["#8864b4", "#397dd5", "#46c0f2", "#226958"];
|
|
200
|
+
const gradient = data.map((item, i) => {
|
|
201
|
+
const start = current;
|
|
202
|
+
current += total ? Number(item.value || 0) / total * 100 : 0;
|
|
203
|
+
return `${item.color || palette[i % palette.length]} ${start}% ${current}%`;
|
|
204
|
+
}).join(",");
|
|
205
|
+
return /* @__PURE__ */ jsxs2("div", { className: "dash-mfa-chart", children: [
|
|
206
|
+
/* @__PURE__ */ jsx2("button", { type: "button", className: "dash-pie", style: { background: total ? `conic-gradient(${gradient})` : "#e9edef" }, "aria-label": ariaLabel || data.map((item) => `${item.value} ${item.label}`).join(", "), onClick: () => data[0] && onSelect?.(data[0].id, data[0]) }),
|
|
207
|
+
/* @__PURE__ */ jsx2("div", { className: "dash-legend", children: data.map((item, i) => /* @__PURE__ */ jsxs2("button", { type: "button", onClick: () => onSelect?.(item.id, item), children: [
|
|
208
|
+
/* @__PURE__ */ jsx2("i", { style: { background: item.color || palette[i % palette.length] } }),
|
|
209
|
+
item.label
|
|
210
|
+
] }, item.id ?? i)) })
|
|
211
|
+
] });
|
|
212
|
+
}
|
|
213
|
+
function SelfServiceChart({ data = SELF_SERVICE_REPORT_DATA, max = 35, ticks, axisLabel = "No. Of Users", unit = "users", color = "#226958", onSelect }) {
|
|
214
|
+
const ceiling = Math.max(1, Number(max));
|
|
215
|
+
const marks = ticks || Array.from({ length: 8 }, (_, i) => ceiling * i / 7);
|
|
216
|
+
const gridStep = 100 / Math.max(1, marks.length - 1);
|
|
217
|
+
return /* @__PURE__ */ jsxs2("div", { className: "dash-horizontal-chart", children: [
|
|
218
|
+
/* @__PURE__ */ jsx2("span", { className: "dash-horizontal-axis-title", children: axisLabel }),
|
|
219
|
+
/* @__PURE__ */ jsx2("div", { className: "dash-horizontal-bars", style: { gridTemplateRows: `repeat(${Math.max(data.length, 1)},1fr)`, backgroundImage: `repeating-linear-gradient(90deg,transparent 0,transparent calc(${gridStep}% - 1px),#e5e9ea calc(${gridStep}% - 1px),#e5e9ea ${gridStep}%)` }, children: data.map((item, i) => /* @__PURE__ */ jsxs2("button", { type: "button", onClick: () => onSelect?.(item.id, item), "aria-label": `${item.label}: ${item.value} ${unit}`, children: [
|
|
220
|
+
/* @__PURE__ */ jsx2("span", { children: item.label }),
|
|
221
|
+
/* @__PURE__ */ jsx2("i", { style: { width: `${Math.min(100, Math.max(0, Number(item.value) / ceiling * 100))}%`, background: item.color || color } })
|
|
222
|
+
] }, item.id ?? i)) }),
|
|
223
|
+
/* @__PURE__ */ jsx2("div", { className: "dash-horizontal-ticks", children: marks.map((n, i) => /* @__PURE__ */ jsx2("span", { children: Number.isInteger(n) ? n : Number(n.toFixed(1)) }, i)) })
|
|
224
|
+
] });
|
|
225
|
+
}
|
|
226
|
+
function ShortcutRail({ groups = DASHBOARD_SHORTCUTS, onSelect, ariaLabel = "Dashboard shortcuts" }) {
|
|
227
|
+
return /* @__PURE__ */ jsx2("aside", { className: "dash-shortcuts", "aria-label": ariaLabel, children: groups.map((group, index) => /* @__PURE__ */ jsxs2("section", { children: [
|
|
228
|
+
/* @__PURE__ */ jsx2("h3", { children: group.title }),
|
|
229
|
+
/* @__PURE__ */ jsx2("ul", { children: group.links.map((link, i) => {
|
|
230
|
+
const item = typeof link === "string" ? { id: link, label: link } : link;
|
|
231
|
+
return /* @__PURE__ */ jsx2("li", { children: item.href ? /* @__PURE__ */ jsx2("a", { href: item.href, onClick: (event) => {
|
|
232
|
+
if (onSelect) {
|
|
233
|
+
event.preventDefault();
|
|
234
|
+
onSelect(item.id, item);
|
|
235
|
+
}
|
|
236
|
+
}, children: item.label }) : /* @__PURE__ */ jsx2("button", { type: "button", onClick: () => onSelect?.(item.id, item), children: item.label }) }, item.id ?? i);
|
|
237
|
+
}) })
|
|
238
|
+
] }, group.id ?? group.title ?? index)) });
|
|
239
|
+
}
|
|
240
|
+
function DashboardToolbar({ domains = ["ADSELFSERVICE"], domain, defaultDomain, onDomainChange, domainLabel = "Select Domain to View :", showShortcuts = true, onToggleShortcuts, onExpand, settingsLabel = "Dashboard settings", expandLabel = "Expand dashboard", menuItems, onMenuAction }) {
|
|
241
|
+
const [menu, setMenu] = useState2(false);
|
|
242
|
+
const actions = menuItems || [{ id: "embed", label: "Embed Dashboard" }, { id: "updater", label: "Dashboard Updater" }, { id: "shortcuts", label: `${showShortcuts ? "Hide" : "Show"} Shortcut Menu` }];
|
|
243
|
+
return /* @__PURE__ */ jsxs2("div", { className: "dash-toolbar", children: [
|
|
244
|
+
/* @__PURE__ */ jsx2("label", { htmlFor: "dash-domain", children: domainLabel }),
|
|
245
|
+
/* @__PURE__ */ jsx2("select", { id: "dash-domain", value: domain, defaultValue: domain === void 0 ? defaultDomain ?? (typeof domains[0] === "string" ? domains[0] : domains[0]?.value) : void 0, onChange: (event) => {
|
|
246
|
+
const item = domains.map((raw) => typeof raw === "string" ? { value: raw, label: raw } : raw).find((option) => option.value === event.target.value);
|
|
247
|
+
onDomainChange?.(event.target.value, item);
|
|
248
|
+
}, children: domains.map((option) => {
|
|
249
|
+
const item = typeof option === "string" ? { value: option, label: option } : option;
|
|
250
|
+
return /* @__PURE__ */ jsx2("option", { value: item.value, children: item.label }, item.value);
|
|
251
|
+
}) }),
|
|
252
|
+
/* @__PURE__ */ jsxs2("div", { className: "dash-toolbar-actions", children: [
|
|
253
|
+
/* @__PURE__ */ jsxs2("div", { className: "dash-menu-anchor", children: [
|
|
254
|
+
/* @__PURE__ */ jsx2("button", { type: "button", "aria-label": settingsLabel, "aria-expanded": menu, onClick: () => setMenu(!menu), children: /* @__PURE__ */ jsx2(Settings, { size: 18 }) }),
|
|
255
|
+
menu && /* @__PURE__ */ jsx2("div", { className: "dash-menu", children: actions.map((item) => /* @__PURE__ */ jsx2("button", { type: "button", onClick: () => {
|
|
256
|
+
if (item.id === "shortcuts") onToggleShortcuts?.();
|
|
257
|
+
item.onClick?.(item);
|
|
258
|
+
onMenuAction?.(item.id, item);
|
|
259
|
+
setMenu(false);
|
|
260
|
+
}, children: item.label }, item.id)) })
|
|
261
|
+
] }),
|
|
262
|
+
/* @__PURE__ */ jsx2("button", { type: "button", "aria-label": expandLabel, onClick: onExpand, children: /* @__PURE__ */ jsx2(Maximize2, { size: 17 }) })
|
|
263
|
+
] })
|
|
264
|
+
] });
|
|
265
|
+
}
|
|
266
|
+
function DashboardLayout({ metrics, charts, shortcuts, showShortcuts = true }) {
|
|
267
|
+
return /* @__PURE__ */ jsxs2("div", { className: `dash-layout ${showShortcuts ? "" : "without-shortcuts"}`, children: [
|
|
268
|
+
/* @__PURE__ */ jsxs2("div", { className: "dash-content", children: [
|
|
269
|
+
/* @__PURE__ */ jsx2("div", { className: "dash-metrics", children: metrics }),
|
|
270
|
+
/* @__PURE__ */ jsx2("div", { className: "dash-chart-grid", children: charts })
|
|
271
|
+
] }),
|
|
272
|
+
showShortcuts && shortcuts
|
|
273
|
+
] });
|
|
274
|
+
}
|
|
275
|
+
function ExpandedWidget({ title, onClose, children, closeLabel = "Close expanded widget" }) {
|
|
276
|
+
if (!title) return null;
|
|
277
|
+
return /* @__PURE__ */ jsx2("div", { className: "dash-overlay", role: "presentation", onMouseDown: onClose, children: /* @__PURE__ */ jsxs2("div", { className: "dash-expanded", role: "dialog", "aria-modal": "true", "aria-label": title, onMouseDown: (e) => e.stopPropagation(), children: [
|
|
278
|
+
/* @__PURE__ */ jsxs2("div", { className: "dash-expanded-heading", children: [
|
|
279
|
+
/* @__PURE__ */ jsx2("strong", { children: title }),
|
|
280
|
+
/* @__PURE__ */ jsx2("button", { type: "button", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx2(X2, { size: 18 }) })
|
|
281
|
+
] }),
|
|
282
|
+
children
|
|
283
|
+
] }) });
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
// src/widgets/ReportWidgets.jsx
|
|
287
|
+
import React3, { useEffect, useMemo, useState as useState3 } from "react";
|
|
288
|
+
import { AlarmClock, ChevronDown, ChevronRight, CircleHelp as CircleHelp2, Info as Info2, Search } from "lucide-react";
|
|
289
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
290
|
+
var REPORT_GROUPS = [
|
|
291
|
+
{ label: "Active Directory Reports", items: [["2", "Locked Out Users Report"], ["3", "Soon-To-Expire Password Users Report"], ["4", "Password Expired Users Report"]] },
|
|
292
|
+
{ label: "Password Self-Service Reports", items: [["6", "Reset Password Audit Report"], ["7", "Unlock Account Audit Report"], ["1202", "GINA/Mac/Linux Agent Reset Password Audit Report"], ["1203", "GINA/Mac/Linux Agent Unlock Account Audit Report"], ["8", "Self-Update Audit Report"], ["9", "Change Password Audit Report"], ["1204", "Password/Account Expiry Notifications Delivery Report"]] },
|
|
293
|
+
{ label: "MFA Reports", items: [["15", "MFA Enrolled Users Report"], ["16", "MFA Non-Enrolled Users Report"], ["1206", "MFA Enrollment Audit Report"], ["1207", "MFA Usage Audit Report"], ["1208", "MFA Usage for Machines/VPN/OWA"], ["1209", "MFA Usage from Mobile Devices"], ["1210", "MFA Failures Audit Report"], ["1211", "MFA Trusted Browser Report"], ["1212", "MFA Trusted Machines Report"], ["18", "Security Questions Report"], ["1213", "Backup Code Usage Report"], ["301", "Offline MFA Enrolled Machines Report"], ["601", "FIDO2 Passkeys Report"], ["13", "Blocked Users Report"]] },
|
|
294
|
+
{ label: "GINA/Mac/Linux Agent Reports", items: [["1215", "Agent Installed Machines Report"], ["1216", "Agent Installation Failures Report"]] },
|
|
295
|
+
{ label: "Other Reports", items: [["12", "User Attempts Audit Report"], ["17", "Licensed Users Report"], ["10", "Notification Delivery Report"], ["19", "Push Registered Devices Report"], ["901", "Application Access Audit Report"], ["902", "JIT Provisioning Audit Report"]] }
|
|
296
|
+
];
|
|
297
|
+
var normalizeReport = (item) => Array.isArray(item) ? { id: item[0], label: item[1] } : item;
|
|
298
|
+
function ReportCategoryBar({ groups = REPORT_GROUPS, selected, defaultSelected, onSelect, ariaLabel = "Report group menu" }) {
|
|
299
|
+
const [open, setOpen] = useState3("");
|
|
300
|
+
const [localSelected, setLocalSelected] = useState3(defaultSelected ?? (groups[0]?.items[0] && normalizeReport(groups[0].items[0]).id));
|
|
301
|
+
const currentSelected = selected ?? localSelected;
|
|
302
|
+
return /* @__PURE__ */ jsx3("nav", { className: "report-category-bar", "aria-label": ariaLabel, children: groups.map((group) => /* @__PURE__ */ jsxs3("div", { className: "report-category", children: [
|
|
303
|
+
/* @__PURE__ */ jsxs3("button", { type: "button", "aria-expanded": open === group.label, onClick: () => setOpen(open === group.label ? "" : group.label), children: [
|
|
304
|
+
group.label,
|
|
305
|
+
/* @__PURE__ */ jsx3(ChevronDown, { size: 10 })
|
|
306
|
+
] }),
|
|
307
|
+
open === group.label && /* @__PURE__ */ jsx3("div", { className: "report-category-menu", children: group.items.map((raw, i) => {
|
|
308
|
+
const item = normalizeReport(raw);
|
|
309
|
+
return /* @__PURE__ */ jsx3("button", { type: "button", className: currentSelected === item.id ? "is-active" : "", onClick: () => {
|
|
310
|
+
if (selected === void 0) setLocalSelected(item.id);
|
|
311
|
+
onSelect?.(item.id, item);
|
|
312
|
+
setOpen("");
|
|
313
|
+
}, children: item.label }, item.id ?? i);
|
|
314
|
+
}) })
|
|
315
|
+
] }, group.id ?? group.label)) });
|
|
316
|
+
}
|
|
317
|
+
function ReportFilters({ domains = ["ADSELFSERVICE"], domain, defaultDomain, onDomainChange, ouOptions = ["All OU", "Users"], ou, defaultOu, onOuChange, labels = {}, onGenerate, onStop, generating = false }) {
|
|
318
|
+
const [ouOpen, setOuOpen] = useState3(false);
|
|
319
|
+
const [localOu, setLocalOu] = useState3(defaultOu ?? (typeof ouOptions[0] === "string" ? ouOptions[0] : ouOptions[0]?.value));
|
|
320
|
+
const selectedOu = ou ?? localOu;
|
|
321
|
+
return /* @__PURE__ */ jsxs3("div", { className: "report-filters", children: [
|
|
322
|
+
/* @__PURE__ */ jsxs3("div", { className: "report-filter-row", children: [
|
|
323
|
+
/* @__PURE__ */ jsx3("label", { htmlFor: "report-domain", children: labels.domain || "Select Domain" }),
|
|
324
|
+
/* @__PURE__ */ jsx3("select", { id: "report-domain", value: domain, defaultValue: domain === void 0 ? defaultDomain ?? (typeof domains[0] === "string" ? domains[0] : domains[0]?.value) : void 0, onChange: (event) => {
|
|
325
|
+
const value = event.target.value;
|
|
326
|
+
const item = domains.map((raw) => typeof raw === "string" ? { value: raw, label: raw } : raw).find((option) => option.value === value);
|
|
327
|
+
onDomainChange?.(value, item);
|
|
328
|
+
}, children: domains.map((raw) => {
|
|
329
|
+
const item = typeof raw === "string" ? { value: raw, label: raw } : raw;
|
|
330
|
+
return /* @__PURE__ */ jsx3("option", { value: item.value, children: item.label }, item.value);
|
|
331
|
+
}) }),
|
|
332
|
+
/* @__PURE__ */ jsxs3("button", { type: "button", className: "report-ou-current", onClick: () => setOuOpen(!ouOpen), children: [
|
|
333
|
+
selectedOu,
|
|
334
|
+
/* @__PURE__ */ jsx3(ChevronDown, { size: 11 })
|
|
335
|
+
] }),
|
|
336
|
+
/* @__PURE__ */ jsx3("button", { type: "button", className: "report-ou-link", onClick: () => setOuOpen(!ouOpen), children: labels.selectOu || "Select OU" })
|
|
337
|
+
] }),
|
|
338
|
+
ouOpen && /* @__PURE__ */ jsxs3("div", { className: "report-ou-picker", children: [
|
|
339
|
+
/* @__PURE__ */ jsx3("strong", { children: labels.selectOu || "Select OU" }),
|
|
340
|
+
ouOptions.map((raw) => {
|
|
341
|
+
const item = typeof raw === "string" ? { value: raw, label: raw } : raw;
|
|
342
|
+
return /* @__PURE__ */ jsxs3("label", { children: [
|
|
343
|
+
/* @__PURE__ */ jsx3("input", { type: "radio", name: "report-ou", checked: selectedOu === item.value, onChange: () => {
|
|
344
|
+
setLocalOu(item.value);
|
|
345
|
+
onOuChange?.(item.value, item);
|
|
346
|
+
setOuOpen(false);
|
|
347
|
+
} }),
|
|
348
|
+
" ",
|
|
349
|
+
item.label
|
|
350
|
+
] }, item.value);
|
|
351
|
+
})
|
|
352
|
+
] }),
|
|
353
|
+
/* @__PURE__ */ jsxs3("div", { className: "report-filter-actions", children: [
|
|
354
|
+
/* @__PURE__ */ jsx3("button", { type: "button", className: "report-generate", onClick: onGenerate, disabled: generating, children: labels.generate || "Generate" }),
|
|
355
|
+
/* @__PURE__ */ jsx3("button", { type: "button", className: "report-stop", onClick: onStop, disabled: !generating, children: labels.stop || "Stop" })
|
|
356
|
+
] })
|
|
357
|
+
] });
|
|
358
|
+
}
|
|
359
|
+
function ReportResults({ status = "empty", emptyMessage = "No Data Available", loadingMessage = "Generating report\u2026", children }) {
|
|
360
|
+
return /* @__PURE__ */ jsx3("div", { className: "report-results", role: "status", children: children !== void 0 ? children : status === "loading" ? /* @__PURE__ */ jsx3("span", { children: loadingMessage }) : /* @__PURE__ */ jsxs3("span", { children: [
|
|
361
|
+
/* @__PURE__ */ jsx3(Info2, { size: 13 }),
|
|
362
|
+
" ",
|
|
363
|
+
emptyMessage
|
|
364
|
+
] }) });
|
|
365
|
+
}
|
|
366
|
+
function ReportPageHeading({ title, onSchedule, scheduleLabel = "Schedule Reports", helpText, action }) {
|
|
367
|
+
return /* @__PURE__ */ jsxs3("header", { className: "report-page-heading", children: [
|
|
368
|
+
/* @__PURE__ */ jsxs3("h1", { children: [
|
|
369
|
+
title,
|
|
370
|
+
" ",
|
|
371
|
+
helpText !== null && /* @__PURE__ */ jsx3(CircleHelp2, { size: 12, strokeWidth: 1.3, "aria-label": helpText || `Help for ${title}` })
|
|
372
|
+
] }),
|
|
373
|
+
action || /* @__PURE__ */ jsxs3("button", { type: "button", onClick: onSchedule, children: [
|
|
374
|
+
/* @__PURE__ */ jsx3(AlarmClock, { size: 13 }),
|
|
375
|
+
" ",
|
|
376
|
+
scheduleLabel
|
|
377
|
+
] })
|
|
378
|
+
] });
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
// src/widgets/ConfigurationWidgets.jsx
|
|
382
|
+
import React4, { useState as useState4 } from "react";
|
|
383
|
+
import { ChevronDown as ChevronDown2, ChevronLeft, ChevronRight as ChevronRight2, ChevronsLeft, ChevronsRight, Copy, KeyRound, LockKeyhole, Pencil, Plus, Search as Search2, Settings as Settings2, Trash2, UserRoundPen } from "lucide-react";
|
|
384
|
+
import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
385
|
+
var CONFIG_GROUPS = [
|
|
386
|
+
{ label: "Self-Service", items: [{ id: "policy", label: "Policy Configuration" }, { id: "mfa", label: "Multi-factor Authentication" }, { id: "expiry", label: "Password Expiration Notification" }, { id: "enforcer", label: "Password Policy Enforcer" }, { id: "sync", label: "Password Sync/Single Sign On" }, { id: "conditional", label: "Conditional Access" }, { id: "directory", label: "Directory Self Service" }] },
|
|
387
|
+
{ label: "Administrative Tools", items: [{ id: "enrollment", label: "Quick Enrollment" }, { id: "agent", label: "GINA/Mac/Linux (Ctrl+Alt+Del)" }, { id: "mobile", label: "Mobile App Deployment" }, { id: "approval", label: "Approval Workflow" }, { id: "technician", label: "Technician" }] },
|
|
388
|
+
{ label: "Security Center", items: [{ id: "hardening", label: "Security Hardening" }, { id: "strengtheners", label: "Password Strengtheners" }, { id: "questions", label: "Security Q&A Strengtheners" }, { id: "anti-hacking", label: "Anti-Hacking System" }] }
|
|
389
|
+
];
|
|
390
|
+
var POLICY_FEATURES = [
|
|
391
|
+
{ label: "Reset Password", icon: KeyRound },
|
|
392
|
+
{ label: "Unlock Account", icon: LockKeyhole },
|
|
393
|
+
{ label: "Change Password", icon: Settings2 },
|
|
394
|
+
{ label: "Self Update", icon: UserRoundPen }
|
|
395
|
+
];
|
|
396
|
+
var DEMO_POLICIES = [
|
|
397
|
+
{ name: "Selfservice Users", permissions: "Reset Password, Unlock Account, Self Update, Change Password", modifiedBy: "admin (ADSelfService Plus Authentication)", modified: "2025/04/05 01:43 PM" },
|
|
398
|
+
{ name: "Endpoint MFA Users", permissions: "Reset Password, Unlock Account, Change Password", modifiedBy: "operator (ADSelfService Plus Authentication)", modified: "2025/07/08 07:28 AM" },
|
|
399
|
+
{ name: "OWA MFA Users", permissions: "Reset Password, Unlock Account", modifiedBy: "admin (ADSelfService Plus Authentication)", modified: "2025/04/05 11:38 AM" },
|
|
400
|
+
{ name: "VPN MFA Users", permissions: "Unlock Account, Self Update, Change Password", modifiedBy: "operator (ADSelfService Plus Authentication)", modified: "2025/07/08 07:28 AM" },
|
|
401
|
+
{ name: "Remote Users", permissions: "Reset Password, Self Update, Change Password", modifiedBy: "admin (ADSelfService Plus Authentication)", modified: "2025/04/05 11:39 AM" },
|
|
402
|
+
{ name: "System Admins", permissions: "Reset Password", modifiedBy: "operator (ADSelfService Plus Authentication)", modified: "2025/07/08 07:28 AM" },
|
|
403
|
+
{ name: "Technical Support", permissions: "Self Update, Change Password", modifiedBy: "admin (ADSelfService Plus Authentication)", modified: "2025/04/05 11:40 AM" }
|
|
404
|
+
];
|
|
405
|
+
var POLICY_COLUMNS = [
|
|
406
|
+
{ key: "actions", label: "Actions" },
|
|
407
|
+
{ key: "advanced", label: "Advanced" },
|
|
408
|
+
{ key: "name", label: "Policy Name" },
|
|
409
|
+
{ key: "permissions", label: "Permissions" },
|
|
410
|
+
{ key: "domain", label: "Domain Name" },
|
|
411
|
+
{ key: "modifiedBy", label: "Last Modified By" },
|
|
412
|
+
{ key: "modified", label: "Last Modified Time" }
|
|
413
|
+
];
|
|
414
|
+
function ConfigurationHeader({ title, mode = "Password Self-Service Modes", onModeChange, helpText, action }) {
|
|
415
|
+
return /* @__PURE__ */ jsxs4("div", { className: "config-heading", children: [
|
|
416
|
+
/* @__PURE__ */ jsxs4("h1", { children: [
|
|
417
|
+
title,
|
|
418
|
+
" ",
|
|
419
|
+
helpText !== null && /* @__PURE__ */ jsx4("span", { title: helpText || `Help for ${title}`, children: "\u24D8" })
|
|
420
|
+
] }),
|
|
421
|
+
action || /* @__PURE__ */ jsxs4("button", { type: "button", onClick: () => onModeChange?.(mode), children: [
|
|
422
|
+
mode,
|
|
423
|
+
/* @__PURE__ */ jsx4(ChevronDown2, { size: 11 })
|
|
424
|
+
] })
|
|
425
|
+
] });
|
|
426
|
+
}
|
|
427
|
+
function PolicyFeatureStrip({ title = "Self-Service Features", features = POLICY_FEATURES, instruction, onFeatureSelect }) {
|
|
428
|
+
return /* @__PURE__ */ jsxs4("section", { className: "config-feature-strip", "aria-label": title, children: [
|
|
429
|
+
/* @__PURE__ */ jsx4("h2", { children: title }),
|
|
430
|
+
/* @__PURE__ */ jsx4("div", { className: "config-features", children: features.map(({ id, label, icon: Icon = Settings2 }, index) => /* @__PURE__ */ jsx4("div", { children: onFeatureSelect ? /* @__PURE__ */ jsxs4("button", { type: "button", onClick: () => onFeatureSelect(id ?? label, { id, label, icon: Icon }), children: [
|
|
431
|
+
/* @__PURE__ */ jsx4(Icon, { size: 20, strokeWidth: 2 }),
|
|
432
|
+
/* @__PURE__ */ jsx4("span", { children: label })
|
|
433
|
+
] }) : /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
434
|
+
/* @__PURE__ */ jsx4(Icon, { size: 20, strokeWidth: 2 }),
|
|
435
|
+
/* @__PURE__ */ jsx4("span", { children: label })
|
|
436
|
+
] }) }, id ?? label ?? index)) }),
|
|
437
|
+
/* @__PURE__ */ jsx4("p", { children: instruction === void 0 ? /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
438
|
+
'Click "Add New Policy" Button to add a new policy. To edit an existing policy, click on ',
|
|
439
|
+
/* @__PURE__ */ jsx4(Pencil, { size: 12 }),
|
|
440
|
+
" icon in the Actions column."
|
|
441
|
+
] }) : instruction })
|
|
442
|
+
] });
|
|
443
|
+
}
|
|
444
|
+
function PolicyToolbar({ title = "Available Policies", addLabel = "Add New Policy", searchLabel = "Search policies", count = 0, page, defaultPage = 1, pageSize = 25, onPageChange, onAdd, query, defaultQuery = "", onQueryChange, labels = {} }) {
|
|
445
|
+
const [localPage, setLocalPage] = useState4(defaultPage);
|
|
446
|
+
const [localQuery, setLocalQuery] = useState4(defaultQuery);
|
|
447
|
+
const currentPage = page ?? localPage;
|
|
448
|
+
const currentQuery = query ?? localQuery;
|
|
449
|
+
const pages = Math.max(1, Math.ceil(count / pageSize));
|
|
450
|
+
const first = count ? (currentPage - 1) * pageSize + 1 : 0;
|
|
451
|
+
const last = Math.min(currentPage * pageSize, count);
|
|
452
|
+
const changePage = (next) => {
|
|
453
|
+
if (page === void 0) setLocalPage(next);
|
|
454
|
+
onPageChange?.(next);
|
|
455
|
+
};
|
|
456
|
+
return /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
457
|
+
/* @__PURE__ */ jsxs4("div", { className: "config-table-title", children: [
|
|
458
|
+
/* @__PURE__ */ jsx4("h2", { children: title }),
|
|
459
|
+
/* @__PURE__ */ jsxs4("button", { type: "button", onClick: onAdd, children: [
|
|
460
|
+
/* @__PURE__ */ jsx4(Plus, { size: 13 }),
|
|
461
|
+
" ",
|
|
462
|
+
addLabel
|
|
463
|
+
] })
|
|
464
|
+
] }),
|
|
465
|
+
/* @__PURE__ */ jsxs4("div", { className: "config-table-tools", children: [
|
|
466
|
+
/* @__PURE__ */ jsxs4("label", { children: [
|
|
467
|
+
/* @__PURE__ */ jsx4(Search2, { size: 15 }),
|
|
468
|
+
/* @__PURE__ */ jsx4("input", { "aria-label": searchLabel, value: currentQuery, onChange: (event) => {
|
|
469
|
+
if (query === void 0) setLocalQuery(event.target.value);
|
|
470
|
+
onQueryChange?.(event.target.value);
|
|
471
|
+
} })
|
|
472
|
+
] }),
|
|
473
|
+
/* @__PURE__ */ jsxs4("div", { className: "config-page-controls", children: [
|
|
474
|
+
/* @__PURE__ */ jsx4("button", { type: "button", disabled: currentPage <= 1, "aria-label": labels.first || "First page", onClick: () => changePage(1), children: /* @__PURE__ */ jsx4(ChevronsLeft, { size: 12 }) }),
|
|
475
|
+
/* @__PURE__ */ jsx4("button", { type: "button", disabled: currentPage <= 1, "aria-label": labels.previous || "Previous page", onClick: () => changePage(currentPage - 1), children: /* @__PURE__ */ jsx4(ChevronLeft, { size: 12 }) }),
|
|
476
|
+
/* @__PURE__ */ jsx4("span", { children: labels.range ? labels.range(first, last, count) : `${first}-${last} of ${count}` }),
|
|
477
|
+
/* @__PURE__ */ jsx4("button", { type: "button", disabled: currentPage >= pages, "aria-label": labels.next || "Next page", onClick: () => changePage(currentPage + 1), children: /* @__PURE__ */ jsx4(ChevronRight2, { size: 12 }) }),
|
|
478
|
+
/* @__PURE__ */ jsx4("button", { type: "button", disabled: currentPage >= pages, "aria-label": labels.last || "Last page", onClick: () => changePage(pages), children: /* @__PURE__ */ jsx4(ChevronsRight, { size: 12 }) })
|
|
479
|
+
] })
|
|
480
|
+
] })
|
|
481
|
+
] });
|
|
482
|
+
}
|
|
483
|
+
function PolicyTable({ policies = DEMO_POLICIES, columns = POLICY_COLUMNS, defaultDomain = "ADSELFSERVICE", emptyMessage = "No Data Available", actionLabels = {}, onEdit, onDelete, onCopy, renderCell, getRowId = (policy) => policy.id ?? policy.name }) {
|
|
484
|
+
const cell = (policy, key) => {
|
|
485
|
+
if (renderCell) {
|
|
486
|
+
const custom = renderCell(policy, key);
|
|
487
|
+
if (custom !== void 0) return custom;
|
|
488
|
+
}
|
|
489
|
+
if (key === "actions") return /* @__PURE__ */ jsxs4("div", { className: "config-actions", children: [
|
|
490
|
+
/* @__PURE__ */ jsx4("button", { type: "button", "aria-label": `${actionLabels.edit || "Edit"} ${policy.name}`, onClick: () => onEdit?.(policy), children: /* @__PURE__ */ jsx4(Pencil, { size: 12 }) }),
|
|
491
|
+
/* @__PURE__ */ jsx4("button", { type: "button", "aria-label": `${actionLabels.delete || "Delete"} ${policy.name}`, onClick: () => onDelete?.(policy), children: /* @__PURE__ */ jsx4(Trash2, { size: 12 }) }),
|
|
492
|
+
/* @__PURE__ */ jsx4("button", { type: "button", "aria-label": `${actionLabels.copy || "Copy"} ${policy.name}`, onClick: () => onCopy?.(policy), children: /* @__PURE__ */ jsx4(Copy, { size: 12 }) })
|
|
493
|
+
] });
|
|
494
|
+
if (key === "advanced") return /* @__PURE__ */ jsx4("button", { type: "button", "aria-label": `${actionLabels.advanced || "Advanced settings for"} ${policy.name}`, onClick: () => onEdit?.(policy), children: /* @__PURE__ */ jsx4(Settings2, { size: 17 }) });
|
|
495
|
+
return key === "domain" ? policy.domain ?? defaultDomain : policy[key];
|
|
496
|
+
};
|
|
497
|
+
return /* @__PURE__ */ jsx4("div", { className: "config-policy-table-wrap", children: /* @__PURE__ */ jsxs4("table", { className: `config-policy-table ${columns.length === 7 ? "is-reference" : ""}`, children: [
|
|
498
|
+
/* @__PURE__ */ jsx4("thead", { children: /* @__PURE__ */ jsx4("tr", { children: columns.map((column) => /* @__PURE__ */ jsx4("th", { children: column.label }, column.key)) }) }),
|
|
499
|
+
/* @__PURE__ */ jsx4("tbody", { children: policies.length ? policies.map((policy) => /* @__PURE__ */ jsx4("tr", { children: columns.map((column) => /* @__PURE__ */ jsx4("td", { title: column.key === "modifiedBy" ? policy.modifiedBy : void 0, children: cell(policy, column.key) }, column.key)) }, getRowId(policy))) : /* @__PURE__ */ jsx4("tr", { children: /* @__PURE__ */ jsx4("td", { colSpan: columns.length, className: "config-empty", children: emptyMessage }) }) })
|
|
500
|
+
] }) });
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
// src/widgets/SettingsWidgets.jsx
|
|
504
|
+
import React5, { useState as useState5 } from "react";
|
|
505
|
+
import { Fragment as Fragment3, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
506
|
+
function Frame({ title, tabs, activeTab, defaultTab, onTabChange, children, action, help, className = "" }) {
|
|
507
|
+
const [localTab, setLocalTab] = useState5(defaultTab ?? (typeof tabs?.[0] === "string" ? tabs[0] : tabs?.[0]?.id));
|
|
508
|
+
const active = activeTab ?? localTab;
|
|
509
|
+
return /* @__PURE__ */ jsxs5(Fragment3, { children: [
|
|
510
|
+
/* @__PURE__ */ jsx5(PageHeader, { title, action, help }),
|
|
511
|
+
/* @__PURE__ */ jsxs5(Panel, { className, children: [
|
|
512
|
+
tabs && /* @__PURE__ */ jsx5(Tabs, { tabs, active, onChange: (tab) => {
|
|
513
|
+
if (activeTab === void 0) setLocalTab(tab);
|
|
514
|
+
onTabChange?.(tab);
|
|
515
|
+
} }),
|
|
516
|
+
" ",
|
|
517
|
+
typeof children === "function" ? children(active) : children
|
|
518
|
+
] })
|
|
519
|
+
] });
|
|
520
|
+
}
|
|
521
|
+
function SaveBar({ saveLabel = "Save", cancel = true, cancelLabel = "Cancel", successMessage = "Settings saved in this demo.", onSave, onCancel, status: controlledStatus }) {
|
|
522
|
+
const [status, setStatus] = useState5("");
|
|
523
|
+
return /* @__PURE__ */ jsx5(ActionBar, { saveLabel, cancelLabel, onSave: () => {
|
|
524
|
+
onSave?.();
|
|
525
|
+
if (controlledStatus === void 0) {
|
|
526
|
+
setStatus(successMessage);
|
|
527
|
+
window.setTimeout(() => setStatus(""), 4e3);
|
|
528
|
+
}
|
|
529
|
+
}, onCancel: cancel ? () => {
|
|
530
|
+
onCancel?.();
|
|
531
|
+
if (controlledStatus === void 0) setStatus("");
|
|
532
|
+
} : void 0, status: controlledStatus ?? status });
|
|
533
|
+
}
|
|
534
|
+
function InlineSelect({ options = [], initial, value, onChange, width, ...props }) {
|
|
535
|
+
const [localValue, setLocalValue] = useState5(initial ?? (typeof options[0] === "string" ? options[0] : options[0]?.value));
|
|
536
|
+
return /* @__PURE__ */ jsx5("select", { className: "ad-select", style: { width }, value: value ?? localValue, onChange: (event) => {
|
|
537
|
+
if (value === void 0) setLocalValue(event.target.value);
|
|
538
|
+
onChange?.(event.target.value);
|
|
539
|
+
}, ...props, children: options.map((raw) => {
|
|
540
|
+
const item = typeof raw === "string" ? { value: raw, label: raw } : raw;
|
|
541
|
+
return /* @__PURE__ */ jsx5("option", { value: item.value, children: item.label }, item.value);
|
|
542
|
+
}) });
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
// src/pages/DashboardPage.jsx
|
|
546
|
+
import { Fragment as Fragment4, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
547
|
+
function DashboardPage({ metrics = DASHBOARD_METRICS, directoryData = DIRECTORY_REPORT_DATA, mfaData = MFA_REPORT_DATA, selfServiceData = SELF_SERVICE_REPORT_DATA, shortcuts = DASHBOARD_SHORTCUTS, domains, domain, onDomainChange, chartTitles = {}, chartProps = {}, widgetProps = {}, toolbarProps = {}, onMetricSelect, onReportSelect, onShortcutSelect, onToolbarAction, renderMetric, renderShortcuts }) {
|
|
548
|
+
const [showShortcuts, setShowShortcuts] = useState6(true);
|
|
549
|
+
const [expanded, setExpanded] = useState6(null);
|
|
550
|
+
const titles = { directory: "Active Directory Reports", mfa: "MFA Reports", selfService: "Password Self-Service Reports", ...chartTitles };
|
|
551
|
+
const reportAction = (key, id, item) => {
|
|
552
|
+
chartProps[key]?.onSelect?.(id, item);
|
|
553
|
+
onReportSelect?.(id, item);
|
|
554
|
+
};
|
|
555
|
+
const charts = {
|
|
556
|
+
directory: /* @__PURE__ */ jsx6(ActiveDirectoryChart, { ...chartProps.directory, data: directoryData, onSelect: (id, item) => reportAction("directory", id, item) }),
|
|
557
|
+
mfa: /* @__PURE__ */ jsx6(MfaChart, { ...chartProps.mfa, data: mfaData, onSelect: (id, item) => reportAction("mfa", id, item) }),
|
|
558
|
+
selfService: /* @__PURE__ */ jsx6(SelfServiceChart, { ...chartProps.selfService, data: selfServiceData, onSelect: (id, item) => reportAction("selfService", id, item) })
|
|
559
|
+
};
|
|
560
|
+
const expand = (key) => setExpanded(key);
|
|
561
|
+
const frame = (key, className = "") => /* @__PURE__ */ jsx6(
|
|
562
|
+
WidgetFrame,
|
|
563
|
+
{
|
|
564
|
+
...widgetProps[key],
|
|
565
|
+
title: titles[key],
|
|
566
|
+
className: className || widgetProps[key]?.className,
|
|
567
|
+
onExpand: () => {
|
|
568
|
+
widgetProps[key]?.onExpand?.();
|
|
569
|
+
expand(key);
|
|
570
|
+
},
|
|
571
|
+
children: charts[key]
|
|
572
|
+
}
|
|
573
|
+
);
|
|
574
|
+
return /* @__PURE__ */ jsxs6("div", { className: "dash-page", children: [
|
|
575
|
+
/* @__PURE__ */ jsx6(
|
|
576
|
+
DashboardToolbar,
|
|
577
|
+
{
|
|
578
|
+
...toolbarProps,
|
|
579
|
+
domains: domains ?? toolbarProps.domains,
|
|
580
|
+
domain: domain ?? toolbarProps.domain,
|
|
581
|
+
onDomainChange: (value, item) => {
|
|
582
|
+
onDomainChange?.(value, item);
|
|
583
|
+
toolbarProps.onDomainChange?.(value, item);
|
|
584
|
+
},
|
|
585
|
+
showShortcuts,
|
|
586
|
+
onToggleShortcuts: () => {
|
|
587
|
+
setShowShortcuts(!showShortcuts);
|
|
588
|
+
toolbarProps.onToggleShortcuts?.(!showShortcuts);
|
|
589
|
+
},
|
|
590
|
+
onExpand: () => {
|
|
591
|
+
toolbarProps.onExpand?.();
|
|
592
|
+
expand("directory");
|
|
593
|
+
},
|
|
594
|
+
onMenuAction: (id, item) => {
|
|
595
|
+
onToolbarAction?.(id, item);
|
|
596
|
+
toolbarProps.onMenuAction?.(id, item);
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
),
|
|
600
|
+
/* @__PURE__ */ jsx6(
|
|
601
|
+
DashboardLayout,
|
|
602
|
+
{
|
|
603
|
+
showShortcuts,
|
|
604
|
+
metrics: metrics.map((item, index) => renderMetric ? renderMetric(item, index) : /* @__PURE__ */ jsx6(MetricWidget, { ...item, onClick: () => {
|
|
605
|
+
item.onClick?.(item);
|
|
606
|
+
onMetricSelect?.(item);
|
|
607
|
+
if (item.report !== void 0) onReportSelect?.(item.report, item);
|
|
608
|
+
} }, item.id ?? item.title ?? index)),
|
|
609
|
+
charts: /* @__PURE__ */ jsxs6(Fragment4, { children: [
|
|
610
|
+
frame("directory"),
|
|
611
|
+
frame("mfa"),
|
|
612
|
+
frame("selfService", "dash-wide-widget")
|
|
613
|
+
] }),
|
|
614
|
+
shortcuts: renderShortcuts ? renderShortcuts(shortcuts) : /* @__PURE__ */ jsx6(ShortcutRail, { groups: shortcuts, onSelect: onShortcutSelect })
|
|
615
|
+
}
|
|
616
|
+
),
|
|
617
|
+
/* @__PURE__ */ jsx6(ExpandedWidget, { title: expanded && titles[expanded], onClose: () => setExpanded(null), children: charts[expanded] })
|
|
618
|
+
] });
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
// src/pages/ReportsPage.jsx
|
|
622
|
+
import React7, { useState as useState7 } from "react";
|
|
623
|
+
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
624
|
+
function ReportsPage({ groups = REPORT_GROUPS, selected, defaultSelected, onSelect, filtersProps = {}, labels = {}, status: controlledStatus, onGenerate, onStop, onSchedule, results }) {
|
|
625
|
+
const firstReport = groups[0]?.items[0] && normalizeReport(groups[0].items[0]);
|
|
626
|
+
const [localSelected, setLocalSelected] = useState7(defaultSelected ?? firstReport?.id);
|
|
627
|
+
const [localStatus, setLocalStatus] = useState7("empty");
|
|
628
|
+
const [showSchedule, setShowSchedule] = useState7(false);
|
|
629
|
+
const [localDomain, setLocalDomain] = useState7(filtersProps.defaultDomain ?? (typeof filtersProps.domains?.[0] === "string" ? filtersProps.domains[0] : filtersProps.domains?.[0]?.value) ?? "ADSELFSERVICE");
|
|
630
|
+
const [localOu, setLocalOu] = useState7(filtersProps.defaultOu ?? (typeof filtersProps.ouOptions?.[0] === "string" ? filtersProps.ouOptions[0] : filtersProps.ouOptions?.[0]?.value) ?? "All OU");
|
|
631
|
+
const currentSelected = selected ?? localSelected;
|
|
632
|
+
const report = groups.flatMap((group) => group.items.map(normalizeReport)).find((item) => item.id === currentSelected);
|
|
633
|
+
const title = report?.label || firstReport?.label || labels.untitled || "";
|
|
634
|
+
const status = controlledStatus ?? localStatus;
|
|
635
|
+
const domain = filtersProps.domain ?? localDomain;
|
|
636
|
+
const ou = filtersProps.ou ?? localOu;
|
|
637
|
+
const select = (id, item) => {
|
|
638
|
+
if (selected === void 0) setLocalSelected(id);
|
|
639
|
+
onSelect?.(id, item);
|
|
640
|
+
if (controlledStatus === void 0) setLocalStatus("empty");
|
|
641
|
+
};
|
|
642
|
+
const generate = () => {
|
|
643
|
+
if (onGenerate) onGenerate({ selected: currentSelected, report, domain, ou });
|
|
644
|
+
else {
|
|
645
|
+
setLocalStatus("loading");
|
|
646
|
+
window.setTimeout(() => setLocalStatus("empty"), 650);
|
|
647
|
+
}
|
|
648
|
+
};
|
|
649
|
+
const stop = () => {
|
|
650
|
+
onStop?.();
|
|
651
|
+
if (controlledStatus === void 0) setLocalStatus("empty");
|
|
652
|
+
};
|
|
653
|
+
return /* @__PURE__ */ jsxs7("div", { className: "reports-page", children: [
|
|
654
|
+
/* @__PURE__ */ jsx7(ReportCategoryBar, { groups, selected: currentSelected, onSelect: select }),
|
|
655
|
+
/* @__PURE__ */ jsxs7("div", { className: "report-page-body", children: [
|
|
656
|
+
/* @__PURE__ */ jsx7(ReportPageHeading, { title, scheduleLabel: labels.schedule, helpText: labels.help, onSchedule: () => {
|
|
657
|
+
onSchedule?.(report);
|
|
658
|
+
setShowSchedule(!showSchedule);
|
|
659
|
+
} }),
|
|
660
|
+
showSchedule && /* @__PURE__ */ jsx7("div", { className: "report-schedule-note", children: labels.scheduleNote || "Schedule Reports lets you automate delivery of generated reports." }),
|
|
661
|
+
/* @__PURE__ */ jsx7(ReportFilters, { ...filtersProps, domain, ou, onDomainChange: (value, item) => {
|
|
662
|
+
if (filtersProps.domain === void 0) setLocalDomain(value);
|
|
663
|
+
filtersProps.onDomainChange?.(value, item);
|
|
664
|
+
}, onOuChange: (value, item) => {
|
|
665
|
+
if (filtersProps.ou === void 0) setLocalOu(value);
|
|
666
|
+
filtersProps.onOuChange?.(value, item);
|
|
667
|
+
}, generating: status === "loading", onGenerate: generate, onStop: stop }),
|
|
668
|
+
results ?? /* @__PURE__ */ jsx7(ReportResults, { status, emptyMessage: labels.empty, loadingMessage: labels.loading })
|
|
669
|
+
] })
|
|
670
|
+
] });
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
// src/pages/ConfigurationPage.jsx
|
|
674
|
+
import React8, { useState as useState8 } from "react";
|
|
675
|
+
import { Fragment as Fragment5, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
676
|
+
function ConfigurationPage({ selected, policyId = "policy", groups = CONFIG_GROUPS, policies, initialPolicies = DEMO_POLICIES, onPoliciesChange, features = POLICY_FEATURES, columns = POLICY_COLUMNS, labels = {}, defaultDomain = "ADSELFSERVICE", onSavePolicy, onDeletePolicy, onCopyPolicy, onFeatureSelect, createPolicy, renderSection, renderPolicyForm, headerProps = {}, featureProps = {}, toolbarProps = {}, tableProps = {} }) {
|
|
677
|
+
const [localPolicies, setLocalPolicies] = useState8(initialPolicies);
|
|
678
|
+
const [query, setQuery] = useState8("");
|
|
679
|
+
const [page, setPage] = useState8(1);
|
|
680
|
+
const [editor, setEditor] = useState8(null);
|
|
681
|
+
const [name, setName] = useState8("");
|
|
682
|
+
const currentSelected = selected ?? policyId;
|
|
683
|
+
const currentPolicies = policies ?? localPolicies;
|
|
684
|
+
const update = (next) => {
|
|
685
|
+
if (policies === void 0) setLocalPolicies(next);
|
|
686
|
+
onPoliciesChange?.(next);
|
|
687
|
+
};
|
|
688
|
+
const item = groups.flatMap((group) => group.items).find((entry) => entry.id === currentSelected);
|
|
689
|
+
const title = item?.label || labels.title || "Policy Configuration";
|
|
690
|
+
const filtered = currentPolicies.filter((policy) => String(policy.name || "").toLowerCase().includes(query.toLowerCase()));
|
|
691
|
+
const pageSize = Math.max(1, toolbarProps.pageSize ?? 25);
|
|
692
|
+
const currentPage = Math.min(page, Math.max(1, Math.ceil(filtered.length / pageSize)));
|
|
693
|
+
const visiblePolicies = filtered.slice((currentPage - 1) * pageSize, currentPage * pageSize);
|
|
694
|
+
const openEditor = (policy) => {
|
|
695
|
+
setEditor(policy || { name: "" });
|
|
696
|
+
setName(policy?.name || "");
|
|
697
|
+
};
|
|
698
|
+
const savePolicy = () => {
|
|
699
|
+
if (!name.trim()) return;
|
|
700
|
+
const nextPolicy = editor.name ? { ...editor, name: name.trim() } : createPolicy ? createPolicy(name.trim()) : { name: name.trim(), permissions: "", domain: defaultDomain, modifiedBy: "", modified: "" };
|
|
701
|
+
const next = editor.name ? currentPolicies.map((policy) => policy === editor ? nextPolicy : policy) : [...currentPolicies, nextPolicy];
|
|
702
|
+
update(next);
|
|
703
|
+
onSavePolicy?.(nextPolicy, editor);
|
|
704
|
+
setEditor(null);
|
|
705
|
+
};
|
|
706
|
+
const removePolicy = (policy) => {
|
|
707
|
+
update(currentPolicies.filter((item2) => item2 !== policy));
|
|
708
|
+
onDeletePolicy?.(policy);
|
|
709
|
+
};
|
|
710
|
+
const copyPolicy = (policy) => {
|
|
711
|
+
const copy = { ...policy, name: `${policy.name} ${labels.copySuffix || "Copy"}` };
|
|
712
|
+
update([...currentPolicies, copy]);
|
|
713
|
+
onCopyPolicy?.(copy, policy);
|
|
714
|
+
};
|
|
715
|
+
const otherSection = renderSection?.(currentSelected, item);
|
|
716
|
+
return /* @__PURE__ */ jsxs8("div", { className: "config-page", children: [
|
|
717
|
+
/* @__PURE__ */ jsx8(ConfigurationHeader, { title, ...headerProps }),
|
|
718
|
+
currentSelected === policyId ? /* @__PURE__ */ jsxs8(Fragment5, { children: [
|
|
719
|
+
/* @__PURE__ */ jsx8(PolicyFeatureStrip, { ...featureProps, title: labels.featuresTitle ?? featureProps.title, instruction: labels.instruction ?? featureProps.instruction, features, onFeatureSelect: (id, item2) => {
|
|
720
|
+
onFeatureSelect?.(id, item2);
|
|
721
|
+
featureProps.onFeatureSelect?.(id, item2);
|
|
722
|
+
} }),
|
|
723
|
+
/* @__PURE__ */ jsx8(PolicyToolbar, { ...toolbarProps, title: labels.policiesTitle || toolbarProps.title, addLabel: labels.add || toolbarProps.addLabel, count: filtered.length, page: currentPage, onPageChange: (next) => {
|
|
724
|
+
setPage(next);
|
|
725
|
+
toolbarProps.onPageChange?.(next);
|
|
726
|
+
}, query, onQueryChange: (value) => {
|
|
727
|
+
setQuery(value);
|
|
728
|
+
setPage(1);
|
|
729
|
+
toolbarProps.onQueryChange?.(value);
|
|
730
|
+
}, onAdd: () => {
|
|
731
|
+
openEditor();
|
|
732
|
+
toolbarProps.onAdd?.();
|
|
733
|
+
} }),
|
|
734
|
+
/* @__PURE__ */ jsx8(PolicyTable, { ...tableProps, policies: visiblePolicies, columns, defaultDomain, onEdit: (policy) => {
|
|
735
|
+
openEditor(policy);
|
|
736
|
+
tableProps.onEdit?.(policy);
|
|
737
|
+
}, onDelete: (policy) => {
|
|
738
|
+
removePolicy(policy);
|
|
739
|
+
tableProps.onDelete?.(policy);
|
|
740
|
+
}, onCopy: (policy) => {
|
|
741
|
+
copyPolicy(policy);
|
|
742
|
+
tableProps.onCopy?.(policy);
|
|
743
|
+
} })
|
|
744
|
+
] }) : otherSection !== void 0 ? otherSection : /* @__PURE__ */ jsxs8(Panel, { className: "config-detail-panel", children: [
|
|
745
|
+
/* @__PURE__ */ jsx8("h2", { children: title }),
|
|
746
|
+
/* @__PURE__ */ jsx8(FormRow, { label: labels.domain || "Select Domain", children: /* @__PURE__ */ jsx8("select", { className: "ad-select", defaultValue: defaultDomain, children: /* @__PURE__ */ jsx8("option", { children: defaultDomain }) }) }),
|
|
747
|
+
/* @__PURE__ */ jsxs8(CheckRow, { children: [
|
|
748
|
+
labels.enable || "Enable",
|
|
749
|
+
" ",
|
|
750
|
+
title
|
|
751
|
+
] }),
|
|
752
|
+
/* @__PURE__ */ jsx8("p", { children: labels.sectionDescription?.(title) || `Configure ${title.toLowerCase()} for the selected domain.` })
|
|
753
|
+
] }),
|
|
754
|
+
/* @__PURE__ */ jsx8(Modal, { title: editor?.name ? labels.editTitle || "Edit Policy" : labels.addTitle || "Add New Policy", open: !!editor, onClose: () => setEditor(null), footer: /* @__PURE__ */ jsxs8(Fragment5, { children: [
|
|
755
|
+
/* @__PURE__ */ jsx8(Button, { onClick: () => setEditor(null), children: labels.cancel || "Cancel" }),
|
|
756
|
+
/* @__PURE__ */ jsx8(Button, { variant: "primary", onClick: savePolicy, children: labels.save || "Save" })
|
|
757
|
+
] }), children: renderPolicyForm ? renderPolicyForm({ policy: editor, name, setName }) : /* @__PURE__ */ jsx8(TextField, { label: labels.policyName || "Policy Name", value: name, onChange: (event) => setName(event.target.value) }) })
|
|
758
|
+
] });
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
// src/admin/screens.jsx
|
|
762
|
+
import React9, { useState as useState9 } from "react";
|
|
763
|
+
import { ArrowRight, Database, LaptopMinimal, Network, Server } from "lucide-react";
|
|
764
|
+
import { Fragment as Fragment6, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
765
|
+
var ADMIN_GROUPS = [
|
|
766
|
+
{ label: "Customize", items: [{ id: "login", label: "Login Settings" }, { id: "personalize", label: "Personalize" }] },
|
|
767
|
+
{ label: "Enterprise Essentials", items: [{ id: "failover", label: "Failover and Secure Gateway" }, { id: "reverse", label: "Reverse Proxy" }] },
|
|
768
|
+
{ label: "Product Settings", items: [{ id: "connection", label: "Connection" }, { id: "mail", label: "Mail / SMS Settings" }, { id: "dashboard", label: "Dashboard Updater" }, { id: "backup", label: "Backup Settings" }, { id: "site", label: "Site Based DC Updater" }, { id: "integration", label: "Integration Settings" }, { id: "windows", label: "Windows Service" }, { id: "security", label: "Security and Privacy" }] },
|
|
769
|
+
{ label: "License Management", items: [{ id: "restrict", label: "Restrict Users" }] }
|
|
770
|
+
];
|
|
771
|
+
function RowLink({ children, onClick }) {
|
|
772
|
+
return /* @__PURE__ */ jsx9(TextLink, { onClick, children });
|
|
773
|
+
}
|
|
774
|
+
function LoginSettings() {
|
|
775
|
+
const [modal, setModal] = useState9("");
|
|
776
|
+
const modalItems = modal === "Manage Custom Attributes" ? ["First Name", "Last Name", "Display Name", "Mail Address", "Mobile Number"] : ["ADSELFSERVICE", "Microsoft Entra ID"];
|
|
777
|
+
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
778
|
+
/* @__PURE__ */ jsx9(Frame, { title: "Login Settings", help: "Configure administrator and directory user login behavior", action: /* @__PURE__ */ jsx9(Button, { onClick: () => setModal("Manage Custom Attributes"), children: "Manage Custom Attributes" }), tabs: ["General", "Single Sign-On", "Smart Card Authentication"], children: (active) => active === "General" ? /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
779
|
+
/* @__PURE__ */ jsx9(SectionTitle, { children: "Login Settings" }),
|
|
780
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-option-list", children: [
|
|
781
|
+
/* @__PURE__ */ jsx9(CheckRow, { help: "Hides the administrator option on the self-service login page", children: "Hide self-service admin login" }),
|
|
782
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-option-inline", children: [
|
|
783
|
+
/* @__PURE__ */ jsx9(CheckRow, { disabled: true, children: "Allow/Restrict admin portal access based on IP addresses." }),
|
|
784
|
+
/* @__PURE__ */ jsx9(RowLink, { onClick: () => setModal("Configure IP addresses"), children: "Configure now" })
|
|
785
|
+
] }),
|
|
786
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-option-inline", children: [
|
|
787
|
+
/* @__PURE__ */ jsx9(CheckRow, { defaultChecked: true, children: "Show the directory selection drop-down menu in the web portal's login page." }),
|
|
788
|
+
/* @__PURE__ */ jsx9(RowLink, { onClick: () => setModal("Configure Directory List"), children: "Configure Directory List" })
|
|
789
|
+
] }),
|
|
790
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-option-inline", children: [
|
|
791
|
+
/* @__PURE__ */ jsx9(CheckRow, { defaultChecked: true, children: "Show the directory selection drop-down menu in the mobile app and mobile portal login screen." }),
|
|
792
|
+
/* @__PURE__ */ jsx9(RowLink, { onClick: () => setModal("Configure Directory List"), children: "Configure Directory List" })
|
|
793
|
+
] }),
|
|
794
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-option-inline", children: [
|
|
795
|
+
/* @__PURE__ */ jsx9(CheckRow, { help: "Permit configured attributes as alternate login identifiers", children: "Enable other unique attributes to log in to the product." }),
|
|
796
|
+
/* @__PURE__ */ jsx9(RowLink, { onClick: () => setModal("Select attribute list"), children: "Select attribute list" })
|
|
797
|
+
] }),
|
|
798
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-option-inline", children: [
|
|
799
|
+
/* @__PURE__ */ jsx9(CheckRow, { children: "Enable user disclaimer" }),
|
|
800
|
+
/* @__PURE__ */ jsx9(RowLink, { onClick: () => setModal("Customize disclaimer"), children: "Customize" })
|
|
801
|
+
] }),
|
|
802
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-option-inline", children: [
|
|
803
|
+
/* @__PURE__ */ jsx9(CheckRow, { children: "Prevent hackers from finding out valid users." }),
|
|
804
|
+
/* @__PURE__ */ jsx9(RowLink, { onClick: () => setModal("Configure user protection"), children: "Configure" }),
|
|
805
|
+
/* @__PURE__ */ jsx9(HelpTip, { text: "Use the same message for valid and invalid usernames" })
|
|
806
|
+
] })
|
|
807
|
+
] }),
|
|
808
|
+
/* @__PURE__ */ jsx9(SectionTitle, { children: "CAPTCHA settings" }),
|
|
809
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-option-list", children: [
|
|
810
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-option-inline", children: [
|
|
811
|
+
/* @__PURE__ */ jsx9(CheckRow, { children: "Show CAPTCHA (word verification image) on login page." }),
|
|
812
|
+
/* @__PURE__ */ jsx9(RowLink, { onClick: () => setModal("CAPTCHA settings"), children: "CAPTCHA settings" })
|
|
813
|
+
] }),
|
|
814
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-indent", children: [
|
|
815
|
+
/* @__PURE__ */ jsxs9(CheckRow, { disabled: true, children: [
|
|
816
|
+
"On ",
|
|
817
|
+
/* @__PURE__ */ jsx9("em", { children: "Admin" }),
|
|
818
|
+
" & ",
|
|
819
|
+
/* @__PURE__ */ jsx9("em", { children: "Directory User" }),
|
|
820
|
+
" login page."
|
|
821
|
+
] }),
|
|
822
|
+
/* @__PURE__ */ jsxs9(CheckRow, { disabled: true, children: [
|
|
823
|
+
"On ",
|
|
824
|
+
/* @__PURE__ */ jsx9("em", { children: "Reset Password" }),
|
|
825
|
+
" & ",
|
|
826
|
+
/* @__PURE__ */ jsx9("em", { children: "Unlock Account" }),
|
|
827
|
+
" login page."
|
|
828
|
+
] })
|
|
829
|
+
] }),
|
|
830
|
+
/* @__PURE__ */ jsx9(CheckRow, { help: "Enable an audio alternative for the CAPTCHA", children: "Enable audio CAPTCHA." })
|
|
831
|
+
] }),
|
|
832
|
+
/* @__PURE__ */ jsx9(SectionTitle, { children: "Other Settings" }),
|
|
833
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-option-list", children: [
|
|
834
|
+
/* @__PURE__ */ jsxs9(CheckRow, { children: [
|
|
835
|
+
"Hide ",
|
|
836
|
+
/* @__PURE__ */ jsx9("em", { children: "Help" }),
|
|
837
|
+
" button on end users page"
|
|
838
|
+
] }),
|
|
839
|
+
/* @__PURE__ */ jsxs9(CheckRow, { children: [
|
|
840
|
+
"Hide ",
|
|
841
|
+
/* @__PURE__ */ jsx9("em", { children: "Mobile Access" }),
|
|
842
|
+
" button on end users page"
|
|
843
|
+
] })
|
|
844
|
+
] }),
|
|
845
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-tail-link", children: [
|
|
846
|
+
/* @__PURE__ */ jsx9(RowLink, { onClick: () => setModal("Customize HTML"), children: "Customize" }),
|
|
847
|
+
" end user login page completely as HTML"
|
|
848
|
+
] }),
|
|
849
|
+
/* @__PURE__ */ jsx9(SaveBar, {})
|
|
850
|
+
] }) : active === "Single Sign-On" ? /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
851
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-option-list", children: [
|
|
852
|
+
/* @__PURE__ */ jsx9(CheckRow, { children: /* @__PURE__ */ jsx9("strong", { children: "Enable SSO" }) }),
|
|
853
|
+
/* @__PURE__ */ jsx9(RadioRow, { name: "sso", value: "SAML", disabled: true, children: "SAML Authentication" }),
|
|
854
|
+
/* @__PURE__ */ jsx9(RadioRow, { name: "sso", value: "NTLM", checked: true, disabled: true, children: "NTLM Authentication" })
|
|
855
|
+
] }),
|
|
856
|
+
/* @__PURE__ */ jsxs9(Notice, { children: [
|
|
857
|
+
"To complete the NTLM SSO configuration, download the latest Jespa JAR file, add it to the /lib folder, and restart ADSelfService Plus. ",
|
|
858
|
+
/* @__PURE__ */ jsx9(TextLink, { children: "Learn More" })
|
|
859
|
+
] }),
|
|
860
|
+
/* @__PURE__ */ jsx9(DataTable, { columns: ["", "Domain Name", "Computer Account", "Status"], rows: [[/* @__PURE__ */ jsx9(CheckRow, {}), "ADSELFSERVICE", "-", /* @__PURE__ */ jsx9(TextLink, { onClick: () => setModal("Configure SSO"), children: "Configure now" })]] }),
|
|
861
|
+
/* @__PURE__ */ jsx9(SaveBar, { cancel: false })
|
|
862
|
+
] }) : /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
863
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-form-block", children: [
|
|
864
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Import CA Root Certificate", children: /* @__PURE__ */ jsx9("input", { type: "file", "aria-label": "Choose certificate file" }) }),
|
|
865
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Mapping Attribute in Certificate", children: /* @__PURE__ */ jsx9(InlineSelect, { options: ["SAN.OtherName", "Subject", "SAN.Email"] }) }),
|
|
866
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Mapping Attribute in AD", children: /* @__PURE__ */ jsx9(InlineSelect, { options: ["userPrincipalName", "sAMAccountName", "mail"] }) }),
|
|
867
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Linked Domains", children: /* @__PURE__ */ jsx9("input", { className: "ad-input", disabled: true, defaultValue: "adselfservice.com" }) }),
|
|
868
|
+
/* @__PURE__ */ jsx9(SaveBar, {})
|
|
869
|
+
] }),
|
|
870
|
+
/* @__PURE__ */ jsx9(Notice, { tone: "warning", children: "You must restart ADSelfService Plus for the changes to take effect. Smart Card Authentication is supported only for users in Active Directory." })
|
|
871
|
+
] }) }),
|
|
872
|
+
/* @__PURE__ */ jsx9(Modal, { title: modal, open: !!modal, onClose: () => setModal(""), footer: /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
873
|
+
/* @__PURE__ */ jsx9(Button, { onClick: () => setModal(""), children: "Cancel" }),
|
|
874
|
+
/* @__PURE__ */ jsx9(Button, { variant: "primary", onClick: () => setModal(""), children: "Done" })
|
|
875
|
+
] }), children: modal === "Configure IP addresses" ? /* @__PURE__ */ jsx9(TextField, { label: "Allowed IP address or range", placeholder: "192.168.1.0/24" }) : modal === "Customize disclaimer" || modal === "Customize HTML" ? /* @__PURE__ */ jsx9("textarea", { className: "ad-textarea", rows: "6", "aria-label": "Custom content" }) : /* @__PURE__ */ jsx9("div", { className: "ad-modal-options", children: modalItems.map((item) => /* @__PURE__ */ jsx9(CheckRow, { defaultChecked: true, children: item }, item)) }) })
|
|
876
|
+
] });
|
|
877
|
+
}
|
|
878
|
+
function Personalize() {
|
|
879
|
+
return /* @__PURE__ */ jsx9(Frame, { title: "Personalize Settings", tabs: ["Display Settings", "Portal Rebranding", "Mobile Rebranding", "Change Password", "Language Customization"], children: (active) => active === "Display Settings" ? /* @__PURE__ */ jsxs9("div", { className: "ad-form-block", children: [
|
|
880
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Choose Language", children: /* @__PURE__ */ jsx9(InlineSelect, { options: ["Browser Default", "English", "Japanese", "Spanish", "German", "French"] }) }),
|
|
881
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Choose AD Welcome Name", children: /* @__PURE__ */ jsx9(InlineSelect, { options: ["SamAccountName", "UserPrincipalName", "DisplayName", "FirstName", "LastName"] }) }),
|
|
882
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Choose Entra ID Welcome Name", children: /* @__PURE__ */ jsx9(InlineSelect, { options: ["UserPrincipalName", "DisplayName", "FirstName", "Mail Address"] }) }),
|
|
883
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Time Format", children: /* @__PURE__ */ jsx9(InlineSelect, { options: ["02:45 PM", "14:45", "14:45:00"] }) }),
|
|
884
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Date Format", children: /* @__PURE__ */ jsx9(InlineSelect, { options: ["2016/08/15 (yyyy/MM/dd)", "08/15/2016 (MM/dd/yyyy)", "15-08-2016 (dd-MM-yyyy)"], width: 230 }) }),
|
|
885
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Time Zone", children: /* @__PURE__ */ jsx9(InlineSelect, { options: ["(GMT -8:00) Pacific Daylight Time(America/Los_Angeles)", "(GMT +5:30) India Standard Time(Asia/Kolkata)", "(GMT 00:00) UTC"], width: 355 }) }),
|
|
886
|
+
/* @__PURE__ */ jsx9(SaveBar, { cancelLabel: "Restore" })
|
|
887
|
+
] }) : active === "Portal Rebranding" ? /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
888
|
+
/* @__PURE__ */ jsx9(SectionTitle, { children: "General Customization" }),
|
|
889
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Choose Theme Color", children: /* @__PURE__ */ jsx9(InlineSelect, { options: ["Dark Gray", "Blue", "Green"] }) }),
|
|
890
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Browser Title", children: /* @__PURE__ */ jsx9(TextField, { defaultValue: "ADSelfService Plus" }) }),
|
|
891
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Browser Title Image", hint: "Preferred image format is .ico", children: /* @__PURE__ */ jsx9("input", { type: "file", accept: ".ico" }) }),
|
|
892
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Change Logo", hint: "Dimension: 200 x 50, Size 2MB", children: /* @__PURE__ */ jsx9("input", { type: "file", accept: "image/*" }) }),
|
|
893
|
+
/* @__PURE__ */ jsx9(SectionTitle, { children: "Login Customization" }),
|
|
894
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Customize Login Page Buttons", children: /* @__PURE__ */ jsxs9("div", { className: "ad-option-list", children: [
|
|
895
|
+
/* @__PURE__ */ jsx9(CheckRow, { defaultChecked: true, children: "Log In" }),
|
|
896
|
+
/* @__PURE__ */ jsx9(CheckRow, { defaultChecked: true, children: "Forgot your password?" }),
|
|
897
|
+
/* @__PURE__ */ jsx9(CheckRow, { defaultChecked: true, children: "Account locked out?" })
|
|
898
|
+
] }) }),
|
|
899
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Login Screen Background Image", hint: "Dimension: 1300 x 700, Size 2MB", children: /* @__PURE__ */ jsx9("input", { type: "file", accept: "image/*" }) }),
|
|
900
|
+
/* @__PURE__ */ jsx9(SaveBar, { cancelLabel: "Restore" })
|
|
901
|
+
] }) : active === "Mobile Rebranding" ? /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
902
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Change Logo", hint: "Dimension 1000x400 - Size 2 MB", children: /* @__PURE__ */ jsx9("input", { type: "file", accept: "image/*" }) }),
|
|
903
|
+
/* @__PURE__ */ jsx9(SectionTitle, { children: "Customize Home Screen" }),
|
|
904
|
+
/* @__PURE__ */ jsx9("div", { className: "ad-option-list", children: ["Password Reset", "Account Unlock", "Change Password", "Server Settings", "Login", "Help", "Feedback"].map((item) => /* @__PURE__ */ jsx9(CheckRow, { defaultChecked: item !== "Change Password", children: item }, item)) }),
|
|
905
|
+
/* @__PURE__ */ jsx9(CheckRow, { children: "Restrict Mobile Access" }),
|
|
906
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-indent", children: [
|
|
907
|
+
/* @__PURE__ */ jsx9(CheckRow, { disabled: true, children: "Restrict Mobile site access" }),
|
|
908
|
+
/* @__PURE__ */ jsx9(CheckRow, { disabled: true, children: "Restrict Mobile app (iOS/android) access" })
|
|
909
|
+
] }),
|
|
910
|
+
/* @__PURE__ */ jsx9(CheckRow, { children: "Remember login in mobile app for auto login." }),
|
|
911
|
+
/* @__PURE__ */ jsx9(SectionTitle, { children: "Advanced" }),
|
|
912
|
+
/* @__PURE__ */ jsx9("div", { className: "ad-spaced", children: /* @__PURE__ */ jsx9(Button, { children: "Preview" }) }),
|
|
913
|
+
/* @__PURE__ */ jsx9(SaveBar, { cancelLabel: "Restore" })
|
|
914
|
+
] }) : active === "Change Password" ? /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
915
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-form-block", children: [
|
|
916
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Old Password", required: true, children: /* @__PURE__ */ jsx9(TextField, { type: "password" }) }),
|
|
917
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "New Password", required: true, children: /* @__PURE__ */ jsx9(TextField, { type: "password" }) }),
|
|
918
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Confirm New Password", required: true, children: /* @__PURE__ */ jsx9(TextField, { type: "password" }) })
|
|
919
|
+
] }),
|
|
920
|
+
/* @__PURE__ */ jsxs9("ul", { className: "ad-password-rules", children: [
|
|
921
|
+
/* @__PURE__ */ jsx9("li", { children: "Minimum length should be at least 8" }),
|
|
922
|
+
/* @__PURE__ */ jsx9("li", { children: "Number of special characters to include 2" }),
|
|
923
|
+
/* @__PURE__ */ jsx9("li", { children: "Must contain at least 1 upper case character" }),
|
|
924
|
+
/* @__PURE__ */ jsx9("li", { children: "Number of numerals to include 1" }),
|
|
925
|
+
/* @__PURE__ */ jsx9("li", { children: "Must not be a palindrome" })
|
|
926
|
+
] }),
|
|
927
|
+
/* @__PURE__ */ jsx9(SaveBar, { saveLabel: "Change Password" })
|
|
928
|
+
] }) : /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
929
|
+
/* @__PURE__ */ jsx9(Notice, { children: "Personalize ADSelfService Plus by modifying text displayed in its web interface. Retain curly braces in sentences that contain them, then reload the web console to view changes." }),
|
|
930
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Select Language", children: /* @__PURE__ */ jsx9(InlineSelect, { options: ["English", "Japanese", "Chinese-Simplified", "Spanish", "German", "French"] }) }),
|
|
931
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-language-toolbar", children: [
|
|
932
|
+
/* @__PURE__ */ jsx9(TextField, { placeholder: "Enter text to search" }),
|
|
933
|
+
/* @__PURE__ */ jsx9(Button, { children: "Find & Replace" }),
|
|
934
|
+
/* @__PURE__ */ jsx9("span", { children: "1 - 25 of 18324" })
|
|
935
|
+
] }),
|
|
936
|
+
/* @__PURE__ */ jsx9(DataTable, { columns: ["Text", "Action"], rows: ["Force Enrollment using Logon Script", "Mandatory fields cannot be left empty.", "Logon Hours", "Modules", "Trusted IPs", "Embed Widget", "Active Directory account unlock failed.", "Successfully changed the password"].map((text) => [text, /* @__PURE__ */ jsx9(TextLink, { children: "Modify" })]) })
|
|
937
|
+
] }) });
|
|
938
|
+
}
|
|
939
|
+
function Failover() {
|
|
940
|
+
const [mode, setMode] = useState9("Load Balancing");
|
|
941
|
+
const [open, setOpen] = useState9(false);
|
|
942
|
+
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
943
|
+
/* @__PURE__ */ jsx9(PageHeader, { title: "Failover and Secure Gateway", action: /* @__PURE__ */ jsx9(Button, { variant: "outline", onClick: () => setOpen(true), children: "How to configure?" }) }),
|
|
944
|
+
/* @__PURE__ */ jsx9(Panel, { className: "ad-architecture-panel", children: /* @__PURE__ */ jsxs9("div", { className: "ad-architecture", children: [
|
|
945
|
+
/* @__PURE__ */ jsx9("h3", { children: "Load Balancer Architecture" }),
|
|
946
|
+
/* @__PURE__ */ jsx9(Tabs, { tabs: ["Load Balancing", "Failover"], active: mode, onChange: setMode }),
|
|
947
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-architecture-diagram", children: [
|
|
948
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-architecture-node", children: [
|
|
949
|
+
/* @__PURE__ */ jsx9(LaptopMinimal, { size: 48 }),
|
|
950
|
+
/* @__PURE__ */ jsx9("span", { children: "Web Interface" })
|
|
951
|
+
] }),
|
|
952
|
+
/* @__PURE__ */ jsx9(ArrowRight, { size: 23 }),
|
|
953
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-architecture-node", children: [
|
|
954
|
+
/* @__PURE__ */ jsx9(Network, { size: 48 }),
|
|
955
|
+
/* @__PURE__ */ jsx9("span", { children: "Virtual IP/Hostname" })
|
|
956
|
+
] }),
|
|
957
|
+
/* @__PURE__ */ jsx9(ArrowRight, { size: 23 }),
|
|
958
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-server-stack", children: [
|
|
959
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-architecture-node", children: [
|
|
960
|
+
/* @__PURE__ */ jsx9(Server, { size: 45 }),
|
|
961
|
+
/* @__PURE__ */ jsx9("small", { children: "Primary" })
|
|
962
|
+
] }),
|
|
963
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-architecture-node", children: [
|
|
964
|
+
/* @__PURE__ */ jsx9(Server, { size: 45 }),
|
|
965
|
+
/* @__PURE__ */ jsx9("small", { children: "Secondary" })
|
|
966
|
+
] }),
|
|
967
|
+
/* @__PURE__ */ jsx9("span", { children: "ADSelfService Plus Servers" })
|
|
968
|
+
] }),
|
|
969
|
+
/* @__PURE__ */ jsx9(ArrowRight, { size: 23 }),
|
|
970
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-architecture-node", children: [
|
|
971
|
+
/* @__PURE__ */ jsx9(Database, { size: 48 }),
|
|
972
|
+
/* @__PURE__ */ jsx9("span", { children: "ADSelfService Plus Database" })
|
|
973
|
+
] })
|
|
974
|
+
] })
|
|
975
|
+
] }) }),
|
|
976
|
+
/* @__PURE__ */ jsx9("div", { className: "ad-configure-action", children: /* @__PURE__ */ jsx9(Button, { variant: "primary", onClick: () => setOpen(true), children: "Click to Configure" }) }),
|
|
977
|
+
/* @__PURE__ */ jsxs9(Modal, { title: `${mode} Configuration`, open, onClose: () => setOpen(false), footer: /* @__PURE__ */ jsx9(Button, { variant: "primary", onClick: () => setOpen(false), children: "Close" }), children: [
|
|
978
|
+
/* @__PURE__ */ jsxs9(Notice, { children: [
|
|
979
|
+
"Specify the access URL and server details to configure ",
|
|
980
|
+
mode.toLowerCase(),
|
|
981
|
+
"."
|
|
982
|
+
] }),
|
|
983
|
+
/* @__PURE__ */ jsx9(TextField, { label: "Access URL", placeholder: "https://adselfservice.example.com" })
|
|
984
|
+
] })
|
|
985
|
+
] });
|
|
986
|
+
}
|
|
987
|
+
function ReverseProxy() {
|
|
988
|
+
return /* @__PURE__ */ jsxs9(Frame, { title: "Reverse Proxy", children: [
|
|
989
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-proxy", children: [
|
|
990
|
+
/* @__PURE__ */ jsx9("strong", { children: "Context Based" }),
|
|
991
|
+
/* @__PURE__ */ jsxs9("dl", { children: [
|
|
992
|
+
/* @__PURE__ */ jsx9("dt", { children: "Protocol" }),
|
|
993
|
+
/* @__PURE__ */ jsx9("dd", { children: "HTTPS" }),
|
|
994
|
+
/* @__PURE__ */ jsx9("dt", { children: "Port" }),
|
|
995
|
+
/* @__PURE__ */ jsx9("dd", { children: "443" }),
|
|
996
|
+
/* @__PURE__ */ jsx9("dt", { children: "Context" }),
|
|
997
|
+
/* @__PURE__ */ jsx9("dd", { children: "adssp" }),
|
|
998
|
+
/* @__PURE__ */ jsx9("dt", { children: "Access URL" }),
|
|
999
|
+
/* @__PURE__ */ jsx9("dd", { children: "https://WIN-6VQ61ODR35T:443/adssp" }),
|
|
1000
|
+
/* @__PURE__ */ jsx9("dt", { children: "Target URL" }),
|
|
1001
|
+
/* @__PURE__ */ jsx9("dd", { children: "https://ADSSPDEMO1:443" })
|
|
1002
|
+
] })
|
|
1003
|
+
] }),
|
|
1004
|
+
/* @__PURE__ */ jsx9(Notice, { tone: "warning", children: "To modify reverse proxy details, navigate to AD360 > Admin > Administration > Reverse Proxy." })
|
|
1005
|
+
] });
|
|
1006
|
+
}
|
|
1007
|
+
function Connection() {
|
|
1008
|
+
const [port, setPort] = useState9("https");
|
|
1009
|
+
return /* @__PURE__ */ jsx9(Frame, { title: "Connection Settings", action: /* @__PURE__ */ jsx9(TextLink, { children: "Configure Access URL" }), tabs: ["Connection Settings", "Proxy Settings", "General Settings"], children: (active) => active === "Connection Settings" ? /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
1010
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-form-block", children: [
|
|
1011
|
+
/* @__PURE__ */ jsxs9(FormRow, { label: "ADSelfService Plus Port [http]", children: [
|
|
1012
|
+
/* @__PURE__ */ jsx9(RadioRow, { name: "port", value: "http", checked: port === "http", onChange: setPort }),
|
|
1013
|
+
/* @__PURE__ */ jsx9("input", { className: "ad-input ad-short", defaultValue: "8888", disabled: port !== "http" })
|
|
1014
|
+
] }),
|
|
1015
|
+
/* @__PURE__ */ jsxs9(FormRow, { label: "ADSelfService Plus Port [https]", children: [
|
|
1016
|
+
/* @__PURE__ */ jsx9(RadioRow, { name: "port", value: "https", checked: port === "https", onChange: setPort }),
|
|
1017
|
+
/* @__PURE__ */ jsx9("input", { className: "ad-input ad-short", defaultValue: "443", disabled: port !== "https" }),
|
|
1018
|
+
/* @__PURE__ */ jsx9(TextLink, { children: "Apply SSL Certificate" })
|
|
1019
|
+
] }),
|
|
1020
|
+
/* @__PURE__ */ jsxs9(FormRow, { label: "Encrypt Keystore Password", children: [
|
|
1021
|
+
/* @__PURE__ */ jsx9(CheckRow, {}),
|
|
1022
|
+
/* @__PURE__ */ jsx9("input", { className: "ad-input", disabled: true, type: "password" })
|
|
1023
|
+
] }),
|
|
1024
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "", children: /* @__PURE__ */ jsx9(CheckRow, { children: "Use LDAP SSL(LDAPS)" }) }),
|
|
1025
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "", children: /* @__PURE__ */ jsx9(TextLink, { children: "Advanced Settings" }) })
|
|
1026
|
+
] }),
|
|
1027
|
+
/* @__PURE__ */ jsx9(SaveBar, {}),
|
|
1028
|
+
/* @__PURE__ */ jsx9("p", { className: "ad-footnote", children: "Changes will reflect only on restart of ADSelfService Plus." })
|
|
1029
|
+
] }) : active === "Proxy Settings" ? /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
1030
|
+
/* @__PURE__ */ jsx9(CheckRow, { children: "Enable Proxy Server" }),
|
|
1031
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-form-block", children: [
|
|
1032
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Server Name or IP", required: true, children: /* @__PURE__ */ jsx9(TextField, { placeholder: "Server Name or IP" }) }),
|
|
1033
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Port", children: /* @__PURE__ */ jsx9(TextField, { placeholder: "Port" }) }),
|
|
1034
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Username", children: /* @__PURE__ */ jsx9(TextField, {}) }),
|
|
1035
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Password", children: /* @__PURE__ */ jsx9(TextField, { type: "password" }) })
|
|
1036
|
+
] }),
|
|
1037
|
+
/* @__PURE__ */ jsx9("p", { className: "ad-footnote", children: "Provide username and password if the proxy server requires authentication." }),
|
|
1038
|
+
/* @__PURE__ */ jsx9(SaveBar, { cancelLabel: "Reset" }),
|
|
1039
|
+
/* @__PURE__ */ jsx9("div", { className: "ad-tail-link", children: /* @__PURE__ */ jsx9(TextLink, { children: "Test Connection" }) })
|
|
1040
|
+
] }) : /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
1041
|
+
/* @__PURE__ */ jsx9(SectionTitle, { children: "Session Settings" }),
|
|
1042
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Session Expiration Time", children: /* @__PURE__ */ jsx9(InlineSelect, { options: ["10 mins", "15 mins", "20 mins", "25 mins", "30 mins", "45 mins", "60 mins", "24 hrs", "Never"] }) }),
|
|
1043
|
+
/* @__PURE__ */ jsx9(CheckRow, { children: "Deny Concurrent Logins" }),
|
|
1044
|
+
/* @__PURE__ */ jsx9(SectionTitle, { children: "Startup & Logging Settings" }),
|
|
1045
|
+
/* @__PURE__ */ jsx9(SaveBar, { saveLabel: "Save Settings" }),
|
|
1046
|
+
/* @__PURE__ */ jsx9("p", { className: "ad-footnote", children: "Changes will reflect only on restart of ADSelfService Plus." })
|
|
1047
|
+
] }) });
|
|
1048
|
+
}
|
|
1049
|
+
function MailSms() {
|
|
1050
|
+
const [mode, setMode] = useState9("SMTP");
|
|
1051
|
+
const [auth, setAuth] = useState9("basic");
|
|
1052
|
+
const [smsAlert, setSmsAlert] = useState9(false);
|
|
1053
|
+
return /* @__PURE__ */ jsx9(Frame, { title: "Mail / SMS Server Settings", action: /* @__PURE__ */ jsx9(TextLink, { children: "Mail/Mobile Attributes" }), tabs: ["Mail Settings", "SMS Settings", "Notification Settings"], children: (active) => active === "Mail Settings" ? /* @__PURE__ */ jsxs9("div", { className: "ad-form-block", children: [
|
|
1054
|
+
/* @__PURE__ */ jsx9(SectionTitle, { children: "Configure Mail Server" }),
|
|
1055
|
+
/* @__PURE__ */ jsxs9(FormRow, { label: "Mode", children: [
|
|
1056
|
+
/* @__PURE__ */ jsx9(RadioRow, { name: "mailmode", value: "SMTP", checked: mode === "SMTP", onChange: setMode, children: "SMTP" }),
|
|
1057
|
+
/* @__PURE__ */ jsx9(RadioRow, { name: "mailmode", value: "API", checked: mode === "API", onChange: setMode, children: "API" })
|
|
1058
|
+
] }),
|
|
1059
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Server Name or IP", required: true, children: /* @__PURE__ */ jsx9(TextField, { defaultValue: "smtp" }) }),
|
|
1060
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Port", required: true, children: /* @__PURE__ */ jsx9(TextField, { defaultValue: "25" }) }),
|
|
1061
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "From Address", required: true, children: /* @__PURE__ */ jsx9(TextField, { defaultValue: "noreply@adselfserviceplus.com" }) }),
|
|
1062
|
+
/* @__PURE__ */ jsxs9(FormRow, { label: "Admin Mail Address", required: true, hint: "Use comma (,) to separate multiple email addresses.", children: [
|
|
1063
|
+
/* @__PURE__ */ jsx9(TextField, { defaultValue: "noreply@adselfserviceplus.com" }),
|
|
1064
|
+
/* @__PURE__ */ jsx9(TextLink, { children: "Send a test mail" })
|
|
1065
|
+
] }),
|
|
1066
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Secure Connection (SSL/TLS)", children: /* @__PURE__ */ jsx9(InlineSelect, { options: ["None", "SSL", "TLS"], initial: "SSL" }) }),
|
|
1067
|
+
/* @__PURE__ */ jsx9(SectionTitle, { children: "Authentication" }),
|
|
1068
|
+
/* @__PURE__ */ jsxs9(FormRow, { label: "Authentication Type", children: [
|
|
1069
|
+
/* @__PURE__ */ jsx9(RadioRow, { name: "auth", value: "basic", checked: auth === "basic", onChange: setAuth, children: "Basic Authentication" }),
|
|
1070
|
+
/* @__PURE__ */ jsx9(RadioRow, { name: "auth", value: "oauth", checked: auth === "oauth", onChange: setAuth, children: "OAuth Authentication" })
|
|
1071
|
+
] }),
|
|
1072
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Username", children: /* @__PURE__ */ jsx9(TextField, {}) }),
|
|
1073
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Password", children: /* @__PURE__ */ jsx9(TextField, { type: "password" }) }),
|
|
1074
|
+
/* @__PURE__ */ jsx9(SaveBar, { saveLabel: "Save Settings" }),
|
|
1075
|
+
/* @__PURE__ */ jsx9("p", { className: "ad-footnote", children: "Once the mail server settings are saved, a test mail will be sent to the Admin Mail Address." })
|
|
1076
|
+
] }) : active === "SMS Settings" ? /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
1077
|
+
/* @__PURE__ */ jsxs9(FormRow, { label: "SMS Provider", children: [
|
|
1078
|
+
/* @__PURE__ */ jsx9(InlineSelect, { options: ["GSMModem", "Clickatell", "Custom"], initial: "Clickatell" }),
|
|
1079
|
+
/* @__PURE__ */ jsx9(TextLink, { children: "Send Test SMS" })
|
|
1080
|
+
] }),
|
|
1081
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-option-inline", children: [
|
|
1082
|
+
/* @__PURE__ */ jsx9(CheckRow, { checked: smsAlert, onChange: setSmsAlert, children: "Please notify me when my credit balance reaches" }),
|
|
1083
|
+
/* @__PURE__ */ jsx9("input", { className: "ad-input ad-short", defaultValue: "10", disabled: !smsAlert })
|
|
1084
|
+
] }),
|
|
1085
|
+
/* @__PURE__ */ jsx9(SaveBar, { saveLabel: "Save Settings" }),
|
|
1086
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-notes", children: [
|
|
1087
|
+
/* @__PURE__ */ jsx9("strong", { children: "Quick Help" }),
|
|
1088
|
+
/* @__PURE__ */ jsxs9("ul", { children: [
|
|
1089
|
+
/* @__PURE__ */ jsx9("li", { children: "Mobile numbers should use the standard international format with country code." }),
|
|
1090
|
+
/* @__PURE__ */ jsx9("li", { children: "Do not include a leading zero, plus sign, or spaces." }),
|
|
1091
|
+
/* @__PURE__ */ jsx9("li", { children: "1 credit = 1 message of 70 characters." })
|
|
1092
|
+
] })
|
|
1093
|
+
] })
|
|
1094
|
+
] }) : /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
1095
|
+
/* @__PURE__ */ jsx9(SectionTitle, { children: "Mail Notification" }),
|
|
1096
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-option-list", children: [
|
|
1097
|
+
/* @__PURE__ */ jsx9(CheckRow, { children: "Enable License Expiry Notification" }),
|
|
1098
|
+
/* @__PURE__ */ jsx9(CheckRow, { children: "Enable notifications for product startup and downtime events" }),
|
|
1099
|
+
/* @__PURE__ */ jsx9(CheckRow, { children: "Enable notifications for new product updates" }),
|
|
1100
|
+
/* @__PURE__ */ jsx9(CheckRow, { children: "Enable notifications for events and workshops" }),
|
|
1101
|
+
/* @__PURE__ */ jsx9(CheckRow, { children: "Send notifications to the secondary email addresses of all end users" }),
|
|
1102
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-option-inline", children: [
|
|
1103
|
+
/* @__PURE__ */ jsx9(CheckRow, { children: "Notify when SSL certificate is" }),
|
|
1104
|
+
/* @__PURE__ */ jsx9("input", { className: "ad-input ad-short", disabled: true }),
|
|
1105
|
+
"days before expiration"
|
|
1106
|
+
] })
|
|
1107
|
+
] }),
|
|
1108
|
+
/* @__PURE__ */ jsx9(SectionTitle, { children: "SMS Notification" }),
|
|
1109
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-option-list", children: [
|
|
1110
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-option-inline", children: [
|
|
1111
|
+
/* @__PURE__ */ jsx9(CheckRow, { children: "Enable product startup and downtime SMS notifications for this mobile number" }),
|
|
1112
|
+
/* @__PURE__ */ jsx9("input", { className: "ad-input", disabled: true, placeholder: "Enter the mobile Number" })
|
|
1113
|
+
] }),
|
|
1114
|
+
/* @__PURE__ */ jsx9(CheckRow, { children: "Send notifications to the secondary mobile numbers of all end users" })
|
|
1115
|
+
] }),
|
|
1116
|
+
/* @__PURE__ */ jsx9(SaveBar, { saveLabel: "Save Settings" })
|
|
1117
|
+
] }) });
|
|
1118
|
+
}
|
|
1119
|
+
function DashboardUpdater() {
|
|
1120
|
+
const [selected, setSelected] = useState9("");
|
|
1121
|
+
const rows = [["AD Synchronizer", "ADSELFSERVICE", "Once in every 1 Hrs 0 Mins.", "Today 09:36 PM", "Success"], ["Locked Out Users", "ADSELFSERVICE", "Once in every 3 Hrs 0 Mins.", "Today 10:36 PM", "Success"], ["Password Expired Users", "ADSELFSERVICE", "Daily at 7 Hrs 0 Mins.", "2026/10/14 06:30 PM", "Success"], ["Soon-To-Expire User Passwords", "ADSELFSERVICE", "Daily at 7 Hrs 0 Mins.", "2026/10/14 06:30 PM", "Success"], ["Microsoft Entra ID Synchronizer", "Zoho", "Once in every 1 Hrs 0 Mins.", "Today 09:52 PM", "Success"]];
|
|
1122
|
+
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
1123
|
+
/* @__PURE__ */ jsx9(Frame, { title: "Dashboard Updater", children: /* @__PURE__ */ jsx9(DataTable, { columns: ["Actions", "Scheduler Name", "Applies to (Directories)", "Schedule Frequency", "Next Run", "Status"], rows: rows.map((row) => [/* @__PURE__ */ jsx9(TextLink, { onClick: () => setSelected(row[0]), children: "Edit" }), ...row.slice(0, 4), /* @__PURE__ */ jsx9("span", { className: "ad-success", children: row[4] })]) }) }),
|
|
1124
|
+
/* @__PURE__ */ jsx9(Modal, { title: selected, open: !!selected, onClose: () => setSelected(""), footer: /* @__PURE__ */ jsx9(Button, { variant: "primary", onClick: () => setSelected(""), children: "Done" }), children: /* @__PURE__ */ jsx9(FormRow, { label: "Schedule Frequency", children: /* @__PURE__ */ jsx9(InlineSelect, { options: ["Every hour", "Every 3 hours", "Daily"] }) }) })
|
|
1125
|
+
] });
|
|
1126
|
+
}
|
|
1127
|
+
function Backup() {
|
|
1128
|
+
return /* @__PURE__ */ jsxs9(Frame, { title: "Backup Settings", action: /* @__PURE__ */ jsx9(TextLink, { children: "Backup History" }), tabs: ["Backup Settings"], children: [
|
|
1129
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-form-block", children: [
|
|
1130
|
+
/* @__PURE__ */ jsxs9(FormRow, { label: "Backup Frequency", children: [
|
|
1131
|
+
/* @__PURE__ */ jsx9(InlineSelect, { options: ["Daily", "Weekly", "Monthly"] }),
|
|
1132
|
+
/* @__PURE__ */ jsx9(InlineSelect, { options: ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"] }),
|
|
1133
|
+
" hrs ",
|
|
1134
|
+
/* @__PURE__ */ jsx9(InlineSelect, { options: ["00", "05", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55"] }),
|
|
1135
|
+
" mins"
|
|
1136
|
+
] }),
|
|
1137
|
+
/* @__PURE__ */ jsxs9(FormRow, { label: "Backup Storage Path", required: true, hint: "Path Format: C:\\local-path\\ (or) \\\\network-path\\", children: [
|
|
1138
|
+
/* @__PURE__ */ jsx9(TextField, {}),
|
|
1139
|
+
/* @__PURE__ */ jsx9(TextLink, { children: "Backup Now" })
|
|
1140
|
+
] }),
|
|
1141
|
+
/* @__PURE__ */ jsx9(FormRow, { label: "Retain Backup Files", children: /* @__PURE__ */ jsx9(InlineSelect, { options: ["Delete files older than 15 days", "Delete files older than 30 days", "Keep last 10 files", "Keep all files"] }) }),
|
|
1142
|
+
/* @__PURE__ */ jsx9("div", { className: "ad-inline-save", children: /* @__PURE__ */ jsx9(SaveBar, { cancel: false }) })
|
|
1143
|
+
] }),
|
|
1144
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-notes", children: [
|
|
1145
|
+
/* @__PURE__ */ jsx9("strong", { children: "Note:" }),
|
|
1146
|
+
/* @__PURE__ */ jsxs9("ul", { children: [
|
|
1147
|
+
/* @__PURE__ */ jsx9("li", { children: "If the specified path is wrong or unavailable, backup files will be stored in the default Backup folder." }),
|
|
1148
|
+
/* @__PURE__ */ jsx9("li", { children: "You can protect your backup with a password under Admin > Product Settings > Security and Privacy." }),
|
|
1149
|
+
/* @__PURE__ */ jsx9("li", { children: "Automatic backup can be enabled only if you are using the built-in PostgreSQL database." })
|
|
1150
|
+
] })
|
|
1151
|
+
] })
|
|
1152
|
+
] });
|
|
1153
|
+
}
|
|
1154
|
+
function SiteBased() {
|
|
1155
|
+
const [selected, setSelected] = useState9("adselfservice.com");
|
|
1156
|
+
const [open, setOpen] = useState9(false);
|
|
1157
|
+
const ous = ["adselfservice.com", "Computers", "Demo-Admins", "Demo-Computers", "Demo-Contact", "Demo-Developers", "Demo-Engineering", "Demo-Finance", "Demo-Groups", "Demo-HR", "Demo-Marketing", "Demo-Sales", "Demo-SelfService", "Demo-Technical Support", "Demo-Testing", "Demo-Users", "Domain Controllers", "Users"];
|
|
1158
|
+
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
1159
|
+
/* @__PURE__ */ jsxs9(Frame, { title: "Site Based DC Updater", help: "Configure site based domain controller selection", children: [
|
|
1160
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-site-domain", children: [
|
|
1161
|
+
/* @__PURE__ */ jsx9("strong", { children: "Select Domain" }),
|
|
1162
|
+
/* @__PURE__ */ jsx9(InlineSelect, { options: ["ADSELFSERVICE"] })
|
|
1163
|
+
] }),
|
|
1164
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-site-picker", children: [
|
|
1165
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-site-column", children: [
|
|
1166
|
+
/* @__PURE__ */ jsx9("strong", { children: "OUs" }),
|
|
1167
|
+
/* @__PURE__ */ jsx9("div", { className: "ad-ou-tree", children: ous.map((ou, i) => /* @__PURE__ */ jsxs9("label", { className: "ad-ou-row", style: { paddingLeft: i === 0 ? 16 : 36 }, children: [
|
|
1168
|
+
/* @__PURE__ */ jsx9("input", { type: "checkbox", checked: selected === ou, onChange: () => setSelected(ou) }),
|
|
1169
|
+
/* @__PURE__ */ jsx9("span", { children: i === 0 ? "\u25A3" : "\u25B8" }),
|
|
1170
|
+
ou
|
|
1171
|
+
] }, ou)) })
|
|
1172
|
+
] }),
|
|
1173
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-site-column", children: [
|
|
1174
|
+
/* @__PURE__ */ jsxs9("strong", { children: [
|
|
1175
|
+
"Domain Controller (",
|
|
1176
|
+
selected,
|
|
1177
|
+
")"
|
|
1178
|
+
] }),
|
|
1179
|
+
/* @__PURE__ */ jsx9("div", { className: "ad-dc-list", children: "\u25A3 \xA0 adsspdemo1.adselfservice.com" }),
|
|
1180
|
+
/* @__PURE__ */ jsx9(TextLink, { onClick: () => setOpen(true), children: "Select More DCs" })
|
|
1181
|
+
] })
|
|
1182
|
+
] }),
|
|
1183
|
+
/* @__PURE__ */ jsx9(CheckRow, { children: "Set higher priority to Site-based DC Updater over policy-based DC Updater" }),
|
|
1184
|
+
/* @__PURE__ */ jsx9(SaveBar, {})
|
|
1185
|
+
] }),
|
|
1186
|
+
/* @__PURE__ */ jsx9(Modal, { title: "Select More DCs", open, onClose: () => setOpen(false), footer: /* @__PURE__ */ jsx9(Button, { variant: "primary", onClick: () => setOpen(false), children: "Done" }), children: /* @__PURE__ */ jsx9(CheckRow, { defaultChecked: true, children: "adsspdemo1.adselfservice.com" }) })
|
|
1187
|
+
] });
|
|
1188
|
+
}
|
|
1189
|
+
function Integration() {
|
|
1190
|
+
const [selected, setSelected] = useState9("");
|
|
1191
|
+
const apps = [["ADManager Plus", "ADManager Plus"], ["ServiceDesk Plus", "ServiceDesk Plus"], ["splunk>", "Splunk Server"], ["SYSLOG", "Syslog Server"], ["Hibp?", "Have I Been Pwned?"], ["Log360 - EventLog Analyzer", "Log360"], ["ServiceDesk Plus Cloud", "ServiceDesk Plus Cloud"]];
|
|
1192
|
+
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
1193
|
+
/* @__PURE__ */ jsx9(Frame, { title: "Integration Settings", help: "Configure external integrations", children: /* @__PURE__ */ jsx9("div", { className: "ad-integration-grid", children: apps.map(([logo, label]) => /* @__PURE__ */ jsxs9("button", { className: "ad-integration-tile", onClick: () => setSelected(label), children: [
|
|
1194
|
+
/* @__PURE__ */ jsx9("strong", { children: logo }),
|
|
1195
|
+
/* @__PURE__ */ jsx9("span", { children: label })
|
|
1196
|
+
] }, label)) }) }),
|
|
1197
|
+
/* @__PURE__ */ jsxs9(Modal, { title: selected, open: !!selected, onClose: () => setSelected(""), footer: /* @__PURE__ */ jsx9(Button, { onClick: () => setSelected(""), children: "Close" }), children: [
|
|
1198
|
+
/* @__PURE__ */ jsxs9(Notice, { children: [
|
|
1199
|
+
"Configure the connection for ",
|
|
1200
|
+
selected,
|
|
1201
|
+
"."
|
|
1202
|
+
] }),
|
|
1203
|
+
/* @__PURE__ */ jsx9(TextField, { label: "Server URL" })
|
|
1204
|
+
] })
|
|
1205
|
+
] });
|
|
1206
|
+
}
|
|
1207
|
+
function WindowsService() {
|
|
1208
|
+
return /* @__PURE__ */ jsx9(Frame, { title: "ADSelfService Plus as Windows Service", children: /* @__PURE__ */ jsxs9("div", { className: "ad-service-instructions", children: [
|
|
1209
|
+
/* @__PURE__ */ jsx9("h2", { children: "To install and start ADSelfService Plus as a service:" }),
|
|
1210
|
+
/* @__PURE__ */ jsxs9("ol", { children: [
|
|
1211
|
+
/* @__PURE__ */ jsx9("li", { children: "Please stop ADSelfService Plus if it is running. (Start-->All Programs-->ADSelfService Plus-->Stop ADSelfService Plus)" }),
|
|
1212
|
+
/* @__PURE__ */ jsx9("li", { children: "Install as a service. (Start-->All Programs-->ADSelfService Plus-->NT Service-->Install ADSelfService Plus as Service)" }),
|
|
1213
|
+
/* @__PURE__ */ jsxs9("li", { children: [
|
|
1214
|
+
"Start as a service:",
|
|
1215
|
+
/* @__PURE__ */ jsxs9("ol", { type: "i", children: [
|
|
1216
|
+
/* @__PURE__ */ jsx9("li", { children: 'Start-->Run and type "services.msc"' }),
|
|
1217
|
+
/* @__PURE__ */ jsx9("li", { children: 'Right-click on "ManageEngine ADSelfService Plus" and Click on Properties.' }),
|
|
1218
|
+
/* @__PURE__ */ jsx9("li", { children: 'Go to Logon Tab and choose "This Account" option. Enter administrative credentials and click OK.' }),
|
|
1219
|
+
/* @__PURE__ */ jsx9("li", { children: 'Right-click on "ManageEngine ADSelfService Plus" and Click on Start.' })
|
|
1220
|
+
] })
|
|
1221
|
+
] })
|
|
1222
|
+
] })
|
|
1223
|
+
] }) });
|
|
1224
|
+
}
|
|
1225
|
+
function Security() {
|
|
1226
|
+
return /* @__PURE__ */ jsxs9(Frame, { title: "Security and Privacy", tabs: ["Privacy Settings"], children: [
|
|
1227
|
+
/* @__PURE__ */ jsx9(SectionTitle, { children: "Data Security" }),
|
|
1228
|
+
/* @__PURE__ */ jsx9("p", { children: "Enable password protection for" }),
|
|
1229
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-option-list", children: [
|
|
1230
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-option-inline", children: [
|
|
1231
|
+
/* @__PURE__ */ jsx9(CheckRow, { children: "Scheduled and exported reports" }),
|
|
1232
|
+
/* @__PURE__ */ jsx9("input", { className: "ad-input", type: "password", disabled: true })
|
|
1233
|
+
] }),
|
|
1234
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-option-inline", children: [
|
|
1235
|
+
/* @__PURE__ */ jsx9(CheckRow, { children: "Database backup files" }),
|
|
1236
|
+
/* @__PURE__ */ jsx9("input", { className: "ad-input", type: "password", disabled: true })
|
|
1237
|
+
] })
|
|
1238
|
+
] }),
|
|
1239
|
+
/* @__PURE__ */ jsx9(SectionTitle, { children: "Usage Statistics" }),
|
|
1240
|
+
/* @__PURE__ */ jsx9(CheckRow, { defaultChecked: true, children: "Send product usage statistics anonymously" }),
|
|
1241
|
+
/* @__PURE__ */ jsx9(SaveBar, { saveLabel: "Save Settings" })
|
|
1242
|
+
] });
|
|
1243
|
+
}
|
|
1244
|
+
function RestrictUsers() {
|
|
1245
|
+
const [active, setActive] = useState9("Restrict Users");
|
|
1246
|
+
const [open, setOpen] = useState9(false);
|
|
1247
|
+
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
1248
|
+
/* @__PURE__ */ jsxs9(Frame, { title: "Restricted Users", action: /* @__PURE__ */ jsxs9("div", { className: "ad-header-links", children: [
|
|
1249
|
+
/* @__PURE__ */ jsx9(TextLink, { children: "Schedule to Restrict/Derestrict" }),
|
|
1250
|
+
/* @__PURE__ */ jsx9(TextLink, { children: "License Info" })
|
|
1251
|
+
] }), children: [
|
|
1252
|
+
/* @__PURE__ */ jsxs9(Notice, { tone: "warning", children: [
|
|
1253
|
+
/* @__PURE__ */ jsx9("strong", { children: "Note" }),
|
|
1254
|
+
/* @__PURE__ */ jsxs9("ul", { children: [
|
|
1255
|
+
/* @__PURE__ */ jsx9("li", { children: "Prevent licenses being wasted by stale user accounts." }),
|
|
1256
|
+
/* @__PURE__ */ jsx9("li", { children: "Restrict inactive user accounts and prevent them from being exploited." }),
|
|
1257
|
+
/* @__PURE__ */ jsx9("li", { children: "Enrolment data of a restricted user would be deleted automatically." }),
|
|
1258
|
+
/* @__PURE__ */ jsx9("li", { children: "Restricting a user revokes and frees up the Endpoint MFA license they have consumed." })
|
|
1259
|
+
] })
|
|
1260
|
+
] }),
|
|
1261
|
+
/* @__PURE__ */ jsx9(Tabs, { tabs: ["Restrict Users", "Derestrict Users"], active, onChange: setActive }),
|
|
1262
|
+
/* @__PURE__ */ jsxs9("div", { className: "ad-restrict-toolbar", children: [
|
|
1263
|
+
/* @__PURE__ */ jsx9("span", { children: "Select Directory" }),
|
|
1264
|
+
/* @__PURE__ */ jsx9(InlineSelect, { options: ["ADSELFSERVICE"] }),
|
|
1265
|
+
/* @__PURE__ */ jsx9("span", { className: "ad-restrict-count", children: "0-0 of 0" }),
|
|
1266
|
+
/* @__PURE__ */ jsx9(InlineSelect, { options: ["25", "50", "100"] })
|
|
1267
|
+
] }),
|
|
1268
|
+
/* @__PURE__ */ jsx9(DataTable, { columns: [""], empty: `There are no ${active === "Restrict Users" ? "restricted" : "derestricted"} users in this directory. Click ${active} to start.` }),
|
|
1269
|
+
/* @__PURE__ */ jsx9("div", { className: "ad-spaced", children: /* @__PURE__ */ jsx9(Button, { variant: "primary", onClick: () => setOpen(true), children: active }) })
|
|
1270
|
+
] }),
|
|
1271
|
+
/* @__PURE__ */ jsx9(Modal, { title: active, open, onClose: () => setOpen(false), footer: /* @__PURE__ */ jsx9(Button, { variant: "primary", onClick: () => setOpen(false), children: "Done" }), children: /* @__PURE__ */ jsx9(TextField, { label: "Search Users", placeholder: "Search by name" }) })
|
|
1272
|
+
] });
|
|
1273
|
+
}
|
|
1274
|
+
var SCREENS = { login: LoginSettings, personalize: Personalize, failover: Failover, reverse: ReverseProxy, connection: Connection, mail: MailSms, dashboard: DashboardUpdater, backup: Backup, site: SiteBased, integration: Integration, windows: WindowsService, security: Security, restrict: RestrictUsers };
|
|
1275
|
+
function AdminScreen({ screen, screens = {}, renderScreen, screenProps = {} }) {
|
|
1276
|
+
const override = renderScreen?.(screen);
|
|
1277
|
+
if (override !== void 0) return override;
|
|
1278
|
+
const Component = screens[screen] || SCREENS[screen] || LoginSettings;
|
|
1279
|
+
return /* @__PURE__ */ jsx9(Component, { ...screenProps }, screen);
|
|
1280
|
+
}
|
|
1281
|
+
export {
|
|
1282
|
+
ADMIN_GROUPS,
|
|
1283
|
+
AdminScreen,
|
|
1284
|
+
ConfigurationPage,
|
|
1285
|
+
DashboardPage,
|
|
1286
|
+
ReportsPage
|
|
1287
|
+
};
|