@cobaltcore-dev/aurora 0.23.0 → 1.0.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/dist/client/App.d.ts +1 -1
- package/dist/client/{AuthProvider-CQ6Yppoh.mjs → AuthProvider-5TyZKZkx.mjs} +3 -3
- package/dist/client/AuthProvider-5TyZKZkx.mjs.map +1 -0
- package/dist/client/{ContentHeader-9KZdhOoA.mjs → ContentHeader-D64NtKvo.mjs} +26 -25
- package/dist/client/ContentHeader-D64NtKvo.mjs.map +1 -0
- package/dist/client/DeleteFlavorModal-C2K43ABZ.mjs +732 -0
- package/dist/client/DeleteFlavorModal-C2K43ABZ.mjs.map +1 -0
- package/dist/client/DeletePcaModal-D9v8E0Ki.mjs +92 -0
- package/dist/client/DeletePcaModal-D9v8E0Ki.mjs.map +1 -0
- package/dist/client/DetailsInfo-h7rPJ4Jf.mjs +61 -0
- package/dist/client/DetailsInfo-h7rPJ4Jf.mjs.map +1 -0
- package/dist/client/FiltersInput-Bw8TFfwb.mjs +82 -0
- package/dist/client/FiltersInput-Bw8TFfwb.mjs.map +1 -0
- package/dist/client/{FloatingIpActionModals-BcceUHcg.mjs → FloatingIpActionModals-BfEDfYg9.mjs} +66 -66
- package/dist/client/{FloatingIpActionModals-BcceUHcg.mjs.map → FloatingIpActionModals-BfEDfYg9.mjs.map} +1 -1
- package/dist/client/ImageToastNotifications-C0Tluzq-.mjs +1125 -0
- package/dist/client/ImageToastNotifications-C0Tluzq-.mjs.map +1 -0
- package/dist/client/{RouteError-Rm08PcxN.mjs → RouteError-B-NPGIv7.mjs} +2 -2
- package/dist/client/{RouteError-Rm08PcxN.mjs.map → RouteError-B-NPGIv7.mjs.map} +1 -1
- package/dist/client/Slot-CWb612-_.mjs.map +1 -1
- package/dist/client/{SortInput-D_q_jDfe.mjs → SortInput-DysAXpB3.mjs} +6 -6
- package/dist/client/{SortInput-D_q_jDfe.mjs.map → SortInput-DysAXpB3.mjs.map} +1 -1
- package/dist/client/{StatusError-2ZU1gFpu.mjs → StatusError-DX-GvLjq.mjs} +8 -8
- package/dist/client/{StatusError-2ZU1gFpu.mjs.map → StatusError-DX-GvLjq.mjs.map} +1 -1
- package/dist/client/TwoColumnDescriptionList-B3xunXmz.mjs +22 -0
- package/dist/client/TwoColumnDescriptionList-B3xunXmz.mjs.map +1 -0
- package/dist/client/{_auth-D5_QNUos.mjs → _auth-R5H2yKFf.mjs} +2 -2
- package/dist/client/_auth-R5H2yKFf.mjs.map +1 -0
- package/dist/client/_flavorId-Dit5mM8I.mjs +210 -0
- package/dist/client/_flavorId-Dit5mM8I.mjs.map +1 -0
- package/dist/client/{_flavorId-CFmkmg2Y.mjs → _flavorId-Zj7LNL-R.mjs} +4 -4
- package/dist/client/{_flavorId-CFmkmg2Y.mjs.map → _flavorId-Zj7LNL-R.mjs.map} +1 -1
- package/dist/client/_floatingIpId-B0MCoqE3.mjs +215 -0
- package/dist/client/_floatingIpId-B0MCoqE3.mjs.map +1 -0
- package/dist/client/{_floatingIpId-Dzh6_JCI.mjs → _floatingIpId-DCQQpNO-.mjs} +4 -4
- package/dist/client/{_floatingIpId-Dzh6_JCI.mjs.map → _floatingIpId-DCQQpNO-.mjs.map} +1 -1
- package/dist/client/_imageId-CZYzBAVx.mjs +558 -0
- package/dist/client/_imageId-CZYzBAVx.mjs.map +1 -0
- package/dist/client/_pcaId-CHRRsWmO.mjs +605 -0
- package/dist/client/_pcaId-CHRRsWmO.mjs.map +1 -0
- package/dist/client/{_projectId-DNZsNxJw.mjs → _projectId-B8wWSxPu.mjs} +9 -9
- package/dist/client/_projectId-B8wWSxPu.mjs.map +1 -0
- package/dist/client/{_projectId-BuBIFdgG.mjs → _projectId-C5DUYIjt.mjs} +117 -117
- package/dist/client/{_projectId-BuBIFdgG.mjs.map → _projectId-C5DUYIjt.mjs.map} +1 -1
- package/dist/client/{_projectId-CAQkJHZ4.mjs → _projectId-D2pFfYIs.mjs} +3 -3
- package/dist/client/{_projectId-CAQkJHZ4.mjs.map → _projectId-D2pFfYIs.mjs.map} +1 -1
- package/dist/client/{_projectId-D-b7paXE.mjs → _projectId-DhSWowQo.mjs} +4 -4
- package/dist/client/{_projectId-D-b7paXE.mjs.map → _projectId-DhSWowQo.mjs.map} +1 -1
- package/dist/client/{_securityGroupId-DFdNKa2l.mjs → _securityGroupId-DZ4D4WwB.mjs} +635 -617
- package/dist/client/_securityGroupId-DZ4D4WwB.mjs.map +1 -0
- package/dist/client/{_securityGroupId-DRkY3Gt6.mjs → _securityGroupId-Mj8NJT2-.mjs} +4 -4
- package/dist/client/{_securityGroupId-DRkY3Gt6.mjs.map → _securityGroupId-Mj8NJT2-.mjs.map} +1 -1
- package/dist/client/_storageType-C-9bNkmZ.mjs +2211 -0
- package/dist/client/_storageType-C-9bNkmZ.mjs.map +1 -0
- package/dist/client/_storageType-zeSZe--V.mjs.map +1 -1
- package/dist/client/{about-C8tTrQaW.mjs → about-WLyShNgE.mjs} +8 -8
- package/dist/client/about-WLyShNgE.mjs.map +1 -0
- package/dist/client/assets/objectDownload.worker-BXFQIIU_.js.map +1 -0
- package/dist/client/assets/objectDownload.worker-ECvFtmOF.js.map +1 -0
- package/dist/client/{aurora-jyvXcI4T.mjs → aurora-IMO9HhqJ.mjs} +2 -2
- package/dist/client/aurora-IMO9HhqJ.mjs.map +1 -0
- package/dist/client/{build-CRLQyqu2.mjs → build-DnD-T35u.mjs} +8180 -8212
- package/dist/client/build-DnD-T35u.mjs.map +1 -0
- package/dist/client/components/Auth/LoginForm.d.ts +1 -1
- package/dist/client/components/Auth/SessionExpirationTimer.d.ts +1 -1
- package/dist/client/components/ContentHeader/ContentHeader.d.ts +1 -1
- package/dist/client/components/Error/RouteError.d.ts +1 -1
- package/dist/client/components/Error/StatusError.d.ts +1 -1
- package/dist/client/components/JsonEditor.d.ts +1 -1
- package/dist/client/components/ListToolbar/FiltersInput.d.ts +3 -1
- package/dist/client/components/ListToolbar/SelectedFilters.d.ts +1 -1
- package/dist/client/components/ListToolbar/index.d.ts +1 -1
- package/dist/client/components/ProjectView/ProjectInfoBox.d.ts +1 -1
- package/dist/client/components/Slot.d.ts +1 -1
- package/dist/client/components/TwoColumnDescriptionList.d.ts +11 -0
- package/dist/client/components/navigation/LanguageSelect.d.ts +1 -1
- package/dist/client/components/navigation/MainNavigation.d.ts +1 -1
- package/dist/client/components/navigation/UserMenu.d.ts +1 -1
- package/dist/client/{flavors-Dy-2mRGv.mjs → flavors-Cp0LEGOH.mjs} +2 -2
- package/dist/client/{flavors-Dy-2mRGv.mjs.map → flavors-Cp0LEGOH.mjs.map} +1 -1
- package/dist/client/{flavors-BfTXqmoD.mjs → flavors-CwMbDRHm2.mjs} +203 -201
- package/dist/client/flavors-CwMbDRHm2.mjs.map +1 -0
- package/dist/client/flavors-DWMZ6TuJ.mjs.map +1 -1
- package/dist/client/floatingips-ICwo-rV_.mjs +591 -0
- package/dist/client/floatingips-ICwo-rV_.mjs.map +1 -0
- package/dist/client/formatBytes-CZv_XyCY.mjs.map +1 -1
- package/dist/client/helpers-1PpYf-fC.mjs.map +1 -1
- package/dist/client/hooks/useAvailableViewportHeight.d.ts +33 -0
- package/dist/client/hooks/useVirtualizedTableBody.d.ts +37 -0
- package/dist/client/{hooks-Bw3sHHOg.mjs → hooks-CrriowRk.mjs} +2 -2
- package/dist/client/{hooks-Bw3sHHOg.mjs.map → hooks-CrriowRk.mjs.map} +1 -1
- package/dist/client/images-DOGZmr3D.mjs +1937 -0
- package/dist/client/images-DOGZmr3D.mjs.map +1 -0
- package/dist/client/{images-DPKUXryV.mjs → images-DWiM_72I.mjs} +2 -2
- package/dist/client/{images-DPKUXryV.mjs.map → images-DWiM_72I.mjs.map} +1 -1
- package/dist/client/images-NBf2bV43.mjs.map +1 -1
- package/dist/client/index.js +601 -445
- package/dist/client/index.js.map +1 -1
- package/dist/client/{md-CyCflQee.mjs → md-DNzcRhmz.mjs} +6 -60
- package/dist/client/{md-CyCflQee.mjs.map → md-DNzcRhmz.mjs.map} +1 -1
- package/dist/client/network-DuZm76BZ.mjs.map +1 -1
- package/dist/client/objects-D2MKUCxc.mjs +56 -0
- package/dist/client/objects-D2MKUCxc.mjs.map +1 -0
- package/dist/client/objects-DI1-tnKr.mjs +56 -0
- package/dist/client/objects-DI1-tnKr.mjs.map +1 -0
- package/dist/client/objects-DeK2WD5K.mjs +10078 -0
- package/dist/client/objects-DeK2WD5K.mjs.map +1 -0
- package/dist/client/pca-BokFv4Gz.mjs +239 -0
- package/dist/client/pca-BokFv4Gz.mjs.map +1 -0
- package/dist/client/{pca-D0kKxHp4.mjs → pca-D5jHAl0b.mjs} +4 -3
- package/dist/client/{pca-D0kKxHp4.mjs.map → pca-D5jHAl0b.mjs.map} +1 -1
- package/dist/client/projects-yiK0HGSA.mjs.map +1 -1
- package/dist/client/routeInfo-CdTRlSxv.mjs.map +1 -1
- package/dist/client/{routes-CtfnI-aY.mjs → routes-B05u5bk4.mjs} +2 -2
- package/dist/client/{routes-CtfnI-aY.mjs.map → routes-B05u5bk4.mjs.map} +1 -1
- package/dist/client/{routes-BOf-GDMM.mjs → routes-DOJr5onJ.mjs} +31 -28
- package/dist/client/routes-DOJr5onJ.mjs.map +1 -0
- package/dist/client/{securitygroups-DRhFle2O.mjs → securitygroups-Be2Qgmew.mjs} +201 -195
- package/dist/client/securitygroups-Be2Qgmew.mjs.map +1 -0
- package/dist/client/{securitygroups-B8aLyFK7.mjs → securitygroups-_7SYN2jN.mjs} +2 -2
- package/dist/client/{securitygroups-B8aLyFK7.mjs.map → securitygroups-_7SYN2jN.mjs.map} +1 -1
- package/dist/client/store/AuthProvider.d.ts +1 -1
- package/dist/client/{trpcClient-Di56hpVv.mjs → trpcClient-D7gpR7YG.mjs} +2 -2
- package/dist/client/{trpcClient-Di56hpVv.mjs.map → trpcClient-D7gpR7YG.mjs.map} +1 -1
- package/dist/client/trpcClient.d.ts +125 -11
- package/dist/client/useModal-DCs1OJh7.mjs.map +1 -1
- package/dist/client/{useSecurityGroupPermissions-BPS1ibWq.mjs → useSecurityGroupPermissions-qPwm4mFt.mjs} +15 -15
- package/dist/client/{useSecurityGroupPermissions-BPS1ibWq.mjs.map → useSecurityGroupPermissions-qPwm4mFt.mjs.map} +1 -1
- package/dist/server/index.d.ts +125 -11
- package/dist/server/index.js +4142 -2845
- package/package.json +8 -8
- package/dist/client/AuthProvider-CQ6Yppoh.mjs.map +0 -1
- package/dist/client/BucketToastNotifications-BhPi4WWw.mjs +0 -613
- package/dist/client/BucketToastNotifications-BhPi4WWw.mjs.map +0 -1
- package/dist/client/ContentHeader-9KZdhOoA.mjs.map +0 -1
- package/dist/client/DeleteFlavorModal-Be2qZo4w.mjs +0 -713
- package/dist/client/DeleteFlavorModal-Be2qZo4w.mjs.map +0 -1
- package/dist/client/DeletePcaModal-CIFsGWyj.mjs +0 -80
- package/dist/client/DeletePcaModal-CIFsGWyj.mjs.map +0 -1
- package/dist/client/DetailsInfo-CHVD7d-W.mjs +0 -52
- package/dist/client/DetailsInfo-CHVD7d-W.mjs.map +0 -1
- package/dist/client/FiltersInput-DqT08Ib-.mjs +0 -81
- package/dist/client/FiltersInput-DqT08Ib-.mjs.map +0 -1
- package/dist/client/ImageToastNotifications-BGyX2J6j.mjs +0 -1219
- package/dist/client/ImageToastNotifications-BGyX2J6j.mjs.map +0 -1
- package/dist/client/_auth-D5_QNUos.mjs.map +0 -1
- package/dist/client/_flavorId-BsmqS9hP.mjs +0 -194
- package/dist/client/_flavorId-BsmqS9hP.mjs.map +0 -1
- package/dist/client/_floatingIpId-Bb9ZEJ6b.mjs +0 -228
- package/dist/client/_floatingIpId-Bb9ZEJ6b.mjs.map +0 -1
- package/dist/client/_imageId-C3As7sHE.mjs +0 -534
- package/dist/client/_imageId-C3As7sHE.mjs.map +0 -1
- package/dist/client/_pcaId-n0q0aDb6.mjs +0 -545
- package/dist/client/_pcaId-n0q0aDb6.mjs.map +0 -1
- package/dist/client/_projectId-DNZsNxJw.mjs.map +0 -1
- package/dist/client/_securityGroupId-DFdNKa2l.mjs.map +0 -1
- package/dist/client/_storageType-BKfQcpgp.mjs +0 -81
- package/dist/client/_storageType-BKfQcpgp.mjs.map +0 -1
- package/dist/client/_storageType-sMj9NEJz.mjs +0 -2870
- package/dist/client/_storageType-sMj9NEJz.mjs.map +0 -1
- package/dist/client/about-C8tTrQaW.mjs.map +0 -1
- package/dist/client/assets/objectDownload.worker-BAc5Au4B.js.map +0 -1
- package/dist/client/aurora-jyvXcI4T.mjs.map +0 -1
- package/dist/client/build-CRLQyqu2.mjs.map +0 -1
- package/dist/client/flavors-BfTXqmoD.mjs.map +0 -1
- package/dist/client/floatingips-zhNK6Xxn.mjs +0 -562
- package/dist/client/floatingips-zhNK6Xxn.mjs.map +0 -1
- package/dist/client/images-DhZnqUG_.mjs +0 -1890
- package/dist/client/images-DhZnqUG_.mjs.map +0 -1
- package/dist/client/objects-BG1saVLZ.mjs +0 -6648
- package/dist/client/objects-BG1saVLZ.mjs.map +0 -1
- package/dist/client/objects-Dahys529.mjs +0 -103
- package/dist/client/objects-Dahys529.mjs.map +0 -1
- package/dist/client/objects-o2Cj_ndZ.mjs +0 -8
- package/dist/client/objects-o2Cj_ndZ.mjs.map +0 -1
- package/dist/client/pca-B60iWWfG.mjs +0 -251
- package/dist/client/pca-B60iWWfG.mjs.map +0 -1
- package/dist/client/routes-BOf-GDMM.mjs.map +0 -1
- package/dist/client/securitygroups-DRhFle2O.mjs.map +0 -1
- package/dist/client/useListWithFiltering-aPTUNRaW.mjs +0 -32
- package/dist/client/useListWithFiltering-aPTUNRaW.mjs.map +0 -1
|
@@ -0,0 +1,605 @@
|
|
|
1
|
+
import { B as e, C as t, D as n, E as r, G as i, I as a, S as o, Y as s, Z as c, _ as l, a as u, at as d, b as f, c as p, ct as m, dt as h, k as g, m as _, n as v, rt as y, s as b, t as x } from "./build-DnD-T35u.mjs";
|
|
2
|
+
import { a as S } from "./trpcClient-D7gpR7YG.mjs";
|
|
3
|
+
import { n as C, t as w } from "./DetailsInfo-h7rPJ4Jf.mjs";
|
|
4
|
+
import { t as T } from "./useProjectId-DBc5lpoU.mjs";
|
|
5
|
+
import "./hooks-CrriowRk.mjs";
|
|
6
|
+
import { t as E } from "./useModal-DCs1OJh7.mjs";
|
|
7
|
+
import { n as D, t as O } from "./DeletePcaModal-D9v8E0Ki.mjs";
|
|
8
|
+
import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
|
|
9
|
+
import { Fragment as M, useRef as N, useState as P } from "react";
|
|
10
|
+
import { useNavigate as F } from "@tanstack/react-router";
|
|
11
|
+
import { useQuery as I } from "@tanstack/react-query";
|
|
12
|
+
import { Trans as L, useLingui as R } from "@lingui/react";
|
|
13
|
+
import { z } from "zod";
|
|
14
|
+
import { useForm as B, useStore as V } from "@tanstack/react-form";
|
|
15
|
+
import "reflect-metadata";
|
|
16
|
+
import { Pkcs10CertificateRequest as H, SubjectAlternativeNameExtension as ee, X509Certificate as U } from "@peculiar/x509";
|
|
17
|
+
//#region src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/-components/-modals/parseCsrInfo.ts
|
|
18
|
+
var W = (e) => {
|
|
19
|
+
let t = e.replace(/\\n/g, "\n").trim();
|
|
20
|
+
return t.includes("-----BEGIN") && !t.includes("\n") ? t.replace("-----BEGIN CERTIFICATE REQUEST-----", "-----BEGIN CERTIFICATE REQUEST-----\n").replace("-----END CERTIFICATE REQUEST-----", "\n-----END CERTIFICATE REQUEST-----") : t;
|
|
21
|
+
}, te = /-----BEGIN CERTIFICATE-----[\s\S]*?-----END CERTIFICATE-----/g, G = (e) => {
|
|
22
|
+
let t = e.match(te);
|
|
23
|
+
if (!t || t.join("").replace(/\s/g, "") !== e.replace(/\s/g, "")) throw Error("Invalid PEM certificate chain");
|
|
24
|
+
return t.map((e) => new U(e));
|
|
25
|
+
}, K = (e) => {
|
|
26
|
+
let t = e, n = e.name.toUpperCase(), r = e.name;
|
|
27
|
+
return [
|
|
28
|
+
"RSASSA-PKCS1-V1_5",
|
|
29
|
+
"RSA-PSS",
|
|
30
|
+
"RSA-OAEP"
|
|
31
|
+
].includes(n) ? r = "RSA" : ["ECDSA", "ECDH"].includes(n) ? r = "EC" : ["ED25519", "EDDSA"].includes(n) && (r = "EdDSA"), typeof t.modulusLength == "number" ? `${r} ${t.modulusLength}-bit` : typeof t.namedCurve == "string" ? `${r} (${t.namedCurve})` : r;
|
|
32
|
+
}, q = (e) => {
|
|
33
|
+
if (!e) return "—";
|
|
34
|
+
let t = e.hash?.name ? ` with ${e.hash.name}` : "";
|
|
35
|
+
return `${e.name}${t}`;
|
|
36
|
+
}, J = (e) => {
|
|
37
|
+
let t = W(e), n = [];
|
|
38
|
+
if (t.includes("-----BEGIN CERTIFICATE-----")) {
|
|
39
|
+
let [e] = G(t);
|
|
40
|
+
return n.push({
|
|
41
|
+
label: "Subject Information",
|
|
42
|
+
value: e.subject || "—"
|
|
43
|
+
}), n.push({
|
|
44
|
+
label: "Public Key Algorithm",
|
|
45
|
+
value: K(e.publicKey.algorithm)
|
|
46
|
+
}), n.push({
|
|
47
|
+
label: "Signature Algorithm",
|
|
48
|
+
value: q(e.signatureAlgorithm)
|
|
49
|
+
}), n.push({
|
|
50
|
+
label: "Subject Alternative Names (SAN)",
|
|
51
|
+
value: Y(e.extensions)
|
|
52
|
+
}), n.push({
|
|
53
|
+
label: "Certificate Chain Size",
|
|
54
|
+
value: `${new TextEncoder().encode(t).byteLength} bytes`
|
|
55
|
+
}), n;
|
|
56
|
+
}
|
|
57
|
+
let r = new H(t);
|
|
58
|
+
return n.push({
|
|
59
|
+
label: "Subject Information",
|
|
60
|
+
value: r.subject || "—"
|
|
61
|
+
}), r.publicKey && n.push({
|
|
62
|
+
label: "Public Key Algorithm",
|
|
63
|
+
value: K(r.publicKey.algorithm)
|
|
64
|
+
}), n.push({
|
|
65
|
+
label: "Signature Algorithm",
|
|
66
|
+
value: q(r.signatureAlgorithm)
|
|
67
|
+
}), n.push({
|
|
68
|
+
label: "Subject Alternative Names (SAN)",
|
|
69
|
+
value: Y(r.extensions)
|
|
70
|
+
}), n;
|
|
71
|
+
}, Y = (e) => {
|
|
72
|
+
let t = e.find((e) => e.type === "2.5.29.17");
|
|
73
|
+
return t && new ee(t.rawData).names.items.map((e) => `${e.type}: ${e.value}`).join(", ") || "—";
|
|
74
|
+
}, X = (e) => {
|
|
75
|
+
try {
|
|
76
|
+
let t = W(e);
|
|
77
|
+
return !t.includes("-----BEGIN CERTIFICATE-----") && (new H(t), !0);
|
|
78
|
+
} catch {
|
|
79
|
+
return !1;
|
|
80
|
+
}
|
|
81
|
+
}, Z = (e) => {
|
|
82
|
+
try {
|
|
83
|
+
return G(W(e)), !0;
|
|
84
|
+
} catch {
|
|
85
|
+
return !1;
|
|
86
|
+
}
|
|
87
|
+
}, Q = ({ csrCode: e }) => {
|
|
88
|
+
let t = e.trim().length > 0, { data: r } = I({
|
|
89
|
+
queryKey: ["parsed-certificate-info", e],
|
|
90
|
+
queryFn: async () => J(e),
|
|
91
|
+
enabled: t,
|
|
92
|
+
retry: !1
|
|
93
|
+
}), i = r ?? [];
|
|
94
|
+
return i.length ? /*#__PURE__*/ A(p, {
|
|
95
|
+
alignTerms: "right",
|
|
96
|
+
className: "mt-4 w-full",
|
|
97
|
+
children: i.map(({ label: e, value: t }) => /*#__PURE__*/ j(M, { children: [/*#__PURE__*/ A(v, {
|
|
98
|
+
className: "text-pretty",
|
|
99
|
+
children: e
|
|
100
|
+
}), /*#__PURE__*/ A(n, { children: t })] }, e))
|
|
101
|
+
}) : null;
|
|
102
|
+
}, ne = ({ open: e, onClose: t, pcaId: n }) => {
|
|
103
|
+
let { i18n: r, _: o } = R(), c = T(), l = S.useUtils(), [f, p] = P(null), g = z.object({ imported_certificate_chain: z.string().trim().min(1).refine(Z, r._({ id: "TUjabl" })) }), { isPending: v, ...y } = S.services.pca.import.useMutation({ onSettled: () => l.services.pca.getById.invalidate({
|
|
104
|
+
project_id: c,
|
|
105
|
+
certificate_authority_id: n
|
|
106
|
+
}) }), b = B({
|
|
107
|
+
defaultValues: { imported_certificate_chain: "" },
|
|
108
|
+
validators: {
|
|
109
|
+
onChange: g,
|
|
110
|
+
onSubmit: g
|
|
111
|
+
},
|
|
112
|
+
onSubmit: async ({ value: e }) => {
|
|
113
|
+
await y.mutateAsync({
|
|
114
|
+
project_id: c,
|
|
115
|
+
certificate_authority_id: n,
|
|
116
|
+
imported_certificate_chain: e.imported_certificate_chain
|
|
117
|
+
});
|
|
118
|
+
let { message: t, ...r } = D();
|
|
119
|
+
d.success(t, r), x();
|
|
120
|
+
}
|
|
121
|
+
}), x = () => {
|
|
122
|
+
v || (b.reset(), p(null), y.reset(), t());
|
|
123
|
+
}, C = N(null), w = V(b.store, (e) => e.values.imported_certificate_chain);
|
|
124
|
+
return /*#__PURE__*/ j(s, {
|
|
125
|
+
open: e,
|
|
126
|
+
size: "large",
|
|
127
|
+
title: r._({ id: "+1rTEL" }),
|
|
128
|
+
onCancel: x,
|
|
129
|
+
cancelButtonLabel: r._({ id: "dEgA5A" }),
|
|
130
|
+
confirmButtonLabel: r._({ id: "tfDRzk" }),
|
|
131
|
+
onConfirm: b.handleSubmit,
|
|
132
|
+
disableConfirmButton: v || !w.trim() || !b.state.canSubmit,
|
|
133
|
+
children: [
|
|
134
|
+
y.error && /*#__PURE__*/ A(a, {
|
|
135
|
+
dismissible: !1,
|
|
136
|
+
variant: "error",
|
|
137
|
+
className: "mb-4",
|
|
138
|
+
children: y.error.message
|
|
139
|
+
}),
|
|
140
|
+
f && /*#__PURE__*/ A(a, {
|
|
141
|
+
dismissible: !1,
|
|
142
|
+
variant: "error",
|
|
143
|
+
className: "mb-4",
|
|
144
|
+
children: f
|
|
145
|
+
}),
|
|
146
|
+
v && /*#__PURE__*/ j("div", {
|
|
147
|
+
className: "mb-4 flex items-center justify-center gap-2",
|
|
148
|
+
children: [/*#__PURE__*/ A(i, { variant: "primary" }), /*#__PURE__*/ A("span", {
|
|
149
|
+
className: "text-theme-high text-sm",
|
|
150
|
+
children: /*#__PURE__*/ A(L, { id: "pYR76U" })
|
|
151
|
+
})]
|
|
152
|
+
}),
|
|
153
|
+
!v && /*#__PURE__*/ A(h, {
|
|
154
|
+
className: "mb-0",
|
|
155
|
+
id: "import-externally-signed-certificate-form",
|
|
156
|
+
onSubmit: (e) => {
|
|
157
|
+
e.preventDefault(), b.handleSubmit();
|
|
158
|
+
},
|
|
159
|
+
children: /*#__PURE__*/ j(_, { children: [
|
|
160
|
+
/*#__PURE__*/ j("div", {
|
|
161
|
+
className: "mb-2",
|
|
162
|
+
children: [/*#__PURE__*/ A(u, {
|
|
163
|
+
onClick: () => C.current?.click(),
|
|
164
|
+
children: r._({ id: "E7kdtm" })
|
|
165
|
+
}), /*#__PURE__*/ A("input", {
|
|
166
|
+
ref: C,
|
|
167
|
+
type: "file",
|
|
168
|
+
accept: ".json",
|
|
169
|
+
className: "sr-only",
|
|
170
|
+
onChange: (e) => {
|
|
171
|
+
let t = e.target.files?.[0];
|
|
172
|
+
if (!t) return;
|
|
173
|
+
if (p(null), !t.name.toLowerCase().endsWith(".json")) {
|
|
174
|
+
p(r._({ id: "FucIRH" })), e.target.value = "";
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
let n = new FileReader();
|
|
178
|
+
n.onload = (e) => {
|
|
179
|
+
let t = e.target?.result;
|
|
180
|
+
try {
|
|
181
|
+
let e = JSON.parse(t);
|
|
182
|
+
if (typeof e?.imported_certificate_chain != "string") throw Error(r._({ id: "2ULlt3" }));
|
|
183
|
+
let n = e.imported_certificate_chain;
|
|
184
|
+
b.setFieldValue("imported_certificate_chain", n), C.current && (C.current.value = "");
|
|
185
|
+
} catch (e) {
|
|
186
|
+
p(e instanceof Error ? e.message : r._({ id: "wYlEDy" })), b.setFieldValue("imported_certificate_chain", "");
|
|
187
|
+
}
|
|
188
|
+
}, n.readAsText(t);
|
|
189
|
+
}
|
|
190
|
+
})]
|
|
191
|
+
}),
|
|
192
|
+
/*#__PURE__*/ A(b.Field, {
|
|
193
|
+
name: "imported_certificate_chain",
|
|
194
|
+
children: (e) => /*#__PURE__*/ A(m, {
|
|
195
|
+
id: e.name,
|
|
196
|
+
name: e.name,
|
|
197
|
+
value: e.state.value,
|
|
198
|
+
onBlur: e.handleBlur,
|
|
199
|
+
onChange: (t) => {
|
|
200
|
+
let n = t.target.value;
|
|
201
|
+
e.handleChange(n), p(null);
|
|
202
|
+
},
|
|
203
|
+
placeholder: r._({ id: "FAA/qW" }),
|
|
204
|
+
errortext: e.state.meta.errors.map((e) => e?.message).join(", "),
|
|
205
|
+
disabled: v
|
|
206
|
+
})
|
|
207
|
+
}),
|
|
208
|
+
/*#__PURE__*/ A(Q, { csrCode: w })
|
|
209
|
+
] })
|
|
210
|
+
})
|
|
211
|
+
]
|
|
212
|
+
});
|
|
213
|
+
}, re = ({ open: e, onClose: t, pcaId: n }) => {
|
|
214
|
+
let { i18n: r, _: o } = R(), c = F(), l = T(), u = S.useUtils(), { isPending: d, ...f } = S.services.pca.createCertificate.useMutation({ onSettled: () => u.services.pca.listCertificates.invalidate() }), p = z.object({ csr: z.string().trim().min(1).refine(X, r._({ id: "5HK1ka" })) }), g = B({
|
|
215
|
+
defaultValues: { csr: "" },
|
|
216
|
+
validators: {
|
|
217
|
+
onChange: p,
|
|
218
|
+
onSubmit: p
|
|
219
|
+
},
|
|
220
|
+
onSubmit: async ({ value: e }) => {
|
|
221
|
+
let t = await f.mutateAsync({
|
|
222
|
+
project_id: l,
|
|
223
|
+
certificate_authority_id: n,
|
|
224
|
+
csr: e.csr.replace(/\\n/g, "\n"),
|
|
225
|
+
configuration: { validity: { not_after: Math.floor(Date.now() / 1e3) + 28800 } }
|
|
226
|
+
});
|
|
227
|
+
v(), await c({
|
|
228
|
+
to: "/projects/$projectId/services/pca/$pcaId/$certificateId",
|
|
229
|
+
params: {
|
|
230
|
+
projectId: l,
|
|
231
|
+
pcaId: n,
|
|
232
|
+
certificateId: t.id
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
}), v = () => {
|
|
237
|
+
d || (g.reset(), f.reset(), t());
|
|
238
|
+
}, y = V(g.store, (e) => e.values.csr);
|
|
239
|
+
return /*#__PURE__*/ j(s, {
|
|
240
|
+
open: e,
|
|
241
|
+
size: "large",
|
|
242
|
+
title: r._({ id: "9kDPaB" }),
|
|
243
|
+
onCancel: v,
|
|
244
|
+
cancelButtonLabel: r._({ id: "dEgA5A" }),
|
|
245
|
+
confirmButtonLabel: r._({ id: "tfDRzk" }),
|
|
246
|
+
onConfirm: g.handleSubmit,
|
|
247
|
+
disableConfirmButton: d || !y.trim() || !g.state.canSubmit,
|
|
248
|
+
children: [
|
|
249
|
+
f.error && /*#__PURE__*/ A(a, {
|
|
250
|
+
dismissible: !1,
|
|
251
|
+
variant: "error",
|
|
252
|
+
className: "mb-4",
|
|
253
|
+
children: f.error.message
|
|
254
|
+
}),
|
|
255
|
+
d && /*#__PURE__*/ j("div", {
|
|
256
|
+
className: "mb-4 flex items-center justify-center gap-2",
|
|
257
|
+
children: [/*#__PURE__*/ A(i, { variant: "primary" }), /*#__PURE__*/ A("span", {
|
|
258
|
+
className: "text-theme-high text-sm",
|
|
259
|
+
children: /*#__PURE__*/ A(L, { id: "NG+FZC" })
|
|
260
|
+
})]
|
|
261
|
+
}),
|
|
262
|
+
!d && /*#__PURE__*/ A(h, {
|
|
263
|
+
className: "mb-0",
|
|
264
|
+
id: "issue-end-entity-certificate-form",
|
|
265
|
+
onSubmit: (e) => {
|
|
266
|
+
e.preventDefault(), g.handleSubmit();
|
|
267
|
+
},
|
|
268
|
+
children: /*#__PURE__*/ j(_, { children: [/*#__PURE__*/ A(g.Field, {
|
|
269
|
+
name: "csr",
|
|
270
|
+
children: (e) => /*#__PURE__*/ A(m, {
|
|
271
|
+
id: e.name,
|
|
272
|
+
name: e.name,
|
|
273
|
+
value: e.state.value,
|
|
274
|
+
onBlur: e.handleBlur,
|
|
275
|
+
onChange: (t) => e.handleChange(t.target.value),
|
|
276
|
+
placeholder: r._({ id: "h6JDtI" }),
|
|
277
|
+
errortext: e.state.meta.errors.map((e) => e?.message).join(", "),
|
|
278
|
+
disabled: d
|
|
279
|
+
})
|
|
280
|
+
}), /*#__PURE__*/ A(Q, { csrCode: y })] })
|
|
281
|
+
})
|
|
282
|
+
]
|
|
283
|
+
});
|
|
284
|
+
}, ie = 86400, $ = ({ open: e, onClose: t, pca: n }) => {
|
|
285
|
+
let { i18n: r, _: o } = R(), c = T(), l = S.useUtils(), { isPending: u, ...d } = S.services.pca.createCertificate.useMutation({ onSettled: () => {
|
|
286
|
+
l.services.pca.listCertificates.invalidate(), l.services.pca.getById.invalidate({
|
|
287
|
+
project_id: c,
|
|
288
|
+
certificate_authority_id: n.id
|
|
289
|
+
});
|
|
290
|
+
} });
|
|
291
|
+
return /*#__PURE__*/ j(s, {
|
|
292
|
+
open: e,
|
|
293
|
+
title: r._({ id: "AirKNZ" }),
|
|
294
|
+
onCancel: () => {
|
|
295
|
+
u || (d.reset(), t());
|
|
296
|
+
},
|
|
297
|
+
cancelButtonLabel: r._({ id: "dEgA5A" }),
|
|
298
|
+
confirmButtonLabel: r._({ id: "rx4T2i" }),
|
|
299
|
+
onConfirm: async () => {
|
|
300
|
+
u || !n.csr || (await d.mutateAsync({
|
|
301
|
+
project_id: c,
|
|
302
|
+
certificate_authority_id: n.id,
|
|
303
|
+
csr: n.csr,
|
|
304
|
+
configuration: { validity: { not_after: Math.floor(Date.now() / 1e3) + ie } }
|
|
305
|
+
}), t());
|
|
306
|
+
},
|
|
307
|
+
disableConfirmButton: u || !n.csr,
|
|
308
|
+
children: [d.error && /*#__PURE__*/ A(a, {
|
|
309
|
+
dismissible: !1,
|
|
310
|
+
variant: "error",
|
|
311
|
+
className: "mb-4",
|
|
312
|
+
children: d.error?.message
|
|
313
|
+
}), u ? /*#__PURE__*/ j("div", {
|
|
314
|
+
className: "flex items-center justify-center gap-2",
|
|
315
|
+
children: [/*#__PURE__*/ A(i, { variant: "primary" }), /*#__PURE__*/ A("span", {
|
|
316
|
+
className: "text-theme-high text-sm",
|
|
317
|
+
children: /*#__PURE__*/ A(L, { id: "1DbiGM" })
|
|
318
|
+
})]
|
|
319
|
+
}) : /*#__PURE__*/ A(L, { id: "MI6aae" })]
|
|
320
|
+
});
|
|
321
|
+
}, ae = ({ certificate: e }) => {
|
|
322
|
+
let { i18n: t, _: n } = R(), i = F(), a = () => i({
|
|
323
|
+
from: "/projects/$projectId/services/pca/$pcaId/",
|
|
324
|
+
to: "$certificateId",
|
|
325
|
+
params: (t) => ({
|
|
326
|
+
...t,
|
|
327
|
+
certificateId: e.id
|
|
328
|
+
})
|
|
329
|
+
});
|
|
330
|
+
return /*#__PURE__*/ j(r, {
|
|
331
|
+
"data-testid": `pca-certificate-row-${e.id}`,
|
|
332
|
+
onClick: a,
|
|
333
|
+
children: [
|
|
334
|
+
/*#__PURE__*/ A(x, { children: e.certificate_authority_id }),
|
|
335
|
+
/*#__PURE__*/ A(x, { children: e.id }),
|
|
336
|
+
/*#__PURE__*/ A(x, {
|
|
337
|
+
onClick: (e) => e.stopPropagation(),
|
|
338
|
+
className: "items-end pr-0",
|
|
339
|
+
children: /*#__PURE__*/ A(g, { children: /*#__PURE__*/ A(l, { children: /*#__PURE__*/ A(o, {
|
|
340
|
+
label: t._({ id: "v0hPHE" }),
|
|
341
|
+
onClick: a
|
|
342
|
+
}) }) })
|
|
343
|
+
})
|
|
344
|
+
]
|
|
345
|
+
}, e.id);
|
|
346
|
+
}, oe = 50, se = ({ pca: n }) => {
|
|
347
|
+
let { i18n: a, _: o } = R(), s = T(), [l, d] = E(!1), [f, p] = E(!1), [m, h] = P([void 0]), [g, _] = P(1), v = m[g - 1], { data: C, isLoading: w, isError: D, error: O } = S.services.pca.listCertificates.useQuery({
|
|
348
|
+
project_id: s,
|
|
349
|
+
certificate_authority_id: n.id,
|
|
350
|
+
limit: oe,
|
|
351
|
+
next_page_marker: v
|
|
352
|
+
}), M = C?.certificates ?? [], N = C?.next_page_marker, F = N ? g + 1 : g, I = Math.max(F, m.length), z = (e) => {
|
|
353
|
+
e < 1 || e > I || (e > g && N && h((t) => {
|
|
354
|
+
let n = [...t];
|
|
355
|
+
return n[e - 1] = N, n;
|
|
356
|
+
}), _(e));
|
|
357
|
+
};
|
|
358
|
+
if (w) return /*#__PURE__*/ j(c, {
|
|
359
|
+
className: "py-8",
|
|
360
|
+
distribution: "center",
|
|
361
|
+
alignment: "center",
|
|
362
|
+
direction: "vertical",
|
|
363
|
+
children: [/*#__PURE__*/ A(i, {
|
|
364
|
+
variant: "primary",
|
|
365
|
+
size: "large",
|
|
366
|
+
className: "mb-2"
|
|
367
|
+
}), /*#__PURE__*/ A(L, { id: "T9o/az" })]
|
|
368
|
+
});
|
|
369
|
+
if (D) return /*#__PURE__*/ A(c, {
|
|
370
|
+
className: "py-8",
|
|
371
|
+
distribution: "center",
|
|
372
|
+
alignment: "center",
|
|
373
|
+
direction: "vertical",
|
|
374
|
+
children: O?.message ?? a._({ id: "hz9da7" })
|
|
375
|
+
});
|
|
376
|
+
let B = [
|
|
377
|
+
a._({ id: "c1OE1x" }),
|
|
378
|
+
a._({ id: "S0kLOH" }),
|
|
379
|
+
""
|
|
380
|
+
], V = B.length;
|
|
381
|
+
return /*#__PURE__*/ j("div", {
|
|
382
|
+
className: "relative",
|
|
383
|
+
children: [/*#__PURE__*/ j(c, {
|
|
384
|
+
className: "pt-3 pb-2",
|
|
385
|
+
distribution: "end",
|
|
386
|
+
children: [n.state === "READY" && /*#__PURE__*/ j(k, { children: [/*#__PURE__*/ A(u, {
|
|
387
|
+
variant: "primary",
|
|
388
|
+
label: a._({ id: "9kDPaB" }),
|
|
389
|
+
onClick: d
|
|
390
|
+
}), l && /*#__PURE__*/ A(re, {
|
|
391
|
+
open: l,
|
|
392
|
+
onClose: d,
|
|
393
|
+
pcaId: n.id
|
|
394
|
+
})] }), n.state === "AWAITING_CERTIFICATE" && /*#__PURE__*/ j(k, { children: [/*#__PURE__*/ A(u, {
|
|
395
|
+
variant: "primary",
|
|
396
|
+
label: a._({ id: "AirKNZ" }),
|
|
397
|
+
onClick: p
|
|
398
|
+
}), f && /*#__PURE__*/ A($, {
|
|
399
|
+
pca: n,
|
|
400
|
+
open: f,
|
|
401
|
+
onClose: p
|
|
402
|
+
})] })]
|
|
403
|
+
}), M.length === 0 && g === 1 ? /*#__PURE__*/ A(b, {
|
|
404
|
+
columns: V,
|
|
405
|
+
className: "pca-certificates",
|
|
406
|
+
"data-testid": "no-pcas-certificates",
|
|
407
|
+
children: /*#__PURE__*/ A(r, { children: /*#__PURE__*/ j(x, {
|
|
408
|
+
colSpan: V,
|
|
409
|
+
children: [/*#__PURE__*/ A(y, { children: /*#__PURE__*/ A(L, { id: "kNeZrV" }) }), /*#__PURE__*/ A("p", { children: /*#__PURE__*/ A(L, { id: "7huC4O" }) })]
|
|
410
|
+
}) })
|
|
411
|
+
}) : /*#__PURE__*/ j(k, { children: [/*#__PURE__*/ j(b, {
|
|
412
|
+
columns: V,
|
|
413
|
+
children: [/*#__PURE__*/ A(r, { children: B.map((e) => /*#__PURE__*/ A(t, { children: e }, e)) }), M.map((e) => /*#__PURE__*/ A(ae, { certificate: e }, e.id))]
|
|
414
|
+
}), I > 1 && /*#__PURE__*/ A("div", {
|
|
415
|
+
className: "flex justify-center py-4",
|
|
416
|
+
children: /*#__PURE__*/ A(e, {
|
|
417
|
+
variant: "input",
|
|
418
|
+
currentPage: g,
|
|
419
|
+
pages: I,
|
|
420
|
+
onPressPrevious: () => z(g - 1),
|
|
421
|
+
onPressNext: () => z(g + 1)
|
|
422
|
+
})
|
|
423
|
+
})] })]
|
|
424
|
+
});
|
|
425
|
+
}, ce = ({ pca: e }) => {
|
|
426
|
+
let { i18n: t, _: n } = R(), r = F(), a = T(), [o, s] = E(!1), [l, d] = E(!1), p = e.configuration?.subject?.named_attributes?.cn ?? t._({ id: "Ef7StM" }), m = () => r({
|
|
427
|
+
to: "/projects/$projectId/services/pca",
|
|
428
|
+
params: { projectId: a }
|
|
429
|
+
}), h = [
|
|
430
|
+
{
|
|
431
|
+
label: t._({ id: "c1OE1x" }),
|
|
432
|
+
value: e.id
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
label: t._({ id: "mSfwLL" }),
|
|
436
|
+
value: e.project_id
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
label: t._({ id: "QGFuw+" }),
|
|
440
|
+
value: e.display_subject
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
label: t._({ id: "UbWeJA" }),
|
|
444
|
+
value: e.certificate?.validity.not_before !== void 0 && e.certificate?.validity.not_after !== void 0 ? `${Math.round((e.certificate.validity.not_after - e.certificate.validity.not_before) / 86400)} days` : void 0
|
|
445
|
+
}
|
|
446
|
+
], g = {
|
|
447
|
+
CREATING: /*#__PURE__*/ A(f, {
|
|
448
|
+
variant: "info",
|
|
449
|
+
children: /*#__PURE__*/ j(c, {
|
|
450
|
+
direction: "horizontal",
|
|
451
|
+
gap: "1",
|
|
452
|
+
alignment: "center",
|
|
453
|
+
children: [/*#__PURE__*/ A(i, { size: "18" }), " Creating"]
|
|
454
|
+
})
|
|
455
|
+
}),
|
|
456
|
+
AWAITING_CERTIFICATE: /*#__PURE__*/ A(f, {
|
|
457
|
+
icon: "accessTime",
|
|
458
|
+
variant: "warning",
|
|
459
|
+
text: t._({ id: "mB4LB4" })
|
|
460
|
+
}),
|
|
461
|
+
READY: /*#__PURE__*/ A(f, {
|
|
462
|
+
icon: "checkCircle",
|
|
463
|
+
variant: "success",
|
|
464
|
+
text: t._({ id: "ckH3fT" })
|
|
465
|
+
}),
|
|
466
|
+
FAILED: /*#__PURE__*/ A(f, {
|
|
467
|
+
icon: "error",
|
|
468
|
+
variant: "error",
|
|
469
|
+
text: t._({ id: "7Bj3x9" })
|
|
470
|
+
})
|
|
471
|
+
};
|
|
472
|
+
return /*#__PURE__*/ j(k, { children: [
|
|
473
|
+
/*#__PURE__*/ j(c, {
|
|
474
|
+
direction: "vertical",
|
|
475
|
+
gap: "3",
|
|
476
|
+
children: [
|
|
477
|
+
/*#__PURE__*/ j(c, {
|
|
478
|
+
direction: "horizontal",
|
|
479
|
+
distribution: "between",
|
|
480
|
+
children: [/*#__PURE__*/ j(c, {
|
|
481
|
+
gap: "2",
|
|
482
|
+
alignment: "center",
|
|
483
|
+
children: [/*#__PURE__*/ A("div", {
|
|
484
|
+
className: "text-theme-default text-2xl font-semibold",
|
|
485
|
+
children: `${p} Certificate Authority Details`
|
|
486
|
+
}), g[e.state]]
|
|
487
|
+
}), /*#__PURE__*/ A(u, {
|
|
488
|
+
onClick: d,
|
|
489
|
+
children: /*#__PURE__*/ A(L, { id: "Blsc/x" })
|
|
490
|
+
})]
|
|
491
|
+
}),
|
|
492
|
+
/*#__PURE__*/ A("p", {
|
|
493
|
+
className: "text-theme-highest text-sm",
|
|
494
|
+
children: /*#__PURE__*/ A(L, { id: "dxMaZH" })
|
|
495
|
+
}),
|
|
496
|
+
e.state === "AWAITING_CERTIFICATE" && /*#__PURE__*/ j(c, {
|
|
497
|
+
direction: "vertical",
|
|
498
|
+
gap: "1",
|
|
499
|
+
className: "bg-dt-background mb-1 rounded-sm p-2",
|
|
500
|
+
children: [/*#__PURE__*/ j(c, {
|
|
501
|
+
direction: "vertical",
|
|
502
|
+
gap: "1",
|
|
503
|
+
children: [/*#__PURE__*/ A("div", {
|
|
504
|
+
className: "text-base font-bold",
|
|
505
|
+
children: /*#__PURE__*/ A(L, { id: "cUKFby" })
|
|
506
|
+
}), /*#__PURE__*/ A("div", { children: /*#__PURE__*/ A(L, { id: "+HVj+D" }) })]
|
|
507
|
+
}), /*#__PURE__*/ A(c, {
|
|
508
|
+
direction: "horizontal",
|
|
509
|
+
gap: "2",
|
|
510
|
+
distribution: "end",
|
|
511
|
+
children: /*#__PURE__*/ A(u, {
|
|
512
|
+
onClick: s,
|
|
513
|
+
children: /*#__PURE__*/ A(L, { id: "3uDz8n" })
|
|
514
|
+
})
|
|
515
|
+
})]
|
|
516
|
+
}),
|
|
517
|
+
/*#__PURE__*/ A(w, {
|
|
518
|
+
basicInfo: h,
|
|
519
|
+
heading: `Certificate ${p}`,
|
|
520
|
+
content: e.certificate?.pem ?? e.csr ?? "",
|
|
521
|
+
fileName: `${p}.pem`
|
|
522
|
+
})
|
|
523
|
+
]
|
|
524
|
+
}),
|
|
525
|
+
o && /*#__PURE__*/ A(ne, {
|
|
526
|
+
pcaId: e.id,
|
|
527
|
+
open: o,
|
|
528
|
+
onClose: s
|
|
529
|
+
}),
|
|
530
|
+
l && /*#__PURE__*/ A(O, {
|
|
531
|
+
pca: e,
|
|
532
|
+
open: l,
|
|
533
|
+
onClose: d,
|
|
534
|
+
onSuccess: m
|
|
535
|
+
}),
|
|
536
|
+
/*#__PURE__*/ A(se, { pca: e })
|
|
537
|
+
] });
|
|
538
|
+
};
|
|
539
|
+
//#endregion
|
|
540
|
+
//#region src/client/routes/_auth/projects/$projectId/services/pca/$pcaId/index.tsx?tsr-split=component
|
|
541
|
+
function le() {
|
|
542
|
+
let e = F(), t = T(), { pcaId: n } = C.useParams(), { isLoading: r, isError: a, error: o, data: s } = S.services.pca.getById.useQuery({
|
|
543
|
+
project_id: t,
|
|
544
|
+
certificate_authority_id: n
|
|
545
|
+
});
|
|
546
|
+
if (r) return /*#__PURE__*/ j(c, {
|
|
547
|
+
className: "fixed inset-0",
|
|
548
|
+
distribution: "center",
|
|
549
|
+
alignment: "center",
|
|
550
|
+
direction: "vertical",
|
|
551
|
+
children: [/*#__PURE__*/ A(i, {
|
|
552
|
+
variant: "primary",
|
|
553
|
+
size: "large",
|
|
554
|
+
className: "mb-2"
|
|
555
|
+
}), /*#__PURE__*/ A(L, { id: "og1m+J" })]
|
|
556
|
+
});
|
|
557
|
+
let l = () => e({
|
|
558
|
+
to: "/projects/$projectId/services/pca",
|
|
559
|
+
params: { projectId: t }
|
|
560
|
+
});
|
|
561
|
+
if (a) {
|
|
562
|
+
let e = o?.message || "Unknown error";
|
|
563
|
+
return /*#__PURE__*/ j(c, {
|
|
564
|
+
className: "fixed inset-0",
|
|
565
|
+
distribution: "center",
|
|
566
|
+
alignment: "center",
|
|
567
|
+
direction: "vertical",
|
|
568
|
+
gap: "5",
|
|
569
|
+
children: [
|
|
570
|
+
/*#__PURE__*/ A("p", {
|
|
571
|
+
className: "text-theme-error font-semibold",
|
|
572
|
+
children: /*#__PURE__*/ A(L, { id: "IQSLN+" })
|
|
573
|
+
}),
|
|
574
|
+
/*#__PURE__*/ A("p", {
|
|
575
|
+
className: "text-theme-highest",
|
|
576
|
+
children: e
|
|
577
|
+
}),
|
|
578
|
+
/*#__PURE__*/ A(u, {
|
|
579
|
+
onClick: l,
|
|
580
|
+
variant: "primary",
|
|
581
|
+
children: /*#__PURE__*/ A(L, { id: "HG0uMz" })
|
|
582
|
+
})
|
|
583
|
+
]
|
|
584
|
+
});
|
|
585
|
+
}
|
|
586
|
+
return s ? /*#__PURE__*/ A(ce, { pca: s }) : /*#__PURE__*/ j(c, {
|
|
587
|
+
className: "fixed inset-0",
|
|
588
|
+
distribution: "center",
|
|
589
|
+
alignment: "center",
|
|
590
|
+
direction: "vertical",
|
|
591
|
+
gap: "5",
|
|
592
|
+
children: [/*#__PURE__*/ A("p", {
|
|
593
|
+
className: "text-theme-secondary",
|
|
594
|
+
children: /*#__PURE__*/ A(L, { id: "Io2Dvq" })
|
|
595
|
+
}), /*#__PURE__*/ A(u, {
|
|
596
|
+
onClick: l,
|
|
597
|
+
variant: "primary",
|
|
598
|
+
children: /*#__PURE__*/ A(L, { id: "HG0uMz" })
|
|
599
|
+
})]
|
|
600
|
+
});
|
|
601
|
+
}
|
|
602
|
+
//#endregion
|
|
603
|
+
export { le as component };
|
|
604
|
+
|
|
605
|
+
//# sourceMappingURL=_pcaId-CHRRsWmO.mjs.map
|