@yadsh/dsh-qa-integrations 0.6.0 → 0.7.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 +309 -288
- package/lib/broker.js +12 -0
- package/lib/broker.js.map +1 -1
- package/lib/client/bitrix24.js +66 -5
- package/lib/client/bitrix24.js.map +1 -1
- package/lib/client/confluence.js +97 -129
- package/lib/client/confluence.js.map +1 -1
- package/lib/client/gitlab.js +1 -1
- package/lib/client/gitlab.js.map +1 -1
- package/lib/client/index.js +25 -5
- package/lib/client/index.js.map +1 -1
- package/lib/client/integrations.js +1 -1
- package/lib/client/integrations.js.map +1 -1
- package/lib/client/jira.js +95 -127
- package/lib/client/jira.js.map +1 -1
- package/lib/client/operator-card.js +537 -0
- package/lib/client/operator-card.js.map +1 -0
- package/lib/client/operator-controls.js +232 -0
- package/lib/client/operator-controls.js.map +1 -0
- package/lib/client/styles.js +60 -0
- package/lib/client/styles.js.map +1 -1
- package/lib/client/testit.js +39 -3
- package/lib/client/testit.js.map +1 -1
- package/lib/client/weblate.js +38 -3
- package/lib/client/weblate.js.map +1 -1
- package/lib/client.js +2825 -785
- package/lib/client.js.map +1 -1
- package/lib/index.js +192 -51
- package/lib/index.js.map +1 -1
- package/lib/providers/bitrix24/catalog.js +138 -8
- package/lib/providers/bitrix24/catalog.js.map +1 -1
- package/lib/providers/bitrix24/config.js +85 -14
- package/lib/providers/bitrix24/config.js.map +1 -1
- package/lib/providers/bitrix24/index.js +113 -0
- package/lib/providers/bitrix24/index.js.map +1 -1
- package/lib/providers/confluence/catalog.js +51 -3
- package/lib/providers/confluence/catalog.js.map +1 -1
- package/lib/providers/confluence/index.js +293 -35
- package/lib/providers/confluence/index.js.map +1 -1
- package/lib/providers/confluence/operations.js +1 -1
- package/lib/providers/confluence/operations.js.map +1 -1
- package/lib/providers/jira/catalog.js +73 -3
- package/lib/providers/jira/catalog.js.map +1 -1
- package/lib/providers/jira/index.js +266 -12
- package/lib/providers/jira/index.js.map +1 -1
- package/lib/providers/testit/catalog.js +77 -0
- package/lib/providers/testit/catalog.js.map +1 -1
- package/lib/providers/testit/index.js +277 -3
- package/lib/providers/testit/index.js.map +1 -1
- package/lib/providers/weblate/catalog.js +103 -9
- package/lib/providers/weblate/catalog.js.map +1 -1
- package/lib/providers/weblate/index.js +243 -5
- package/lib/providers/weblate/index.js.map +1 -1
- package/lib/shared/settings.js +14 -0
- package/lib/shared/settings.js.map +1 -0
- package/lib/typert.host.js +148 -56
- package/lib/typert.remote-client.d.ts +13 -11
- package/lib/typert.remote-client.js +89 -50
- package/lib/types/broker.d.ts +11 -3
- package/lib/types/client/bitrix24.d.ts +24 -2
- package/lib/types/client/confluence.d.ts +19 -3
- package/lib/types/client/index.d.ts +7 -6
- package/lib/types/client/integrations.d.ts +2 -2
- package/lib/types/client/jira.d.ts +20 -3
- package/lib/types/client/operator-card.d.ts +22 -0
- package/lib/types/client/operator-controls.d.ts +135 -0
- package/lib/types/client/testit.d.ts +14 -1
- package/lib/types/client/weblate.d.ts +14 -1
- package/lib/types/index.d.ts +81 -13
- package/lib/types/providers/bitrix24/catalog.d.ts +8 -0
- package/lib/types/providers/bitrix24/config.d.ts +14 -23
- package/lib/types/providers/bitrix24/index.d.ts +36 -1
- package/lib/types/providers/confluence/catalog.d.ts +11 -3
- package/lib/types/providers/confluence/index.d.ts +61 -7
- package/lib/types/providers/confluence/operations.d.ts +2 -0
- package/lib/types/providers/jira/catalog.d.ts +13 -0
- package/lib/types/providers/jira/index.d.ts +48 -1
- package/lib/types/providers/testit/catalog.d.ts +12 -0
- package/lib/types/providers/testit/index.d.ts +61 -2
- package/lib/types/providers/weblate/catalog.d.ts +19 -2
- package/lib/types/providers/weblate/index.d.ts +43 -1
- package/lib/types/shared/settings.d.ts +14 -0
- package/package.json +4 -4
|
@@ -0,0 +1,537 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { CardShell, bindSettingsExternalStore, } from "@yadsh/dsh-plugin-kit/client";
|
|
3
|
+
import { useCallback, useEffect, useMemo, useState, useSyncExternalStore, } from "react";
|
|
4
|
+
import { InstanceListField, NumberField, RecordField, SelectField, StringListField, TextField, Toggle, } from "./operator-controls.js";
|
|
5
|
+
// ---------------------------------------------------------------- raw reading
|
|
6
|
+
//
|
|
7
|
+
// The namespace stores the raw user layer, so a field a deployment never
|
|
8
|
+
// touched reads as absent. Every accessor below narrows that shape in one
|
|
9
|
+
// place and answers with the schema's own default where it can.
|
|
10
|
+
function rawObject(value) {
|
|
11
|
+
return typeof value === "object" && value !== null
|
|
12
|
+
? value
|
|
13
|
+
: {};
|
|
14
|
+
}
|
|
15
|
+
function rawArray(value) {
|
|
16
|
+
return Array.isArray(value) ? value : [];
|
|
17
|
+
}
|
|
18
|
+
function rawString(value) {
|
|
19
|
+
return typeof value === "string" ? value : "";
|
|
20
|
+
}
|
|
21
|
+
function rawNumber(value) {
|
|
22
|
+
return typeof value === "number" && Number.isFinite(value)
|
|
23
|
+
? value
|
|
24
|
+
: undefined;
|
|
25
|
+
}
|
|
26
|
+
function rawStringList(value) {
|
|
27
|
+
return rawArray(value).filter((row) => typeof row === "string");
|
|
28
|
+
}
|
|
29
|
+
function rawRecord(value) {
|
|
30
|
+
return Object.entries(rawObject(value)).filter((entry) => typeof entry[1] === "string");
|
|
31
|
+
}
|
|
32
|
+
function rawBool(value, fallback) {
|
|
33
|
+
return typeof value === "boolean" ? value : fallback;
|
|
34
|
+
}
|
|
35
|
+
/** Resource rows as `kind: v1, v2` text pairs for the record editor. */
|
|
36
|
+
function resourceRows(value) {
|
|
37
|
+
return Object.entries(rawObject(value)).map(([kind, values]) => [
|
|
38
|
+
kind,
|
|
39
|
+
rawArray(values).map(String).join(", "),
|
|
40
|
+
]);
|
|
41
|
+
}
|
|
42
|
+
/** `{ kind: ["a", "b"] }` from the editor's `kind: "a, b"` rows. */
|
|
43
|
+
function resourceRecord(rows) {
|
|
44
|
+
const record = {};
|
|
45
|
+
for (const [kind, values] of rows) {
|
|
46
|
+
const list = values
|
|
47
|
+
.split(",")
|
|
48
|
+
.map((row) => row.trim())
|
|
49
|
+
.filter((row) => row !== "");
|
|
50
|
+
if (list.length > 0)
|
|
51
|
+
record[kind] = list;
|
|
52
|
+
}
|
|
53
|
+
return record;
|
|
54
|
+
}
|
|
55
|
+
function displayError(error) {
|
|
56
|
+
if (error instanceof Error)
|
|
57
|
+
return error.message;
|
|
58
|
+
if (typeof error === "string")
|
|
59
|
+
return error;
|
|
60
|
+
return "Хост отклонил значение.";
|
|
61
|
+
}
|
|
62
|
+
/** Whether the raw user layer carries the path (an object walk; lists whole). */
|
|
63
|
+
function isOverridden(user, path) {
|
|
64
|
+
let cursor = user;
|
|
65
|
+
for (const segment of path) {
|
|
66
|
+
if (typeof cursor !== "object" || cursor === null)
|
|
67
|
+
return false;
|
|
68
|
+
cursor = cursor[segment];
|
|
69
|
+
if (cursor === undefined)
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
/** Top-level keys the user layer overrides; what «reset» clears. */
|
|
75
|
+
function overriddenKeys(user) {
|
|
76
|
+
return Object.keys(rawObject(user));
|
|
77
|
+
}
|
|
78
|
+
// ------------------------------------------------------------------- sections
|
|
79
|
+
function Section(props) {
|
|
80
|
+
return (_jsxs("details", { className: "qai-op__section", open: props.open, children: [_jsxs("summary", { className: "qai-op__section-summary", children: [_jsx("span", { className: "qai-op__section-title", children: props.title }), props.state === undefined || props.state === "" ? null : (_jsx("span", { className: "qai-op__section-state", children: props.state })), props.hint === undefined ? null : (_jsx("span", { className: "qai-op__hint", children: props.hint }))] }), _jsx("div", { className: "qai-op__section-body", children: props.children })] }));
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* A labelled block inside one section: switches that describe the provider,
|
|
84
|
+
* the connections it reads through, the surface it opens to the agent, and the
|
|
85
|
+
* tuning knobs folded away at the end. The fields stay the same controls in the
|
|
86
|
+
* same paths — only the headings that say what belongs with what change.
|
|
87
|
+
*/
|
|
88
|
+
function Group(props) {
|
|
89
|
+
const className = [
|
|
90
|
+
"qai-op__group",
|
|
91
|
+
props.kind === "checks" ? "qai-op__group--checks" : "",
|
|
92
|
+
props.wide === true ? "qai-op__group--wide" : "",
|
|
93
|
+
]
|
|
94
|
+
.filter((part) => part !== "")
|
|
95
|
+
.join(" ");
|
|
96
|
+
return (_jsxs("section", { className: className, children: [_jsx("h4", { className: "qai-op__group-title", children: props.title }), props.hint === undefined ? null : (_jsx("p", { className: "qai-op__group-hint", children: props.hint })), _jsx("div", { className: "qai-op__grid", children: props.children })] }));
|
|
97
|
+
}
|
|
98
|
+
/** The tuning knobs of one provider, folded away until someone needs them. */
|
|
99
|
+
function LimitsGroup(props) {
|
|
100
|
+
return (_jsxs("details", { className: "qai-op__group qai-op__group--limits", children: [_jsxs("summary", { className: "qai-op__group-summary", children: [_jsx("span", { className: "qai-op__group-title", children: "\u041E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u0438\u044F \u0438 \u043F\u043E\u0432\u0442\u043E\u0440\u044B" }), _jsx("span", { className: "qai-op__group-hint", children: props.hint ?? "потолки ответов и повторы при ошибках провайдера" })] }), _jsx("div", { className: "qai-op__grid", children: props.children })] }));
|
|
101
|
+
}
|
|
102
|
+
/** `1 инстанс`, `3 инстанса`, `11 инстансов`. */
|
|
103
|
+
function plural(count, forms) {
|
|
104
|
+
const mod10 = count % 10;
|
|
105
|
+
const mod100 = count % 100;
|
|
106
|
+
const [one, few, many] = forms;
|
|
107
|
+
if (mod10 === 1 && mod100 !== 11)
|
|
108
|
+
return `${count} ${one}`;
|
|
109
|
+
if (mod10 >= 2 && mod10 <= 4 && (mod100 < 10 || mod100 >= 20)) {
|
|
110
|
+
return `${count} ${few}`;
|
|
111
|
+
}
|
|
112
|
+
return `${count} ${many}`;
|
|
113
|
+
}
|
|
114
|
+
/** One line describing a collapsed provider: on/off, connections, surface. */
|
|
115
|
+
function providerState(provider, shape = {}) {
|
|
116
|
+
const parts = [];
|
|
117
|
+
if (shape.enabled === true) {
|
|
118
|
+
parts.push(rawBool(provider.enabled, true) ? "включён" : "выключен");
|
|
119
|
+
}
|
|
120
|
+
for (const entry of shape.counts ?? []) {
|
|
121
|
+
const list = provider[entry.path];
|
|
122
|
+
const size = Array.isArray(list) ? list.length : 0;
|
|
123
|
+
if (size > 0)
|
|
124
|
+
parts.push(plural(size, entry.forms));
|
|
125
|
+
}
|
|
126
|
+
const capabilities = shape.capabilities ?? [];
|
|
127
|
+
if (capabilities.length > 0) {
|
|
128
|
+
const on = capabilities.filter(([key, fallback]) => rawBool(provider[key], fallback)).length;
|
|
129
|
+
parts.push(`доступно ${on} из ${capabilities.length}`);
|
|
130
|
+
}
|
|
131
|
+
return parts.join(" · ");
|
|
132
|
+
}
|
|
133
|
+
function instanceRows(value) {
|
|
134
|
+
return rawArray(value)
|
|
135
|
+
.map(rawObject)
|
|
136
|
+
.map((row) => ({
|
|
137
|
+
id: rawString(row.id),
|
|
138
|
+
label: rawString(row.label),
|
|
139
|
+
baseUrl: rawString(row.baseUrl),
|
|
140
|
+
}));
|
|
141
|
+
}
|
|
142
|
+
function profileDrafts(value) {
|
|
143
|
+
return rawArray(value)
|
|
144
|
+
.map(rawObject)
|
|
145
|
+
.map((row) => {
|
|
146
|
+
const credential = rawObject(row.credential);
|
|
147
|
+
return {
|
|
148
|
+
id: rawString(row.id),
|
|
149
|
+
provider: rawString(row.provider),
|
|
150
|
+
instance: rawString(row.instance),
|
|
151
|
+
label: rawString(row.label),
|
|
152
|
+
enabled: rawBool(row.enabled, true),
|
|
153
|
+
secretFile: rawString(credential.secretFile),
|
|
154
|
+
secretEnv: rawString(credential.secretEnv),
|
|
155
|
+
resources: resourceRows(row.resources),
|
|
156
|
+
policy: rawRecord(row.policy),
|
|
157
|
+
};
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
const PROVIDER_IDS = [
|
|
161
|
+
"bitrix24",
|
|
162
|
+
"confluence",
|
|
163
|
+
"gitlab",
|
|
164
|
+
"teamcity",
|
|
165
|
+
"jira",
|
|
166
|
+
"testit",
|
|
167
|
+
"weblate",
|
|
168
|
+
];
|
|
169
|
+
function profileWire(draft) {
|
|
170
|
+
const wire = {
|
|
171
|
+
id: draft.id.trim(),
|
|
172
|
+
provider: draft.provider.trim(),
|
|
173
|
+
instance: draft.instance.trim(),
|
|
174
|
+
label: draft.label.trim(),
|
|
175
|
+
enabled: draft.enabled,
|
|
176
|
+
};
|
|
177
|
+
const secretFile = draft.secretFile.trim();
|
|
178
|
+
const secretEnv = draft.secretEnv.trim();
|
|
179
|
+
if (secretFile !== "" || secretEnv !== "") {
|
|
180
|
+
wire.credential = {
|
|
181
|
+
...(secretFile === "" ? {} : { secretFile }),
|
|
182
|
+
...(secretEnv === "" ? {} : { secretEnv }),
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
if (draft.resources.length > 0) {
|
|
186
|
+
wire.resources = resourceRecord(draft.resources);
|
|
187
|
+
}
|
|
188
|
+
if (draft.policy.length > 0) {
|
|
189
|
+
wire.policy = Object.fromEntries(draft.policy.map(([operation]) => [operation, "deny"]));
|
|
190
|
+
}
|
|
191
|
+
return wire;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* The managed-credential profile list. Every field edit commits the whole
|
|
195
|
+
* array at the parent path, so a row can never be half-stored; the drafts
|
|
196
|
+
* reset from the stored list when the Host accepts or refuels it.
|
|
197
|
+
*/
|
|
198
|
+
function ServiceProfilesField(props) {
|
|
199
|
+
const [drafts, setDrafts] = useState(props.profiles);
|
|
200
|
+
useEffect(() => {
|
|
201
|
+
setDrafts(props.profiles);
|
|
202
|
+
}, [props.profiles]);
|
|
203
|
+
const commit = (next) => {
|
|
204
|
+
setDrafts(next);
|
|
205
|
+
if (next.length === 0) {
|
|
206
|
+
props.unset(["managedServiceCredentials", "profiles"]);
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
props.write(["managedServiceCredentials", "profiles"], next.map(profileWire));
|
|
210
|
+
};
|
|
211
|
+
const edit = (index, patch) => {
|
|
212
|
+
commit(props.profiles.map((row, at) => at === index ? { ...row, ...patch } : row));
|
|
213
|
+
};
|
|
214
|
+
const commitRecord = (index, key, rows) => {
|
|
215
|
+
if (rows.length === 0) {
|
|
216
|
+
commit(props.profiles.map((row, at) => at === index ? { ...row, [key]: [] } : row));
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
commit(props.profiles.map((row, at) => at === index
|
|
220
|
+
? {
|
|
221
|
+
...row,
|
|
222
|
+
[key]: key === "resources"
|
|
223
|
+
? resourceRecord(rows)
|
|
224
|
+
: Object.fromEntries(rows.map(([operation]) => [operation, "deny"])),
|
|
225
|
+
}
|
|
226
|
+
: row));
|
|
227
|
+
};
|
|
228
|
+
return (_jsxs("div", { className: "qai-op__field", children: [_jsxs("span", { className: "qai-op__label", children: ["\u041F\u0440\u043E\u0444\u0438\u043B\u0438 \u0434\u043E\u0441\u0442\u0443\u043F\u043E\u0432", props.overridden(["managedServiceCredentials", "profiles"]) ? (_jsx("span", { className: "qai-op__overridden", children: "\u043F\u0435\u0440\u0435\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u043E" })) : null] }), _jsx("ul", { className: "qai-op__profiles", children: props.profiles.map((row, index) => (_jsxs("li", { className: "qai-op__profile", children: [_jsxs("div", { className: "qai-op__profile-head", children: [_jsx("strong", { children: row.label || row.id || "новый профиль" }), _jsxs("label", { className: "qai-op__toggle-row qai-op__toggle-row--inline", children: [_jsx("input", { className: "qai-op__toggle", type: "checkbox", checked: row.enabled, disabled: props.disabled, onChange: (event) => {
|
|
229
|
+
edit(index, { enabled: event.currentTarget.checked });
|
|
230
|
+
} }), _jsx("span", { children: "\u0432\u043A\u043B\u044E\u0447\u0451\u043D" })] }), _jsx("button", { type: "button", className: "qai-op__row-remove", disabled: props.disabled, onClick: () => {
|
|
231
|
+
commit(props.profiles.filter((_, at) => at !== index));
|
|
232
|
+
}, children: "\u0443\u0431\u0440\u0430\u0442\u044C" })] }), _jsxs("div", { className: "qai-op__profile-grid", children: [_jsxs("span", { className: "qai-op__instance-cell", children: [_jsx("span", { className: "qai-op__instance-key", children: "id" }), _jsx("input", { className: "qai-op__input", type: "text", value: row.id, placeholder: "qa-gitlab-readonly", disabled: props.disabled, onChange: (event) => {
|
|
233
|
+
setDrafts(drafts.map((draft, at) => at === index
|
|
234
|
+
? { ...draft, id: event.currentTarget.value }
|
|
235
|
+
: draft));
|
|
236
|
+
}, onBlur: () => {
|
|
237
|
+
const id = row.id.trim();
|
|
238
|
+
const next = drafts[index]?.id.trim() ?? "";
|
|
239
|
+
if (next !== "" && next !== id)
|
|
240
|
+
edit(index, { id: next });
|
|
241
|
+
} })] }), _jsxs("span", { className: "qai-op__instance-cell", children: [_jsx("span", { className: "qai-op__instance-key", children: "\u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440" }), _jsx("select", { className: "qai-op__input", value: row.provider, disabled: props.disabled, onChange: (event) => {
|
|
242
|
+
edit(index, { provider: event.currentTarget.value });
|
|
243
|
+
}, children: PROVIDER_IDS.map((id) => (_jsx("option", { value: id, children: id }, id))) })] }), _jsxs("span", { className: "qai-op__instance-cell", children: [_jsx("span", { className: "qai-op__instance-key", children: "\u0438\u043D\u0441\u0442\u0430\u043D\u0441" }), _jsx("input", { className: "qai-op__input", type: "text", value: row.instance, placeholder: "corp", disabled: props.disabled, onChange: (event) => {
|
|
244
|
+
setDrafts(drafts.map((draft, at) => at === index
|
|
245
|
+
? { ...draft, instance: event.currentTarget.value }
|
|
246
|
+
: draft));
|
|
247
|
+
}, onBlur: () => {
|
|
248
|
+
const instance = row.instance.trim();
|
|
249
|
+
const next = drafts[index]?.instance.trim() ?? "";
|
|
250
|
+
if (next !== "" && next !== instance) {
|
|
251
|
+
edit(index, { instance: next });
|
|
252
|
+
}
|
|
253
|
+
} })] }), _jsxs("span", { className: "qai-op__instance-cell", children: [_jsx("span", { className: "qai-op__instance-key", children: "\u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435" }), _jsx("input", { className: "qai-op__input", type: "text", value: row.label, placeholder: "QA GitLab Read-only", disabled: props.disabled, onChange: (event) => {
|
|
254
|
+
setDrafts(drafts.map((draft, at) => at === index
|
|
255
|
+
? { ...draft, label: event.currentTarget.value }
|
|
256
|
+
: draft));
|
|
257
|
+
}, onBlur: () => {
|
|
258
|
+
const label = row.label.trim();
|
|
259
|
+
const next = drafts[index]?.label.trim() ?? "";
|
|
260
|
+
if (next !== "" && next !== label) {
|
|
261
|
+
edit(index, { label: next });
|
|
262
|
+
}
|
|
263
|
+
} })] }), _jsxs("span", { className: "qai-op__instance-cell", children: [_jsx("span", { className: "qai-op__instance-key", children: "\u0444\u0430\u0439\u043B \u0441\u0435\u043A\u0440\u0435\u0442\u0430" }), _jsx("input", { className: "qai-op__input", type: "text", value: row.secretFile, placeholder: "/run/secrets/\u2026", disabled: props.disabled, onChange: (event) => {
|
|
264
|
+
setDrafts(drafts.map((draft, at) => at === index
|
|
265
|
+
? { ...draft, secretFile: event.currentTarget.value }
|
|
266
|
+
: draft));
|
|
267
|
+
}, onBlur: () => {
|
|
268
|
+
const secretFile = row.secretFile.trim();
|
|
269
|
+
const next = drafts[index]?.secretFile.trim() ?? "";
|
|
270
|
+
if (next !== "" && next !== secretFile) {
|
|
271
|
+
edit(index, { secretFile: next });
|
|
272
|
+
}
|
|
273
|
+
} })] }), _jsxs("span", { className: "qai-op__instance-cell", children: [_jsx("span", { className: "qai-op__instance-key", children: "\u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u0430\u044F \u0441\u0435\u043A\u0440\u0435\u0442\u0430" }), _jsx("input", { className: "qai-op__input", type: "text", value: row.secretEnv, placeholder: "QA_GITLAB_TOKEN", disabled: props.disabled, onChange: (event) => {
|
|
274
|
+
setDrafts(drafts.map((draft, at) => at === index
|
|
275
|
+
? { ...draft, secretEnv: event.currentTarget.value }
|
|
276
|
+
: draft));
|
|
277
|
+
}, onBlur: () => {
|
|
278
|
+
const secretEnv = row.secretEnv.trim();
|
|
279
|
+
const next = drafts[index]?.secretEnv.trim() ?? "";
|
|
280
|
+
if (next !== "" && next !== secretEnv) {
|
|
281
|
+
edit(index, { secretEnv: next });
|
|
282
|
+
}
|
|
283
|
+
} })] })] }), _jsx(RecordField, { label: "\u0420\u0435\u0441\u0443\u0440\u0441\u044B (\u0432\u0438\u0434: \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043F\u044F\u0442\u0443\u044E)", path: ["managedServiceCredentials", "profiles"], entries: row.resources, keyPlaceholder: "projects", valuePlaceholder: "group/repo, group/other", disabled: props.disabled, write: (_path, value) => {
|
|
284
|
+
commitRecord(index, "resources", Object.entries(value).map(([kind, values]) => [kind, values.join(", ")]));
|
|
285
|
+
}, unset: () => {
|
|
286
|
+
commitRecord(index, "resources", []);
|
|
287
|
+
}, overridden: props.overridden }), _jsx(RecordField, { label: "\u0417\u0430\u043F\u0440\u0435\u0449\u0451\u043D\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", hint: "\u043A\u0430\u0436\u0434\u0430\u044F \u0437\u0430\u043F\u0438\u0441\u044C \u0432\u0441\u0435\u0433\u0434\u0430 \u0445\u0440\u0430\u043D\u0438\u0442 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 deny", path: ["managedServiceCredentials", "profiles"], entries: row.policy, keyPlaceholder: "mergeRequest.create", valuePlaceholder: "", fixedValue: "deny", disabled: props.disabled, write: (_path, value) => {
|
|
288
|
+
commitRecord(index, "policy", Object.keys(value).map((operation) => [operation, "deny"]));
|
|
289
|
+
}, unset: () => {
|
|
290
|
+
commitRecord(index, "policy", []);
|
|
291
|
+
}, overridden: props.overridden })] }, `${index}:${row.id}`))) }), _jsx("span", { children: _jsx("button", { type: "button", className: "qai-op__button", disabled: props.disabled, onClick: () => {
|
|
292
|
+
commit([
|
|
293
|
+
...props.profiles,
|
|
294
|
+
{
|
|
295
|
+
id: "",
|
|
296
|
+
provider: "gitlab",
|
|
297
|
+
instance: "",
|
|
298
|
+
label: "",
|
|
299
|
+
enabled: true,
|
|
300
|
+
secretFile: "",
|
|
301
|
+
secretEnv: "",
|
|
302
|
+
resources: [],
|
|
303
|
+
policy: [],
|
|
304
|
+
},
|
|
305
|
+
]);
|
|
306
|
+
}, children: "\u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043F\u0440\u043E\u0444\u0438\u043B\u044C" }) })] }));
|
|
307
|
+
}
|
|
308
|
+
/** One provider's credential-help override: every field optional, every miss keeps the built-in help. */
|
|
309
|
+
function CredentialHelpSection(props) {
|
|
310
|
+
const base = ["credentialHelp", props.provider];
|
|
311
|
+
const control = {
|
|
312
|
+
disabled: props.disabled,
|
|
313
|
+
write: props.write,
|
|
314
|
+
unset: props.unset,
|
|
315
|
+
overridden: props.overridden,
|
|
316
|
+
};
|
|
317
|
+
return (_jsxs("details", { className: "qai-op__subsection", children: [_jsxs("summary", { className: "qai-op__section-summary", children: [_jsx("span", { className: "qai-op__section-title", children: props.provider }), Object.keys(props.override).length === 0 ? (_jsx("span", { className: "qai-op__hint", children: "\u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u0430\u044F \u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043A\u0430" })) : (_jsx("span", { className: "qai-op__overridden", children: "\u043F\u0435\u0440\u0435\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u043E" }))] }), _jsx("div", { className: "qai-op__section-body", children: _jsxs("div", { className: "qai-op__grid", children: [_jsx(Toggle, { label: "\u041F\u043E\u0434\u0441\u043A\u0430\u0437\u043A\u0430 \u043F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0435\u0442\u0441\u044F", path: [...base, "enabled"], value: rawBool(props.override.enabled, true), disabled: props.disabled, write: props.write }), _jsx(TextField, { label: "\u041C\u0435\u0445\u0430\u043D\u0438\u0437\u043C (kind)", path: [...base, "kind"], value: rawString(props.override.kind), ...control }), _jsx(TextField, { label: "\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435", path: [...base, "label"], value: rawString(props.override.label), ...control }), _jsx(TextField, { label: "\u0413\u0434\u0435 \u043F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u0442\u043E\u043A\u0435\u043D (\u0430\u0434\u0440\u0435\u0441)", path: [...base, "obtainUrl"], value: rawString(props.override.obtainUrl), placeholder: "https://wiki.example.corp/tokens", ...control }), _jsx(TextField, { label: "\u0413\u0434\u0435 \u043F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u0442\u043E\u043A\u0435\u043D (\u043F\u043E\u0434\u043F\u0438\u0441\u044C)", path: [...base, "obtainLabel"], value: rawString(props.override.obtainLabel), ...control }), _jsx(TextField, { label: "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u0438\u044F (\u0430\u0434\u0440\u0435\u0441)", path: [...base, "docsUrl"], value: rawString(props.override.docsUrl), ...control }), _jsx(TextField, { label: "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u0438\u044F (\u043F\u043E\u0434\u043F\u0438\u0441\u044C)", path: [...base, "docsLabel"], value: rawString(props.override.docsLabel), ...control }), _jsx(TextField, { label: "\u0418\u043D\u0441\u0442\u0440\u0443\u043A\u0446\u0438\u044F", path: [...base, "instructions"], value: rawString(props.override.instructions), ...control }), _jsx(TextField, { label: "\u041A\u043B\u044E\u0447 \u043B\u043E\u043A\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043D\u0441\u0442\u0440\u0443\u043A\u0446\u0438\u0438", path: [...base, "instructionsLocaleKey"], value: rawString(props.override.instructionsLocaleKey), ...control }), _jsx(StringListField, { label: "\u0421\u043A\u043E\u0443\u043F\u044B", path: [...base, "scopes"], values: rawStringList(props.override.scopes), placeholder: "read_user", ...control }), _jsx(StringListField, { label: "\u0417\u0430\u043C\u0435\u0442\u043A\u0438", path: [...base, "notes"], values: rawStringList(props.override.notes), placeholder: "\u0442\u043E\u043A\u0435\u043D \u0436\u0438\u0432\u0451\u0442 \u043E\u0434\u0438\u043D \u0433\u043E\u0434", ...control }), _jsx(Toggle, { label: "Self-hosted", path: [...base, "selfHosted"], value: rawBool(props.override.selfHosted, false), disabled: props.disabled, write: props.write })] }) })] }));
|
|
318
|
+
}
|
|
319
|
+
// ----------------------------------------------------------------- the card
|
|
320
|
+
export function OperatorCard({ scope }) {
|
|
321
|
+
const store = useMemo(() => bindSettingsExternalStore(scope), [scope]);
|
|
322
|
+
const settings = useSyncExternalStore(store.subscribe, store.getSnapshot, store.getSnapshot);
|
|
323
|
+
const [error, setError] = useState(null);
|
|
324
|
+
const config = rawObject(settings.value);
|
|
325
|
+
const writable = settings.status === "ready" && settings.writable;
|
|
326
|
+
const write = useCallback((path, value) => {
|
|
327
|
+
const ops = [
|
|
328
|
+
{ op: "set", path: [...path], value },
|
|
329
|
+
];
|
|
330
|
+
scope.mutate(ops).catch((cause) => {
|
|
331
|
+
setError(displayError(cause));
|
|
332
|
+
});
|
|
333
|
+
}, [scope]);
|
|
334
|
+
const unset = useCallback((path) => {
|
|
335
|
+
const ops = [{ op: "unset", path: [...path] }];
|
|
336
|
+
scope.mutate(ops).catch((cause) => {
|
|
337
|
+
setError(displayError(cause));
|
|
338
|
+
});
|
|
339
|
+
}, [scope]);
|
|
340
|
+
const overridden = useCallback((path) => isOverridden(settings.user, path), [settings.user]);
|
|
341
|
+
const keys = overriddenKeys(settings.user);
|
|
342
|
+
const resetAll = useCallback(() => {
|
|
343
|
+
const ops = keys.map((key) => ({
|
|
344
|
+
op: "unset",
|
|
345
|
+
path: [key],
|
|
346
|
+
}));
|
|
347
|
+
scope.mutate(ops).catch((cause) => {
|
|
348
|
+
setError(displayError(cause));
|
|
349
|
+
});
|
|
350
|
+
}, [keys, scope]);
|
|
351
|
+
if (settings.status === "unavailable")
|
|
352
|
+
return null;
|
|
353
|
+
const control = {
|
|
354
|
+
disabled: !writable,
|
|
355
|
+
write,
|
|
356
|
+
unset,
|
|
357
|
+
overridden,
|
|
358
|
+
};
|
|
359
|
+
const msc = rawObject(config.managedServiceCredentials);
|
|
360
|
+
/** Capability toggle: reads default on, deny-listed switches default off. */
|
|
361
|
+
const tg = (label, path, value, hint) => (_jsx(Toggle, { label: label, hint: hint, path: path, value: value, disabled: !writable, write: write, overridden: overridden(path) }));
|
|
362
|
+
return (_jsx(CardShell, { title: "\u0418\u043D\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u2014 \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044F", description: "\u041E\u043F\u0435\u0440\u0430\u0442\u043E\u0440\u0441\u043A\u0438\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0439: \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u044B, \u0430\u0434\u0440\u0435\u0441\u0430, \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E\u0441\u0442\u0438 \u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043D\u044B\u0435 \u0434\u043E\u0441\u0442\u0443\u043F\u044B. \u041F\u0440\u0430\u0432\u043A\u0430 \u043F\u0440\u0438\u043C\u0435\u043D\u044F\u0435\u0442\u0441\u044F \u043A \u0437\u0430\u043F\u0443\u0449\u0435\u043D\u043D\u043E\u043C\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0443 \u0441\u0440\u0430\u0437\u0443.", badge: _jsx("span", { className: "dsh-plugin-card__badge", children: keys.length === 0
|
|
363
|
+
? "по умолчанию"
|
|
364
|
+
: `переопределено: ${keys.length}` }), label: (open) => open
|
|
365
|
+
? "Свернуть конфигурацию интеграций"
|
|
366
|
+
: "Развернуть конфигурацию интеграций", bodyClassName: "qai-op__body", children: settings.status === "loading" ? (_jsx("p", { className: "qai-op__muted", children: "\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044E \u0438\u043D\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0439\u2026" })) : (_jsxs(_Fragment, { children: [error !== null ? _jsx("div", { className: "qai-op__error", children: error }) : null, !writable ? (_jsx("p", { className: "qai-op__muted", children: "\u0425\u043E\u0441\u0442 \u043D\u0435 \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442 \u043F\u0440\u0430\u0432\u043A\u0438 \u0438\u0437 \u044D\u0442\u043E\u0433\u043E \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u2014 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u043D\u044B \u0442\u043E\u043B\u044C\u043A\u043E \u0434\u043B\u044F \u0447\u0442\u0435\u043D\u0438\u044F." })) : null, _jsxs("div", { className: "qai-op__toolbar", children: [_jsx("span", { className: "qai-op__hint", children: "\u0421\u043B\u043E\u0439 \u043F\u0440\u0430\u0432\u043E\u043A \u043F\u043E\u0432\u0435\u0440\u0445 \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043F\u0440\u043E\u0444\u0438\u043B\u044F: \u043E\u0447\u0438\u0449\u0435\u043D\u043D\u0430\u044F \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044F \u043A \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044E \u0438\u0437 yaml." }), _jsxs("button", { type: "button", className: "qai-op__button", disabled: !writable || keys.length === 0, onClick: resetAll, children: ["\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u043F\u0435\u0440\u0435\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u044F (", keys.length, ")"] })] }), _jsxs(Section, { title: "\u041E\u0431\u0449\u0438\u0435", open: true, children: [_jsx(Group, { title: "\u041F\u043B\u0430\u0433\u0438\u043D", children: tg("Плагин включён", ["enabled"], rawBool(config.enabled, false), "выключенный плагин не регистрирует инструменты и прячет пользовательские страницы") }), _jsxs(Group, { title: "\u0425\u0440\u0430\u043D\u0438\u043B\u0438\u0449\u0435 \u0438 \u043A\u043B\u044E\u0447\u0438", wide: true, hint: "\u043F\u0443\u0442\u0438 \u0447\u0438\u0442\u0430\u044E\u0442\u0441\u044F \u0445\u043E\u0441\u0442\u043E\u043C \u043F\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435: \u043F\u0440\u0430\u0432\u043A\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u043E \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0430", children: [_jsx(TextField, { label: "\u0424\u0430\u0439\u043B \u0445\u0440\u0430\u043D\u0438\u043B\u0438\u0449\u0430 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0439", hint: "\u043F\u0440\u0438\u043C\u0435\u043D\u044F\u0435\u0442\u0441\u044F \u0441\u043E \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u043C \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u043E\u043C \u0445\u043E\u0441\u0442\u0430", path: ["dataPath"], value: rawString(config.dataPath), ...control }), _jsx(TextField, { label: "\u0424\u0430\u0439\u043B \u043C\u0430\u0441\u0442\u0435\u0440-\u043A\u043B\u044E\u0447\u0430", hint: "\u043F\u0440\u0438\u043C\u0435\u043D\u044F\u0435\u0442\u0441\u044F \u0441\u043E \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u043C \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u043E\u043C \u0445\u043E\u0441\u0442\u0430", path: ["masterKeyPath"], value: rawString(config.masterKeyPath), ...control }), _jsx(NumberField, { label: "\u0412\u0435\u0440\u0441\u0438\u044F \u043C\u0430\u0441\u0442\u0435\u0440-\u043A\u043B\u044E\u0447\u0430", path: ["masterKeyVersion"], value: rawNumber(config.masterKeyVersion), ...control })] }), _jsx(Group, { title: "\u0414\u043E\u043C\u0435\u043D\u044B \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0439", children: _jsx(StringListField, { label: "\u0421\u0443\u0444\u0444\u0438\u043A\u0441\u044B \u043F\u043E\u0440\u0442\u0430\u043B\u043E\u0432 Bitrix24", hint: "\u0445\u043E\u0441\u0442\u044B, \u043D\u0430 \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u043C\u043E\u0436\u0435\u0442 \u0443\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u0432\u0435\u0431\u0445\u0443\u043A; \u043A\u0430\u0436\u0434\u044B\u0439 \u0441 \u0442\u043E\u0447\u043A\u0438", path: ["allowedPortalSuffixes"], values: rawStringList(config.allowedPortalSuffixes), placeholder: ".bitrix24.example", ...control }) }), _jsxs(LimitsGroup, { hint: "\u043F\u043E\u0442\u043E\u043B\u043A\u0438 \u043E\u0442\u0432\u0435\u0442\u043E\u0432 \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u043E\u0432 \u0438 \u0441\u0440\u043E\u043A \u0445\u0440\u0430\u043D\u0435\u043D\u0438\u044F \u0430\u0443\u0434\u0438\u0442\u0430", children: [_jsx(NumberField, { label: "\u0422\u0430\u0439\u043C\u0430\u0443\u0442 \u0437\u0430\u043F\u0440\u043E\u0441\u0430, \u043C\u0441", path: ["timeoutMs"], value: rawNumber(config.timeoutMs), ...control }), _jsx(NumberField, { label: "\u041F\u043E\u0442\u043E\u043B\u043E\u043A \u043E\u0442\u0432\u0435\u0442\u0430 \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u0430, \u0431\u0430\u0439\u0442", path: ["maxResponseBytes"], value: rawNumber(config.maxResponseBytes), ...control }), _jsx(NumberField, { label: "\u0425\u0440\u0430\u043D\u0435\u043D\u0438\u0435 \u0430\u0443\u0434\u0438\u0442\u0430, \u0434\u043D\u0435\u0439", path: ["auditRetentionDays"], value: rawNumber(config.auditRetentionDays), ...control })] })] }), _jsxs(Section, { title: "Bitrix24", state: providerState(rawObject(config.bitrix24), {
|
|
367
|
+
enabled: true,
|
|
368
|
+
capabilities: [
|
|
369
|
+
["crmRead", true],
|
|
370
|
+
["crmCommentWrite", false],
|
|
371
|
+
["chatRead", true],
|
|
372
|
+
["openlinesRead", true],
|
|
373
|
+
["userRead", true],
|
|
374
|
+
["departmentRead", true],
|
|
375
|
+
["tasksRead", true],
|
|
376
|
+
["calendarRead", true],
|
|
377
|
+
["diskRead", true],
|
|
378
|
+
],
|
|
379
|
+
}), children: [_jsx(Group, { title: "\u041F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440", children: tg("Провайдер включён", ["bitrix24", "enabled"], rawBool(rawObject(config.bitrix24).enabled, true)) }), _jsxs(Group, { title: "\u0427\u0442\u043E \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E \u0430\u0433\u0435\u043D\u0442\u0443", kind: "checks", children: [tg("CRM: чтение", ["bitrix24", "crmRead"], rawBool(rawObject(config.bitrix24).crmRead, true)), tg("CRM: комментарий таймлайна (запись)", ["bitrix24", "crmCommentWrite"], rawBool(rawObject(config.bitrix24).crmCommentWrite, false), "единственный инструмент записи; выключен по умолчанию"), tg("Чаты: чтение", ["bitrix24", "chatRead"], rawBool(rawObject(config.bitrix24).chatRead, true)), tg("Открытые линии: чтение", ["bitrix24", "openlinesRead"], rawBool(rawObject(config.bitrix24).openlinesRead, true)), tg("Пользователи: чтение", ["bitrix24", "userRead"], rawBool(rawObject(config.bitrix24).userRead, true)), tg("Структура компании: чтение", ["bitrix24", "departmentRead"], rawBool(rawObject(config.bitrix24).departmentRead, true)), tg("Задачи: чтение", ["bitrix24", "tasksRead"], rawBool(rawObject(config.bitrix24).tasksRead, true)), tg("Календарь: чтение", ["bitrix24", "calendarRead"], rawBool(rawObject(config.bitrix24).calendarRead, true)), tg("Диск: чтение", ["bitrix24", "diskRead"], rawBool(rawObject(config.bitrix24).diskRead, true))] })] }), _jsxs(Section, { title: "Confluence", state: providerState(rawObject(config.confluence), {
|
|
380
|
+
enabled: true,
|
|
381
|
+
capabilities: [
|
|
382
|
+
["identityRead", true],
|
|
383
|
+
["spacesRead", true],
|
|
384
|
+
["searchRead", true],
|
|
385
|
+
["contentRead", true],
|
|
386
|
+
["commentsRead", true],
|
|
387
|
+
["attachmentsRead", true],
|
|
388
|
+
["versionsRead", true],
|
|
389
|
+
],
|
|
390
|
+
counts: [
|
|
391
|
+
{
|
|
392
|
+
path: "instances",
|
|
393
|
+
forms: ["сайт", "сайта", "сайтов"],
|
|
394
|
+
},
|
|
395
|
+
],
|
|
396
|
+
}), children: [_jsxs(Group, { title: "\u041F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440", children: [tg("Провайдер включён", ["confluence", "enabled"], rawBool(rawObject(config.confluence).enabled, true)), tg("Разрешить http", ["confluence", "allowInsecureHttp"], rawBool(rawObject(config.confluence).allowInsecureHttp, false), "только для dev-стенда")] }), _jsxs(Group, { title: "\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435", wide: true, children: [_jsx(InstanceListField, { label: "\u0421\u0430\u0439\u0442\u044B Confluence", hint: "\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C \u0432\u044B\u0431\u0438\u0440\u0430\u0435\u0442 \u0441\u0430\u0439\u0442 \u0438\u0437 \u0441\u043F\u0438\u0441\u043A\u0430 \u0438 \u0432\u0432\u043E\u0434\u0438\u0442 e-mail \u0441 \u0442\u043E\u043A\u0435\u043D\u043E\u043C", path: ["confluence", "instances"], instances: instanceRows(rawObject(config.confluence).instances), ...control }), _jsx(StringListField, { label: "\u0420\u0430\u0437\u0440\u0435\u0448\u0451\u043D\u043D\u044B\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u0430", hint: "\u043F\u0443\u0441\u0442\u043E \u2014 \u0432\u0441\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u0430, \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0451\u043D\u043D\u043E\u043C\u0443 \u0430\u043A\u043A\u0430\u0443\u043D\u0442\u0443", path: ["confluence", "allowedSpaces"], values: rawStringList(rawObject(config.confluence).allowedSpaces), placeholder: "PROJ", ...control })] }), _jsxs(Group, { title: "\u0427\u0442\u043E \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E \u0430\u0433\u0435\u043D\u0442\u0443", kind: "checks", children: [tg("Профиль: чтение", ["confluence", "identityRead"], rawBool(rawObject(config.confluence).identityRead, true)), tg("Пространства: чтение", ["confluence", "spacesRead"], rawBool(rawObject(config.confluence).spacesRead, true)), tg("Поиск: чтение", ["confluence", "searchRead"], rawBool(rawObject(config.confluence).searchRead, true)), tg("Страницы: чтение", ["confluence", "contentRead"], rawBool(rawObject(config.confluence).contentRead, true)), tg("Комментарии: чтение", ["confluence", "commentsRead"], rawBool(rawObject(config.confluence).commentsRead, true)), tg("Вложения: чтение", ["confluence", "attachmentsRead"], rawBool(rawObject(config.confluence).attachmentsRead, true)), tg("Версии: чтение", ["confluence", "versionsRead"], rawBool(rawObject(config.confluence).versionsRead, true))] }), _jsxs(LimitsGroup, { children: [_jsx(NumberField, { label: "\u0422\u0435\u043B\u043E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E, \u0437\u043D\u0430\u043A\u043E\u0432", path: ["confluence", "defaultBodyChars"], value: rawNumber(rawObject(config.confluence).defaultBodyChars), ...control }), _jsx(NumberField, { label: "\u041F\u043E\u0442\u043E\u043B\u043E\u043A \u0442\u0435\u043B\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B, \u0437\u043D\u0430\u043A\u043E\u0432", path: ["confluence", "maxBodyChars"], value: rawNumber(rawObject(config.confluence).maxBodyChars), ...control }), _jsx(NumberField, { label: "\u0421\u0442\u0440\u043E\u043A \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0441\u043F\u0438\u0441\u043A\u0430", path: ["confluence", "maxResults"], value: rawNumber(rawObject(config.confluence).maxResults), ...control }), _jsx(NumberField, { label: "\u0420\u043E\u0434\u0438\u0442\u0435\u043B\u0435\u0439 \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0435\u0432 \u043D\u0430 \u0432\u044B\u0437\u043E\u0432", path: ["confluence", "maxReplyParents"], value: rawNumber(rawObject(config.confluence).maxReplyParents), ...control }), _jsx(NumberField, { label: "\u041F\u043E\u0432\u0442\u043E\u0440\u044B \u043F\u0440\u0438 429/5xx", path: ["confluence", "retries"], value: rawNumber(rawObject(config.confluence).retries), ...control })] })] }), _jsxs(Section, { title: "GitLab", state: providerState(rawObject(config.gitlab), {
|
|
397
|
+
enabled: true,
|
|
398
|
+
capabilities: [
|
|
399
|
+
["identityRead", true],
|
|
400
|
+
["projectsRead", true],
|
|
401
|
+
["repositoryRead", true],
|
|
402
|
+
["searchRead", true],
|
|
403
|
+
["issuesRead", true],
|
|
404
|
+
["mergeRequestsRead", true],
|
|
405
|
+
["ciRead", true],
|
|
406
|
+
],
|
|
407
|
+
counts: [
|
|
408
|
+
{
|
|
409
|
+
path: "instances",
|
|
410
|
+
forms: ["инстанс", "инстанса", "инстансов"],
|
|
411
|
+
},
|
|
412
|
+
],
|
|
413
|
+
}), children: [_jsxs(Group, { title: "\u041F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440", children: [tg("Провайдер включён", ["gitlab", "enabled"], rawBool(rawObject(config.gitlab).enabled, true)), tg("Разрешить http", ["gitlab", "allowInsecureHttp"], rawBool(rawObject(config.gitlab).allowInsecureHttp, false), "только для dev-стенда")] }), _jsx(Group, { title: "\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435", wide: true, children: _jsx(InstanceListField, { label: "\u0418\u043D\u0441\u0442\u0430\u043D\u0441\u044B GitLab", hint: "\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C \u0432\u044B\u0431\u0438\u0440\u0430\u0435\u0442 \u0438\u043D\u0441\u0442\u0430\u043D\u0441 \u0438\u0437 \u0441\u043F\u0438\u0441\u043A\u0430, \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u043B\u044C\u043D\u044B\u0439 \u0445\u043E\u0441\u0442 \u0432\u0432\u0435\u0441\u0442\u0438 \u043D\u0435\u043B\u044C\u0437\u044F", path: ["gitlab", "instances"], instances: instanceRows(rawObject(config.gitlab).instances), ...control }) }), _jsxs(Group, { title: "\u0427\u0442\u043E \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E \u0430\u0433\u0435\u043D\u0442\u0443", kind: "checks", children: [tg("Профиль: чтение", ["gitlab", "identityRead"], rawBool(rawObject(config.gitlab).identityRead, true)), tg("Проекты: чтение", ["gitlab", "projectsRead"], rawBool(rawObject(config.gitlab).projectsRead, true)), tg("Репозиторий: чтение", ["gitlab", "repositoryRead"], rawBool(rawObject(config.gitlab).repositoryRead, true)), tg("Поиск: чтение", ["gitlab", "searchRead"], rawBool(rawObject(config.gitlab).searchRead, true)), tg("Задачи: чтение", ["gitlab", "issuesRead"], rawBool(rawObject(config.gitlab).issuesRead, true)), tg("MR: чтение", ["gitlab", "mergeRequestsRead"], rawBool(rawObject(config.gitlab).mergeRequestsRead, true)), tg("CI: чтение", ["gitlab", "ciRead"], rawBool(rawObject(config.gitlab).ciRead, true))] }), _jsxs(LimitsGroup, { children: [_jsx(NumberField, { label: "\u041F\u043E\u0442\u043E\u043B\u043E\u043A \u0444\u0430\u0439\u043B\u0430, \u0431\u0430\u0439\u0442", path: ["gitlab", "maxFileBytes"], value: rawNumber(rawObject(config.gitlab).maxFileBytes), ...control }), _jsx(NumberField, { label: "\u041F\u043E\u0442\u043E\u043B\u043E\u043A \u043B\u043E\u0433\u0430 \u0437\u0430\u0434\u0430\u0447\u0438 CI, \u0431\u0430\u0439\u0442", path: ["gitlab", "maxJobLogBytes"], value: rawNumber(rawObject(config.gitlab).maxJobLogBytes), ...control }), _jsx(NumberField, { label: "\u041F\u043E\u0442\u043E\u043B\u043E\u043A \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u043F\u043E\u0438\u0441\u043A\u0430", path: ["gitlab", "maxSearchResults"], value: rawNumber(rawObject(config.gitlab).maxSearchResults), ...control }), _jsx(NumberField, { label: "\u041F\u043E\u0432\u0442\u043E\u0440\u044B \u043F\u0440\u0438 429/5xx", path: ["gitlab", "retries"], value: rawNumber(rawObject(config.gitlab).retries), ...control })] })] }), _jsxs(Section, { title: "TeamCity", state: providerState(rawObject(config.teamcity), {
|
|
414
|
+
enabled: true,
|
|
415
|
+
capabilities: [
|
|
416
|
+
["identityRead", true],
|
|
417
|
+
["projectsRead", true],
|
|
418
|
+
["buildConfigsRead", true],
|
|
419
|
+
["buildsRead", true],
|
|
420
|
+
["failuresRead", true],
|
|
421
|
+
["logsRead", true],
|
|
422
|
+
["queueRead", true],
|
|
423
|
+
["investigationsRead", true],
|
|
424
|
+
["agentsRead", true],
|
|
425
|
+
["artifactsRead", true],
|
|
426
|
+
],
|
|
427
|
+
}), children: [_jsxs(Group, { title: "\u041F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440", children: [tg("Провайдер включён", ["teamcity", "enabled"], rawBool(rawObject(config.teamcity).enabled, true)), tg("Разрешить http", ["teamcity", "network", "allowHttp"], rawBool(rawObject(rawObject(config.teamcity).network).allowHttp, false), "незащищённые адреса TeamCity")] }), _jsxs(Group, { title: "\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435", wide: true, children: [_jsx(TextField, { label: "\u0410\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 TeamCity", hint: "\u043E\u0434\u0438\u043D \u043D\u0430 \u0432\u0435\u0441\u044C \u0441\u0442\u0435\u043D\u0434; \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C \u0432\u0432\u043E\u0434\u0438\u0442 \u0442\u043E\u043B\u044C\u043A\u043E \u0442\u043E\u043A\u0435\u043D", placeholder: "https://teamcity.example.corp", path: ["teamcity", "serverUrl"], value: rawString(rawObject(config.teamcity).serverUrl), ...control }), _jsx(SelectField, { label: "\u0420\u0435\u0436\u0438\u043C \u0441\u0435\u0442\u0435\u0432\u043E\u0439 \u043F\u043E\u043B\u0438\u0442\u0438\u043A\u0438", path: ["teamcity", "network", "mode"], value: rawString(rawObject(rawObject(config.teamcity).network).mode) || "allowlist", options: [
|
|
428
|
+
{
|
|
429
|
+
value: "allowlist",
|
|
430
|
+
label: "allowlist — только перечисленные адреса",
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
value: "trusted-private",
|
|
434
|
+
label: "trusted-private — любой хост, приватные диапазоны разрешены",
|
|
435
|
+
},
|
|
436
|
+
], disabled: !writable, write: write, overridden: overridden }), _jsx(StringListField, { label: "\u0420\u0430\u0437\u0440\u0435\u0448\u0451\u043D\u043D\u044B\u0435 \u0445\u043E\u0441\u0442\u044B", hint: "\u0442\u043E\u0447\u043D\u044B\u0435 \u0438\u043C\u0435\u043D\u0430 \u0438\u043B\u0438 *.\u0441\u0443\u0444\u0444\u0438\u043A\u0441; \u043E\u043F\u0435\u0447\u0430\u0442\u043A\u0430 \u043F\u0430\u0434\u0430\u0435\u0442 \u043F\u0440\u0438 \u0437\u0430\u043F\u0438\u0441\u0438", path: ["teamcity", "network", "allowedHosts"], values: rawStringList(rawObject(rawObject(config.teamcity).network).allowedHosts), placeholder: "teamcity.example.corp", ...control }), _jsx(StringListField, { label: "\u0420\u0430\u0437\u0440\u0435\u0448\u0451\u043D\u043D\u044B\u0435 CIDR", hint: "\u0442\u043E\u043B\u044C\u043A\u043E \u0434\u043B\u044F \u0430\u0434\u0440\u0435\u0441\u043E\u0432, \u0437\u0430\u043F\u0438\u0441\u0430\u043D\u043D\u044B\u0445 \u0446\u0438\u0444\u0440\u0430\u043C\u0438", path: ["teamcity", "network", "allowedCidrs"], values: rawStringList(rawObject(rawObject(config.teamcity).network).allowedCidrs), placeholder: "10.20.0.0/16", ...control }), _jsx(StringListField, { label: "\u0420\u0430\u0437\u0440\u0435\u0448\u0451\u043D\u043D\u044B\u0435 \u043F\u043E\u0440\u0442\u044B", hint: "\u043F\u0443\u0441\u0442\u043E \u2014 \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u043E\u0440\u0442 \u0441\u0445\u0435\u043C\u044B", path: ["teamcity", "network", "allowedPorts"], values: rawStringList(rawObject(rawObject(config.teamcity).network).allowedPorts), placeholder: "8111", ...control })] }), _jsx(Group, { title: "\u0427\u0442\u043E \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E \u0430\u0433\u0435\u043D\u0442\u0443", kind: "checks", children: [
|
|
437
|
+
["identityRead", "Профиль: чтение"],
|
|
438
|
+
["projectsRead", "Проекты: чтение"],
|
|
439
|
+
["buildConfigsRead", "Конфигурации сборок: чтение"],
|
|
440
|
+
["buildsRead", "Сборки: чтение"],
|
|
441
|
+
["failuresRead", "Провалы: чтение"],
|
|
442
|
+
["logsRead", "Логи сборок: чтение"],
|
|
443
|
+
["queueRead", "Очередь: чтение"],
|
|
444
|
+
["investigationsRead", "Расследования: чтение"],
|
|
445
|
+
["agentsRead", "Агенты: чтение"],
|
|
446
|
+
["artifactsRead", "Артефакты: чтение"],
|
|
447
|
+
].map(([key, label]) => tg(label, ["teamcity", key], rawBool(rawObject(config.teamcity)[key], true))) }), _jsxs(LimitsGroup, { children: [_jsx(NumberField, { label: "\u0421\u0442\u0440\u043E\u043A \u0432 \u043E\u0442\u0432\u0435\u0442\u0435 \u043B\u043E\u0433\u0430", path: ["teamcity", "maxLogLines"], value: rawNumber(rawObject(config.teamcity).maxLogLines), ...control }), _jsx(NumberField, { label: "\u0421\u043A\u0430\u0447\u0438\u0432\u0430\u0442\u044C \u043B\u043E\u0433\u0430, \u0431\u0430\u0439\u0442", path: ["teamcity", "maxLogBytes"], value: rawNumber(rawObject(config.teamcity).maxLogBytes), ...control }), _jsx(NumberField, { label: "\u0410\u0440\u0442\u0435\u0444\u0430\u043A\u0442 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E, \u0431\u0430\u0439\u0442", path: ["teamcity", "defaultArtifactBytes"], value: rawNumber(rawObject(config.teamcity).defaultArtifactBytes), ...control }), _jsx(NumberField, { label: "\u041F\u043E\u0442\u043E\u043B\u043E\u043A \u0430\u0440\u0442\u0435\u0444\u0430\u043A\u0442\u0430, \u0431\u0430\u0439\u0442", path: ["teamcity", "maxArtifactBytes"], value: rawNumber(rawObject(config.teamcity).maxArtifactBytes), ...control }), _jsx(NumberField, { label: "\u0422\u0430\u0439\u043C\u0430\u0443\u0442 \u043B\u043E\u0433\u043E\u0432 \u0438 \u0430\u0440\u0442\u0435\u0444\u0430\u043A\u0442\u043E\u0432, \u043C\u0441", path: ["teamcity", "streamTimeoutMs"], value: rawNumber(rawObject(config.teamcity).streamTimeoutMs), ...control }), _jsx(NumberField, { label: "\u041F\u043E\u0432\u0442\u043E\u0440\u044B \u043F\u0440\u0438 429/5xx", path: ["teamcity", "retries"], value: rawNumber(rawObject(config.teamcity).retries), ...control })] })] }), _jsxs(Section, { title: "Jira", state: providerState(rawObject(config.jira), {
|
|
448
|
+
enabled: true,
|
|
449
|
+
capabilities: [
|
|
450
|
+
["identityRead", true],
|
|
451
|
+
["issuesRead", true],
|
|
452
|
+
["commentsRead", true],
|
|
453
|
+
["attachmentsRead", true],
|
|
454
|
+
["transitionsRead", true],
|
|
455
|
+
["projectsRead", true],
|
|
456
|
+
["fieldsRead", true],
|
|
457
|
+
],
|
|
458
|
+
counts: [
|
|
459
|
+
{ path: "sites", forms: ["сайт", "сайта", "сайтов"] },
|
|
460
|
+
],
|
|
461
|
+
}), children: [_jsxs(Group, { title: "\u041F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440", children: [tg("Провайдер включён", ["jira", "enabled"], rawBool(rawObject(config.jira).enabled, true)), tg("Разрешить http", ["jira", "allowInsecureHttp"], rawBool(rawObject(config.jira).allowInsecureHttp, false), "только для dev-стенда")] }), _jsxs(Group, { title: "\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435", wide: true, children: [_jsx(InstanceListField, { label: "\u0421\u0430\u0439\u0442\u044B Jira Cloud", hint: "\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C \u0432\u044B\u0431\u0438\u0440\u0430\u0435\u0442 \u0441\u0430\u0439\u0442 \u0438\u0437 \u0441\u043F\u0438\u0441\u043A\u0430, \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u043B\u044C\u043D\u044B\u0439 \u0445\u043E\u0441\u0442 \u0432\u0432\u0435\u0441\u0442\u0438 \u043D\u0435\u043B\u044C\u0437\u044F", path: ["jira", "sites"], instances: instanceRows(rawObject(config.jira).sites), ...control }), _jsx(RecordField, { label: "\u041F\u0441\u0435\u0432\u0434\u043E\u043D\u0438\u043C\u044B \u043F\u043E\u043B\u0435\u0439", hint: "\u0438\u043C\u044F \u043F\u043E\u043B\u044F Jira \u043F\u043E \u0431\u0438\u0437\u043D\u0435\u0441-\u0442\u0435\u0440\u043C\u0438\u043D\u0443", path: ["jira", "fieldAliases"], entries: rawRecord(rawObject(config.jira).fieldAliases), keyPlaceholder: "\u043F\u0440\u043E\u0434\u0443\u043A\u0442", valuePlaceholder: "customfield_10000", ...control })] }), _jsx(Group, { title: "\u0427\u0442\u043E \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E \u0430\u0433\u0435\u043D\u0442\u0443", kind: "checks", children: [
|
|
462
|
+
["identityRead", "Профиль: чтение"],
|
|
463
|
+
["issuesRead", "Задачи: чтение"],
|
|
464
|
+
["commentsRead", "Комментарии: чтение"],
|
|
465
|
+
["attachmentsRead", "Вложения: чтение"],
|
|
466
|
+
["transitionsRead", "Переходы: чтение"],
|
|
467
|
+
["projectsRead", "Проекты: чтение"],
|
|
468
|
+
["fieldsRead", "Схема полей: чтение"],
|
|
469
|
+
].map(([key, label]) => tg(label, ["jira", key], rawBool(rawObject(config.jira)[key], true))) }), _jsxs(LimitsGroup, { children: [_jsx(NumberField, { label: "\u0421\u0442\u0440\u043E\u043A \u043F\u043E\u0438\u0441\u043A\u0430 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E", path: ["jira", "defaultSearchLimit"], value: rawNumber(rawObject(config.jira).defaultSearchLimit), ...control }), _jsx(NumberField, { label: "\u041F\u043E\u0442\u043E\u043B\u043E\u043A \u0441\u0442\u0440\u043E\u043A \u043F\u043E\u0438\u0441\u043A\u0430", path: ["jira", "maxSearchLimit"], value: rawNumber(rawObject(config.jira).maxSearchLimit), ...control }), _jsx(NumberField, { label: "\u041F\u043E\u0442\u043E\u043B\u043E\u043A \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0435\u0432", path: ["jira", "maxCommentLimit"], value: rawNumber(rawObject(config.jira).maxCommentLimit), ...control }), _jsx(NumberField, { label: "\u0417\u043D\u0430\u043A\u043E\u0432 \u0442\u0435\u043A\u0441\u0442\u0430 \u0432 \u043E\u0442\u0432\u0435\u0442\u0435", path: ["jira", "maxTextChars"], value: rawNumber(rawObject(config.jira).maxTextChars), ...control }), _jsx(NumberField, { label: "\u041F\u043E\u0432\u0442\u043E\u0440\u044B \u043F\u0440\u0438 429/5xx", path: ["jira", "retries"], value: rawNumber(rawObject(config.jira).retries), ...control })] })] }), _jsxs(Section, { title: "Test IT", state: providerState(rawObject(config.testit), {
|
|
470
|
+
enabled: true,
|
|
471
|
+
capabilities: [
|
|
472
|
+
["projectsRead", true],
|
|
473
|
+
["sectionsRead", true],
|
|
474
|
+
["workItemsRead", true],
|
|
475
|
+
["historyRead", true],
|
|
476
|
+
["commentsRead", true],
|
|
477
|
+
["testPlansRead", true],
|
|
478
|
+
["testRunsRead", true],
|
|
479
|
+
["testResultsRead", true],
|
|
480
|
+
["autoTestsRead", true],
|
|
481
|
+
["attachmentsRead", true],
|
|
482
|
+
["configurationsRead", true],
|
|
483
|
+
],
|
|
484
|
+
counts: [
|
|
485
|
+
{
|
|
486
|
+
path: "instances",
|
|
487
|
+
forms: ["инстанс", "инстанса", "инстансов"],
|
|
488
|
+
},
|
|
489
|
+
],
|
|
490
|
+
}), children: [_jsxs(Group, { title: "\u041F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440", children: [tg("Провайдер включён", ["testit", "enabled"], rawBool(rawObject(config.testit).enabled, true)), tg("Разрешить http", ["testit", "allowInsecureHttp"], rawBool(rawObject(config.testit).allowInsecureHttp, false), "только для dev-стенда")] }), _jsx(Group, { title: "\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435", wide: true, children: _jsx(InstanceListField, { label: "\u0418\u043D\u0441\u0442\u0430\u043B\u043B\u044F\u0446\u0438\u0438 Test IT", path: ["testit", "instances"], instances: instanceRows(rawObject(config.testit).instances), ...control }) }), _jsx(Group, { title: "\u0427\u0442\u043E \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E \u0430\u0433\u0435\u043D\u0442\u0443", kind: "checks", children: [
|
|
491
|
+
["projectsRead", "Проекты: чтение"],
|
|
492
|
+
["sectionsRead", "Секции: чтение"],
|
|
493
|
+
["workItemsRead", "Work items: чтение"],
|
|
494
|
+
["historyRead", "История: чтение"],
|
|
495
|
+
["commentsRead", "Комментарии: чтение"],
|
|
496
|
+
["testPlansRead", "Планы: чтение"],
|
|
497
|
+
["testRunsRead", "Прогоны: чтение"],
|
|
498
|
+
["testResultsRead", "Результаты: чтение"],
|
|
499
|
+
["autoTestsRead", "Автотесты: чтение"],
|
|
500
|
+
["attachmentsRead", "Вложения: чтение"],
|
|
501
|
+
["configurationsRead", "Конфигурации: чтение"],
|
|
502
|
+
].map(([key, label]) => tg(label, ["testit", key], rawBool(rawObject(config.testit)[key], true))) }), _jsxs(LimitsGroup, { children: [_jsx(NumberField, { label: "\u0421\u0442\u0440\u043E\u043A \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E", path: ["testit", "defaultResults"], value: rawNumber(rawObject(config.testit).defaultResults), ...control }), _jsx(NumberField, { label: "\u041F\u043E\u0442\u043E\u043B\u043E\u043A \u0441\u0442\u0440\u043E\u043A \u0441\u043F\u0438\u0441\u043A\u0430", path: ["testit", "maxResults"], value: rawNumber(rawObject(config.testit).maxResults), ...control }), _jsx(NumberField, { label: "\u0412\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E, \u0431\u0430\u0439\u0442", path: ["testit", "defaultAttachmentBytes"], value: rawNumber(rawObject(config.testit).defaultAttachmentBytes), ...control }), _jsx(NumberField, { label: "\u041F\u043E\u0442\u043E\u043B\u043E\u043A \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u044F, \u0431\u0430\u0439\u0442", path: ["testit", "maxAttachmentBytes"], value: rawNumber(rawObject(config.testit).maxAttachmentBytes), ...control }), _jsx(NumberField, { label: "\u0422\u0430\u0439\u043C\u0430\u0443\u0442 \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u044F, \u043C\u0441", path: ["testit", "attachmentTimeoutMs"], value: rawNumber(rawObject(config.testit).attachmentTimeoutMs), ...control }), _jsx(NumberField, { label: "\u041F\u043E\u0432\u0442\u043E\u0440\u044B \u043F\u0440\u0438 429/5xx", path: ["testit", "retries"], value: rawNumber(rawObject(config.testit).retries), ...control })] })] }), _jsxs(Section, { title: "Weblate", state: providerState(rawObject(config.weblate), {
|
|
503
|
+
enabled: true,
|
|
504
|
+
capabilities: [
|
|
505
|
+
["identityRead", true],
|
|
506
|
+
["projectsRead", true],
|
|
507
|
+
["componentsRead", true],
|
|
508
|
+
["translationsRead", true],
|
|
509
|
+
["unitsRead", true],
|
|
510
|
+
["checksRead", true],
|
|
511
|
+
["commentsRead", true],
|
|
512
|
+
["suggestionsRead", true],
|
|
513
|
+
["changesRead", true],
|
|
514
|
+
["statisticsRead", true],
|
|
515
|
+
["screenshotsRead", true],
|
|
516
|
+
],
|
|
517
|
+
counts: [
|
|
518
|
+
{
|
|
519
|
+
path: "instances",
|
|
520
|
+
forms: ["инстанс", "инстанса", "инстансов"],
|
|
521
|
+
},
|
|
522
|
+
],
|
|
523
|
+
}), children: [_jsxs(Group, { title: "\u041F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440", children: [tg("Провайдер включён", ["weblate", "enabled"], rawBool(rawObject(config.weblate).enabled, true)), tg("Разрешить http", ["weblate", "allowInsecureHttp"], rawBool(rawObject(config.weblate).allowInsecureHttp, false), "только для dev-стенда")] }), _jsx(Group, { title: "\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435", wide: true, children: _jsx(InstanceListField, { label: "\u0418\u043D\u0441\u0442\u0430\u043D\u0441\u044B Weblate", path: ["weblate", "instances"], instances: instanceRows(rawObject(config.weblate).instances), ...control }) }), _jsx(Group, { title: "\u0427\u0442\u043E \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E \u0430\u0433\u0435\u043D\u0442\u0443", kind: "checks", children: [
|
|
524
|
+
["identityRead", "Профиль: чтение"],
|
|
525
|
+
["projectsRead", "Проекты: чтение"],
|
|
526
|
+
["componentsRead", "Компоненты: чтение"],
|
|
527
|
+
["translationsRead", "Переводы: чтение"],
|
|
528
|
+
["unitsRead", "Единицы: чтение"],
|
|
529
|
+
["checksRead", "Проверки: чтение"],
|
|
530
|
+
["commentsRead", "Комментарии: чтение"],
|
|
531
|
+
["suggestionsRead", "Предложения: чтение"],
|
|
532
|
+
["changesRead", "Изменения: чтение"],
|
|
533
|
+
["statisticsRead", "Статистика: чтение"],
|
|
534
|
+
["screenshotsRead", "Скриншоты: чтение"],
|
|
535
|
+
].map(([key, label]) => tg(label, ["weblate", key], rawBool(rawObject(config.weblate)[key], true))) }), _jsxs(LimitsGroup, { children: [_jsx(NumberField, { label: "\u0417\u043D\u0430\u043A\u043E\u0432 \u0441\u0442\u0440\u043E\u043A\u0438 \u0432 \u043E\u0442\u0432\u0435\u0442\u0435", path: ["weblate", "maxTextChars"], value: rawNumber(rawObject(config.weblate).maxTextChars), ...control }), _jsx(NumberField, { label: "\u0421\u0442\u0440\u043E\u043A \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443", path: ["weblate", "maxPageSize"], value: rawNumber(rawObject(config.weblate).maxPageSize), ...control }), _jsx(NumberField, { label: "\u041F\u043E\u0432\u0442\u043E\u0440\u044B \u043F\u0440\u0438 429/5xx", path: ["weblate", "retries"], value: rawNumber(rawObject(config.weblate).retries), ...control })] })] }), _jsxs(Section, { title: "\u0421\u0435\u0440\u0432\u0438\u0441\u043D\u044B\u0435 \u0434\u043E\u0441\u0442\u0443\u043F\u044B", hint: "\u043E\u0431\u0449\u0438\u0435 read-only \u043A\u0440\u0435\u0434\u0435\u043D\u0448\u0430\u043B\u044B, \u043A\u043E\u0442\u043E\u0440\u044B\u043C\u0438 \u0432\u043B\u0430\u0434\u0435\u0435\u0442 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044B\u0432\u0430\u043D\u0438\u0435", children: [_jsxs(Group, { title: "\u0420\u0435\u0436\u0438\u043C", children: [tg("Сервисные доступы включены", ["managedServiceCredentials", "enabled"], rawBool(msc.enabled, false)), tg("Новое подключение стартует в сервисном режиме", ["managedServiceCredentials", "defaultForNewConnections"], rawBool(msc.defaultForNewConnections, true))] }), _jsx(Group, { title: "\u041F\u0440\u043E\u0444\u0438\u043B\u0438 \u0434\u043E\u0441\u0442\u0443\u043F\u0430", wide: true, hint: "read-only \u0430\u043A\u043A\u0430\u0443\u043D\u0442, \u043A\u043E\u0442\u043E\u0440\u044B\u043C \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044B\u0432\u0430\u043D\u0438\u0435 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0435\u0442\u0441\u044F \u0432\u043C\u0435\u0441\u0442\u043E \u0433\u043E\u0441\u0442\u044F", children: _jsx(ServiceProfilesField, { profiles: profileDrafts(msc.profiles), disabled: !writable, write: write, unset: unset, overridden: overridden }) })] }), _jsx(Section, { title: "\u041F\u043E\u0434\u0441\u043A\u0430\u0437\u043A\u0438 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u044F \u0434\u043E\u0441\u0442\u0443\u043F\u0430", hint: "\u0437\u0430\u043C\u0435\u043D\u0430 \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u044B\u0445 \u0441\u0441\u044B\u043B\u043E\u043A \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u043E\u0432 \u0441\u0432\u043E\u0438\u043C\u0438", children: PROVIDER_IDS.map((provider) => (_jsx(CredentialHelpSection, { provider: provider, override: rawObject(rawObject(config.credentialHelp)[provider]), disabled: !writable, write: write, unset: unset, overridden: overridden }, provider))) })] })) }));
|
|
536
|
+
}
|
|
537
|
+
//# sourceMappingURL=operator-card.js.map
|