@yadsh/dsh-qa-integrations 0.9.0 → 0.10.1
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 +32 -21
- package/compatibility.json +7 -3
- package/lib/broker.js +172 -17
- package/lib/broker.js.map +1 -1
- package/lib/client/bitrix24.js +8 -6
- package/lib/client/bitrix24.js.map +1 -1
- package/lib/client/card.js +14 -13
- package/lib/client/card.js.map +1 -1
- package/lib/client/confluence.js +11 -7
- package/lib/client/confluence.js.map +1 -1
- package/lib/client/credential-help-note.js +51 -0
- package/lib/client/credential-help-note.js.map +1 -0
- package/lib/client/gitlab.js +8 -6
- package/lib/client/gitlab.js.map +1 -1
- package/lib/client/index.js +38 -32
- package/lib/client/index.js.map +1 -1
- package/lib/client/integrations.js +31 -18
- package/lib/client/integrations.js.map +1 -1
- package/lib/client/jira.js +10 -8
- package/lib/client/jira.js.map +1 -1
- package/lib/client/operator-card.js +93 -534
- package/lib/client/operator-card.js.map +1 -1
- package/lib/client/operator-controls.js +72 -23
- package/lib/client/operator-controls.js.map +1 -1
- package/lib/client/operator-sections/bitrix24.js +22 -0
- package/lib/client/operator-sections/bitrix24.js.map +1 -0
- package/lib/client/operator-sections/confluence.js +27 -0
- package/lib/client/operator-sections/confluence.js.map +1 -0
- package/lib/client/operator-sections/credential-help.js +15 -0
- package/lib/client/operator-sections/credential-help.js.map +1 -0
- package/lib/client/operator-sections/general.js +8 -0
- package/lib/client/operator-sections/general.js.map +1 -0
- package/lib/client/operator-sections/gitlab.js +41 -0
- package/lib/client/operator-sections/gitlab.js.map +1 -0
- package/lib/client/operator-sections/jira.js +25 -0
- package/lib/client/operator-sections/jira.js.map +1 -0
- package/lib/client/operator-sections/provider-section.js +21 -0
- package/lib/client/operator-sections/provider-section.js.map +1 -0
- package/lib/client/operator-sections/service-profiles.js +178 -0
- package/lib/client/operator-sections/service-profiles.js.map +1 -0
- package/lib/client/operator-sections/shared.js +192 -0
- package/lib/client/operator-sections/shared.js.map +1 -0
- package/lib/client/operator-sections/teamcity.js +42 -0
- package/lib/client/operator-sections/teamcity.js.map +1 -0
- package/lib/client/operator-sections/testit.js +35 -0
- package/lib/client/operator-sections/testit.js.map +1 -0
- package/lib/client/operator-sections/weblate.js +32 -0
- package/lib/client/operator-sections/weblate.js.map +1 -0
- package/lib/client/operator-service-reach.js +98 -0
- package/lib/client/operator-service-reach.js.map +1 -0
- package/lib/client/provider-card.js +32 -19
- package/lib/client/provider-card.js.map +1 -1
- package/lib/client/styles.js +52 -15
- package/lib/client/styles.js.map +1 -1
- package/lib/client/teamcity.js +7 -5
- package/lib/client/teamcity.js.map +1 -1
- package/lib/client/testit.js +8 -6
- package/lib/client/testit.js.map +1 -1
- package/lib/client/weblate.js +8 -6
- package/lib/client/weblate.js.map +1 -1
- package/lib/client.js +2838 -1923
- package/lib/client.js.map +1 -1
- package/lib/config.js +64 -17
- package/lib/config.js.map +1 -1
- package/lib/errors.js +5 -0
- package/lib/errors.js.map +1 -1
- package/lib/index.js +176 -222
- package/lib/index.js.map +1 -1
- package/lib/providers/bitrix24/tools.js +7 -2
- package/lib/providers/bitrix24/tools.js.map +1 -1
- package/lib/providers/bitrix24/transport.js +28 -8
- package/lib/providers/bitrix24/transport.js.map +1 -1
- package/lib/providers/confluence/config.js +14 -55
- package/lib/providers/confluence/config.js.map +1 -1
- package/lib/providers/confluence/tools.js +7 -2
- package/lib/providers/confluence/tools.js.map +1 -1
- package/lib/providers/confluence/transport.js +42 -78
- package/lib/providers/confluence/transport.js.map +1 -1
- package/lib/providers/gitlab/config.js +11 -55
- package/lib/providers/gitlab/config.js.map +1 -1
- package/lib/providers/gitlab/operations.js +3 -3
- package/lib/providers/gitlab/operations.js.map +1 -1
- package/lib/providers/gitlab/tools.js +7 -2
- package/lib/providers/gitlab/tools.js.map +1 -1
- package/lib/providers/gitlab/transport.js +33 -65
- package/lib/providers/gitlab/transport.js.map +1 -1
- package/lib/providers/jira/config.js +18 -58
- package/lib/providers/jira/config.js.map +1 -1
- package/lib/providers/jira/jql.js +105 -1
- package/lib/providers/jira/jql.js.map +1 -1
- package/lib/providers/jira/tools.js +68 -2
- package/lib/providers/jira/tools.js.map +1 -1
- package/lib/providers/jira/transport.js +44 -110
- package/lib/providers/jira/transport.js.map +1 -1
- package/lib/providers/kernel/address.js +90 -0
- package/lib/providers/kernel/address.js.map +1 -0
- package/lib/providers/kernel/errors.js +42 -0
- package/lib/providers/kernel/errors.js.map +1 -0
- package/lib/providers/kernel/read-policy.js +276 -0
- package/lib/providers/kernel/read-policy.js.map +1 -0
- package/lib/providers/kernel/token.js +45 -0
- package/lib/providers/kernel/token.js.map +1 -0
- package/lib/providers/shared/service-boundary.js +31 -3
- package/lib/providers/shared/service-boundary.js.map +1 -1
- package/lib/providers/teamcity/tools.js +8 -3
- package/lib/providers/teamcity/tools.js.map +1 -1
- package/lib/providers/teamcity/transport.js +6 -8
- package/lib/providers/teamcity/transport.js.map +1 -1
- package/lib/providers/testit/config.js +12 -57
- package/lib/providers/testit/config.js.map +1 -1
- package/lib/providers/testit/tools.js +7 -2
- package/lib/providers/testit/tools.js.map +1 -1
- package/lib/providers/testit/transport.js +12 -12
- package/lib/providers/testit/transport.js.map +1 -1
- package/lib/providers/weblate/config.js +12 -55
- package/lib/providers/weblate/config.js.map +1 -1
- package/lib/providers/weblate/tools.js +7 -2
- package/lib/providers/weblate/tools.js.map +1 -1
- package/lib/providers/weblate/transport.js +21 -20
- package/lib/providers/weblate/transport.js.map +1 -1
- package/lib/public-api.js +79 -0
- package/lib/public-api.js.map +1 -0
- package/lib/repository.js +65 -16
- package/lib/repository.js.map +1 -1
- package/lib/service-credentials/policy.js +14 -1
- package/lib/service-credentials/policy.js.map +1 -1
- package/lib/tool-kit.js +34 -7
- package/lib/tool-kit.js.map +1 -1
- package/lib/tools.js +49 -24
- package/lib/tools.js.map +1 -1
- package/lib/typert.host.js +455 -351
- package/lib/typert.remote-client.js +450 -336
- package/lib/types/broker.d.ts +65 -1
- package/lib/types/client/card.d.ts +13 -4
- package/lib/types/client/credential-help-note.d.ts +26 -0
- package/lib/types/client/index.d.ts +15 -7
- package/lib/types/client/integrations.d.ts +5 -4
- package/lib/types/client/operator-card.d.ts +56 -4
- package/lib/types/client/operator-controls.d.ts +31 -0
- package/lib/types/client/operator-sections/bitrix24.d.ts +12 -0
- package/lib/types/client/operator-sections/confluence.d.ts +10 -0
- package/lib/types/client/operator-sections/credential-help.d.ts +17 -0
- package/lib/types/client/operator-sections/general.d.ts +11 -0
- package/lib/types/client/operator-sections/gitlab.d.ts +13 -0
- package/lib/types/client/operator-sections/jira.d.ts +11 -0
- package/lib/types/client/operator-sections/provider-section.d.ts +58 -0
- package/lib/types/client/operator-sections/service-profiles.d.ts +13 -0
- package/lib/types/client/operator-sections/shared.d.ts +123 -0
- package/lib/types/client/operator-sections/teamcity.d.ts +11 -0
- package/lib/types/client/operator-sections/testit.d.ts +10 -0
- package/lib/types/client/operator-sections/weblate.d.ts +10 -0
- package/lib/types/client/operator-service-reach.d.ts +76 -0
- package/lib/types/client/provider-card.d.ts +14 -3
- package/lib/types/client/styles.d.ts +28 -4
- package/lib/types/config.d.ts +49 -2
- package/lib/types/errors.d.ts +24 -0
- package/lib/types/index.d.ts +54 -117
- package/lib/types/providers/bitrix24/tools.d.ts +2 -5
- package/lib/types/providers/confluence/tools.d.ts +2 -6
- package/lib/types/providers/confluence/transport.d.ts +0 -6
- package/lib/types/providers/gitlab/config.d.ts +1 -1
- package/lib/types/providers/gitlab/tools.d.ts +2 -6
- package/lib/types/providers/gitlab/transport.d.ts +3 -5
- package/lib/types/providers/jira/tools.d.ts +2 -6
- package/lib/types/providers/jira/transport.d.ts +2 -11
- package/lib/types/providers/kernel/address.d.ts +57 -0
- package/lib/types/providers/kernel/errors.d.ts +34 -0
- package/lib/types/providers/kernel/read-policy.d.ts +118 -0
- package/lib/types/providers/kernel/token.d.ts +25 -0
- package/lib/types/providers/shared/service-boundary.d.ts +15 -0
- package/lib/types/providers/teamcity/tools.d.ts +2 -6
- package/lib/types/providers/teamcity/transport.d.ts +1 -1
- package/lib/types/providers/testit/tools.d.ts +2 -6
- package/lib/types/providers/testit/transport.d.ts +1 -1
- package/lib/types/providers/weblate/tools.d.ts +2 -6
- package/lib/types/public-api.d.ts +80 -0
- package/lib/types/repository.d.ts +62 -2
- package/lib/types/tool-kit.d.ts +27 -1
- package/lib/types/tools.d.ts +26 -9
- package/lib/types/types.d.ts +17 -3
- package/package.json +25 -23
- package/lib/providers/shared/http.js +0 -168
- package/lib/providers/shared/http.js.map +0 -1
- package/lib/types/providers/shared/http.d.ts +0 -60
package/lib/client/confluence.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { CredentialHelpNote } from "
|
|
2
|
+
import { CredentialHelpNote } from "./credential-help-note.js";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { createProviderCard, serviceConnectOption } from "./provider-card.js";
|
|
5
5
|
const ERROR_COPY = {
|
|
@@ -12,6 +12,8 @@ const ERROR_COPY = {
|
|
|
12
12
|
ResourceNotFound: "Confluence не нашёл страницу или аккаунт её не видит.",
|
|
13
13
|
RateLimited: "Слишком много запросов. Попробуйте позже.",
|
|
14
14
|
ResultTooLarge: "Ответ Confluence слишком большой для одного запроса.",
|
|
15
|
+
UpstreamTimeout: "Confluence не ответил вовремя. Попробуйте ещё раз.",
|
|
16
|
+
TlsFailure: "Сертификат Confluence не принят стендом. Нужен сертификат, которому доверяет сервер.",
|
|
15
17
|
OperationDeniedByPolicy: "Пространство вне списка, разрешённого оператором стенда.",
|
|
16
18
|
ServiceCredentialUnavailable: "Для этого сайта администратор не настроил сервисный токен.",
|
|
17
19
|
ServiceCredentialDisabled: "Сервисный токен этого сайта отключён администратором.",
|
|
@@ -29,6 +31,7 @@ export function createConfluenceCard(remote) {
|
|
|
29
31
|
const serviceBoundary = remote.serviceBoundary;
|
|
30
32
|
const managedServiceCredentials = remote.managedServiceCredentials;
|
|
31
33
|
return createProviderCard({
|
|
34
|
+
provider: "confluence",
|
|
32
35
|
title: "Confluence",
|
|
33
36
|
portalFallback: "База знаний и документация вашей команды",
|
|
34
37
|
accountFallback: "Пользователь Atlassian",
|
|
@@ -100,6 +103,7 @@ export function createConfluenceCard(remote) {
|
|
|
100
103
|
result.value.defaultForNewConnections);
|
|
101
104
|
},
|
|
102
105
|
credentialSection: (state, help) => {
|
|
106
|
+
const zone = state.testIdZone;
|
|
103
107
|
const { sites, instanceId, email } = state.extra;
|
|
104
108
|
const configured = sites.length > 0;
|
|
105
109
|
if (!configured)
|
|
@@ -117,22 +121,22 @@ export function createConfluenceCard(remote) {
|
|
|
117
121
|
: undefined
|
|
118
122
|
: sites.find((site) => site.id === instanceId);
|
|
119
123
|
const server = selected?.deploymentType === "server";
|
|
120
|
-
const sitePicker = needsChoice ? (_jsxs("label", { className: "dsh-qa-integrations__field", children: ["\u0421\u0430\u0439\u0442 Confluence", _jsxs("select", { className: "dsh-qa-integrations__input", value: instanceId, disabled: state.busy, onChange: (event) => state.extra.setInstanceId(event.currentTarget.value), children: [_jsx("option", { value: "", children: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0430\u0439\u0442" }), sites.map((site) => (_jsx("option", { value: site.id, children: site.label }, site.id)))] })] })) : (_jsxs("span", { className: "dsh-qa-integrations__muted", children: ["\u0421\u0430\u0439\u0442: ", sites[0]?.label ?? ""] }));
|
|
121
|
-
const deployment = (_jsxs("span", { className: "dsh-qa-integrations__muted", children: ["\u0420\u0430\u0437\u0432\u0451\u0440\u0442\u044B\u0432\u0430\u043D\u0438\u0435: ", server ? "Server / Data Center" : "Atlassian Cloud"] }));
|
|
124
|
+
const sitePicker = needsChoice ? (_jsxs("label", { className: "dsh-qa-integrations__field", "data-testid": `${zone}-instance-picker`, children: ["\u0421\u0430\u0439\u0442 Confluence", _jsxs("select", { className: "dsh-qa-integrations__input", "data-testid": `${zone}-instance`, value: instanceId, disabled: state.busy, onChange: (event) => state.extra.setInstanceId(event.currentTarget.value), children: [_jsx("option", { value: "", children: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0430\u0439\u0442" }), sites.map((site) => (_jsx("option", { value: site.id, children: site.label }, site.id)))] })] })) : (_jsxs("span", { className: "dsh-qa-integrations__muted", "data-testid": `${zone}-instance-static`, children: ["\u0421\u0430\u0439\u0442: ", sites[0]?.label ?? ""] }));
|
|
125
|
+
const deployment = (_jsxs("span", { className: "dsh-qa-integrations__muted", "data-testid": `${zone}-deployment`, children: ["\u0420\u0430\u0437\u0432\u0451\u0440\u0442\u044B\u0432\u0430\u043D\u0438\u0435: ", server ? "Server / Data Center" : "Atlassian Cloud"] }));
|
|
122
126
|
// With a managed credential there is nothing to paste: the host spends the
|
|
123
127
|
// deployment's token, so the form keeps the site picker and the checkbox
|
|
124
128
|
// and drops the e-mail and the secret field entirely.
|
|
125
129
|
if (state.useService) {
|
|
126
|
-
return (_jsxs("div", { className: "dsh-qa-integrations__section", children: [sitePicker, deployment, service, _jsxs("div", { className: "dsh-qa-integrations__actions", children: [_jsx("button", { className: "dsh-qa-integrations__button dsh-qa-integrations__button--primary", type: "button", disabled: state.busy || (needsChoice && instanceId === ""), onClick: state.save, children: "\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0441\u0435\u0440\u0432\u0438\u0441\u043D\u044B\u0439 \u0442\u043E\u043A\u0435\u043D" }), state.connected ? (_jsx("button", { className: "dsh-qa-integrations__button", type: "button", disabled: state.busy, onClick: state.cancelCredential, children: "\u041E\u0442\u043C\u0435\u043D\u0430" })) : null] })] }));
|
|
130
|
+
return (_jsxs("div", { className: "dsh-qa-integrations__section", "data-testid": `${zone}-credential`, children: [sitePicker, deployment, service, _jsxs("div", { className: "dsh-qa-integrations__actions", children: [_jsx("button", { className: "dsh-qa-integrations__button dsh-qa-integrations__button--primary", type: "button", disabled: state.busy || (needsChoice && instanceId === ""), "data-testid": `${zone}-connect`, onClick: state.save, children: "\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0441\u0435\u0440\u0432\u0438\u0441\u043D\u044B\u0439 \u0442\u043E\u043A\u0435\u043D" }), state.connected ? (_jsx("button", { className: "dsh-qa-integrations__button", type: "button", disabled: state.busy, "data-testid": `${zone}-credential-cancel`, onClick: state.cancelCredential, children: "\u041E\u0442\u043C\u0435\u043D\u0430" })) : null] })] }));
|
|
127
131
|
}
|
|
128
|
-
return (_jsxs("div", { className: "dsh-qa-integrations__section", children: [service, sitePicker, deployment, server ? null : (_jsxs("label", { className: "dsh-qa-integrations__field", children: ["\u041F\u043E\u0447\u0442\u0430 \u0430\u043A\u043A\u0430\u0443\u043D\u0442\u0430 Atlassian", _jsx("input", { className: "dsh-qa-integrations__input", type: "email", autoComplete: "off", value: email, disabled: state.busy, onChange: (event) => state.extra.setEmail(event.currentTarget.value), placeholder: "user@example.com" })] })), _jsxs("label", { className: "dsh-qa-integrations__field", children: [server ? "Личный токен доступа (PAT)" : "Atlassian API token", _jsx("input", { className: "dsh-qa-integrations__input", type: "password", autoComplete: "new-password", value: state.credential, disabled: state.busy, onChange: (event) => state.setCredential(event.currentTarget.value), placeholder: server ? "Вставьте личный токен доступа" : "ATATT…" })] }), _jsx(CredentialHelpNote, { help: help }), _jsx("p", { className: "dsh-qa-integrations__hint", children: server
|
|
132
|
+
return (_jsxs("div", { className: "dsh-qa-integrations__section", "data-testid": `${zone}-credential`, children: [service, sitePicker, deployment, server ? null : (_jsxs("label", { className: "dsh-qa-integrations__field", "data-testid": `${zone}-account-field`, children: ["\u041F\u043E\u0447\u0442\u0430 \u0430\u043A\u043A\u0430\u0443\u043D\u0442\u0430 Atlassian", _jsx("input", { className: "dsh-qa-integrations__input", "data-testid": `${zone}-account`, type: "email", autoComplete: "off", value: email, disabled: state.busy, onChange: (event) => state.extra.setEmail(event.currentTarget.value), placeholder: "user@example.com" })] })), _jsxs("label", { className: "dsh-qa-integrations__field", "data-testid": `${zone}-credential-field`, children: [server ? "Личный токен доступа (PAT)" : "Atlassian API token", _jsx("input", { className: "dsh-qa-integrations__input", "data-testid": `${zone}-credential-input`, type: "password", autoComplete: "new-password", value: state.credential, disabled: state.busy, onChange: (event) => state.setCredential(event.currentTarget.value), placeholder: server ? "Вставьте личный токен доступа" : "ATATT…" })] }), _jsx(CredentialHelpNote, { help: help }), _jsx("p", { className: "dsh-qa-integrations__hint", "data-testid": `${zone}-credential-hint`, children: server
|
|
129
133
|
? "Токен хранится в зашифрованном виде и после сохранения не отображается."
|
|
130
134
|
: "Почта и токен хранятся в зашифрованном виде и после сохранения больше не отображаются." }), _jsxs("div", { className: "dsh-qa-integrations__actions", children: [_jsx("button", { className: "dsh-qa-integrations__button dsh-qa-integrations__button--primary", type: "button", disabled: state.busy ||
|
|
131
135
|
state.credential.trim() === "" ||
|
|
132
136
|
(!server && email.trim() === "") ||
|
|
133
|
-
(needsChoice && instanceId === ""), onClick: state.save, children: "\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u0438 \u043F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C" }), state.connected ? (_jsx("button", { className: "dsh-qa-integrations__button", type: "button", disabled: state.busy, onClick: state.cancelCredential, children: "\u041E\u0442\u043C\u0435\u043D\u0430" })) : null] })] }));
|
|
137
|
+
(needsChoice && instanceId === ""), "data-testid": `${zone}-connect`, onClick: state.save, children: "\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u0438 \u043F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C" }), state.connected ? (_jsx("button", { className: "dsh-qa-integrations__button", type: "button", disabled: state.busy, "data-testid": `${zone}-credential-cancel`, onClick: state.cancelCredential, children: "\u041E\u0442\u043C\u0435\u043D\u0430" })) : null] })] }));
|
|
134
138
|
},
|
|
135
|
-
notConfiguredHint: () => (_jsx("p", { className: "dsh-qa-integrations__hint", children: "\u041E\u043F\u0435\u0440\u0430\u0442\u043E\u0440 \u043D\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0438\u043B \u043D\u0438 \u043E\u0434\u043D\u043E\u0433\u043E \u0441\u0430\u0439\u0442\u0430 Confluence, \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0442\u044C \u043D\u0435\u0447\u0435\u0433\u043E." })),
|
|
139
|
+
notConfiguredHint: (state) => state.extra.sites.length === 0 ? (_jsx("p", { className: "dsh-qa-integrations__hint", "data-testid": `${state.testIdZone}-not-configured`, children: "\u041E\u043F\u0435\u0440\u0430\u0442\u043E\u0440 \u043D\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0438\u043B \u043D\u0438 \u043E\u0434\u043D\u043E\u0433\u043E \u0441\u0430\u0439\u0442\u0430 Confluence, \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0442\u044C \u043D\u0435\u0447\u0435\u0433\u043E." })) : null,
|
|
136
140
|
});
|
|
137
141
|
}
|
|
138
142
|
//# sourceMappingURL=confluence.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confluence.js","sourceRoot":"","sources":["../../src/client/confluence.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"confluence.js","sourceRoot":"","sources":["../../src/client/confluence.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAQjC,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAiD9E,MAAM,UAAU,GAAqC;IACnD,oBAAoB,EAAE,iCAAiC;IACvD,iBAAiB,EACf,yEAAyE;IAC3E,wBAAwB,EACtB,uEAAuE;IACzE,mBAAmB,EAAE,iDAAiD;IACtE,uBAAuB,EAAE,2BAA2B;IACpD,iBAAiB,EACf,4EAA4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jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* The credential-help note as this bundle renders it.
|
|
4
|
+
*
|
|
5
|
+
* `@yadsh/dsh-plugin-kit` ships this note and every provider card here reuses
|
|
6
|
+
* it, which this bundle can no longer do: the kit's trigger draws the card
|
|
7
|
+
* shell's inline chevron (`ChevronDown`, whose path is the shell's), and a bundle
|
|
8
|
+
* seated on the Plugins panel may not carry that path anywhere in itself — the
|
|
9
|
+
* card-contract gate reads the built bytes, so importing the kit's note would take
|
|
10
|
+
* this bundle red rather than restyling it. What the note *says* still comes from
|
|
11
|
+
* the kit: `credentialHelpView` shapes the metadata and re-sanitizes each address
|
|
12
|
+
* on this side of the wire, so only the markup is repeated here — with a
|
|
13
|
+
* disclosure drawn the way this plugin draws its own collapsibles (a border
|
|
14
|
+
* triangle, no glyph, no shell path) and under this bundle's own class names, so
|
|
15
|
+
* the copy cannot fight the kit's sheet for the same selectors.
|
|
16
|
+
*
|
|
17
|
+
* The two are kept equal in content by
|
|
18
|
+
* `tests/client/credential-help-note.test.tsx`, which renders this component and
|
|
19
|
+
* the kit's side by side over one fixture and compares the text. That test, not a
|
|
20
|
+
* promise about the kit, is what stops the copies drifting; the kit's note would
|
|
21
|
+
* have to stop carrying the shell's chevron before this file could go away, and no
|
|
22
|
+
* card owns that change yet.
|
|
23
|
+
*/
|
|
24
|
+
import { credentialHelpView, } from "@yadsh/dsh-plugin-kit/client";
|
|
25
|
+
import { useId, useState } from "react";
|
|
26
|
+
/** What the panel calls the permission list, as the kit's note calls it. */
|
|
27
|
+
const SCOPES_LABEL = "Требуемые права";
|
|
28
|
+
/** External help always leaves the app, so the opened page cannot reach back. */
|
|
29
|
+
function HelpLink({ link, className, }) {
|
|
30
|
+
return (_jsx("a", { ...(className === undefined ? {} : { className }), href: link.url, target: "_blank", rel: "noopener noreferrer", children: link.label }));
|
|
31
|
+
}
|
|
32
|
+
export function CredentialHelpNote({ help, translate, className, }) {
|
|
33
|
+
const [open, setOpen] = useState(false);
|
|
34
|
+
const panelId = useId();
|
|
35
|
+
const view = credentialHelpView(help, translate);
|
|
36
|
+
if (view === null)
|
|
37
|
+
return null;
|
|
38
|
+
const root = className === undefined
|
|
39
|
+
? "dsh-qa-integrations-help"
|
|
40
|
+
: `dsh-qa-integrations-help ${className}`;
|
|
41
|
+
if (!view.expandable) {
|
|
42
|
+
const link = view.obtain ?? view.docs;
|
|
43
|
+
if (link === undefined)
|
|
44
|
+
return null;
|
|
45
|
+
return (_jsx("p", { className: root, children: _jsx(HelpLink, { link: link, className: "dsh-qa-integrations-help__link" }) }));
|
|
46
|
+
}
|
|
47
|
+
return (_jsxs("div", { className: root, children: [_jsxs("button", { type: "button", className: "dsh-qa-integrations-help__trigger", "aria-expanded": open, "aria-controls": panelId, onClick: () => {
|
|
48
|
+
setOpen(!open);
|
|
49
|
+
}, children: [view.action, _jsx("span", { className: "dsh-qa-integrations-help__chevron", "aria-hidden": "true" })] }), open ? (_jsxs("div", { className: "dsh-qa-integrations-help__panel", id: panelId, children: [view.title === undefined ? null : (_jsx("p", { className: "dsh-qa-integrations-help__title", children: view.title })), view.steps.length === 1 ? (_jsx("p", { className: "dsh-qa-integrations-help__text", children: view.steps[0] })) : view.steps.length > 1 ? (_jsx("ol", { className: "dsh-qa-integrations-help__steps", children: view.steps.map((step) => (_jsx("li", { children: step }, step))) })) : null, view.scopes.length === 0 ? null : (_jsxs("div", { className: "dsh-qa-integrations-help__group", children: [_jsx("span", { className: "dsh-qa-integrations-help__label", children: SCOPES_LABEL }), _jsx("ul", { className: "dsh-qa-integrations-help__list", children: view.scopes.map((scope) => (_jsx("li", { children: scope }, scope))) })] })), view.notes.length === 0 ? null : (_jsx("ul", { className: "dsh-qa-integrations-help__list", children: view.notes.map((note) => (_jsx("li", { children: note }, note))) })), view.obtain === undefined && view.docs === undefined ? null : (_jsxs("div", { className: "dsh-qa-integrations-help__links", children: [view.obtain === undefined ? null : (_jsx(HelpLink, { link: view.obtain })), view.docs === undefined ? null : _jsx(HelpLink, { link: view.docs })] }))] })) : null] }));
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=credential-help-note.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-help-note.js","sourceRoot":"","sources":["../../src/client/credential-help-note.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EACL,kBAAkB,GAEnB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAqB,MAAM,OAAO,CAAC;AAE3D,4EAA4E;AAC5E,MAAM,YAAY,GAAG,iBAAiB,CAAC;AAEvC,iFAAiF;AACjF,SAAS,QAAQ,CAAC,EAChB,IAAI,EACJ,SAAS,GAIV;IACC,OAAO,CACL,eACM,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAClD,IAAI,EAAE,IAAI,CAAC,GAAG,EACd,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,YAExB,IAAI,CAAC,KAAK,GACT,CACL,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,EACjC,IAAI,EACJ,SAAS,EACT,SAAS,GACe;IACxB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxC,MAAM,OAAO,GAAG,KAAK,EAAE,CAAC;IACxB,MAAM,IAAI,GAAG,kBAAkB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACjD,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC/B,MAAM,IAAI,GACR,SAAS,KAAK,SAAS;QACrB,CAAC,CAAC,0BAA0B;QAC5B,CAAC,CAAC,4BAA4B,SAAS,EAAE,CAAC;IAC9C,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;QACrB,MAAM,IAAI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from "./credential-help-note.js";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { createProviderCard, serviceConnectOption } from "./provider-card.js";
|
|
5
5
|
const ERROR_COPY = {
|
|
@@ -25,6 +25,7 @@ const ERROR_COPY = {
|
|
|
25
25
|
};
|
|
26
26
|
export function createGitlabCard(remote) {
|
|
27
27
|
return createProviderCard({
|
|
28
|
+
provider: "gitlab",
|
|
28
29
|
title: "GitLab",
|
|
29
30
|
portalFallback: "Issues, merge requests и CI вашего GitLab",
|
|
30
31
|
accountFallback: "Пользователь GitLab",
|
|
@@ -77,24 +78,25 @@ export function createGitlabCard(remote) {
|
|
|
77
78
|
: false;
|
|
78
79
|
},
|
|
79
80
|
credentialSection: (state, help) => {
|
|
81
|
+
const zone = state.testIdZone;
|
|
80
82
|
const { instances, instanceId } = state.extra;
|
|
81
83
|
const configured = instances.length > 0;
|
|
82
84
|
if (!configured)
|
|
83
85
|
return null;
|
|
84
86
|
const needsChoice = instances.length > 1;
|
|
85
87
|
const service = serviceConnectOption(state);
|
|
86
|
-
const instancePicker = needsChoice ? (_jsxs("label", { className: "dsh-qa-integrations__field", children: ["\u0418\u043D\u0441\u0442\u0430\u043D\u0441 GitLab", _jsxs("select", { className: "dsh-qa-integrations__input", value: instanceId, disabled: state.busy, onChange: (event) => state.extra.setInstanceId(event.currentTarget.value), children: [_jsx("option", { value: "", children: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0438\u043D\u0441\u0442\u0430\u043D\u0441" }), instances.map((instance) => (_jsx("option", { value: instance.id, children: instance.label }, instance.id)))] })] })) : (_jsxs("span", { className: "dsh-qa-integrations__muted", children: ["\u0418\u043D\u0441\u0442\u0430\u043D\u0441: ", instances[0]?.label ?? ""] }));
|
|
88
|
+
const instancePicker = needsChoice ? (_jsxs("label", { className: "dsh-qa-integrations__field", "data-testid": `${zone}-instance-picker`, children: ["\u0418\u043D\u0441\u0442\u0430\u043D\u0441 GitLab", _jsxs("select", { className: "dsh-qa-integrations__input", "data-testid": `${zone}-instance`, value: instanceId, disabled: state.busy, onChange: (event) => state.extra.setInstanceId(event.currentTarget.value), children: [_jsx("option", { value: "", children: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0438\u043D\u0441\u0442\u0430\u043D\u0441" }), instances.map((instance) => (_jsx("option", { value: instance.id, children: instance.label }, instance.id)))] })] })) : (_jsxs("span", { className: "dsh-qa-integrations__muted", "data-testid": `${zone}-instance-static`, children: ["\u0418\u043D\u0441\u0442\u0430\u043D\u0441: ", instances[0]?.label ?? ""] }));
|
|
87
89
|
// With a managed credential there is nothing to paste: the host spends the
|
|
88
90
|
// deployment's token, so the form keeps the instance picker and the
|
|
89
91
|
// checkbox and drops the secret field entirely.
|
|
90
92
|
if (state.useService) {
|
|
91
|
-
return (_jsxs("div", { className: "dsh-qa-integrations__section", children: [instancePicker, service, _jsxs("div", { className: "dsh-qa-integrations__actions", children: [_jsx("button", { className: "dsh-qa-integrations__button dsh-qa-integrations__button--primary", type: "button", disabled: state.busy || (needsChoice && instanceId === ""), onClick: state.save, children: "\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0441\u0435\u0440\u0432\u0438\u0441\u043D\u044B\u0439 \u0442\u043E\u043A\u0435\u043D" }), state.connected ? (_jsx("button", { className: "dsh-qa-integrations__button", type: "button", disabled: state.busy, onClick: state.cancelCredential, children: "\u041E\u0442\u043C\u0435\u043D\u0430" })) : null] })] }));
|
|
93
|
+
return (_jsxs("div", { className: "dsh-qa-integrations__section", "data-testid": `${zone}-credential`, children: [instancePicker, service, _jsxs("div", { className: "dsh-qa-integrations__actions", children: [_jsx("button", { className: "dsh-qa-integrations__button dsh-qa-integrations__button--primary", type: "button", disabled: state.busy || (needsChoice && instanceId === ""), "data-testid": `${zone}-connect`, onClick: state.save, children: "\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0441\u0435\u0440\u0432\u0438\u0441\u043D\u044B\u0439 \u0442\u043E\u043A\u0435\u043D" }), state.connected ? (_jsx("button", { className: "dsh-qa-integrations__button", type: "button", disabled: state.busy, "data-testid": `${zone}-credential-cancel`, onClick: state.cancelCredential, children: "\u041E\u0442\u043C\u0435\u043D\u0430" })) : null] })] }));
|
|
92
94
|
}
|
|
93
|
-
return (_jsxs("div", { className: "dsh-qa-integrations__section", children: [service, instancePicker, _jsxs("label", { className: "dsh-qa-integrations__field", children: ["Personal access token GitLab", _jsx("input", { className: "dsh-qa-integrations__input", type: "password", autoComplete: "new-password", value: state.credential, disabled: state.busy, onChange: (event) => state.setCredential(event.currentTarget.value), placeholder: "glpat-\u2026" })] }), _jsx(CredentialHelpNote, { help: help }), _jsx("p", { className: "dsh-qa-integrations__hint", children: "\u0422\u043E\u043A\u0435\u043D \u0445\u0440\u0430\u043D\u0438\u0442\u0441\u044F \u0432 \u0437\u0430\u0448\u0438\u0444\u0440\u043E\u0432\u0430\u043D\u043D\u043E\u043C \u0432\u0438\u0434\u0435 \u0438 \u043F\u043E\u0441\u043B\u0435 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u044F \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044F." }), _jsxs("div", { className: "dsh-qa-integrations__actions", children: [_jsx("button", { className: "dsh-qa-integrations__button dsh-qa-integrations__button--primary", type: "button", disabled: state.busy ||
|
|
95
|
+
return (_jsxs("div", { className: "dsh-qa-integrations__section", "data-testid": `${zone}-credential`, children: [service, instancePicker, _jsxs("label", { className: "dsh-qa-integrations__field", "data-testid": `${zone}-credential-field`, children: ["Personal access token GitLab", _jsx("input", { className: "dsh-qa-integrations__input", "data-testid": `${zone}-credential-input`, type: "password", autoComplete: "new-password", value: state.credential, disabled: state.busy, onChange: (event) => state.setCredential(event.currentTarget.value), placeholder: "glpat-\u2026" })] }), _jsx(CredentialHelpNote, { help: help }), _jsx("p", { className: "dsh-qa-integrations__hint", "data-testid": `${zone}-credential-hint`, children: "\u0422\u043E\u043A\u0435\u043D \u0445\u0440\u0430\u043D\u0438\u0442\u0441\u044F \u0432 \u0437\u0430\u0448\u0438\u0444\u0440\u043E\u0432\u0430\u043D\u043D\u043E\u043C \u0432\u0438\u0434\u0435 \u0438 \u043F\u043E\u0441\u043B\u0435 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u044F \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044F." }), _jsxs("div", { className: "dsh-qa-integrations__actions", children: [_jsx("button", { className: "dsh-qa-integrations__button dsh-qa-integrations__button--primary", type: "button", disabled: state.busy ||
|
|
94
96
|
state.credential.trim() === "" ||
|
|
95
|
-
(needsChoice && instanceId === ""), onClick: state.save, children: "\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u0438 \u043F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C" }), state.connected ? (_jsx("button", { className: "dsh-qa-integrations__button", type: "button", disabled: state.busy, onClick: state.cancelCredential, children: "\u041E\u0442\u043C\u0435\u043D\u0430" })) : null] })] }));
|
|
97
|
+
(needsChoice && instanceId === ""), "data-testid": `${zone}-connect`, onClick: state.save, children: "\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u0438 \u043F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C" }), state.connected ? (_jsx("button", { className: "dsh-qa-integrations__button", type: "button", disabled: state.busy, "data-testid": `${zone}-credential-cancel`, onClick: state.cancelCredential, children: "\u041E\u0442\u043C\u0435\u043D\u0430" })) : null] })] }));
|
|
96
98
|
},
|
|
97
|
-
notConfiguredHint: (state) => state.extra.instances.length === 0 ? (_jsx("p", { className: "dsh-qa-integrations__hint", children: "\u041E\u043F\u0435\u0440\u0430\u0442\u043E\u0440 \u043D\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0438\u043B \u043D\u0438 \u043E\u0434\u043D\u043E\u0433\u043E \u0438\u043D\u0441\u0442\u0430\u043D\u0441\u0430 GitLab, \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0442\u044C \u043D\u0435\u0447\u0435\u0433\u043E." })) : null,
|
|
99
|
+
notConfiguredHint: (state) => state.extra.instances.length === 0 ? (_jsx("p", { className: "dsh-qa-integrations__hint", "data-testid": `${state.testIdZone}-not-configured`, children: "\u041E\u043F\u0435\u0440\u0430\u0442\u043E\u0440 \u043D\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0438\u043B \u043D\u0438 \u043E\u0434\u043D\u043E\u0433\u043E \u0438\u043D\u0441\u0442\u0430\u043D\u0441\u0430 GitLab, \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0442\u044C \u043D\u0435\u0447\u0435\u0433\u043E." })) : null,
|
|
98
100
|
});
|
|
99
101
|
}
|
|
100
102
|
//# sourceMappingURL=gitlab.js.map
|
package/lib/client/gitlab.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitlab.js","sourceRoot":"","sources":["../../src/client/gitlab.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"gitlab.js","sourceRoot":"","sources":["../../src/client/gitlab.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAQjC,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAwC9E,MAAM,UAAU,GAAqC;IACnD,oBAAoB,EAAE,iCAAiC;IACvD,iBAAiB,EAAE,sDAAsD;IACzE,wBAAwB,EACtB,0DAA0D;IAC5D,mBAAmB,EAAE,6CAA6C;IAClE,uBAAuB,EAAE,2BAA2B;IACpD,iBAAiB,EAAE,mDAAmD;IACtE,iBAAi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IACF,CACP,CAAC;QACJ,CAAC;QACD,iBAAiB,EAAE,CAAC,KAAK,EAAE,EAAE,CAC3B,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CACnC,YACE,SAAS,EAAC,2BAA2B,iBACxB,GAAG,KAAK,CAAC,UAAU,iBAAiB,6UAG/C,CACL,CAAC,CAAC,CAAC,IAAI;KACX,CAAC,CAAC;AACL,CAAC"}
|
package/lib/client/index.js
CHANGED
|
@@ -1,24 +1,31 @@
|
|
|
1
1
|
import qaIntegrationsRemote from "@yadsh/dsh-qa-integrations/remote";
|
|
2
|
-
import {
|
|
3
|
-
import { createIntegrationsHostTab } from "./card.js";
|
|
2
|
+
import { createIntegrationsCard } from "./card.js";
|
|
4
3
|
import { createIntegrationsPage, } from "./integrations.js";
|
|
5
|
-
import {
|
|
4
|
+
import { OperatorCardEntry } from "./operator-card.js";
|
|
6
5
|
import { styles } from "./styles.js";
|
|
7
6
|
import { QA_INTEGRATIONS_SETTINGS_NAMESPACE } from "../shared/settings.js";
|
|
8
7
|
export const inject = [
|
|
9
8
|
"remote",
|
|
10
9
|
"qaUserSettingsSections",
|
|
11
10
|
"qaUserSession",
|
|
12
|
-
"
|
|
11
|
+
"configForms",
|
|
13
12
|
"slots",
|
|
14
13
|
];
|
|
15
14
|
/**
|
|
16
|
-
* All three mounts of this one bundle: the operator card
|
|
17
|
-
*
|
|
18
|
-
* page of the signed-in user's QA settings dialog, where the account gate
|
|
19
|
-
* lives, and the
|
|
20
|
-
* reaches the same account through the `qaUserSession` service
|
|
21
|
-
*
|
|
15
|
+
* All three mounts of this one bundle: the operator card, which edits the
|
|
16
|
+
* plugin's own profile entry through the settings form the Host serves for it,
|
|
17
|
+
* the page of the signed-in user's QA settings dialog, where the account gate
|
|
18
|
+
* lives, and the account card the Plugins page shows on this bundle's own page,
|
|
19
|
+
* which reaches the same account through the `qaUserSession` service.
|
|
20
|
+
*
|
|
21
|
+
* The two panel cards draw the body only — the page supplies their frame, title
|
|
22
|
+
* and expand control. What they leave behind is the Settings *surface*: neither
|
|
23
|
+
* needs the settings directory (loopback-only, and the card keeps answering from
|
|
24
|
+
* a browser on the LAN) nor a tab of the Settings dialog. What neither can drop
|
|
25
|
+
* is the settings *service*: `configForms` is
|
|
26
|
+
* `@deepseek-ai/dsh-client-ui-settings`, which stays a peer, an injection and a
|
|
27
|
+
* documented dependency (`docs/COMPATIBILITY.md`) — a seat decides where the card
|
|
28
|
+
* renders, not which module hands it a form.
|
|
22
29
|
*/
|
|
23
30
|
export async function apply(ctx) {
|
|
24
31
|
const disposeRemote = await ctx.remote.$mount(qaIntegrationsRemote);
|
|
@@ -27,13 +34,13 @@ export async function apply(ctx) {
|
|
|
27
34
|
"remote.qaIntegrations",
|
|
28
35
|
"qaUserSettingsSections",
|
|
29
36
|
"qaUserSession",
|
|
30
|
-
"
|
|
37
|
+
"configForms",
|
|
31
38
|
"slots",
|
|
32
39
|
], (injected) => {
|
|
33
40
|
const face = injected;
|
|
34
41
|
let cancelled = false;
|
|
35
42
|
let removeSection;
|
|
36
|
-
let
|
|
43
|
+
let removeBundleCard;
|
|
37
44
|
face.effect(() => {
|
|
38
45
|
const style = document.createElement("style");
|
|
39
46
|
style.dataset.dshQaIntegrations = "styles";
|
|
@@ -41,19 +48,20 @@ export async function apply(ctx) {
|
|
|
41
48
|
document.head.append(style);
|
|
42
49
|
return () => style.remove();
|
|
43
50
|
}, "dsh-qa-integrations: styles");
|
|
44
|
-
// The operator card
|
|
45
|
-
//
|
|
46
|
-
// the
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
// The operator card edits this plugin's own entry, which the Host
|
|
52
|
+
// serves as soon as the entry exists — it does not wait for the Remote
|
|
53
|
+
// to describe the deployment, because an operator's first act may be
|
|
54
|
+
// enabling the plugin, and the card is the surface that does it.
|
|
55
|
+
const removeCard = face.configForms.whileServed([QA_INTEGRATIONS_SETTINGS_NAMESPACE], () => face.slots.inject("plugins.row.config", () => face.slots.register({
|
|
56
|
+
name: "plugins.row.config",
|
|
57
|
+
key: "@yadsh/dsh-qa-integrations#qa-integrations",
|
|
58
|
+
// The seat hands the page's own `ConfigPageForm` — `{ state,
|
|
59
|
+
// mutate }` only — so the card edits the full form this entry
|
|
60
|
+
// resolves, under a name the owner prop cannot overwrite.
|
|
51
61
|
inject: () => ({
|
|
52
|
-
|
|
53
|
-
namespace: QA_INTEGRATIONS_SETTINGS_NAMESPACE,
|
|
54
|
-
}),
|
|
62
|
+
settingsForm: face.configForms.get(QA_INTEGRATIONS_SETTINGS_NAMESPACE),
|
|
55
63
|
}),
|
|
56
|
-
});
|
|
64
|
+
}, OperatorCardEntry)));
|
|
57
65
|
void (async () => {
|
|
58
66
|
const description = await face.remote.qaIntegrations.describe();
|
|
59
67
|
if (cancelled || !description.ok || !description.value.enabled) {
|
|
@@ -66,19 +74,17 @@ export async function apply(ctx) {
|
|
|
66
74
|
order: 40,
|
|
67
75
|
component: createIntegrationsPage(face.remote.qaIntegrations, providers),
|
|
68
76
|
});
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
name: "
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
label: () => "Интеграции",
|
|
75
|
-
}, HostTab));
|
|
77
|
+
const BundleCard = createIntegrationsCard(face.remote.qaIntegrations, providers, face.qaUserSession);
|
|
78
|
+
removeBundleCard = face.slots.inject("plugins.bundle.config", () => face.slots.register({
|
|
79
|
+
name: "plugins.bundle.config",
|
|
80
|
+
key: "@yadsh/dsh-qa-integrations",
|
|
81
|
+
}, BundleCard));
|
|
76
82
|
})().catch(() => undefined);
|
|
77
83
|
return () => {
|
|
78
84
|
cancelled = true;
|
|
79
85
|
removeSection?.();
|
|
80
|
-
|
|
81
|
-
removeCard
|
|
86
|
+
removeBundleCard?.();
|
|
87
|
+
removeCard();
|
|
82
88
|
};
|
|
83
89
|
});
|
|
84
90
|
}
|
package/lib/client/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.tsx"],"names":[],"mappings":"AAQA,OAAO,oBAAoB,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.tsx"],"names":[],"mappings":"AAQA,OAAO,oBAAoB,MAAM,mCAAmC,CAAC;AAOrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EACL,sBAAsB,GAEvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,kCAAkC,EAAE,MAAM,uBAAuB,CAAC;AAsB3E,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,QAAQ;IACR,wBAAwB;IACxB,eAAe;IACf,aAAa;IACb,OAAO;CACC,CAAC;AAEX;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,KAAK,UAAU,KAAK,CAAC,GAAY;IACtC,MAAM,aAAa,GAAG,MAAO,GAAkB,CAAC,MAAM,CAAC,MAAM,CAC3D,oBAAoB,CACrB,CAAC;IACF,IAAI,CAAC;QACH,MAAM,GAAG,CAAC,MAAM,CACd;YACE,uBAAuB;YACvB,wBAAwB;YACxB,eAAe;YACf,aAAa;YACb,OAAO;SACR,EACD,CAAC,QAAQ,EAAE,EAAE;YACX,MAAM,IAAI,GAAG,QAAsB,CAAC;YACpC,IAAI,SAAS,GAAG,KAAK,CAAC;YACtB,IAAI,aAAuC,CAAC;YAC5C,IAAI,gBAA0C,CAAC;YAC/C,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE;gBACf,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;gBAC9C,KAAK,CAAC,OAAO,CAAC,iBAAiB,GAAG,QAAQ,CAAC;gBAC3C,KA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MAAM,CAAC,cAAc,EAC1B,SAAS,CACV;iBACF,CAAC,CAAC;gBACH,MAAM,UAAU,GAAG,sBAAsB,CACvC,IAAI,CAAC,MAAM,CAAC,cAAc,EAC1B,SAAS,EACT,IAAI,CAAC,aAAa,CACnB,CAAC;gBACF,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,uBAAuB,EAAE,GAAG,EAAE,CACjE,IAAI,CAAC,KAAK,CAAC,QAAQ,CACjB;oBACE,IAAI,EAAE,uBAAuB;oBAC7B,GAAG,EAAE,4BAA4B;iBAClC,EACD,UAAU,CACX,CACF,CAAC;YACJ,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;YAC5B,OAAO,GAAG,EAAE;gBACV,SAAS,GAAG,IAAI,CAAC;gBACjB,aAAa,EAAE,EAAE,CAAC;gBAClB,gBAAgB,EAAE,EAAE,CAAC;gBACrB,UAAU,EAAE,CAAC;YACf,CAAC,CAAC;QACJ,CAAC,CACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,aAAa,EAAE,CAAC;QACtB,MAAM,KAAK,CAAC;IACd,CAAC;IACD,OAAO,KAAK,IAAI,EAAE;QAChB,MAAM,aAAa,EAAE,CAAC;IACxB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -10,12 +10,16 @@ import { createWeblateCard } from "./weblate.js";
|
|
|
10
10
|
/** The disclosure that has to stand next to the credentials. */
|
|
11
11
|
export const INTEGRATIONS_DISCLOSURE = "Данные, которые агент читает через интеграцию, могут передаваться настроенному для этого чата LLM-провайдеру для выполнения запроса. Секрет подключения в модель не передаётся.";
|
|
12
12
|
/**
|
|
13
|
-
* Read the
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* Read the deployment once per mount: the provider cards and the credential
|
|
14
|
+
* help each one shows. Both are a display-only payload: when the call fails, or
|
|
15
|
+
* a provider declares no help, the cards render their plain credential fields —
|
|
16
|
+
* which is why nothing here may block the form.
|
|
16
17
|
*/
|
|
17
|
-
function
|
|
18
|
-
const [
|
|
18
|
+
function useDeploymentProviders(remote, token) {
|
|
19
|
+
const [state, setState] = useState(() => ({
|
|
20
|
+
helps: new Map(),
|
|
21
|
+
offered: undefined,
|
|
22
|
+
}));
|
|
19
23
|
// The remote proxy keeps one identity in practice, but the token is what
|
|
20
24
|
// decides when to read, so the call goes through a ref and stays the only
|
|
21
25
|
// dependency of the effect.
|
|
@@ -27,22 +31,26 @@ function useCredentialHelp(remote, token) {
|
|
|
27
31
|
const result = await remoteRef.current.providers(token);
|
|
28
32
|
if (cancelled || !result.ok)
|
|
29
33
|
return;
|
|
30
|
-
|
|
31
|
-
provider
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
setState({
|
|
35
|
+
helps: new Map(result.value.map((provider) => [
|
|
36
|
+
provider.id,
|
|
37
|
+
provider.credentialHelp,
|
|
38
|
+
])),
|
|
39
|
+
offered: result.value.map((provider) => provider.id),
|
|
40
|
+
});
|
|
34
41
|
})().catch(() => undefined);
|
|
35
42
|
return () => {
|
|
36
43
|
cancelled = true;
|
|
37
44
|
};
|
|
38
45
|
}, [token]);
|
|
39
|
-
return
|
|
46
|
+
return state;
|
|
40
47
|
}
|
|
41
48
|
/**
|
|
42
|
-
* One card per provider the deployment mounted. The list comes from the
|
|
43
|
-
* (`describe`),
|
|
44
|
-
* the
|
|
45
|
-
* shows comes from the
|
|
49
|
+
* One card per provider the deployment mounted. The starting list comes from the
|
|
50
|
+
* host (`describe`), and each mount re-reads what the service offers, so a
|
|
51
|
+
* provider the operator switched off stops rendering and the client carries no
|
|
52
|
+
* knowledge of which exist. The credential help each card shows comes from the
|
|
53
|
+
* same host, per provider.
|
|
46
54
|
*
|
|
47
55
|
* Both mounts share this component: the page of the QA settings dialog, where
|
|
48
56
|
* the account gate lives, and the host's plugin-configuration card.
|
|
@@ -56,16 +64,21 @@ export function createProviderCards(remote) {
|
|
|
56
64
|
const TestitCard = createTestitCard(remote);
|
|
57
65
|
const WeblateCard = createWeblateCard(remote);
|
|
58
66
|
return function ProviderCards({ token, providers }) {
|
|
59
|
-
const
|
|
60
|
-
const helpFor = (id) =>
|
|
61
|
-
|
|
67
|
+
const { helps, offered } = useDeploymentProviders(remote, token);
|
|
68
|
+
const helpFor = (id) => helps.get(id) ?? null;
|
|
69
|
+
// The list below is what the page was built from; `offered` is what the
|
|
70
|
+
// service still has. A provider the operator switches off stops rendering
|
|
71
|
+
// without waiting for the page to reload, and a read that has not answered
|
|
72
|
+
// keeps every card rather than blanking the forms.
|
|
73
|
+
const shown = (id) => providers.includes(id) && (offered === undefined || offered.includes(id));
|
|
74
|
+
return (_jsxs(_Fragment, { children: [shown("bitrix24") ? (_jsx(Bitrix24Card, { token: token, help: helpFor("bitrix24") })) : null, shown("confluence") ? (_jsx(ConfluenceCard, { token: token, help: helpFor("confluence") })) : null, shown("gitlab") ? (_jsx(GitlabCard, { token: token, help: helpFor("gitlab") })) : null, shown("teamcity") ? (_jsx(TeamcityCard, { token: token, help: helpFor("teamcity") })) : null, shown("jira") ? (_jsx(JiraCard, { token: token, help: helpFor("jira") })) : null, shown("testit") ? (_jsx(TestitCard, { token: token, help: helpFor("testit") })) : null, shown("weblate") ? (_jsx(WeblateCard, { token: token, help: helpFor("weblate") })) : null] }));
|
|
62
75
|
};
|
|
63
76
|
}
|
|
64
77
|
/** The `Интеграции` page of the signed-in user's QA settings dialog. */
|
|
65
78
|
export function createIntegrationsPage(remote, providers) {
|
|
66
79
|
const ProviderCards = createProviderCards(remote);
|
|
67
80
|
return function IntegrationsPage({ token }) {
|
|
68
|
-
return (_jsxs("section", { className: "dsh-qa-integrations", "aria-labelledby": "qa-integrations-title", children: [_jsxs("div", { children: [_jsx("h2", { id: "qa-integrations-title", className: "dsh-qa-integrations__heading", children: "\u0418\u043D\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438" }), _jsx("p", { className: "dsh-qa-integrations__lead", children: "\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u0441\u0432\u043E\u0438 \u0440\u0430\u0431\u043E\u0447\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044B. \u041A\u0430\u0436\u0434\u043E\u0435 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E \u0442\u043E\u043B\u044C\u043A\u043E \u0432\u0430\u0448\u0435\u043C\u0443 \u0430\u043A\u043A\u0430\u0443\u043D\u0442\u0443." })] }), _jsx(ProviderCards, { token: token, providers: providers }), _jsx("p", { className: "dsh-qa-integrations__notice", children: INTEGRATIONS_DISCLOSURE })] }));
|
|
81
|
+
return (_jsxs("section", { className: "dsh-qa-integrations", "data-testid": "qa-integrations-page", "aria-labelledby": "qa-integrations-title", children: [_jsxs("div", { children: [_jsx("h2", { id: "qa-integrations-title", className: "dsh-qa-integrations__heading", "data-testid": "qa-integrations-page-title", children: "\u0418\u043D\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438" }), _jsx("p", { className: "dsh-qa-integrations__lead", "data-testid": "qa-integrations-page-lead", children: "\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u0441\u0432\u043E\u0438 \u0440\u0430\u0431\u043E\u0447\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044B. \u041A\u0430\u0436\u0434\u043E\u0435 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E \u0442\u043E\u043B\u044C\u043A\u043E \u0432\u0430\u0448\u0435\u043C\u0443 \u0430\u043A\u043A\u0430\u0443\u043D\u0442\u0443." })] }), _jsx(ProviderCards, { token: token, providers: providers }), _jsx("p", { className: "dsh-qa-integrations__notice", "data-testid": "qa-integrations-page-disclosure", children: INTEGRATIONS_DISCLOSURE })] }));
|
|
69
82
|
};
|
|
70
83
|
}
|
|
71
84
|
//# sourceMappingURL=integrations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrations.js","sourceRoot":"","sources":["../../src/client/integrations.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEpD,OAAO,EACL,kBAAkB,GAGnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAyB,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAqB,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,cAAc,EAAmB,MAAM,WAAW,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAuB,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAqB,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAsB,MAAM,cAAc,CAAC;AA2BrE,gEAAgE;AAChE,MAAM,CAAC,MAAM,uBAAuB,GAClC,iLAAiL,CAAC;
|
|
1
|
+
{"version":3,"file":"integrations.js","sourceRoot":"","sources":["../../src/client/integrations.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEpD,OAAO,EACL,kBAAkB,GAGnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAyB,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAqB,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,cAAc,EAAmB,MAAM,WAAW,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAuB,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAqB,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAsB,MAAM,cAAc,CAAC;AA2BrE,gEAAgE;AAChE,MAAM,CAAC,MAAM,uBAAuB,GAClC,iLAAiL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8BAA8B,iBAC5B,4BAA4B,6EAGrC,EACL,YACE,SAAS,EAAC,2BAA2B,iBACzB,2BAA2B,kdAIrC,IACA,EACN,KAAC,aAAa,IAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,GAAI,EACrD,YACE,SAAS,EAAC,6BAA6B,iBAC3B,iCAAiC,YAE5C,uBAAuB,GACtB,IACI,CACX,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
package/lib/client/jira.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { CredentialHelpNote } from "
|
|
2
|
+
import { CredentialHelpNote } from "./credential-help-note.js";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { createProviderCard, serviceConnectOption } from "./provider-card.js";
|
|
5
5
|
const ERROR_COPY = {
|
|
@@ -25,6 +25,7 @@ const ERROR_COPY = {
|
|
|
25
25
|
};
|
|
26
26
|
export function createJiraCard(remote) {
|
|
27
27
|
return createProviderCard({
|
|
28
|
+
provider: "jira",
|
|
28
29
|
title: "Jira",
|
|
29
30
|
portalFallback: "Задачи, комментарии и вложения вашей Jira",
|
|
30
31
|
accountFallback: "Пользователь Jira",
|
|
@@ -102,6 +103,7 @@ export function createJiraCard(remote) {
|
|
|
102
103
|
: false;
|
|
103
104
|
},
|
|
104
105
|
credentialSection: (state, help) => {
|
|
106
|
+
const zone = state.testIdZone;
|
|
105
107
|
const { sites, siteId, email } = state.extra;
|
|
106
108
|
const configured = sites.length > 0;
|
|
107
109
|
if (!configured)
|
|
@@ -119,22 +121,22 @@ export function createJiraCard(remote) {
|
|
|
119
121
|
: undefined
|
|
120
122
|
: sites.find((site) => site.id === siteId);
|
|
121
123
|
const server = selected?.deploymentType === "server";
|
|
122
|
-
const sitePicker = needsChoice ? (_jsxs("label", { className: "dsh-qa-integrations__field", children: ["\u0421\u0430\u0439\u0442 Jira", _jsxs("select", { className: "dsh-qa-integrations__input", value: siteId, disabled: state.busy, onChange: (event) => state.extra.setSiteId(event.currentTarget.value), children: [_jsx("option", { value: "", children: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0430\u0439\u0442" }), sites.map((site) => (_jsx("option", { value: site.id, children: site.label }, site.id)))] })] })) : (_jsxs("span", { className: "dsh-qa-integrations__muted", children: ["\u0421\u0430\u0439\u0442: ", sites[0]?.label ?? "", " \u2014 \u0437\u0430\u0434\u0430\u043D \u043E\u043F\u0435\u0440\u0430\u0442\u043E\u0440\u043E\u043C \u0441\u0442\u0435\u043D\u0434\u0430"] }));
|
|
123
|
-
const deployment = (_jsxs("span", { className: "dsh-qa-integrations__muted", children: ["\u0420\u0430\u0437\u0432\u0451\u0440\u0442\u044B\u0432\u0430\u043D\u0438\u0435: ", server ? "Server / Data Center" : "Atlassian Cloud"] }));
|
|
124
|
+
const sitePicker = needsChoice ? (_jsxs("label", { className: "dsh-qa-integrations__field", "data-testid": `${zone}-instance-picker`, children: ["\u0421\u0430\u0439\u0442 Jira", _jsxs("select", { className: "dsh-qa-integrations__input", "data-testid": `${zone}-instance`, value: siteId, disabled: state.busy, onChange: (event) => state.extra.setSiteId(event.currentTarget.value), children: [_jsx("option", { value: "", children: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0430\u0439\u0442" }), sites.map((site) => (_jsx("option", { value: site.id, children: site.label }, site.id)))] })] })) : (_jsxs("span", { className: "dsh-qa-integrations__muted", "data-testid": `${zone}-instance-static`, children: ["\u0421\u0430\u0439\u0442: ", sites[0]?.label ?? "", " \u2014 \u0437\u0430\u0434\u0430\u043D \u043E\u043F\u0435\u0440\u0430\u0442\u043E\u0440\u043E\u043C \u0441\u0442\u0435\u043D\u0434\u0430"] }));
|
|
125
|
+
const deployment = (_jsxs("span", { className: "dsh-qa-integrations__muted", "data-testid": `${zone}-deployment`, children: ["\u0420\u0430\u0437\u0432\u0451\u0440\u0442\u044B\u0432\u0430\u043D\u0438\u0435: ", server ? "Server / Data Center" : "Atlassian Cloud"] }));
|
|
124
126
|
// With a managed credential there is nothing to paste: the host spends the
|
|
125
127
|
// deployment's token, so the form keeps the site picker and the checkbox
|
|
126
128
|
// and drops the e-mail and secret fields entirely.
|
|
127
129
|
if (state.useService) {
|
|
128
|
-
return (_jsxs("div", { className: "dsh-qa-integrations__section", children: [sitePicker, deployment, service, _jsxs("div", { className: "dsh-qa-integrations__actions", children: [_jsx("button", { className: "dsh-qa-integrations__button dsh-qa-integrations__button--primary", type: "button", disabled: state.busy || (needsChoice && siteId === ""), onClick: state.save, children: "\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0441\u0435\u0440\u0432\u0438\u0441\u043D\u044B\u0439 \u0442\u043E\u043A\u0435\u043D" }), state.connected ? (_jsx("button", { className: "dsh-qa-integrations__button", type: "button", disabled: state.busy, onClick: state.cancelCredential, children: "\u041E\u0442\u043C\u0435\u043D\u0430" })) : null] })] }));
|
|
130
|
+
return (_jsxs("div", { className: "dsh-qa-integrations__section", "data-testid": `${zone}-credential`, children: [sitePicker, deployment, service, _jsxs("div", { className: "dsh-qa-integrations__actions", children: [_jsx("button", { className: "dsh-qa-integrations__button dsh-qa-integrations__button--primary", type: "button", "data-testid": `${zone}-connect`, disabled: state.busy || (needsChoice && siteId === ""), onClick: state.save, children: "\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0441\u0435\u0440\u0432\u0438\u0441\u043D\u044B\u0439 \u0442\u043E\u043A\u0435\u043D" }), state.connected ? (_jsx("button", { className: "dsh-qa-integrations__button", type: "button", "data-testid": `${zone}-credential-cancel`, disabled: state.busy, onClick: state.cancelCredential, children: "\u041E\u0442\u043C\u0435\u043D\u0430" })) : null] })] }));
|
|
129
131
|
}
|
|
130
|
-
return (_jsxs("div", { className: "dsh-qa-integrations__section", children: [service, sitePicker, deployment, server ? null : (_jsxs("label", { className: "dsh-qa-integrations__field", children: ["\u0410\u043A\u043A\u0430\u0443\u043D\u0442 Atlassian (e-mail)", _jsx("input", { className: "dsh-qa-integrations__input", type: "email", autoComplete: "off", value: email, disabled: state.busy, onChange: (event) => state.extra.setEmail(event.currentTarget.value), placeholder: "ivan@example.com" })] })), _jsxs("label", { className: "dsh-qa-integrations__field", children: [server ? "Личный токен доступа (PAT)" : "API-токен Jira", _jsx("input", { className: "dsh-qa-integrations__input", type: "password", autoComplete: "new-password", value: state.credential, disabled: state.busy, onChange: (event) => state.setCredential(event.currentTarget.value), placeholder: server ? "Вставьте личный токен доступа" : "ATATT…" })] }), _jsx(CredentialHelpNote, { help: help }), _jsx("p", { className: "dsh-qa-integrations__hint", children: server
|
|
132
|
+
return (_jsxs("div", { className: "dsh-qa-integrations__section", "data-testid": `${zone}-credential`, children: [service, sitePicker, deployment, server ? null : (_jsxs("label", { className: "dsh-qa-integrations__field", "data-testid": `${zone}-account-field`, children: ["\u0410\u043A\u043A\u0430\u0443\u043D\u0442 Atlassian (e-mail)", _jsx("input", { className: "dsh-qa-integrations__input", "data-testid": `${zone}-account`, type: "email", autoComplete: "off", value: email, disabled: state.busy, onChange: (event) => state.extra.setEmail(event.currentTarget.value), placeholder: "ivan@example.com" })] })), _jsxs("label", { className: "dsh-qa-integrations__field", "data-testid": `${zone}-credential-field`, children: [server ? "Личный токен доступа (PAT)" : "API-токен Jira", _jsx("input", { className: "dsh-qa-integrations__input", "data-testid": `${zone}-credential-input`, type: "password", autoComplete: "new-password", value: state.credential, disabled: state.busy, onChange: (event) => state.setCredential(event.currentTarget.value), placeholder: server ? "Вставьте личный токен доступа" : "ATATT…" })] }), _jsx(CredentialHelpNote, { help: help }), _jsx("p", { className: "dsh-qa-integrations__hint", "data-testid": `${zone}-credential-hint`, children: server
|
|
131
133
|
? "Токен хранится в зашифрованном виде и после сохранения не отображается."
|
|
132
|
-
: "Токен и e-mail хранятся в зашифрованном виде и после сохранения не отображаются." }), _jsxs("div", { className: "dsh-qa-integrations__actions", children: [_jsx("button", { className: "dsh-qa-integrations__button dsh-qa-integrations__button--primary", type: "button", disabled: state.busy ||
|
|
134
|
+
: "Токен и e-mail хранятся в зашифрованном виде и после сохранения не отображаются." }), _jsxs("div", { className: "dsh-qa-integrations__actions", children: [_jsx("button", { className: "dsh-qa-integrations__button dsh-qa-integrations__button--primary", type: "button", "data-testid": `${zone}-connect`, disabled: state.busy ||
|
|
133
135
|
state.credential.trim() === "" ||
|
|
134
136
|
(!server && email.trim() === "") ||
|
|
135
|
-
(needsChoice && siteId === ""), onClick: state.save, children: "\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u0438 \u043F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C" }), state.connected ? (_jsx("button", { className: "dsh-qa-integrations__button", type: "button", disabled: state.busy, onClick: state.cancelCredential, children: "\u041E\u0442\u043C\u0435\u043D\u0430" })) : null] })] }));
|
|
137
|
+
(needsChoice && siteId === ""), onClick: state.save, children: "\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u0438 \u043F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C" }), state.connected ? (_jsx("button", { className: "dsh-qa-integrations__button", type: "button", "data-testid": `${zone}-credential-cancel`, disabled: state.busy, onClick: state.cancelCredential, children: "\u041E\u0442\u043C\u0435\u043D\u0430" })) : null] })] }));
|
|
136
138
|
},
|
|
137
|
-
notConfiguredHint: () => (_jsx("p", { className: "dsh-qa-integrations__hint", children: "\u041E\u043F\u0435\u0440\u0430\u0442\u043E\u0440 \u043D\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0438\u043B \u043D\u0438 \u043E\u0434\u043D\u043E\u0433\u043E \u0441\u0430\u0439\u0442\u0430 Jira, \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0442\u044C \u043D\u0435\u0447\u0435\u0433\u043E. \u0410\u0434\u0440\u0435\u0441\u0430 \u0441\u0430\u0439\u0442\u043E\u0432 \u0437\u0430\u0434\u0430\u044E\u0442\u0441\u044F \u0432 \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044B\u0432\u0430\u043D\u0438\u044F." })),
|
|
139
|
+
notConfiguredHint: (state) => state.extra.sites.length === 0 ? (_jsx("p", { className: "dsh-qa-integrations__hint", "data-testid": `${state.testIdZone}-not-configured`, children: "\u041E\u043F\u0435\u0440\u0430\u0442\u043E\u0440 \u043D\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0438\u043B \u043D\u0438 \u043E\u0434\u043D\u043E\u0433\u043E \u0441\u0430\u0439\u0442\u0430 Jira, \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0442\u044C \u043D\u0435\u0447\u0435\u0433\u043E. \u0410\u0434\u0440\u0435\u0441\u0430 \u0441\u0430\u0439\u0442\u043E\u0432 \u0437\u0430\u0434\u0430\u044E\u0442\u0441\u044F \u0432 \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044B\u0432\u0430\u043D\u0438\u044F." })) : null,
|
|
138
140
|
});
|
|
139
141
|
}
|
|
140
142
|
//# sourceMappingURL=jira.js.map
|