@activecollab/components 2.0.491 → 2.0.492
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/Icons/collection/Printer.js +62 -0
- package/dist/cjs/components/Icons/collection/Printer.js.map +1 -0
- package/dist/cjs/components/Icons/collection/index.js +7 -0
- package/dist/cjs/components/Icons/collection/index.js.map +1 -1
- package/dist/cjs/presentation/selfHostedRedesign/parts.js +1386 -0
- package/dist/cjs/presentation/selfHostedRedesign/parts.js.map +1 -0
- package/dist/cjs/presentation/shared/TaskOptionsMenu.js +5 -1
- package/dist/cjs/presentation/shared/TaskOptionsMenu.js.map +1 -1
- package/dist/cjs/presentation/shared/index.js +14 -0
- package/dist/cjs/presentation/shared/index.js.map +1 -1
- package/dist/cjs/presentation/shared/selfHostedSettings.js +7 -2
- package/dist/cjs/presentation/shared/selfHostedSettings.js.map +1 -1
- package/dist/esm/components/Icons/collection/Printer.d.ts +32 -0
- package/dist/esm/components/Icons/collection/Printer.d.ts.map +1 -0
- package/dist/esm/components/Icons/collection/Printer.js +55 -0
- package/dist/esm/components/Icons/collection/Printer.js.map +1 -0
- package/dist/esm/components/Icons/collection/index.d.ts +1 -0
- package/dist/esm/components/Icons/collection/index.d.ts.map +1 -1
- package/dist/esm/components/Icons/collection/index.js +1 -0
- package/dist/esm/components/Icons/collection/index.js.map +1 -1
- package/dist/esm/presentation/selfHostedRedesign/parts.d.ts +158 -0
- package/dist/esm/presentation/selfHostedRedesign/parts.d.ts.map +1 -0
- package/dist/esm/presentation/selfHostedRedesign/parts.js +1208 -0
- package/dist/esm/presentation/selfHostedRedesign/parts.js.map +1 -0
- package/dist/esm/presentation/shared/TaskOptionsMenu.d.ts.map +1 -1
- package/dist/esm/presentation/shared/TaskOptionsMenu.js +5 -1
- package/dist/esm/presentation/shared/TaskOptionsMenu.js.map +1 -1
- package/dist/esm/presentation/shared/index.d.ts +1 -1
- package/dist/esm/presentation/shared/index.d.ts.map +1 -1
- package/dist/esm/presentation/shared/index.js +1 -1
- package/dist/esm/presentation/shared/index.js.map +1 -1
- package/dist/esm/presentation/shared/selfHostedSettings.d.ts +4 -0
- package/dist/esm/presentation/shared/selfHostedSettings.d.ts.map +1 -1
- package/dist/esm/presentation/shared/selfHostedSettings.js +4 -1
- package/dist/esm/presentation/shared/selfHostedSettings.js.map +1 -1
- package/dist/index.js +454 -402
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,1208 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
/**
|
|
3
|
+
* Shared parts of the Self-Hosted Redesign stories
|
|
4
|
+
* (`Presentation/Self-Hosted Redesign/*`): one file per section (Upgrade,
|
|
5
|
+
* Email, Search, Pusher, Cron, Clean Up) renders the same screen with its own
|
|
6
|
+
* section expanded and its own starting state.
|
|
7
|
+
*
|
|
8
|
+
* Grounded in the app:
|
|
9
|
+
* - components/Settings/SelfHostedSettingsDialog.jsx
|
|
10
|
+
* - components/SelfHostedSettings/SelfHostedSettingsContent.jsx (row stack,
|
|
11
|
+
* Old Versions body + Remove)
|
|
12
|
+
* - components/SelfHostedSettings/SelfHostedVersion.js (version sentence,
|
|
13
|
+
* SSH steps, renew block)
|
|
14
|
+
* - components/SelfHostedSettings/EmailConfiguration.js (summary text)
|
|
15
|
+
* - components/SelfHostedSettings/OutgoingEmailFormDialog.js
|
|
16
|
+
* - components/SelfHostedSettings/InboundEmailFormDialog.js
|
|
17
|
+
* - components/SelfHostedSettings/StoredPasswordField.jsx
|
|
18
|
+
* - components/SelfHostedSettings/SearchConfiguration.js
|
|
19
|
+
* - components/SelfHostedSettings/PusherConfiguration.js
|
|
20
|
+
* - components/SelfHostedSettings/CronConfiguration.js (unix branch)
|
|
21
|
+
* Error strings come from the backend `on_system_status` handlers and the
|
|
22
|
+
* `isOk()` methods of the Email, Search, Pusher and Cron integrations.
|
|
23
|
+
*
|
|
24
|
+
* Where the app hand-builds a layout, these stories use the standard DS piece
|
|
25
|
+
* instead (Stack / Row for spacing, TitledText for headed sections, InfoBox for
|
|
26
|
+
* the inbound warning, RadioGroup for the radio sets, Dialog.Title onClose for
|
|
27
|
+
* the close button, the shared CommandBlock for commands).
|
|
28
|
+
*/
|
|
29
|
+
import React, { useEffect, useState } from "react";
|
|
30
|
+
import styled from "styled-components";
|
|
31
|
+
import { Button } from "../../components/Button";
|
|
32
|
+
import { ComboBox } from "../../components/ComboBox";
|
|
33
|
+
import { ConfirmDialog } from "../../components/ConfirmDialog";
|
|
34
|
+
import { Dialog } from "../../components/Dialog";
|
|
35
|
+
import { IconButton } from "../../components/IconButton";
|
|
36
|
+
import { OpenExpandedIcon } from "../../components/Icons";
|
|
37
|
+
import { InfoBox } from "../../components/InfoBox";
|
|
38
|
+
import { Input, InputPassword } from "../../components/Input";
|
|
39
|
+
import { Label } from "../../components/Label";
|
|
40
|
+
import { Link } from "../../components/Links";
|
|
41
|
+
import { SpinnerLoader } from "../../components/Loaders";
|
|
42
|
+
import { StyledLink as InlineLink } from "../../components/PortableText/Styles";
|
|
43
|
+
import { RadioGroup } from "../../components/RadioGroup";
|
|
44
|
+
import { Row } from "../../components/Row";
|
|
45
|
+
import { Select } from "../../components/Select";
|
|
46
|
+
import { SelectTrigger } from "../../components/SelectTrigger";
|
|
47
|
+
import { Stack } from "../../components/Stack";
|
|
48
|
+
import { TitledText } from "../../components/TitledText";
|
|
49
|
+
import { Toggle } from "../../components/Toggle";
|
|
50
|
+
import { Tooltip } from "../../components/Tooltip";
|
|
51
|
+
import { Body1, Body2, Caption1 } from "../../components/Typography";
|
|
52
|
+
import { CommandBlock, EmailLogLink, ExpandableSettingRow, okStatus, SelfHostedSettingsDialog, SM } from "../shared";
|
|
53
|
+
|
|
54
|
+
/* ------------------------------------------------------------------ */
|
|
55
|
+
/* Mock payloads — one per endpoint the screen reads. */
|
|
56
|
+
/* ------------------------------------------------------------------ */
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* mirrors: GET /system-status (repository/useSystemStatus.js) — the
|
|
60
|
+
* per-section flags and errors plus the running version header.
|
|
61
|
+
*/
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* mirrors: backend `lang()` strings in the `on_system_status` handlers and the
|
|
65
|
+
* integrations' `isOk()` (EmailIntegration, SearchIntegration,
|
|
66
|
+
* PusherIntegration, CronIntegration).
|
|
67
|
+
*/
|
|
68
|
+
export const SEARCH_NOT_CONFIGURED_ERROR = "Search server is not configured";
|
|
69
|
+
export const PUSHER_NOT_CONFIGURED_ERROR = "Server for exchange of real-time updates is not configured.";
|
|
70
|
+
export const STATUS_ERRORS = {
|
|
71
|
+
noImapCheck: "No incoming mail checks has been performed in the past hour",
|
|
72
|
+
noEmailSent: "No email sent since last sending attempt",
|
|
73
|
+
searchJobsFailed: "There has been search related errors in past 24 hours",
|
|
74
|
+
cronFrequently: "Frequently Cron job did not run in the past 5 minutes",
|
|
75
|
+
cronImap: "Inbound email Cron job did not run in the past 5 minutes",
|
|
76
|
+
cronHourly: "Hourly Cron job did not run in the past hour"
|
|
77
|
+
};
|
|
78
|
+
export const SYSTEM_STATUS = {
|
|
79
|
+
cron_is_ok: true,
|
|
80
|
+
cron_errors: [],
|
|
81
|
+
email_is_ok: true,
|
|
82
|
+
email_errors: [],
|
|
83
|
+
search_is_ok: false,
|
|
84
|
+
search_errors: [SEARCH_NOT_CONFIGURED_ERROR],
|
|
85
|
+
pusher_is_ok: true,
|
|
86
|
+
pusher_errors: [],
|
|
87
|
+
imap_is_available: true,
|
|
88
|
+
headers: {
|
|
89
|
+
"x-angie-applicationversion": "8.2.17"
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
/** mirrors: GET /system-status/check-for-updates (useCheckForUpdates). */
|
|
94
|
+
|
|
95
|
+
export const CHECK_FOR_UPDATES = {
|
|
96
|
+
current_version: "8.2.17",
|
|
97
|
+
latest_available_version: "8.2.19",
|
|
98
|
+
new_version_available: true,
|
|
99
|
+
support_expires_on: 1830297600,
|
|
100
|
+
// 2028-01-01
|
|
101
|
+
support_renewal_url: "https://activecollab.com/profile/licenses/1042/renewal"
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
/** mirrors: GET /system/versions/old-versions (repository/useOldVersions.js). */
|
|
105
|
+
|
|
106
|
+
export const OLD_VERSIONS = {
|
|
107
|
+
versions_is_ok: false,
|
|
108
|
+
versions_errors: ["Please remove unused old version directories and files. (8.2.16, 8.2.14, 8.2.11)", "Old version directories are not writable. Please delete them manually."]
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
/** mirrors: GET /integrations/email `single` (useIntegration("email")). */
|
|
112
|
+
|
|
113
|
+
export const EMAIL_INTEGRATION = {
|
|
114
|
+
sender_name: "Northwind Projects",
|
|
115
|
+
sender_email: "projects@northwind.example",
|
|
116
|
+
smtp_host: "smtp.northwind.example",
|
|
117
|
+
smtp_port: 465,
|
|
118
|
+
smtp_security: "ssl",
|
|
119
|
+
smtp_username: "projects@northwind.example",
|
|
120
|
+
has_smtp_password: true,
|
|
121
|
+
smtp_verify_certificate: true,
|
|
122
|
+
imap_host: "imap.northwind.example",
|
|
123
|
+
imap_port: 993,
|
|
124
|
+
imap_security: "ssl",
|
|
125
|
+
imap_username: "inbox@northwind.example",
|
|
126
|
+
has_imap_password: true,
|
|
127
|
+
imap_mailbox: "INBOX",
|
|
128
|
+
imap_verify_certificate: true,
|
|
129
|
+
imap_subaddress_separator: "+",
|
|
130
|
+
imap_once_processed_action: "move",
|
|
131
|
+
imap_once_processed_folder: ""
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
/** mirrors: GET /integrations/search `single` (useIntegration("search")). */
|
|
135
|
+
|
|
136
|
+
export const SEARCH_NOT_CONFIGURED = {
|
|
137
|
+
hosts: "",
|
|
138
|
+
user: "",
|
|
139
|
+
password: "",
|
|
140
|
+
path_to_certificate: "",
|
|
141
|
+
shards: 3,
|
|
142
|
+
replicas: 1,
|
|
143
|
+
is_index_created: false,
|
|
144
|
+
is_index_rebuilded: false
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
/** mirrors: GET /integrations/pusher `single` (useIntegration("pusher")). */
|
|
148
|
+
|
|
149
|
+
export const PUSHER_INTEGRATION = {
|
|
150
|
+
app_id: "1874402",
|
|
151
|
+
app_key: "a91f0c6e2d7b4c18e3f5",
|
|
152
|
+
app_cluster: "us2",
|
|
153
|
+
app_secret: "",
|
|
154
|
+
ws_host: "ws-us2.pusher.com",
|
|
155
|
+
is_connection_tested: true
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
/** mirrors: PusherConfiguration.js `options` (a frontend constant). */
|
|
159
|
+
const PUSHER_CLUSTERS = [{
|
|
160
|
+
id: "mt1",
|
|
161
|
+
name: "mt1 (US East (N. Virginia))"
|
|
162
|
+
}, {
|
|
163
|
+
id: "ap1",
|
|
164
|
+
name: "ap1 (Asia Pacific (Singapore))"
|
|
165
|
+
}, {
|
|
166
|
+
id: "ap2",
|
|
167
|
+
name: "ap2 (Asia Pacific (Mumbai))"
|
|
168
|
+
}, {
|
|
169
|
+
id: "us2",
|
|
170
|
+
name: "us2 (US East (Ohio))"
|
|
171
|
+
}, {
|
|
172
|
+
id: "ap3",
|
|
173
|
+
name: "ap3 (Asia Pacific (Tokyo))"
|
|
174
|
+
}, {
|
|
175
|
+
id: "us3",
|
|
176
|
+
name: "us3 (US West (Oregon))"
|
|
177
|
+
}, {
|
|
178
|
+
id: "ap4",
|
|
179
|
+
name: "ap4 (Asia Pacific (Sydney))"
|
|
180
|
+
}, {
|
|
181
|
+
id: "eu",
|
|
182
|
+
name: "eu (EU (Ireland))"
|
|
183
|
+
}, {
|
|
184
|
+
id: "sa1",
|
|
185
|
+
name: "sa1 (South America (São Paulo))"
|
|
186
|
+
}];
|
|
187
|
+
|
|
188
|
+
/** mirrors: GET /integrations/cron `single.instructions` (useIntegration("cron")). */
|
|
189
|
+
|
|
190
|
+
const CRON_PATH = "/srv/www/pm.northwind.example/tasks/cron_jobs";
|
|
191
|
+
export const CRON_INSTRUCTIONS = {
|
|
192
|
+
platform: "unix",
|
|
193
|
+
hourly_last_run: 1791111600,
|
|
194
|
+
// 2026-10-04 11:00 UTC
|
|
195
|
+
frequently_last_run: 1791114060,
|
|
196
|
+
// 2026-10-04 11:41 UTC
|
|
197
|
+
check_imap_last_run: 1791113940,
|
|
198
|
+
// 2026-10-04 11:39 UTC
|
|
199
|
+
setup_frequently: "(crontab -l ; echo \"* * * * * /path/to/your/php '" + CRON_PATH + "/run_every_minute.php' > /dev/null 2>&1\") | crontab -",
|
|
200
|
+
setup_check_imap: "(crontab -l ; echo \"*/3 * * * * /path/to/your/php '" + CRON_PATH + "/check_imap_every_3_minutes.php' > /dev/null 2>&1\") | crontab -",
|
|
201
|
+
setup_hourly: "(crontab -l ; echo \"0 * * * * /path/to/your/php '" + CRON_PATH + "/run_every_hour.php' > /dev/null 2>&1\") | crontab -",
|
|
202
|
+
frequently: "/path/to/your/php " + CRON_PATH + "/run_every_minute.php",
|
|
203
|
+
imap_check: "/path/to/your/php " + CRON_PATH + "/check_imap_every_3_minutes.php",
|
|
204
|
+
hourly: "/path/to/your/php " + CRON_PATH + "/run_every_hour.php"
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
/* ------------------------------------------------------------------ */
|
|
208
|
+
/* Render-time formatting (never precomputed into the payload). */
|
|
209
|
+
/* ------------------------------------------------------------------ */
|
|
210
|
+
|
|
211
|
+
const SECURITY_OPTIONS = [{
|
|
212
|
+
id: "auto",
|
|
213
|
+
name: "Auto"
|
|
214
|
+
}, {
|
|
215
|
+
id: "tls",
|
|
216
|
+
name: "TLS"
|
|
217
|
+
}, {
|
|
218
|
+
id: "ssl",
|
|
219
|
+
name: "SSL"
|
|
220
|
+
}, {
|
|
221
|
+
id: "off",
|
|
222
|
+
name: "None"
|
|
223
|
+
}];
|
|
224
|
+
|
|
225
|
+
/** The port the app sets when security changes (OutgoingEmailFormDialog). */
|
|
226
|
+
const SMTP_PORT_FOR = {
|
|
227
|
+
auto: 587,
|
|
228
|
+
tls: 587,
|
|
229
|
+
ssl: 465,
|
|
230
|
+
off: 25
|
|
231
|
+
};
|
|
232
|
+
const securityName = id => {
|
|
233
|
+
var _SECURITY_OPTIONS$fin, _SECURITY_OPTIONS$fin2;
|
|
234
|
+
return (_SECURITY_OPTIONS$fin = (_SECURITY_OPTIONS$fin2 = SECURITY_OPTIONS.find(option => option.id === id)) == null ? void 0 : _SECURITY_OPTIONS$fin2.name) != null ? _SECURITY_OPTIONS$fin : id;
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
/** EmailConfiguration.js smtpSettingsText. */
|
|
238
|
+
const smtpSummary = data => {
|
|
239
|
+
if (!(data.smtp_host && data.smtp_port)) {
|
|
240
|
+
return "Not configured";
|
|
241
|
+
}
|
|
242
|
+
return [data.smtp_host + ":" + data.smtp_port, data.smtp_security ? data.smtp_security.toUpperCase() + " security" : null, data.smtp_username ? "using account " + data.smtp_username : null].filter(Boolean).join(", ");
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
/** EmailConfiguration.js imapSettingsText. */
|
|
246
|
+
const imapSummary = (data, available) => {
|
|
247
|
+
if (!available) {
|
|
248
|
+
return "Not available due to a missing php_imap extension";
|
|
249
|
+
}
|
|
250
|
+
if (!(data.imap_host && data.imap_port)) {
|
|
251
|
+
return "Not configured";
|
|
252
|
+
}
|
|
253
|
+
return [data.imap_host + ":" + data.imap_port, data.imap_security ? data.imap_security.toUpperCase() + " security" : null, data.imap_username ? "using account " + data.imap_username : null, data.imap_mailbox ? "mailbox " + data.imap_mailbox : null].filter(Boolean).join(", ");
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
/** FormatDate long + FormatLocalTime, e.g. "Oct 7, 2026 11:41". */
|
|
257
|
+
const formatRun = unixSeconds => {
|
|
258
|
+
if (unixSeconds === null) {
|
|
259
|
+
return "Never executed";
|
|
260
|
+
}
|
|
261
|
+
const date = new Date(unixSeconds * 1000);
|
|
262
|
+
const day = date.toLocaleDateString("en-US", {
|
|
263
|
+
month: "short",
|
|
264
|
+
day: "numeric",
|
|
265
|
+
year: "numeric"
|
|
266
|
+
});
|
|
267
|
+
const time = date.toLocaleTimeString("en-GB", {
|
|
268
|
+
hour: "2-digit",
|
|
269
|
+
minute: "2-digit"
|
|
270
|
+
});
|
|
271
|
+
return "Executed " + day + " " + time;
|
|
272
|
+
};
|
|
273
|
+
const statusText = errors => errors.length > 0 ? errors.join(",\n") : "Configured and working properly";
|
|
274
|
+
|
|
275
|
+
/* ------------------------------------------------------------------ */
|
|
276
|
+
/* Expand-card content: label / value pairs */
|
|
277
|
+
/* ------------------------------------------------------------------ */
|
|
278
|
+
|
|
279
|
+
/** One "Label: / value" pair, with an optional action on the right. */
|
|
280
|
+
const FieldRow = styled.div.withConfig({
|
|
281
|
+
displayName: "parts__FieldRow",
|
|
282
|
+
componentId: "sc-1h0u3no-0"
|
|
283
|
+
})(["display:flex;align-items:flex-start;justify-content:space-between;gap:8px;"]);
|
|
284
|
+
const SummaryField = _ref => {
|
|
285
|
+
let label = _ref.label,
|
|
286
|
+
value = _ref.value,
|
|
287
|
+
_ref$alert = _ref.alert,
|
|
288
|
+
alert = _ref$alert === void 0 ? false : _ref$alert,
|
|
289
|
+
action = _ref.action;
|
|
290
|
+
return /*#__PURE__*/React.createElement(FieldRow, null, /*#__PURE__*/React.createElement(Stack, {
|
|
291
|
+
space: "xs"
|
|
292
|
+
}, /*#__PURE__*/React.createElement(Body2, null, label, ":"), /*#__PURE__*/React.createElement(Body2, {
|
|
293
|
+
color: alert ? "alert" : "tertiary",
|
|
294
|
+
whitespace: "pre-wrap"
|
|
295
|
+
}, value)), action);
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
/** The edit icon that opens a sub-dialog (OpenExpandedIcon, text gray). */
|
|
299
|
+
const EditButton = _ref2 => {
|
|
300
|
+
let tooltip = _ref2.tooltip,
|
|
301
|
+
onClick = _ref2.onClick;
|
|
302
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
303
|
+
title: tooltip
|
|
304
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
305
|
+
variant: "text gray",
|
|
306
|
+
onClick: onClick
|
|
307
|
+
}, /*#__PURE__*/React.createElement(OpenExpandedIcon, null)));
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
/* ------------------------------------------------------------------ */
|
|
311
|
+
/* Form building blocks for the sub-dialogs */
|
|
312
|
+
/* ------------------------------------------------------------------ */
|
|
313
|
+
|
|
314
|
+
/** Label + control + optional hint (the app's `tw-mb-6` field block). */
|
|
315
|
+
const DialogFormField = _ref3 => {
|
|
316
|
+
let id = _ref3.id,
|
|
317
|
+
label = _ref3.label,
|
|
318
|
+
hint = _ref3.hint,
|
|
319
|
+
children = _ref3.children;
|
|
320
|
+
return /*#__PURE__*/React.createElement(Stack, {
|
|
321
|
+
space: "xs"
|
|
322
|
+
}, /*#__PURE__*/React.createElement(Label, {
|
|
323
|
+
htmlFor: id
|
|
324
|
+
}, label), children, hint ? /*#__PURE__*/React.createElement(Caption1, {
|
|
325
|
+
color: "tertiary"
|
|
326
|
+
}, hint) : null);
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
/** StoredPasswordField: "Change password" until the user asks to edit. */
|
|
330
|
+
const StoredPasswordField = _ref4 => {
|
|
331
|
+
let id = _ref4.id,
|
|
332
|
+
hasStoredPassword = _ref4.hasStoredPassword;
|
|
333
|
+
const _useState = useState(!hasStoredPassword),
|
|
334
|
+
editing = _useState[0],
|
|
335
|
+
setEditing = _useState[1];
|
|
336
|
+
const _useState2 = useState(""),
|
|
337
|
+
value = _useState2[0],
|
|
338
|
+
setValue = _useState2[1];
|
|
339
|
+
return /*#__PURE__*/React.createElement(DialogFormField, {
|
|
340
|
+
id: id,
|
|
341
|
+
label: "Password"
|
|
342
|
+
}, editing ? /*#__PURE__*/React.createElement(InputPassword, {
|
|
343
|
+
id: id,
|
|
344
|
+
autoComplete: "new-password",
|
|
345
|
+
autoFocus: hasStoredPassword,
|
|
346
|
+
value: value,
|
|
347
|
+
onChange: event => setValue(event.target.value),
|
|
348
|
+
showTooltipText: "Show",
|
|
349
|
+
hideTooltipText: "Hide"
|
|
350
|
+
}) : /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
351
|
+
type: "button",
|
|
352
|
+
variant: "text colored",
|
|
353
|
+
onClick: () => setEditing(true)
|
|
354
|
+
}, "Change password")));
|
|
355
|
+
};
|
|
356
|
+
const SecuritySelect = _ref5 => {
|
|
357
|
+
let id = _ref5.id,
|
|
358
|
+
value = _ref5.value,
|
|
359
|
+
onChange = _ref5.onChange;
|
|
360
|
+
return /*#__PURE__*/React.createElement(Select, {
|
|
361
|
+
options: SECURITY_OPTIONS,
|
|
362
|
+
selected: value,
|
|
363
|
+
onChange: next => onChange(next),
|
|
364
|
+
target: /*#__PURE__*/React.createElement(SelectTrigger, {
|
|
365
|
+
id: id,
|
|
366
|
+
style: {
|
|
367
|
+
width: "auto"
|
|
368
|
+
}
|
|
369
|
+
}, securityName(value)),
|
|
370
|
+
disabledInternalSort: true,
|
|
371
|
+
disableSearch: true,
|
|
372
|
+
forceCloseMenu: true
|
|
373
|
+
});
|
|
374
|
+
};
|
|
375
|
+
const VerifyCertificateField = _ref6 => {
|
|
376
|
+
let checked = _ref6.checked,
|
|
377
|
+
onChange = _ref6.onChange;
|
|
378
|
+
return /*#__PURE__*/React.createElement(Stack, {
|
|
379
|
+
space: "xs"
|
|
380
|
+
}, /*#__PURE__*/React.createElement(Row, {
|
|
381
|
+
space: "sm"
|
|
382
|
+
}, /*#__PURE__*/React.createElement(Toggle, {
|
|
383
|
+
defaultChecked: checked,
|
|
384
|
+
onChange: event => onChange(event.target.checked)
|
|
385
|
+
}), /*#__PURE__*/React.createElement(Body2, {
|
|
386
|
+
color: "secondary"
|
|
387
|
+
}, "Verify security certificate")), /*#__PURE__*/React.createElement(Caption1, {
|
|
388
|
+
color: "tertiary"
|
|
389
|
+
}, "Uncheck if you are getting connection errors because of a self-signed or expired security certificate."));
|
|
390
|
+
};
|
|
391
|
+
|
|
392
|
+
/** Dialog.Content body with the app's 24px field rhythm. */
|
|
393
|
+
const FormBody = _ref7 => {
|
|
394
|
+
let children = _ref7.children;
|
|
395
|
+
return /*#__PURE__*/React.createElement(Stack, {
|
|
396
|
+
space: "lg"
|
|
397
|
+
}, children);
|
|
398
|
+
};
|
|
399
|
+
const SaveActions = _ref8 => {
|
|
400
|
+
let onSave = _ref8.onSave,
|
|
401
|
+
onCancel = _ref8.onCancel,
|
|
402
|
+
_ref8$disabled = _ref8.disabled,
|
|
403
|
+
disabled = _ref8$disabled === void 0 ? false : _ref8$disabled;
|
|
404
|
+
return /*#__PURE__*/React.createElement(Dialog.Actions, null, /*#__PURE__*/React.createElement(Button, {
|
|
405
|
+
variant: "primary",
|
|
406
|
+
onClick: onSave,
|
|
407
|
+
disabled: disabled
|
|
408
|
+
}, "Save"), /*#__PURE__*/React.createElement(Button, {
|
|
409
|
+
variant: "secondary",
|
|
410
|
+
onClick: onCancel
|
|
411
|
+
}, "Cancel"));
|
|
412
|
+
};
|
|
413
|
+
|
|
414
|
+
/* ------------------------------------------------------------------ */
|
|
415
|
+
/* Edit Outgoing Email */
|
|
416
|
+
/* ------------------------------------------------------------------ */
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Server address, security and port on one line. The address takes the free
|
|
420
|
+
* width; security and port take only the width their values need. Below SM
|
|
421
|
+
* the three fields stack.
|
|
422
|
+
*/
|
|
423
|
+
const ServerGrid = styled.div.withConfig({
|
|
424
|
+
displayName: "parts__ServerGrid",
|
|
425
|
+
componentId: "sc-1h0u3no-1"
|
|
426
|
+
})(["display:grid;grid-template-columns:minmax(0,1fr) auto 80px;gap:16px;align-items:start;.c-input-wrapper{width:100%;}@media (max-width:", "){grid-template-columns:minmax(0,1fr);}"], SM);
|
|
427
|
+
const OutgoingEmailDialog = _ref9 => {
|
|
428
|
+
let open = _ref9.open,
|
|
429
|
+
data = _ref9.data,
|
|
430
|
+
onClose = _ref9.onClose,
|
|
431
|
+
onSave = _ref9.onSave;
|
|
432
|
+
const _useState3 = useState(data),
|
|
433
|
+
draft = _useState3[0],
|
|
434
|
+
setDraft = _useState3[1];
|
|
435
|
+
useEffect(() => setDraft(data), [data, open]);
|
|
436
|
+
const set = (key, value) => setDraft(prev => _extends({}, prev, {
|
|
437
|
+
[key]: value
|
|
438
|
+
}));
|
|
439
|
+
return /*#__PURE__*/React.createElement(Dialog, {
|
|
440
|
+
open: open,
|
|
441
|
+
onClose: onClose,
|
|
442
|
+
size: "l",
|
|
443
|
+
enableBackgroundClick: true
|
|
444
|
+
}, /*#__PURE__*/React.createElement(Dialog.Title, {
|
|
445
|
+
onClose: onClose
|
|
446
|
+
}, "Edit Outgoing Email"), /*#__PURE__*/React.createElement(Dialog.ContentDivider, null), /*#__PURE__*/React.createElement(Dialog.Content, null, /*#__PURE__*/React.createElement(FormBody, null, /*#__PURE__*/React.createElement(Stack, {
|
|
447
|
+
space: "md"
|
|
448
|
+
}, /*#__PURE__*/React.createElement(Body2, null, "Outgoing email is used by ActiveCollab to send email notifications, invites, or daily recap emails."), /*#__PURE__*/React.createElement(Body2, null, "Setting up incoming email allows you to import replies to email notifications and any messages sent to a project email address.", " ", /*#__PURE__*/React.createElement(InlineLink, {
|
|
449
|
+
href: "#",
|
|
450
|
+
target: "_blank",
|
|
451
|
+
rel: "noreferrer"
|
|
452
|
+
}, "Learn more"), "."), /*#__PURE__*/React.createElement(Body2, null, "Outgoing & incoming mail will only work if the Cron job is set (eg. trigger every 3 minutes).")), /*#__PURE__*/React.createElement(Body1, {
|
|
453
|
+
weight: "bold"
|
|
454
|
+
}, "Outgoing Email Server"), /*#__PURE__*/React.createElement(DialogFormField, {
|
|
455
|
+
id: "sender_email",
|
|
456
|
+
label: "Notification Email",
|
|
457
|
+
hint: "The users will receive emails from this address"
|
|
458
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
459
|
+
id: "sender_email",
|
|
460
|
+
required: true,
|
|
461
|
+
value: draft.sender_email,
|
|
462
|
+
onChange: event => set("sender_email", event.target.value)
|
|
463
|
+
})), /*#__PURE__*/React.createElement(ServerGrid, null, /*#__PURE__*/React.createElement(DialogFormField, {
|
|
464
|
+
id: "smtp_host",
|
|
465
|
+
label: "Server Address"
|
|
466
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
467
|
+
id: "smtp_host",
|
|
468
|
+
value: draft.smtp_host,
|
|
469
|
+
onChange: event => set("smtp_host", event.target.value)
|
|
470
|
+
})), /*#__PURE__*/React.createElement(DialogFormField, {
|
|
471
|
+
id: "smtp_security",
|
|
472
|
+
label: "Security"
|
|
473
|
+
}, /*#__PURE__*/React.createElement(SecuritySelect, {
|
|
474
|
+
id: "smtp_security",
|
|
475
|
+
value: draft.smtp_security,
|
|
476
|
+
onChange: value => setDraft(prev => _extends({}, prev, {
|
|
477
|
+
smtp_security: value,
|
|
478
|
+
smtp_port: SMTP_PORT_FOR[value]
|
|
479
|
+
}))
|
|
480
|
+
})), /*#__PURE__*/React.createElement(DialogFormField, {
|
|
481
|
+
id: "smtp_port",
|
|
482
|
+
label: "Port"
|
|
483
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
484
|
+
id: "smtp_port",
|
|
485
|
+
inputMode: "numeric",
|
|
486
|
+
value: String(draft.smtp_port),
|
|
487
|
+
onChange: event => set("smtp_port", Number(event.target.value) || 0)
|
|
488
|
+
}))), /*#__PURE__*/React.createElement(DialogFormField, {
|
|
489
|
+
id: "smtp_username",
|
|
490
|
+
label: "Username"
|
|
491
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
492
|
+
id: "smtp_username",
|
|
493
|
+
value: draft.smtp_username,
|
|
494
|
+
onChange: event => set("smtp_username", event.target.value)
|
|
495
|
+
})), /*#__PURE__*/React.createElement(StoredPasswordField, {
|
|
496
|
+
id: "smtp_password",
|
|
497
|
+
hasStoredPassword: draft.has_smtp_password
|
|
498
|
+
}), /*#__PURE__*/React.createElement(VerifyCertificateField, {
|
|
499
|
+
checked: draft.smtp_verify_certificate,
|
|
500
|
+
onChange: checked => set("smtp_verify_certificate", checked)
|
|
501
|
+
}))), /*#__PURE__*/React.createElement(Dialog.ContentDivider, null), /*#__PURE__*/React.createElement(SaveActions, {
|
|
502
|
+
onSave: () => onSave(draft),
|
|
503
|
+
onCancel: onClose
|
|
504
|
+
}));
|
|
505
|
+
};
|
|
506
|
+
|
|
507
|
+
/* ------------------------------------------------------------------ */
|
|
508
|
+
/* Edit Inbound Email */
|
|
509
|
+
/* ------------------------------------------------------------------ */
|
|
510
|
+
|
|
511
|
+
const InboundEmailDialog = _ref0 => {
|
|
512
|
+
let open = _ref0.open,
|
|
513
|
+
data = _ref0.data,
|
|
514
|
+
onClose = _ref0.onClose,
|
|
515
|
+
onSave = _ref0.onSave;
|
|
516
|
+
const _useState4 = useState(data),
|
|
517
|
+
draft = _useState4[0],
|
|
518
|
+
setDraft = _useState4[1];
|
|
519
|
+
useEffect(() => setDraft(data), [data, open]);
|
|
520
|
+
const set = (key, value) => setDraft(prev => _extends({}, prev, {
|
|
521
|
+
[key]: value
|
|
522
|
+
}));
|
|
523
|
+
return /*#__PURE__*/React.createElement(Dialog, {
|
|
524
|
+
open: open,
|
|
525
|
+
onClose: onClose,
|
|
526
|
+
size: "l",
|
|
527
|
+
enableBackgroundClick: true
|
|
528
|
+
}, /*#__PURE__*/React.createElement(Dialog.Title, {
|
|
529
|
+
onClose: onClose
|
|
530
|
+
}, "Edit Inbound Email"), /*#__PURE__*/React.createElement(Dialog.ContentDivider, null), /*#__PURE__*/React.createElement(Dialog.Content, null, /*#__PURE__*/React.createElement(FormBody, null, /*#__PURE__*/React.createElement(InfoBox, {
|
|
531
|
+
type: "warning"
|
|
532
|
+
}, /*#__PURE__*/React.createElement(Body2, null, /*#__PURE__*/React.createElement("strong", null, "Important:"), " use a dedicated email address, not a personal one or any other address that's in use. Imported emails are moved to a folder or deleted, as set in Once Processed below.")), /*#__PURE__*/React.createElement(Body1, {
|
|
533
|
+
weight: "bold"
|
|
534
|
+
}, "Inbound Email Server"), /*#__PURE__*/React.createElement(ServerGrid, null, /*#__PURE__*/React.createElement(DialogFormField, {
|
|
535
|
+
id: "imap_host",
|
|
536
|
+
label: "Server Address"
|
|
537
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
538
|
+
id: "imap_host",
|
|
539
|
+
value: draft.imap_host,
|
|
540
|
+
onChange: event => set("imap_host", event.target.value)
|
|
541
|
+
})), /*#__PURE__*/React.createElement(DialogFormField, {
|
|
542
|
+
id: "imap_security",
|
|
543
|
+
label: "Security"
|
|
544
|
+
}, /*#__PURE__*/React.createElement(SecuritySelect, {
|
|
545
|
+
id: "imap_security",
|
|
546
|
+
value: draft.imap_security,
|
|
547
|
+
onChange: value => set("imap_security", value)
|
|
548
|
+
})), /*#__PURE__*/React.createElement(DialogFormField, {
|
|
549
|
+
id: "imap_port",
|
|
550
|
+
label: "Port"
|
|
551
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
552
|
+
id: "imap_port",
|
|
553
|
+
inputMode: "numeric",
|
|
554
|
+
value: String(draft.imap_port),
|
|
555
|
+
onChange: event => set("imap_port", Number(event.target.value) || 0)
|
|
556
|
+
}))), /*#__PURE__*/React.createElement(DialogFormField, {
|
|
557
|
+
id: "imap_username",
|
|
558
|
+
label: "Username"
|
|
559
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
560
|
+
id: "imap_username",
|
|
561
|
+
value: draft.imap_username,
|
|
562
|
+
onChange: event => set("imap_username", event.target.value)
|
|
563
|
+
})), /*#__PURE__*/React.createElement(StoredPasswordField, {
|
|
564
|
+
id: "imap_password",
|
|
565
|
+
hasStoredPassword: draft.has_imap_password
|
|
566
|
+
}), /*#__PURE__*/React.createElement(DialogFormField, {
|
|
567
|
+
id: "imap_mailbox",
|
|
568
|
+
label: "Mailbox"
|
|
569
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
570
|
+
id: "imap_mailbox",
|
|
571
|
+
value: draft.imap_mailbox,
|
|
572
|
+
onChange: event => set("imap_mailbox", event.target.value)
|
|
573
|
+
})), /*#__PURE__*/React.createElement(VerifyCertificateField, {
|
|
574
|
+
checked: draft.imap_verify_certificate,
|
|
575
|
+
onChange: checked => set("imap_verify_certificate", checked)
|
|
576
|
+
}), /*#__PURE__*/React.createElement(RadioGroup, {
|
|
577
|
+
label: "Once Processed",
|
|
578
|
+
value: draft.imap_once_processed_action,
|
|
579
|
+
onChange: value => setDraft(prev => _extends({}, prev, {
|
|
580
|
+
imap_once_processed_action: value,
|
|
581
|
+
imap_once_processed_folder: value === "delete" ? "" : prev.imap_once_processed_folder
|
|
582
|
+
})),
|
|
583
|
+
options: [{
|
|
584
|
+
id: "move",
|
|
585
|
+
name: "Move to folder",
|
|
586
|
+
children: draft.imap_once_processed_action === "move" ? /*#__PURE__*/React.createElement(Stack, {
|
|
587
|
+
space: "xs"
|
|
588
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
589
|
+
id: "imap_once_processed_folder",
|
|
590
|
+
"aria-label": "Folder name",
|
|
591
|
+
placeholder: "Archive (automatic)",
|
|
592
|
+
value: draft.imap_once_processed_folder,
|
|
593
|
+
onChange: event => set("imap_once_processed_folder", event.target.value)
|
|
594
|
+
}), /*#__PURE__*/React.createElement(Caption1, {
|
|
595
|
+
color: "tertiary"
|
|
596
|
+
}, "Leave empty to use the mailbox archive folder. ActiveCollab creates the folder if it does not exist.")) : null
|
|
597
|
+
}, {
|
|
598
|
+
id: "delete",
|
|
599
|
+
name: "Delete from the mail server"
|
|
600
|
+
}]
|
|
601
|
+
}), /*#__PURE__*/React.createElement(RadioGroup, {
|
|
602
|
+
label: "Subaddress Style",
|
|
603
|
+
description: "The character that separates the mailbox name from the project code in incoming email addresses. Choose - if your mail host does not preserve +.",
|
|
604
|
+
value: draft.imap_subaddress_separator,
|
|
605
|
+
onChange: value => set("imap_subaddress_separator", value),
|
|
606
|
+
options: [{
|
|
607
|
+
id: "+",
|
|
608
|
+
name: "projects+a1b2c3@northwind.example"
|
|
609
|
+
}, {
|
|
610
|
+
id: "-",
|
|
611
|
+
name: "projects-a1b2c3@northwind.example"
|
|
612
|
+
}]
|
|
613
|
+
}))), /*#__PURE__*/React.createElement(Dialog.ContentDivider, null), /*#__PURE__*/React.createElement(SaveActions, {
|
|
614
|
+
onSave: () => onSave(draft),
|
|
615
|
+
onCancel: onClose
|
|
616
|
+
}));
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
/* ------------------------------------------------------------------ */
|
|
620
|
+
/* Search Configuration */
|
|
621
|
+
/* ------------------------------------------------------------------ */
|
|
622
|
+
|
|
623
|
+
const SearchIntro = () => /*#__PURE__*/React.createElement(Stack, {
|
|
624
|
+
space: "md"
|
|
625
|
+
}, /*#__PURE__*/React.createElement(Body2, null, "ActiveCollab needs to store search data on the ElasticSearch server. If you don't configure it, ActiveCollab will still work - but you won't be able to use the in-app search."), /*#__PURE__*/React.createElement(Body2, null, /*#__PURE__*/React.createElement(InlineLink, {
|
|
626
|
+
href: "#",
|
|
627
|
+
target: "_blank",
|
|
628
|
+
rel: "noreferrer"
|
|
629
|
+
}, "Click here"), " ", "to learn how to configure ElasticSearch."));
|
|
630
|
+
const NumberFieldRow = styled.div.withConfig({
|
|
631
|
+
displayName: "parts__NumberFieldRow",
|
|
632
|
+
componentId: "sc-1h0u3no-2"
|
|
633
|
+
})(["display:flex;gap:16px;.c-input-wrapper{width:80px;}"]);
|
|
634
|
+
const SearchDialog = _ref1 => {
|
|
635
|
+
let open = _ref1.open,
|
|
636
|
+
data = _ref1.data,
|
|
637
|
+
onClose = _ref1.onClose,
|
|
638
|
+
onSave = _ref1.onSave,
|
|
639
|
+
onTestRebuild = _ref1.onTestRebuild,
|
|
640
|
+
onDisconnect = _ref1.onDisconnect,
|
|
641
|
+
_ref1$defaultConfirm = _ref1.defaultConfirm,
|
|
642
|
+
defaultConfirm = _ref1$defaultConfirm === void 0 ? false : _ref1$defaultConfirm;
|
|
643
|
+
const _useState5 = useState(data),
|
|
644
|
+
draft = _useState5[0],
|
|
645
|
+
setDraft = _useState5[1];
|
|
646
|
+
const _useState6 = useState(false),
|
|
647
|
+
showAdvanced = _useState6[0],
|
|
648
|
+
setShowAdvanced = _useState6[1];
|
|
649
|
+
const _useState7 = useState(defaultConfirm),
|
|
650
|
+
confirm = _useState7[0],
|
|
651
|
+
setConfirm = _useState7[1];
|
|
652
|
+
useEffect(() => setDraft(data), [data, open]);
|
|
653
|
+
const set = (key, value) => setDraft(prev => _extends({}, prev, {
|
|
654
|
+
[key]: value
|
|
655
|
+
}));
|
|
656
|
+
const connected = Boolean(data.hosts);
|
|
657
|
+
const connectedSuccess = connected && data.is_index_created && data.is_index_rebuilded;
|
|
658
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Dialog, {
|
|
659
|
+
open: open,
|
|
660
|
+
onClose: onClose,
|
|
661
|
+
size: "l",
|
|
662
|
+
enableBackgroundClick: true
|
|
663
|
+
}, /*#__PURE__*/React.createElement(Dialog.Title, {
|
|
664
|
+
onClose: onClose
|
|
665
|
+
}, "Search Configuration"), /*#__PURE__*/React.createElement(Dialog.ContentDivider, null), connected ? /*#__PURE__*/React.createElement(Dialog.Content, null, /*#__PURE__*/React.createElement(FormBody, null, /*#__PURE__*/React.createElement(SearchIntro, null), connectedSuccess ? /*#__PURE__*/React.createElement(TitledText, {
|
|
666
|
+
title: "Connected"
|
|
667
|
+
}, /*#__PURE__*/React.createElement(Body2, null, "You are connected to the ElasticSearch server.")) : /*#__PURE__*/React.createElement(TitledText, {
|
|
668
|
+
title: "Almost done"
|
|
669
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
670
|
+
space: "sm",
|
|
671
|
+
align: "start"
|
|
672
|
+
}, /*#__PURE__*/React.createElement(Body2, null, "Connection to the ElasticSearch server has been established successfully. Next step is to import your data into the search index. Use Terminal to navigate to the directory where ActiveCollab is installed, and run this command:"), /*#__PURE__*/React.createElement(CommandBlock, null, "php tasks/activecollab-cli.php rebuild_search_index"), /*#__PURE__*/React.createElement(Button, {
|
|
673
|
+
variant: "secondary",
|
|
674
|
+
onClick: onTestRebuild
|
|
675
|
+
}, "Test Rebuild Status"))), /*#__PURE__*/React.createElement(TitledText, {
|
|
676
|
+
title: "Disconnect"
|
|
677
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
678
|
+
space: "md",
|
|
679
|
+
align: "start"
|
|
680
|
+
}, /*#__PURE__*/React.createElement(Body2, null, "Disconnecting from the server will remove ActiveCollab search data, and terminate connection. Once disconnected, ActiveCollab's in-app search feature will stop working."), /*#__PURE__*/React.createElement(Body2, null, "This step is required if you wish to connect to a different ElasticSearch server, or change the search configuration."), /*#__PURE__*/React.createElement(Button, {
|
|
681
|
+
variant: "primary",
|
|
682
|
+
onClick: () => setConfirm(true)
|
|
683
|
+
}, "Disconnect"))))) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Dialog.Content, null, /*#__PURE__*/React.createElement(FormBody, null, /*#__PURE__*/React.createElement(SearchIntro, null), /*#__PURE__*/React.createElement(DialogFormField, {
|
|
684
|
+
id: "hosts",
|
|
685
|
+
label: "Host(s)",
|
|
686
|
+
hint: "Host or comma separated list of hosts"
|
|
687
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
688
|
+
id: "hosts",
|
|
689
|
+
required: true,
|
|
690
|
+
placeholder: "https://localhost:9200",
|
|
691
|
+
value: draft.hosts,
|
|
692
|
+
onChange: event => set("hosts", event.target.value)
|
|
693
|
+
})), /*#__PURE__*/React.createElement(DialogFormField, {
|
|
694
|
+
id: "user",
|
|
695
|
+
label: "Username"
|
|
696
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
697
|
+
id: "user",
|
|
698
|
+
value: draft.user,
|
|
699
|
+
onChange: event => set("user", event.target.value)
|
|
700
|
+
})), /*#__PURE__*/React.createElement(DialogFormField, {
|
|
701
|
+
id: "password",
|
|
702
|
+
label: "Password"
|
|
703
|
+
}, /*#__PURE__*/React.createElement(InputPassword, {
|
|
704
|
+
id: "password",
|
|
705
|
+
value: draft.password,
|
|
706
|
+
onChange: event => set("password", event.target.value),
|
|
707
|
+
showTooltipText: "Show",
|
|
708
|
+
hideTooltipText: "Hide"
|
|
709
|
+
})), /*#__PURE__*/React.createElement(DialogFormField, {
|
|
710
|
+
id: "path_to_certificate",
|
|
711
|
+
label: "Certificate Path"
|
|
712
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
713
|
+
id: "path_to_certificate",
|
|
714
|
+
value: draft.path_to_certificate,
|
|
715
|
+
onChange: event => set("path_to_certificate", event.target.value)
|
|
716
|
+
})), showAdvanced ? /*#__PURE__*/React.createElement(NumberFieldRow, null, /*#__PURE__*/React.createElement(DialogFormField, {
|
|
717
|
+
id: "shards",
|
|
718
|
+
label: "Number of Shards"
|
|
719
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
720
|
+
id: "shards",
|
|
721
|
+
type: "number",
|
|
722
|
+
min: "1",
|
|
723
|
+
max: "50",
|
|
724
|
+
value: String(draft.shards),
|
|
725
|
+
onChange: event => set("shards", Number(event.target.value) || 1)
|
|
726
|
+
})), /*#__PURE__*/React.createElement(DialogFormField, {
|
|
727
|
+
id: "replicas",
|
|
728
|
+
label: "Number of Replicas"
|
|
729
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
730
|
+
id: "replicas",
|
|
731
|
+
type: "number",
|
|
732
|
+
min: "1",
|
|
733
|
+
max: "50",
|
|
734
|
+
value: String(draft.replicas),
|
|
735
|
+
onChange: event => set("replicas", Number(event.target.value) || 1)
|
|
736
|
+
}))) : null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
737
|
+
variant: "text colored",
|
|
738
|
+
onClick: () => setShowAdvanced(prev => !prev)
|
|
739
|
+
}, showAdvanced ? "Hide Advanced Settings" : "Show Advanced Settings")))), /*#__PURE__*/React.createElement(Dialog.ContentDivider, null), /*#__PURE__*/React.createElement(SaveActions, {
|
|
740
|
+
onSave: () => onSave(draft),
|
|
741
|
+
onCancel: onClose,
|
|
742
|
+
disabled: !draft.hosts
|
|
743
|
+
}))), /*#__PURE__*/React.createElement(ConfirmDialog, {
|
|
744
|
+
open: confirm,
|
|
745
|
+
dialogTitle: "Disconnect ElasticSearch",
|
|
746
|
+
confirmBtnText: "Disconnect",
|
|
747
|
+
dialogContent: "Are you sure you want to disconnect from ElasticSearch service?",
|
|
748
|
+
onConfirm: () => {
|
|
749
|
+
setConfirm(false);
|
|
750
|
+
onDisconnect();
|
|
751
|
+
},
|
|
752
|
+
onCancel: () => setConfirm(false)
|
|
753
|
+
}));
|
|
754
|
+
};
|
|
755
|
+
|
|
756
|
+
/* ------------------------------------------------------------------ */
|
|
757
|
+
/* Pusher Configuration */
|
|
758
|
+
/* ------------------------------------------------------------------ */
|
|
759
|
+
|
|
760
|
+
const PusherDialog = _ref10 => {
|
|
761
|
+
let open = _ref10.open,
|
|
762
|
+
data = _ref10.data,
|
|
763
|
+
onClose = _ref10.onClose,
|
|
764
|
+
onSave = _ref10.onSave,
|
|
765
|
+
onDisconnect = _ref10.onDisconnect,
|
|
766
|
+
_ref10$defaultConfirm = _ref10.defaultConfirm,
|
|
767
|
+
defaultConfirm = _ref10$defaultConfirm === void 0 ? false : _ref10$defaultConfirm;
|
|
768
|
+
const _useState8 = useState(data),
|
|
769
|
+
draft = _useState8[0],
|
|
770
|
+
setDraft = _useState8[1];
|
|
771
|
+
const _useState9 = useState(defaultConfirm),
|
|
772
|
+
confirm = _useState9[0],
|
|
773
|
+
setConfirm = _useState9[1];
|
|
774
|
+
useEffect(() => setDraft(data), [data, open]);
|
|
775
|
+
const set = (key, value) => setDraft(prev => _extends({}, prev, {
|
|
776
|
+
[key]: value
|
|
777
|
+
}));
|
|
778
|
+
const intro = /*#__PURE__*/React.createElement(Stack, {
|
|
779
|
+
space: "md"
|
|
780
|
+
}, /*#__PURE__*/React.createElement(Body2, null, "ActiveCollab must be connected to Pusher to send updates in real time. Otherwise, users will only receive notifications by refreshing the page and won't be able to use the Chat feature."), /*#__PURE__*/React.createElement(Body2, null, /*#__PURE__*/React.createElement(InlineLink, {
|
|
781
|
+
href: "#",
|
|
782
|
+
target: "_blank",
|
|
783
|
+
rel: "noreferrer"
|
|
784
|
+
}, "Learn more"), " ", "about the Pusher integration and how to configure it."));
|
|
785
|
+
const canSave = Boolean(draft.app_id && draft.app_key && draft.app_cluster && draft.app_secret);
|
|
786
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Dialog, {
|
|
787
|
+
open: open,
|
|
788
|
+
onClose: onClose,
|
|
789
|
+
size: "l",
|
|
790
|
+
enableBackgroundClick: true
|
|
791
|
+
}, /*#__PURE__*/React.createElement(Dialog.Title, {
|
|
792
|
+
onClose: onClose
|
|
793
|
+
}, "Pusher Configuration"), /*#__PURE__*/React.createElement(Dialog.ContentDivider, null), data.is_connection_tested ? /*#__PURE__*/React.createElement(Dialog.Content, null, /*#__PURE__*/React.createElement(FormBody, null, intro, /*#__PURE__*/React.createElement(TitledText, {
|
|
794
|
+
title: "Connected"
|
|
795
|
+
}, /*#__PURE__*/React.createElement(Body2, null, "You are connected to Pusher.")), /*#__PURE__*/React.createElement(TitledText, {
|
|
796
|
+
title: "Disconnect"
|
|
797
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
798
|
+
space: "md",
|
|
799
|
+
align: "start"
|
|
800
|
+
}, /*#__PURE__*/React.createElement(Body2, null, "Disconnect Pusher and disable ActiveCollab's Chat and real-time features."), /*#__PURE__*/React.createElement(Button, {
|
|
801
|
+
variant: "primary",
|
|
802
|
+
onClick: () => setConfirm(true)
|
|
803
|
+
}, "Disconnect"))))) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Dialog.Content, null, /*#__PURE__*/React.createElement(FormBody, null, intro, /*#__PURE__*/React.createElement(DialogFormField, {
|
|
804
|
+
id: "app_id",
|
|
805
|
+
label: "App ID*"
|
|
806
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
807
|
+
id: "app_id",
|
|
808
|
+
required: true,
|
|
809
|
+
value: draft.app_id,
|
|
810
|
+
onChange: event => set("app_id", event.target.value)
|
|
811
|
+
})), /*#__PURE__*/React.createElement(DialogFormField, {
|
|
812
|
+
id: "app_key",
|
|
813
|
+
label: "Key*"
|
|
814
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
815
|
+
id: "app_key",
|
|
816
|
+
value: draft.app_key,
|
|
817
|
+
onChange: event => set("app_key", event.target.value)
|
|
818
|
+
})), /*#__PURE__*/React.createElement(DialogFormField, {
|
|
819
|
+
id: "app_cluster",
|
|
820
|
+
label: "Cluster*"
|
|
821
|
+
}, /*#__PURE__*/React.createElement(ComboBox, {
|
|
822
|
+
type: "single",
|
|
823
|
+
options: PUSHER_CLUSTERS,
|
|
824
|
+
selected: draft.app_cluster,
|
|
825
|
+
onChange: value => set("app_cluster", value ? String(value) : ""),
|
|
826
|
+
placeholder: "Choose Cluster",
|
|
827
|
+
emptyValue: "Add new Cluster",
|
|
828
|
+
inPortal: true
|
|
829
|
+
})), /*#__PURE__*/React.createElement(DialogFormField, {
|
|
830
|
+
id: "app_secret",
|
|
831
|
+
label: "Secret*"
|
|
832
|
+
}, /*#__PURE__*/React.createElement(InputPassword, {
|
|
833
|
+
id: "app_secret",
|
|
834
|
+
value: draft.app_secret,
|
|
835
|
+
onChange: event => set("app_secret", event.target.value),
|
|
836
|
+
showTooltipText: "Show",
|
|
837
|
+
hideTooltipText: "Hide"
|
|
838
|
+
})))), /*#__PURE__*/React.createElement(Dialog.ContentDivider, null), /*#__PURE__*/React.createElement(SaveActions, {
|
|
839
|
+
onSave: () => onSave(draft),
|
|
840
|
+
onCancel: onClose,
|
|
841
|
+
disabled: !canSave
|
|
842
|
+
}))), /*#__PURE__*/React.createElement(ConfirmDialog, {
|
|
843
|
+
open: confirm,
|
|
844
|
+
dialogTitle: "Disconnect Pusher",
|
|
845
|
+
confirmBtnText: "Disconnect",
|
|
846
|
+
dialogContent: "Disconnecting Pusher will disable ActiveCollab's real-time features. You will only receive notifications by refreshing the page, and the Chat feature won't be available. Chat messages will not be deleted and will become available when you connect to Pusher again.",
|
|
847
|
+
onConfirm: () => {
|
|
848
|
+
setConfirm(false);
|
|
849
|
+
onDisconnect();
|
|
850
|
+
},
|
|
851
|
+
onCancel: () => setConfirm(false)
|
|
852
|
+
}));
|
|
853
|
+
};
|
|
854
|
+
|
|
855
|
+
/* ------------------------------------------------------------------ */
|
|
856
|
+
/* Cron Configuration (unix branch) */
|
|
857
|
+
/* ------------------------------------------------------------------ */
|
|
858
|
+
|
|
859
|
+
const CommandWithLabel = _ref11 => {
|
|
860
|
+
let label = _ref11.label,
|
|
861
|
+
command = _ref11.command;
|
|
862
|
+
return /*#__PURE__*/React.createElement(Stack, {
|
|
863
|
+
space: "xs"
|
|
864
|
+
}, /*#__PURE__*/React.createElement(Body2, {
|
|
865
|
+
weight: "bold"
|
|
866
|
+
}, label), /*#__PURE__*/React.createElement(CommandBlock, null, command));
|
|
867
|
+
};
|
|
868
|
+
const CronDialog = _ref12 => {
|
|
869
|
+
let open = _ref12.open,
|
|
870
|
+
instructions = _ref12.instructions,
|
|
871
|
+
onClose = _ref12.onClose;
|
|
872
|
+
return /*#__PURE__*/React.createElement(Dialog, {
|
|
873
|
+
open: open,
|
|
874
|
+
onClose: onClose,
|
|
875
|
+
size: "l",
|
|
876
|
+
enableBackgroundClick: true
|
|
877
|
+
}, /*#__PURE__*/React.createElement(Dialog.Title, {
|
|
878
|
+
onClose: onClose
|
|
879
|
+
}, "Cron Configuration"), /*#__PURE__*/React.createElement(Dialog.ContentDivider, null), /*#__PURE__*/React.createElement(Dialog.Content, null, /*#__PURE__*/React.createElement(FormBody, null, /*#__PURE__*/React.createElement(Stack, {
|
|
880
|
+
space: "md"
|
|
881
|
+
}, /*#__PURE__*/React.createElement(Body2, null, "ActiveCollab relies on Cron for various system tasks like: checking for new comments and tasks, sending email notifications and reminders, issuing recurring invoices, checking for updates, etc."), /*#__PURE__*/React.createElement(Body2, null, "ActiveCollab has three jobs your server needs to run periodically - one every minute, one every three minutes, and one every hour. Your server can run them automatically at regular time intervals using Cron."), /*#__PURE__*/React.createElement(Body2, null, "If you don't configure Cron to run those jobs, ActiveCollab won't be able to send emails or run other system processes."), /*#__PURE__*/React.createElement(Body2, null, "There are two ways to configure Cron Jobs - both involve adding commands to your ", /*#__PURE__*/React.createElement("strong", null, "crontab"), " file.")), /*#__PURE__*/React.createElement(TitledText, {
|
|
882
|
+
title: "Copy/Pasting the Commands"
|
|
883
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
884
|
+
space: "md"
|
|
885
|
+
}, /*#__PURE__*/React.createElement(Body2, null, "This is a simpler way, but may not work on every server. Also make sure you change the /path/to/your/php to the real location of your php executable. Open the server's terminal (via ssh or directly) and execute the following commands:"), /*#__PURE__*/React.createElement(CommandWithLabel, {
|
|
886
|
+
label: "Frequently Job",
|
|
887
|
+
command: instructions.setup_frequently
|
|
888
|
+
}), /*#__PURE__*/React.createElement(CommandWithLabel, {
|
|
889
|
+
label: "IMAP Job",
|
|
890
|
+
command: instructions.setup_check_imap
|
|
891
|
+
}), /*#__PURE__*/React.createElement(CommandWithLabel, {
|
|
892
|
+
label: "Hourly Job",
|
|
893
|
+
command: instructions.setup_hourly
|
|
894
|
+
}))), /*#__PURE__*/React.createElement(TitledText, {
|
|
895
|
+
title: "Manual Crontab Configuration"
|
|
896
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
897
|
+
space: "md"
|
|
898
|
+
}, /*#__PURE__*/React.createElement(Body2, null, "This is a bit more technical, since you need to know how to set up Crontab jobs. The jobs that need to be executed are located in the ActiveCollab installation directory in tasks/cron_jobs/. You or your system administrator need to open Crontab in the terminal and manually add those jobs to run at regular time intervals."), /*#__PURE__*/React.createElement(Body2, null, "These are the commands - just make sure to update the paths of your php executable:"), /*#__PURE__*/React.createElement(CommandBlock, null, ["* * * * * " + instructions.frequently, "*/3 * * * * " + instructions.imap_check, "0 * * * * " + instructions.hourly].join("\n")))), /*#__PURE__*/React.createElement(TitledText, {
|
|
899
|
+
title: "Checking the Configuration"
|
|
900
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
901
|
+
space: "md"
|
|
902
|
+
}, /*#__PURE__*/React.createElement(Body2, null, "Execute this command on the server and observe the command output:"), /*#__PURE__*/React.createElement(CommandBlock, null, "crontab -l"), /*#__PURE__*/React.createElement(Body2, null, "You should see the jobs listed in the output. If that's not the case, you may need to contact your system administrator to help you out."))))));
|
|
903
|
+
};
|
|
904
|
+
|
|
905
|
+
/* ------------------------------------------------------------------ */
|
|
906
|
+
/* Row bodies */
|
|
907
|
+
/* ------------------------------------------------------------------ */
|
|
908
|
+
|
|
909
|
+
/** A fixed "today" so the expiry check never drifts with the wall clock. */
|
|
910
|
+
const NOW_SECONDS = 1791072000; // 2026-10-04
|
|
911
|
+
|
|
912
|
+
/** formatDateSmart for the expiry date, e.g. "Jun 30, 2026". */
|
|
913
|
+
const formatDay = unixSeconds => new Date(unixSeconds * 1000).toLocaleDateString("en-US", {
|
|
914
|
+
month: "short",
|
|
915
|
+
day: "numeric",
|
|
916
|
+
year: "numeric"
|
|
917
|
+
});
|
|
918
|
+
|
|
919
|
+
/** SelfHostedVersion.js, expired branch: the Renew Subscription block. */
|
|
920
|
+
const RenewBody = _ref13 => {
|
|
921
|
+
let check = _ref13.check;
|
|
922
|
+
return /*#__PURE__*/React.createElement(Stack, {
|
|
923
|
+
space: "md",
|
|
924
|
+
align: "start"
|
|
925
|
+
}, /*#__PURE__*/React.createElement(TitledText, {
|
|
926
|
+
title: "Renew Subscription",
|
|
927
|
+
variant: "title2"
|
|
928
|
+
}, /*#__PURE__*/React.createElement(Body2, null, "Your upgrade and support subscription expired on", " ", formatDay(check.support_expires_on), ". Renew to get access to ActiveCollab ", check.latest_available_version, ".")), /*#__PURE__*/React.createElement(Link, {
|
|
929
|
+
href: check.support_renewal_url,
|
|
930
|
+
target: "_blank",
|
|
931
|
+
rel: "noreferrer",
|
|
932
|
+
variant: "primary"
|
|
933
|
+
}, "Renew Subscription"));
|
|
934
|
+
};
|
|
935
|
+
|
|
936
|
+
/** SelfHostedVersion.js, not-expired branch: the SSH upgrade steps. */
|
|
937
|
+
const VersionBody = () => /*#__PURE__*/React.createElement(Stack, {
|
|
938
|
+
space: "sm"
|
|
939
|
+
}, /*#__PURE__*/React.createElement(Body2, null, "1. Login to your server via SSH,"), /*#__PURE__*/React.createElement(Body2, null, "2. Navigate to directory where ActiveCollab is installed,"), /*#__PURE__*/React.createElement(Stack, {
|
|
940
|
+
space: "xs"
|
|
941
|
+
}, /*#__PURE__*/React.createElement(Body2, null, "3. Run this command:"), /*#__PURE__*/React.createElement(CommandBlock, null, "php tasks/activecollab-cli.php upgrade")));
|
|
942
|
+
const OldVersionsSummary = _ref14 => {
|
|
943
|
+
let data = _ref14.data,
|
|
944
|
+
currentVersion = _ref14.currentVersion,
|
|
945
|
+
removing = _ref14.removing,
|
|
946
|
+
onRemove = _ref14.onRemove;
|
|
947
|
+
const hasErrors = data.versions_errors.length > 0;
|
|
948
|
+
let action = null;
|
|
949
|
+
if (removing) {
|
|
950
|
+
action = /*#__PURE__*/React.createElement(Row, {
|
|
951
|
+
space: "sm"
|
|
952
|
+
}, /*#__PURE__*/React.createElement(SpinnerLoader, null), /*#__PURE__*/React.createElement(Body2, null, "Processing..."));
|
|
953
|
+
} else if (hasErrors) {
|
|
954
|
+
action = /*#__PURE__*/React.createElement(Button, {
|
|
955
|
+
variant: "secondary",
|
|
956
|
+
onClick: onRemove
|
|
957
|
+
}, "Remove");
|
|
958
|
+
}
|
|
959
|
+
return /*#__PURE__*/React.createElement(Stack, {
|
|
960
|
+
space: "sm"
|
|
961
|
+
}, /*#__PURE__*/React.createElement(SummaryField, {
|
|
962
|
+
label: "Status",
|
|
963
|
+
alert: hasErrors,
|
|
964
|
+
value: hasErrors ? data.versions_errors.join(",\n") : "There are no old version files to delete.",
|
|
965
|
+
action: action
|
|
966
|
+
}), /*#__PURE__*/React.createElement(SummaryField, {
|
|
967
|
+
label: "Current Version",
|
|
968
|
+
value: currentVersion
|
|
969
|
+
}));
|
|
970
|
+
};
|
|
971
|
+
|
|
972
|
+
/* ------------------------------------------------------------------ */
|
|
973
|
+
/* The screen */
|
|
974
|
+
/* ------------------------------------------------------------------ */
|
|
975
|
+
|
|
976
|
+
/** The starting state of one story. Every field defaults to the base mocks. */
|
|
977
|
+
|
|
978
|
+
export const SelfHostedRedesignScreen = _ref15 => {
|
|
979
|
+
let expanded = _ref15.expanded,
|
|
980
|
+
_ref15$dialog = _ref15.dialog,
|
|
981
|
+
initialDialog = _ref15$dialog === void 0 ? null : _ref15$dialog,
|
|
982
|
+
_ref15$confirmDisconn = _ref15.confirmDisconnect,
|
|
983
|
+
confirmDisconnect = _ref15$confirmDisconn === void 0 ? false : _ref15$confirmDisconn,
|
|
984
|
+
_ref15$status = _ref15.status,
|
|
985
|
+
initialStatus = _ref15$status === void 0 ? SYSTEM_STATUS : _ref15$status,
|
|
986
|
+
_ref15$check = _ref15.check,
|
|
987
|
+
check = _ref15$check === void 0 ? CHECK_FOR_UPDATES : _ref15$check,
|
|
988
|
+
_ref15$email = _ref15.email,
|
|
989
|
+
initialEmail = _ref15$email === void 0 ? EMAIL_INTEGRATION : _ref15$email,
|
|
990
|
+
_ref15$search = _ref15.search,
|
|
991
|
+
initialSearch = _ref15$search === void 0 ? SEARCH_NOT_CONFIGURED : _ref15$search,
|
|
992
|
+
_ref15$pusher = _ref15.pusher,
|
|
993
|
+
initialPusher = _ref15$pusher === void 0 ? PUSHER_INTEGRATION : _ref15$pusher,
|
|
994
|
+
_ref15$cron = _ref15.cron,
|
|
995
|
+
cron = _ref15$cron === void 0 ? CRON_INSTRUCTIONS : _ref15$cron,
|
|
996
|
+
_ref15$oldVersions = _ref15.oldVersions,
|
|
997
|
+
initialOldVersions = _ref15$oldVersions === void 0 ? OLD_VERSIONS : _ref15$oldVersions,
|
|
998
|
+
_ref15$removing = _ref15.removing,
|
|
999
|
+
initialRemoving = _ref15$removing === void 0 ? false : _ref15$removing;
|
|
1000
|
+
const _useState0 = useState(initialStatus),
|
|
1001
|
+
status = _useState0[0],
|
|
1002
|
+
setStatus = _useState0[1];
|
|
1003
|
+
const _useState1 = useState(initialEmail),
|
|
1004
|
+
email = _useState1[0],
|
|
1005
|
+
setEmail = _useState1[1];
|
|
1006
|
+
const _useState10 = useState(initialSearch),
|
|
1007
|
+
search = _useState10[0],
|
|
1008
|
+
setSearch = _useState10[1];
|
|
1009
|
+
const _useState11 = useState(initialPusher),
|
|
1010
|
+
pusher = _useState11[0],
|
|
1011
|
+
setPusher = _useState11[1];
|
|
1012
|
+
const _useState12 = useState(initialOldVersions),
|
|
1013
|
+
oldVersions = _useState12[0],
|
|
1014
|
+
setOldVersions = _useState12[1];
|
|
1015
|
+
const _useState13 = useState(initialRemoving),
|
|
1016
|
+
removing = _useState13[0],
|
|
1017
|
+
setRemoving = _useState13[1];
|
|
1018
|
+
const _useState14 = useState(initialDialog),
|
|
1019
|
+
dialog = _useState14[0],
|
|
1020
|
+
setDialog = _useState14[1];
|
|
1021
|
+
const close = () => setDialog(null);
|
|
1022
|
+
useEffect(() => {
|
|
1023
|
+
if (!removing || initialRemoving) {
|
|
1024
|
+
return undefined;
|
|
1025
|
+
}
|
|
1026
|
+
const timer = window.setTimeout(() => {
|
|
1027
|
+
setOldVersions({
|
|
1028
|
+
versions_is_ok: true,
|
|
1029
|
+
versions_errors: []
|
|
1030
|
+
});
|
|
1031
|
+
setRemoving(false);
|
|
1032
|
+
}, 1500);
|
|
1033
|
+
return () => window.clearTimeout(timer);
|
|
1034
|
+
}, [removing, initialRemoving]);
|
|
1035
|
+
const isExpired = check.support_expires_on <= NOW_SECONDS;
|
|
1036
|
+
const canUpgrade = check.new_version_available || isExpired;
|
|
1037
|
+
return /*#__PURE__*/React.createElement(SelfHostedSettingsDialog, null, /*#__PURE__*/React.createElement(ExpandableSettingRow, {
|
|
1038
|
+
label: canUpgrade ? "ActiveCollab " + check.latest_available_version + " is available. You are currently using " + check.current_version : "You are currently using latest stable ActiveCollab version (" + check.current_version + ")",
|
|
1039
|
+
wraps: true,
|
|
1040
|
+
status: canUpgrade ? "problem" : "ok",
|
|
1041
|
+
expandable: canUpgrade,
|
|
1042
|
+
defaultExpanded: expanded === "upgrade"
|
|
1043
|
+
}, isExpired ? /*#__PURE__*/React.createElement(RenewBody, {
|
|
1044
|
+
check: check
|
|
1045
|
+
}) : /*#__PURE__*/React.createElement(VersionBody, null)), /*#__PURE__*/React.createElement(ExpandableSettingRow, {
|
|
1046
|
+
label: "Sending and receiving email",
|
|
1047
|
+
status: okStatus(status.email_is_ok),
|
|
1048
|
+
right: /*#__PURE__*/React.createElement(EmailLogLink, null),
|
|
1049
|
+
defaultExpanded: expanded === "email"
|
|
1050
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
1051
|
+
space: "sm"
|
|
1052
|
+
}, /*#__PURE__*/React.createElement(SummaryField, {
|
|
1053
|
+
label: "Status",
|
|
1054
|
+
alert: status.email_errors.length > 0,
|
|
1055
|
+
value: statusText(status.email_errors)
|
|
1056
|
+
}), /*#__PURE__*/React.createElement(SummaryField, {
|
|
1057
|
+
label: "Email",
|
|
1058
|
+
value: email.sender_name + " <" + email.sender_email + ">"
|
|
1059
|
+
}), /*#__PURE__*/React.createElement(SummaryField, {
|
|
1060
|
+
label: "Outgoing Email",
|
|
1061
|
+
value: smtpSummary(email),
|
|
1062
|
+
action: /*#__PURE__*/React.createElement(EditButton, {
|
|
1063
|
+
tooltip: "Edit outgoing email",
|
|
1064
|
+
onClick: () => setDialog("smtp")
|
|
1065
|
+
})
|
|
1066
|
+
}), /*#__PURE__*/React.createElement(SummaryField, {
|
|
1067
|
+
label: "Inbound Email",
|
|
1068
|
+
value: imapSummary(email, status.imap_is_available),
|
|
1069
|
+
action: status.imap_is_available ? /*#__PURE__*/React.createElement(EditButton, {
|
|
1070
|
+
tooltip: "Edit inbound email",
|
|
1071
|
+
onClick: () => setDialog("imap")
|
|
1072
|
+
}) : null
|
|
1073
|
+
}))), /*#__PURE__*/React.createElement(ExpandableSettingRow, {
|
|
1074
|
+
label: "Document search",
|
|
1075
|
+
status: okStatus(status.search_is_ok),
|
|
1076
|
+
defaultExpanded: expanded === "search"
|
|
1077
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
1078
|
+
space: "sm"
|
|
1079
|
+
}, /*#__PURE__*/React.createElement(SummaryField, {
|
|
1080
|
+
label: "Status",
|
|
1081
|
+
alert: status.search_errors.length > 0,
|
|
1082
|
+
value: statusText(status.search_errors),
|
|
1083
|
+
action: /*#__PURE__*/React.createElement(EditButton, {
|
|
1084
|
+
tooltip: "Configure search",
|
|
1085
|
+
onClick: () => setDialog("search")
|
|
1086
|
+
})
|
|
1087
|
+
}), /*#__PURE__*/React.createElement(SummaryField, {
|
|
1088
|
+
label: "Server address",
|
|
1089
|
+
value: search.hosts || "Not configured"
|
|
1090
|
+
}))), /*#__PURE__*/React.createElement(ExpandableSettingRow, {
|
|
1091
|
+
label: "Pusher configuration",
|
|
1092
|
+
status: okStatus(status.pusher_is_ok),
|
|
1093
|
+
defaultExpanded: expanded === "pusher"
|
|
1094
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
1095
|
+
space: "sm"
|
|
1096
|
+
}, /*#__PURE__*/React.createElement(SummaryField, {
|
|
1097
|
+
label: "Status",
|
|
1098
|
+
alert: status.pusher_errors.length > 0,
|
|
1099
|
+
value: statusText(status.pusher_errors),
|
|
1100
|
+
action: /*#__PURE__*/React.createElement(EditButton, {
|
|
1101
|
+
tooltip: "Configure Pusher",
|
|
1102
|
+
onClick: () => setDialog("pusher")
|
|
1103
|
+
})
|
|
1104
|
+
}), /*#__PURE__*/React.createElement(SummaryField, {
|
|
1105
|
+
label: "Server address",
|
|
1106
|
+
value: pusher.is_connection_tested ? pusher.ws_host : "Not configured"
|
|
1107
|
+
}))), /*#__PURE__*/React.createElement(ExpandableSettingRow, {
|
|
1108
|
+
label: "Cron jobs",
|
|
1109
|
+
status: okStatus(status.cron_is_ok),
|
|
1110
|
+
defaultExpanded: expanded === "cron"
|
|
1111
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
1112
|
+
space: "sm"
|
|
1113
|
+
}, /*#__PURE__*/React.createElement(SummaryField, {
|
|
1114
|
+
label: "Status",
|
|
1115
|
+
alert: status.cron_errors.length > 0,
|
|
1116
|
+
value: statusText(status.cron_errors),
|
|
1117
|
+
action: /*#__PURE__*/React.createElement(EditButton, {
|
|
1118
|
+
tooltip: "Cron configuration",
|
|
1119
|
+
onClick: () => setDialog("cron")
|
|
1120
|
+
})
|
|
1121
|
+
}), /*#__PURE__*/React.createElement(SummaryField, {
|
|
1122
|
+
label: "Hourly Job",
|
|
1123
|
+
value: formatRun(cron.hourly_last_run)
|
|
1124
|
+
}), /*#__PURE__*/React.createElement(SummaryField, {
|
|
1125
|
+
label: "Frequently Job",
|
|
1126
|
+
value: formatRun(cron.frequently_last_run)
|
|
1127
|
+
}), /*#__PURE__*/React.createElement(SummaryField, {
|
|
1128
|
+
label: "IMAP Job",
|
|
1129
|
+
value: formatRun(cron.check_imap_last_run)
|
|
1130
|
+
}))), /*#__PURE__*/React.createElement(ExpandableSettingRow, {
|
|
1131
|
+
label: "Old Versions",
|
|
1132
|
+
status: okStatus(oldVersions.versions_is_ok),
|
|
1133
|
+
defaultExpanded: expanded === "clean-up"
|
|
1134
|
+
}, /*#__PURE__*/React.createElement(OldVersionsSummary, {
|
|
1135
|
+
data: oldVersions,
|
|
1136
|
+
currentVersion: status.headers["x-angie-applicationversion"],
|
|
1137
|
+
removing: removing,
|
|
1138
|
+
onRemove: () => setRemoving(true)
|
|
1139
|
+
})), /*#__PURE__*/React.createElement(OutgoingEmailDialog, {
|
|
1140
|
+
open: dialog === "smtp",
|
|
1141
|
+
data: email,
|
|
1142
|
+
onClose: close,
|
|
1143
|
+
onSave: next => {
|
|
1144
|
+
setEmail(next);
|
|
1145
|
+
close();
|
|
1146
|
+
}
|
|
1147
|
+
}), /*#__PURE__*/React.createElement(InboundEmailDialog, {
|
|
1148
|
+
open: dialog === "imap",
|
|
1149
|
+
data: email,
|
|
1150
|
+
onClose: close,
|
|
1151
|
+
onSave: next => {
|
|
1152
|
+
setEmail(next);
|
|
1153
|
+
close();
|
|
1154
|
+
}
|
|
1155
|
+
}), /*#__PURE__*/React.createElement(SearchDialog, {
|
|
1156
|
+
open: dialog === "search",
|
|
1157
|
+
data: search,
|
|
1158
|
+
onClose: close,
|
|
1159
|
+
onSave: next => {
|
|
1160
|
+
setSearch(_extends({}, next, {
|
|
1161
|
+
is_index_created: true
|
|
1162
|
+
}));
|
|
1163
|
+
setStatus(prev => _extends({}, prev, {
|
|
1164
|
+
search_is_ok: true,
|
|
1165
|
+
search_errors: []
|
|
1166
|
+
}));
|
|
1167
|
+
},
|
|
1168
|
+
onTestRebuild: () => setSearch(prev => _extends({}, prev, {
|
|
1169
|
+
is_index_rebuilded: true
|
|
1170
|
+
})),
|
|
1171
|
+
defaultConfirm: confirmDisconnect && initialDialog === "search",
|
|
1172
|
+
onDisconnect: () => {
|
|
1173
|
+
setSearch(SEARCH_NOT_CONFIGURED);
|
|
1174
|
+
setStatus(prev => _extends({}, prev, {
|
|
1175
|
+
search_is_ok: false,
|
|
1176
|
+
search_errors: [SEARCH_NOT_CONFIGURED_ERROR]
|
|
1177
|
+
}));
|
|
1178
|
+
}
|
|
1179
|
+
}), /*#__PURE__*/React.createElement(PusherDialog, {
|
|
1180
|
+
open: dialog === "pusher",
|
|
1181
|
+
data: pusher,
|
|
1182
|
+
onClose: close,
|
|
1183
|
+
onSave: next => {
|
|
1184
|
+
setPusher(_extends({}, next, {
|
|
1185
|
+
is_connection_tested: true
|
|
1186
|
+
}));
|
|
1187
|
+
setStatus(prev => _extends({}, prev, {
|
|
1188
|
+
pusher_is_ok: true,
|
|
1189
|
+
pusher_errors: []
|
|
1190
|
+
}));
|
|
1191
|
+
},
|
|
1192
|
+
defaultConfirm: confirmDisconnect && initialDialog === "pusher",
|
|
1193
|
+
onDisconnect: () => {
|
|
1194
|
+
setPusher(prev => _extends({}, prev, {
|
|
1195
|
+
is_connection_tested: false
|
|
1196
|
+
}));
|
|
1197
|
+
setStatus(prev => _extends({}, prev, {
|
|
1198
|
+
pusher_is_ok: false,
|
|
1199
|
+
pusher_errors: [PUSHER_NOT_CONFIGURED_ERROR]
|
|
1200
|
+
}));
|
|
1201
|
+
}
|
|
1202
|
+
}), /*#__PURE__*/React.createElement(CronDialog, {
|
|
1203
|
+
open: dialog === "cron",
|
|
1204
|
+
instructions: cron,
|
|
1205
|
+
onClose: close
|
|
1206
|
+
}));
|
|
1207
|
+
};
|
|
1208
|
+
//# sourceMappingURL=parts.js.map
|