@replicated/portal-components 0.0.21 → 0.0.22
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/components/metadata/registry.json +2 -2
- package/components/metadata/registry.md +2 -2
- package/dist/actions/change-team.js +39 -0
- package/dist/actions/change-team.js.map +1 -1
- package/dist/actions/index.d.mts +1 -1
- package/dist/actions/index.d.ts +1 -1
- package/dist/actions/index.js +40 -0
- package/dist/actions/index.js.map +1 -1
- package/dist/actions/install-actions.d.mts +1 -1
- package/dist/actions/install-actions.d.ts +1 -1
- package/dist/actions/install-actions.js +39 -0
- package/dist/actions/install-actions.js.map +1 -1
- package/dist/actions/service-account.d.mts +1 -1
- package/dist/actions/service-account.d.ts +1 -1
- package/dist/actions/service-account.js +39 -0
- package/dist/actions/service-account.js.map +1 -1
- package/dist/actions/support-bundles.d.mts +1 -1
- package/dist/actions/support-bundles.d.ts +1 -1
- package/dist/actions/support-bundles.js +39 -0
- package/dist/actions/support-bundles.js.map +1 -1
- package/dist/actions/team-settings.d.mts +1 -1
- package/dist/actions/team-settings.d.ts +1 -1
- package/dist/actions/team-settings.js +39 -0
- package/dist/actions/team-settings.js.map +1 -1
- package/dist/actions/trial-signup.js +39 -0
- package/dist/actions/trial-signup.js.map +1 -1
- package/dist/actions/user-settings.d.mts +1 -1
- package/dist/actions/user-settings.d.ts +1 -1
- package/dist/actions/user-settings.js +39 -0
- package/dist/actions/user-settings.js.map +1 -1
- package/dist/airgap-instances.d.mts +1 -1
- package/dist/airgap-instances.d.ts +1 -1
- package/dist/airgap-instances.js +3 -2
- package/dist/airgap-instances.js.map +1 -1
- package/dist/esm/actions/change-team.js +39 -0
- package/dist/esm/actions/change-team.js.map +1 -1
- package/dist/esm/actions/index.js +40 -1
- package/dist/esm/actions/index.js.map +1 -1
- package/dist/esm/actions/install-actions.js +39 -0
- package/dist/esm/actions/install-actions.js.map +1 -1
- package/dist/esm/actions/service-account.js +39 -0
- package/dist/esm/actions/service-account.js.map +1 -1
- package/dist/esm/actions/support-bundles.js +39 -0
- package/dist/esm/actions/support-bundles.js.map +1 -1
- package/dist/esm/actions/team-settings.js +39 -0
- package/dist/esm/actions/team-settings.js.map +1 -1
- package/dist/esm/actions/trial-signup.js +39 -0
- package/dist/esm/actions/trial-signup.js.map +1 -1
- package/dist/esm/actions/user-settings.js +39 -0
- package/dist/esm/actions/user-settings.js.map +1 -1
- package/dist/esm/airgap-instances.js +3 -2
- package/dist/esm/airgap-instances.js.map +1 -1
- package/dist/esm/helm-install-wizard.js +414 -189
- package/dist/esm/helm-install-wizard.js.map +1 -1
- package/dist/esm/index.js +89 -64
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/install-actions.js +39 -0
- package/dist/esm/install-actions.js.map +1 -1
- package/dist/esm/instance-card.js +2 -1
- package/dist/esm/instance-card.js.map +1 -1
- package/dist/esm/license-details.js +39 -0
- package/dist/esm/license-details.js.map +1 -1
- package/dist/esm/linux-install-wizard.js +310 -166
- package/dist/esm/linux-install-wizard.js.map +1 -1
- package/dist/esm/logout-action.js +187 -0
- package/dist/esm/logout-action.js.map +1 -0
- package/dist/esm/logout-button.js +32 -0
- package/dist/esm/logout-button.js.map +1 -0
- package/dist/esm/markdown-renderer.js +16 -0
- package/dist/esm/markdown-renderer.js.map +1 -0
- package/dist/esm/middleware.js +3 -3
- package/dist/esm/middleware.js.map +1 -1
- package/dist/esm/online-instance-list.js +3 -2
- package/dist/esm/online-instance-list.js.map +1 -1
- package/dist/esm/saml-callback-client.js +5 -2
- package/dist/esm/saml-callback-client.js.map +1 -1
- package/dist/esm/saml-handlers.js +104 -0
- package/dist/esm/saml-handlers.js.map +1 -1
- package/dist/esm/support-bundle-collection-card.js +3 -2
- package/dist/esm/support-bundle-collection-card.js.map +1 -1
- package/dist/esm/support-bundles-card.js +2 -2
- package/dist/esm/support-bundles-card.js.map +1 -1
- package/dist/esm/support-card.js +39 -0
- package/dist/esm/support-card.js.map +1 -1
- package/dist/esm/top-nav-menu-close.js +46 -0
- package/dist/esm/top-nav-menu-close.js.map +1 -0
- package/dist/esm/top-nav.js +149 -59
- package/dist/esm/top-nav.js.map +1 -1
- package/dist/esm/trial-signup.js +6 -3
- package/dist/esm/trial-signup.js.map +1 -1
- package/dist/esm/update-layout.js +149 -59
- package/dist/esm/update-layout.js.map +1 -1
- package/dist/esm/upload-support-bundle-modal.js +2 -2
- package/dist/esm/upload-support-bundle-modal.js.map +1 -1
- package/dist/esm/user-menu-dropdown.js +52 -0
- package/dist/esm/user-menu-dropdown.js.map +1 -0
- package/dist/esm/user-settings.js +5 -5
- package/dist/esm/user-settings.js.map +1 -1
- package/dist/esm/utils/index.js +39 -0
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/helm-install-wizard.d.mts +18 -7
- package/dist/helm-install-wizard.d.ts +18 -7
- package/dist/helm-install-wizard.js +418 -189
- package/dist/helm-install-wizard.js.map +1 -1
- package/dist/{index-sMbq94M7.d.ts → index-DXy7RxOX.d.ts} +18 -1
- package/dist/{index-DyzJ0yKD.d.mts → index-JX9-CIMA.d.mts} +18 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +89 -64
- package/dist/index.js.map +1 -1
- package/dist/install-actions.d.mts +2 -2
- package/dist/install-actions.d.ts +2 -2
- package/dist/install-actions.js +39 -0
- package/dist/install-actions.js.map +1 -1
- package/dist/instance-card.d.mts +1 -1
- package/dist/instance-card.d.ts +1 -1
- package/dist/instance-card.js +2 -1
- package/dist/instance-card.js.map +1 -1
- package/dist/license-details.js +39 -0
- package/dist/license-details.js.map +1 -1
- package/dist/linux-install-wizard.d.mts +17 -7
- package/dist/linux-install-wizard.d.ts +17 -7
- package/dist/linux-install-wizard.js +314 -166
- package/dist/linux-install-wizard.js.map +1 -1
- package/dist/logout-action.d.mts +7 -0
- package/dist/logout-action.d.ts +7 -0
- package/dist/logout-action.js +189 -0
- package/dist/logout-action.js.map +1 -0
- package/dist/logout-button.d.mts +16 -0
- package/dist/logout-button.d.ts +16 -0
- package/dist/logout-button.js +34 -0
- package/dist/logout-button.js.map +1 -0
- package/dist/markdown-renderer.d.mts +12 -0
- package/dist/markdown-renderer.d.ts +12 -0
- package/dist/markdown-renderer.js +22 -0
- package/dist/markdown-renderer.js.map +1 -0
- package/dist/middleware.js +3 -3
- package/dist/middleware.js.map +1 -1
- package/dist/online-instance-list.d.mts +1 -1
- package/dist/online-instance-list.d.ts +1 -1
- package/dist/online-instance-list.js +3 -2
- package/dist/online-instance-list.js.map +1 -1
- package/dist/pending-installations.d.mts +1 -1
- package/dist/pending-installations.d.ts +1 -1
- package/dist/saml-callback-client.js +5 -2
- package/dist/saml-callback-client.js.map +1 -1
- package/dist/saml-handlers.js +104 -0
- package/dist/saml-handlers.js.map +1 -1
- package/dist/security-card.d.mts +1 -1
- package/dist/security-card.d.ts +1 -1
- package/dist/styles.css +39 -0
- package/dist/support-bundle-collection-card.js +3 -2
- package/dist/support-bundle-collection-card.js.map +1 -1
- package/dist/support-bundles-card.d.mts +2 -2
- package/dist/support-bundles-card.d.ts +2 -2
- package/dist/support-bundles-card.js +2 -2
- package/dist/support-bundles-card.js.map +1 -1
- package/dist/support-card.js +39 -0
- package/dist/support-card.js.map +1 -1
- package/dist/top-nav-menu-close.d.mts +10 -0
- package/dist/top-nav-menu-close.d.ts +10 -0
- package/dist/top-nav-menu-close.js +48 -0
- package/dist/top-nav-menu-close.js.map +1 -0
- package/dist/top-nav.js +149 -59
- package/dist/top-nav.js.map +1 -1
- package/dist/trial-signup.js +6 -3
- package/dist/trial-signup.js.map +1 -1
- package/dist/update-layout.js +149 -59
- package/dist/update-layout.js.map +1 -1
- package/dist/upload-support-bundle-modal.js +2 -2
- package/dist/upload-support-bundle-modal.js.map +1 -1
- package/dist/user-menu-dropdown.d.mts +25 -0
- package/dist/user-menu-dropdown.d.ts +25 -0
- package/dist/user-menu-dropdown.js +59 -0
- package/dist/user-menu-dropdown.js.map +1 -0
- package/dist/user-settings.js +5 -5
- package/dist/user-settings.js.map +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +39 -0
- package/dist/utils/index.js.map +1 -1
- package/package.json +29 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { cache, useState, useRef, useMemo, useEffect, useCallback } from 'react';
|
|
2
|
+
import ReactMarkdown from 'react-markdown';
|
|
2
3
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
4
|
import { Buffer } from 'buffer';
|
|
4
5
|
|
|
@@ -20,6 +21,7 @@ __export(tracer_exports, {
|
|
|
20
21
|
var tracer_default;
|
|
21
22
|
|
|
22
23
|
// src/utils/constants.ts
|
|
24
|
+
var DEFAULT_PRIMARY_COLOR = "#4f46e5";
|
|
23
25
|
var DEFAULT_SECONDARY_COLOR = "#6366f1";
|
|
24
26
|
function useCopyToClipboard(resetDelay = 2e3) {
|
|
25
27
|
const [copied, setCopied] = useState(false);
|
|
@@ -40,6 +42,9 @@ function useCopyToClipboard(resetDelay = 2e3) {
|
|
|
40
42
|
}, [resetDelay]);
|
|
41
43
|
return { copy, copied };
|
|
42
44
|
}
|
|
45
|
+
function MarkdownRenderer({ children }) {
|
|
46
|
+
return /* @__PURE__ */ jsx("div", { className: "markdown-content", children: /* @__PURE__ */ jsx(ReactMarkdown, { children }) });
|
|
47
|
+
}
|
|
43
48
|
var LINUX_INSTALL_SERVICE_ACCOUNT_KEY = "linux_install_service_account";
|
|
44
49
|
var LINUX_INSTALL_OPTIONS_KEY = "linux_install_options";
|
|
45
50
|
var navigateTo = (href) => {
|
|
@@ -52,35 +57,45 @@ var navigateTo = (href) => {
|
|
|
52
57
|
console.error("[linux-install-wizard] navigation failed", error);
|
|
53
58
|
}
|
|
54
59
|
};
|
|
55
|
-
var StepIndicator = ({
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
var StepIndicator = ({
|
|
61
|
+
step,
|
|
62
|
+
primaryColor = DEFAULT_PRIMARY_COLOR,
|
|
63
|
+
hasPreInstall = false,
|
|
64
|
+
hasPostInstall = false
|
|
65
|
+
}) => {
|
|
66
|
+
const visibleSteps = [];
|
|
67
|
+
if (hasPreInstall) visibleSteps.push(1);
|
|
68
|
+
visibleSteps.push(2, 3);
|
|
69
|
+
if (hasPostInstall) visibleSteps.push(4);
|
|
70
|
+
const stepCount = visibleSteps.length;
|
|
71
|
+
const currentVisibleIndex = visibleSteps.indexOf(step);
|
|
72
|
+
return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center gap-3", children: visibleSteps.map((visibleStep, index) => {
|
|
73
|
+
const isCompleted = index < currentVisibleIndex;
|
|
74
|
+
const isCurrent = index === currentVisibleIndex;
|
|
75
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
76
|
+
/* @__PURE__ */ jsx(
|
|
77
|
+
"div",
|
|
63
78
|
{
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
79
|
+
className: `flex h-10 w-10 items-center justify-center rounded-full border-2 ${isCompleted ? "border-gray-900 bg-gray-900 text-white" : isCurrent ? "border-gray-900" : "border-gray-200"}`,
|
|
80
|
+
style: isCurrent ? { borderColor: primaryColor } : void 0,
|
|
81
|
+
children: isCompleted ? /* @__PURE__ */ jsx(
|
|
82
|
+
"svg",
|
|
83
|
+
{
|
|
84
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
85
|
+
viewBox: "0 0 16 16",
|
|
86
|
+
className: "h-3.5 w-3.5",
|
|
87
|
+
fill: "none",
|
|
88
|
+
stroke: "currentColor",
|
|
89
|
+
strokeWidth: "2",
|
|
90
|
+
children: /* @__PURE__ */ jsx("path", { d: "m3.5 8 3 3 6-6" })
|
|
91
|
+
}
|
|
92
|
+
) : isCurrent ? /* @__PURE__ */ jsx("span", { className: "h-2.5 w-2.5 rounded-full", style: { backgroundColor: primaryColor } }) : null
|
|
71
93
|
}
|
|
72
|
-
)
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
"div",
|
|
78
|
-
{
|
|
79
|
-
className: `flex h-10 w-10 items-center justify-center rounded-full border-2 ${step === 2 ? "border-gray-900" : "border-gray-200"}`,
|
|
80
|
-
children: step === 2 ? /* @__PURE__ */ jsx("span", { className: "h-2.5 w-2.5 rounded-full bg-gray-900" }) : null
|
|
81
|
-
}
|
|
82
|
-
)
|
|
83
|
-
] });
|
|
94
|
+
),
|
|
95
|
+
index < stepCount - 1 && /* @__PURE__ */ jsx("div", { className: `h-0.5 w-12 ${index < currentVisibleIndex ? "bg-gray-900" : "bg-gray-200"}` })
|
|
96
|
+
] }, visibleStep);
|
|
97
|
+
}) });
|
|
98
|
+
};
|
|
84
99
|
var CodeBlock = ({
|
|
85
100
|
command,
|
|
86
101
|
onCopy
|
|
@@ -112,7 +127,7 @@ var VersionDropdown = ({
|
|
|
112
127
|
onSelect,
|
|
113
128
|
isLoading,
|
|
114
129
|
error,
|
|
115
|
-
primaryColor =
|
|
130
|
+
primaryColor = DEFAULT_PRIMARY_COLOR
|
|
116
131
|
}) => {
|
|
117
132
|
if (isLoading) {
|
|
118
133
|
return /* @__PURE__ */ jsxs("div", { className: "ml-8 flex items-center gap-2 text-sm text-gray-500", children: [
|
|
@@ -157,7 +172,7 @@ var InstallationInstructions = ({
|
|
|
157
172
|
isLoading,
|
|
158
173
|
completedSteps = {},
|
|
159
174
|
isProxy = false,
|
|
160
|
-
primaryColor =
|
|
175
|
+
primaryColor = DEFAULT_PRIMARY_COLOR
|
|
161
176
|
}) => {
|
|
162
177
|
if (isLoading && !instructions?.steps?.length) {
|
|
163
178
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
@@ -172,13 +187,12 @@ var InstallationInstructions = ({
|
|
|
172
187
|
return null;
|
|
173
188
|
}
|
|
174
189
|
const stepOffset = isProxy ? 3 : 2;
|
|
175
|
-
|
|
176
|
-
return /* @__PURE__ */ jsxs("div", { className: `min-w-0 space-y-4 transition-opacity duration-200 ${isLoading ? "opacity-60" : ""}`, children: [
|
|
190
|
+
return /* @__PURE__ */ jsxs("div", { className: `min-w-0 ml-0 space-y-4 transition-opacity duration-200 ${isLoading ? "opacity-60" : ""}`, children: [
|
|
177
191
|
/* @__PURE__ */ jsxs("h3", { className: "text-lg font-semibold text-gray-900", children: [
|
|
178
192
|
"Installation Instructions",
|
|
179
193
|
isLoading && /* @__PURE__ */ jsx("span", { className: "ml-2 inline-block h-4 w-4 animate-spin rounded-full border-2 border-gray-300", style: { borderTopColor: primaryColor } })
|
|
180
194
|
] }),
|
|
181
|
-
/* @__PURE__ */ jsx("ol", { className: "min-w-0 space-y-6 text-sm text-gray-700", children: instructions.steps.map((step, index) => {
|
|
195
|
+
/* @__PURE__ */ jsx("ol", { className: "min-w-0 list-none space-y-6 pl-0 ml-0 text-sm text-gray-700", children: instructions.steps.map((step, index) => {
|
|
182
196
|
const completableStepNames = ["download_assets", "install"];
|
|
183
197
|
const canComplete = completableStepNames.includes(step.step_name);
|
|
184
198
|
const isCompleted = canComplete && completedSteps[step.step_name];
|
|
@@ -203,7 +217,7 @@ var InstallationInstructions = ({
|
|
|
203
217
|
};
|
|
204
218
|
var LinuxInstallWizard = ({
|
|
205
219
|
token,
|
|
206
|
-
primaryColor =
|
|
220
|
+
primaryColor = DEFAULT_PRIMARY_COLOR,
|
|
207
221
|
secondaryColor = DEFAULT_SECONDARY_COLOR,
|
|
208
222
|
createServiceAccountAction,
|
|
209
223
|
fetchChannelReleasesAction,
|
|
@@ -217,9 +231,19 @@ var LinuxInstallWizard = ({
|
|
|
217
231
|
initialInstallOptionsId,
|
|
218
232
|
initialInstallOptionsData,
|
|
219
233
|
initialChannelReleases,
|
|
220
|
-
supportPortalLink
|
|
234
|
+
supportPortalLink,
|
|
235
|
+
preInstallMarkdown,
|
|
236
|
+
postInstallMarkdown,
|
|
237
|
+
completionUrl,
|
|
238
|
+
embeddedClusterInstallUrl
|
|
221
239
|
}) => {
|
|
222
|
-
const
|
|
240
|
+
const hasPreInstall = Boolean(preInstallMarkdown && preInstallMarkdown.trim());
|
|
241
|
+
const hasPostInstall = Boolean(postInstallMarkdown && postInstallMarkdown.trim());
|
|
242
|
+
const effectiveInitialStep = (() => {
|
|
243
|
+
if (initialStep) return initialStep;
|
|
244
|
+
return hasPreInstall ? 1 : 2;
|
|
245
|
+
})();
|
|
246
|
+
const [step, setStep] = useState(effectiveInitialStep);
|
|
223
247
|
const [instanceName, setInstanceName] = useState(initialInstallOptionsData?.instance_name ?? "");
|
|
224
248
|
const [networkAvailability, setNetworkAvailability] = useState(initialNetwork ?? "online");
|
|
225
249
|
const [adminConsoleUrl, setAdminConsoleUrl] = useState(initialInstallOptionsData?.admin_console_url ?? "");
|
|
@@ -227,6 +251,7 @@ var LinuxInstallWizard = ({
|
|
|
227
251
|
const [showErrors, setShowErrors] = useState(false);
|
|
228
252
|
const [isCreatingServiceAccount, setIsCreatingServiceAccount] = useState(false);
|
|
229
253
|
const [apiError, setApiError] = useState(null);
|
|
254
|
+
const [isWaitingForNavigation, setIsWaitingForNavigation] = useState(false);
|
|
230
255
|
const [installOptionsId, setInstallOptionsId] = useState(initialInstallOptionsId ?? null);
|
|
231
256
|
const [serviceAccountId, setServiceAccountId] = useState(initialInstallOptionsData?.service_account_id ?? null);
|
|
232
257
|
const [originalInstanceName, setOriginalInstanceName] = useState(initialInstallOptionsData?.instance_name ?? null);
|
|
@@ -245,7 +270,7 @@ var LinuxInstallWizard = ({
|
|
|
245
270
|
const [isLoadingInstructions, setIsLoadingInstructions] = useState(false);
|
|
246
271
|
const [completedSteps, setCompletedSteps] = useState({});
|
|
247
272
|
const hasLoadedReleases = useRef(!!initialChannelReleases?.length);
|
|
248
|
-
const hasResumedInstallation = useRef(!!initialInstallOptionsData);
|
|
273
|
+
const hasResumedInstallation = useRef(!!initialInstallOptionsData?.instructions);
|
|
249
274
|
const lastUpdateRef = useRef(
|
|
250
275
|
initialInstallOptionsData?.channel_id && initialInstallOptionsData?.channel_release_sequence ? { channelId: initialInstallOptionsData.channel_id, sequence: initialInstallOptionsData.channel_release_sequence } : {}
|
|
251
276
|
);
|
|
@@ -273,16 +298,28 @@ var LinuxInstallWizard = ({
|
|
|
273
298
|
useEffect(() => {
|
|
274
299
|
hasMountedRef.current = true;
|
|
275
300
|
}, []);
|
|
301
|
+
useEffect(() => {
|
|
302
|
+
if (step === 1 && !hasPreInstall) {
|
|
303
|
+
setStep(2);
|
|
304
|
+
if (onStepChange) {
|
|
305
|
+
onStepChange(2);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}, [step, hasPreInstall, onStepChange]);
|
|
276
309
|
useEffect(() => {
|
|
277
310
|
if (!hasMountedRef.current) {
|
|
278
311
|
prevStepRef.current = step;
|
|
279
312
|
return;
|
|
280
313
|
}
|
|
281
314
|
if (step !== prevStepRef.current) {
|
|
315
|
+
if (installOptionsId !== prevInstallOptionsIdRef.current) {
|
|
316
|
+
prevStepRef.current = step;
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
282
319
|
onStepChange?.(step);
|
|
283
320
|
prevStepRef.current = step;
|
|
284
321
|
}
|
|
285
|
-
}, [step, onStepChange]);
|
|
322
|
+
}, [step, installOptionsId, onStepChange]);
|
|
286
323
|
useEffect(() => {
|
|
287
324
|
if (!hasMountedRef.current) {
|
|
288
325
|
prevInstallOptionsIdRef.current = installOptionsId;
|
|
@@ -297,7 +334,7 @@ var LinuxInstallWizard = ({
|
|
|
297
334
|
selectedReleaseRef.current = selectedRelease;
|
|
298
335
|
}, [selectedRelease]);
|
|
299
336
|
useEffect(() => {
|
|
300
|
-
if (step !== 2 || !fetchChannelReleasesAction || hasLoadedReleases.current) {
|
|
337
|
+
if (step !== 2 && step !== 3 || !fetchChannelReleasesAction || hasLoadedReleases.current) {
|
|
301
338
|
return;
|
|
302
339
|
}
|
|
303
340
|
const loadReleases = async () => {
|
|
@@ -329,7 +366,7 @@ var LinuxInstallWizard = ({
|
|
|
329
366
|
return;
|
|
330
367
|
}
|
|
331
368
|
const firstRelease = embeddedClusterReleases[0];
|
|
332
|
-
if (step ===
|
|
369
|
+
if (step === 3 && firstRelease) {
|
|
333
370
|
setSelectedRelease(firstRelease);
|
|
334
371
|
hasAutoSelectedRelease.current = true;
|
|
335
372
|
}
|
|
@@ -348,12 +385,6 @@ var LinuxInstallWizard = ({
|
|
|
348
385
|
}
|
|
349
386
|
const updateOptions = async () => {
|
|
350
387
|
setIsLoadingInstructions(true);
|
|
351
|
-
console.debug("[linux-install-wizard] Updating install options with release", {
|
|
352
|
-
channelId,
|
|
353
|
-
sequence,
|
|
354
|
-
networkAvailability,
|
|
355
|
-
proxyUrl: networkAvailability === "proxy" ? proxyUrl : void 0
|
|
356
|
-
});
|
|
357
388
|
try {
|
|
358
389
|
const result = await updateInstallOptionsAction({
|
|
359
390
|
token,
|
|
@@ -365,10 +396,6 @@ var LinuxInstallWizard = ({
|
|
|
365
396
|
});
|
|
366
397
|
lastUpdateRef.current = { channelId, sequence };
|
|
367
398
|
if (result.instructions) {
|
|
368
|
-
console.debug("[linux-install-wizard] Instructions received from release update", {
|
|
369
|
-
stepsCount: result.instructions.steps?.length,
|
|
370
|
-
firstStepName: result.instructions.steps?.[0]?.step_name
|
|
371
|
-
});
|
|
372
399
|
setInstructions(result.instructions);
|
|
373
400
|
}
|
|
374
401
|
} catch (error) {
|
|
@@ -382,29 +409,16 @@ var LinuxInstallWizard = ({
|
|
|
382
409
|
}, [selectedRelease, installOptionsId, token, updateInstallOptionsAction, networkAvailability, proxyUrl]);
|
|
383
410
|
useEffect(() => {
|
|
384
411
|
if (networkAvailability !== "proxy" || !installOptionsId || !updateInstallOptionsAction || !selectedRelease) {
|
|
385
|
-
console.debug("[linux-install-wizard] Skipping proxy URL update effect", {
|
|
386
|
-
networkAvailability,
|
|
387
|
-
hasInstallOptionsId: !!installOptionsId,
|
|
388
|
-
hasUpdateAction: !!updateInstallOptionsAction,
|
|
389
|
-
hasSelectedRelease: !!selectedRelease
|
|
390
|
-
});
|
|
391
412
|
return;
|
|
392
413
|
}
|
|
393
414
|
if (!hasResumedInstallation.current) {
|
|
394
415
|
return;
|
|
395
416
|
}
|
|
396
|
-
console.debug("[linux-install-wizard] Proxy URL changed, will regenerate instructions after 500ms", { proxyUrl });
|
|
397
417
|
const timeoutId = setTimeout(async () => {
|
|
398
418
|
const currentRelease = selectedReleaseRef.current;
|
|
399
419
|
if (!currentRelease) {
|
|
400
|
-
console.debug("[linux-install-wizard] No release selected, skipping proxy URL update");
|
|
401
420
|
return;
|
|
402
421
|
}
|
|
403
|
-
console.debug("[linux-install-wizard] Regenerating instructions with proxy URL", {
|
|
404
|
-
proxyUrl,
|
|
405
|
-
channelId: currentRelease.channelId,
|
|
406
|
-
channelSequence: currentRelease.channelSequence
|
|
407
|
-
});
|
|
408
422
|
try {
|
|
409
423
|
const result = await updateInstallOptionsAction({
|
|
410
424
|
token,
|
|
@@ -415,9 +429,6 @@ var LinuxInstallWizard = ({
|
|
|
415
429
|
proxyUrl: proxyUrl || void 0
|
|
416
430
|
});
|
|
417
431
|
if (result.instructions) {
|
|
418
|
-
console.debug("[linux-install-wizard] Instructions updated with proxy URL", {
|
|
419
|
-
stepsCount: result.instructions.steps?.length
|
|
420
|
-
});
|
|
421
432
|
setInstructions(result.instructions);
|
|
422
433
|
}
|
|
423
434
|
} catch (error) {
|
|
@@ -430,7 +441,7 @@ var LinuxInstallWizard = ({
|
|
|
430
441
|
if (hasResumedInstallation.current) {
|
|
431
442
|
return;
|
|
432
443
|
}
|
|
433
|
-
if (!initialInstallOptionsId || !getInstallOptionsAction
|
|
444
|
+
if (!initialInstallOptionsId || !getInstallOptionsAction) {
|
|
434
445
|
return;
|
|
435
446
|
}
|
|
436
447
|
hasResumedInstallation.current = true;
|
|
@@ -476,9 +487,9 @@ var LinuxInstallWizard = ({
|
|
|
476
487
|
}
|
|
477
488
|
};
|
|
478
489
|
resumeInstallation();
|
|
479
|
-
}, [initialInstallOptionsId, getInstallOptionsAction, token,
|
|
490
|
+
}, [initialInstallOptionsId, getInstallOptionsAction, token, releases, networkAvailability, proxyUrl]);
|
|
480
491
|
useEffect(() => {
|
|
481
|
-
if (step !==
|
|
492
|
+
if (step !== 3 || !installOptionsId || !getInstallOptionsAction) {
|
|
482
493
|
return;
|
|
483
494
|
}
|
|
484
495
|
if (completedSteps["download_assets"] && completedSteps["install"]) {
|
|
@@ -511,9 +522,7 @@ var LinuxInstallWizard = ({
|
|
|
511
522
|
return () => clearInterval(pollInterval);
|
|
512
523
|
}, [step, installOptionsId, getInstallOptionsAction, token, completedSteps]);
|
|
513
524
|
const handleContinue = async () => {
|
|
514
|
-
console.debug("[linux-install-wizard] handleContinue called, instanceName:", JSON.stringify(instanceName));
|
|
515
525
|
if (!instanceName.trim()) {
|
|
516
|
-
console.debug("[linux-install-wizard] Validation failed: instanceName is empty");
|
|
517
526
|
setShowErrors(true);
|
|
518
527
|
return;
|
|
519
528
|
}
|
|
@@ -527,15 +536,7 @@ var LinuxInstallWizard = ({
|
|
|
527
536
|
setIsCreatingServiceAccount(true);
|
|
528
537
|
try {
|
|
529
538
|
const trimmedInstanceName = instanceName.trim();
|
|
530
|
-
console.debug("[linux-install-wizard] handleContinue - checking conditions", {
|
|
531
|
-
serviceAccountId: !!serviceAccountId,
|
|
532
|
-
originalInstanceName,
|
|
533
|
-
trimmedInstanceName,
|
|
534
|
-
networkAvailability,
|
|
535
|
-
installOptionsId: !!installOptionsId
|
|
536
|
-
});
|
|
537
539
|
if (serviceAccountId && originalInstanceName === trimmedInstanceName && installOptionsId && updateInstallOptionsAction) {
|
|
538
|
-
console.debug("[linux-install-wizard] Reusing existing service account, updating install options...");
|
|
539
540
|
const firstRelease = embeddedClusterReleases[0];
|
|
540
541
|
const result = await updateInstallOptionsAction({
|
|
541
542
|
token,
|
|
@@ -556,9 +557,8 @@ var LinuxInstallWizard = ({
|
|
|
556
557
|
if (result.instructions) {
|
|
557
558
|
setInstructions(result.instructions);
|
|
558
559
|
}
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
onStepChange?.(2);
|
|
560
|
+
setIsWaitingForNavigation(true);
|
|
561
|
+
onStepChange?.(3);
|
|
562
562
|
return;
|
|
563
563
|
}
|
|
564
564
|
if (typeof window !== "undefined" && window.sessionStorage) {
|
|
@@ -572,7 +572,6 @@ var LinuxInstallWizard = ({
|
|
|
572
572
|
setServiceAccountId(saData.service_account.id);
|
|
573
573
|
setOriginalInstanceName(trimmedInstanceName);
|
|
574
574
|
if (createInstallOptionsAction) {
|
|
575
|
-
console.debug("[linux-install-wizard] Creating install options...");
|
|
576
575
|
const firstRelease = embeddedClusterReleases[0];
|
|
577
576
|
const installOptionsResult = await createInstallOptionsAction({
|
|
578
577
|
token,
|
|
@@ -584,7 +583,6 @@ var LinuxInstallWizard = ({
|
|
|
584
583
|
channelId: firstRelease?.channelId,
|
|
585
584
|
channelReleaseSequence: firstRelease?.channelSequence
|
|
586
585
|
});
|
|
587
|
-
console.debug("[linux-install-wizard] Install options result:", installOptionsResult);
|
|
588
586
|
if (firstRelease) {
|
|
589
587
|
setSelectedRelease(firstRelease);
|
|
590
588
|
lastUpdateRef.current = {
|
|
@@ -604,8 +602,7 @@ var LinuxInstallWizard = ({
|
|
|
604
602
|
setInstructions(installOptionsResult.instructions);
|
|
605
603
|
}
|
|
606
604
|
}
|
|
607
|
-
|
|
608
|
-
setStep(2);
|
|
605
|
+
setIsWaitingForNavigation(true);
|
|
609
606
|
} catch (error) {
|
|
610
607
|
console.error("[linux-install-wizard] Failed to continue", error);
|
|
611
608
|
const errorMessage = error instanceof Error ? error.message : "Failed to continue";
|
|
@@ -614,15 +611,33 @@ var LinuxInstallWizard = ({
|
|
|
614
611
|
} else {
|
|
615
612
|
setApiError(errorMessage);
|
|
616
613
|
}
|
|
614
|
+
setIsWaitingForNavigation(false);
|
|
617
615
|
} finally {
|
|
618
616
|
setIsCreatingServiceAccount(false);
|
|
619
617
|
}
|
|
620
618
|
};
|
|
619
|
+
const handleContinueFromPreInstall = () => {
|
|
620
|
+
setStep(2);
|
|
621
|
+
onStepChange?.(2);
|
|
622
|
+
};
|
|
621
623
|
const handleBack = () => {
|
|
622
624
|
setApiError(null);
|
|
623
625
|
setShowErrors(false);
|
|
624
|
-
|
|
625
|
-
|
|
626
|
+
setIsWaitingForNavigation(false);
|
|
627
|
+
if (step === 4) {
|
|
628
|
+
setStep(3);
|
|
629
|
+
onStepChange?.(3);
|
|
630
|
+
} else if (step === 3) {
|
|
631
|
+
setStep(2);
|
|
632
|
+
onStepChange?.(2);
|
|
633
|
+
} else if (step === 2) {
|
|
634
|
+
const prevStep = hasPreInstall ? 1 : 2;
|
|
635
|
+
setStep(prevStep);
|
|
636
|
+
onStepChange?.(prevStep);
|
|
637
|
+
}
|
|
638
|
+
};
|
|
639
|
+
const handleCompletePostInstall = () => {
|
|
640
|
+
navigateTo(completionUrl);
|
|
626
641
|
};
|
|
627
642
|
const handleFinish = useCallback(async () => {
|
|
628
643
|
if (installOptionsId && updateInstallOptionsAction && adminConsoleUrl) {
|
|
@@ -636,18 +651,71 @@ var LinuxInstallWizard = ({
|
|
|
636
651
|
console.error("[linux-install-wizard] Failed to save admin console URL", error);
|
|
637
652
|
}
|
|
638
653
|
}
|
|
639
|
-
|
|
640
|
-
|
|
654
|
+
if (hasPostInstall) {
|
|
655
|
+
setStep(4);
|
|
656
|
+
onStepChange?.(4);
|
|
657
|
+
} else {
|
|
658
|
+
navigateTo(completionUrl);
|
|
659
|
+
}
|
|
660
|
+
}, [installOptionsId, updateInstallOptionsAction, adminConsoleUrl, token, hasPostInstall, onStepChange, completionUrl]);
|
|
641
661
|
const handleReleaseSelect = useCallback((release) => {
|
|
642
662
|
setSelectedRelease(release);
|
|
643
663
|
}, []);
|
|
644
664
|
const isProxy = networkAvailability === "proxy";
|
|
645
|
-
if (step ===
|
|
665
|
+
if (step === 4 && hasPostInstall) {
|
|
666
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
667
|
+
/* @__PURE__ */ jsx(StepIndicator, { step: 4, primaryColor, hasPreInstall, hasPostInstall }),
|
|
668
|
+
/* @__PURE__ */ jsxs("div", { className: "rounded-2xl border border-gray-100 bg-gray-50 p-6", children: [
|
|
669
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsx(MarkdownRenderer, { children: postInstallMarkdown || "" }) }),
|
|
670
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-6 flex items-center justify-between text-sm text-gray-500", children: [
|
|
671
|
+
/* @__PURE__ */ jsx(
|
|
672
|
+
"button",
|
|
673
|
+
{
|
|
674
|
+
type: "button",
|
|
675
|
+
onClick: handleBack,
|
|
676
|
+
className: "rounded-xl px-4 py-2 font-medium text-gray-500 transition hover:bg-gray-100",
|
|
677
|
+
children: "Back"
|
|
678
|
+
}
|
|
679
|
+
),
|
|
680
|
+
/* @__PURE__ */ jsx("span", { children: "Step 4 of 4" }),
|
|
681
|
+
/* @__PURE__ */ jsx(
|
|
682
|
+
"button",
|
|
683
|
+
{
|
|
684
|
+
type: "button",
|
|
685
|
+
onClick: handleCompletePostInstall,
|
|
686
|
+
className: "rounded-xl px-4 py-2 font-medium text-white transition hover:brightness-90",
|
|
687
|
+
style: { backgroundColor: primaryColor },
|
|
688
|
+
children: "Complete"
|
|
689
|
+
}
|
|
690
|
+
)
|
|
691
|
+
] })
|
|
692
|
+
] })
|
|
693
|
+
] });
|
|
694
|
+
}
|
|
695
|
+
if (step === 3) {
|
|
646
696
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
647
|
-
/* @__PURE__ */ jsx(StepIndicator, { step:
|
|
697
|
+
/* @__PURE__ */ jsx(StepIndicator, { step: 3, primaryColor, hasPreInstall, hasPostInstall }),
|
|
648
698
|
/* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-2xl border border-gray-100 bg-gray-50 p-6", children: /* @__PURE__ */ jsxs("div", { className: "min-w-0 space-y-6", children: [
|
|
649
699
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
650
700
|
/* @__PURE__ */ jsx("h2", { className: "text-xl font-semibold text-gray-900", children: isProxy ? "Linux Single Node Proxy Install" : "Linux Single Node Online Install" }),
|
|
701
|
+
embeddedClusterInstallUrl && /* @__PURE__ */ jsxs("p", { className: "mt-4 text-sm text-gray-700", children: [
|
|
702
|
+
"For a detailed description of the system requirements, please see our",
|
|
703
|
+
" ",
|
|
704
|
+
/* @__PURE__ */ jsxs(
|
|
705
|
+
"a",
|
|
706
|
+
{
|
|
707
|
+
href: embeddedClusterInstallUrl,
|
|
708
|
+
target: "_blank",
|
|
709
|
+
rel: "noopener noreferrer",
|
|
710
|
+
className: "font-semibold hover:underline",
|
|
711
|
+
style: { color: secondaryColor },
|
|
712
|
+
children: [
|
|
713
|
+
"Embedded Cluster installation documentation",
|
|
714
|
+
/* @__PURE__ */ jsx("svg", { className: "ml-1 inline-block h-4 w-4 align-text-bottom", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14" }) })
|
|
715
|
+
]
|
|
716
|
+
}
|
|
717
|
+
)
|
|
718
|
+
] }),
|
|
651
719
|
/* @__PURE__ */ jsxs("div", { className: "mt-6 space-y-6", children: [
|
|
652
720
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
653
721
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", style: { color: primaryColor }, children: [
|
|
@@ -671,15 +739,15 @@ var LinuxInstallWizard = ({
|
|
|
671
739
|
/* @__PURE__ */ jsx("span", { className: "flex h-6 w-6 items-center justify-center rounded-full font-semibold", style: { backgroundColor: `${primaryColor}20` }, children: "2" }),
|
|
672
740
|
/* @__PURE__ */ jsx("span", { className: "font-medium text-gray-900", children: "Configure proxy URL" })
|
|
673
741
|
] }),
|
|
674
|
-
/* @__PURE__ */ jsx(
|
|
742
|
+
/* @__PURE__ */ jsx("div", { className: "ml-8", children: /* @__PURE__ */ jsx(
|
|
675
743
|
"input",
|
|
676
744
|
{
|
|
677
745
|
value: proxyUrl,
|
|
678
746
|
onChange: (event) => setProxyUrl(event.target.value),
|
|
679
747
|
placeholder: "Enter proxy URL",
|
|
680
|
-
className: "portal-input
|
|
748
|
+
className: "portal-input w-full"
|
|
681
749
|
}
|
|
682
|
-
)
|
|
750
|
+
) })
|
|
683
751
|
] }),
|
|
684
752
|
/* @__PURE__ */ jsx(
|
|
685
753
|
InstallationInstructions,
|
|
@@ -696,15 +764,15 @@ var LinuxInstallWizard = ({
|
|
|
696
764
|
/* @__PURE__ */ jsx("span", { className: "flex h-6 w-6 items-center justify-center rounded-full font-semibold", style: { backgroundColor: `${primaryColor}20` }, children: (instructions?.steps?.length ?? 0) + (isProxy ? 3 : 2) }),
|
|
697
765
|
/* @__PURE__ */ jsx("span", { className: "font-medium text-gray-900", children: "(Optional) Add the Admin Console URL" })
|
|
698
766
|
] }),
|
|
699
|
-
/* @__PURE__ */ jsx(
|
|
767
|
+
/* @__PURE__ */ jsx("div", { className: "ml-8", children: /* @__PURE__ */ jsx(
|
|
700
768
|
"input",
|
|
701
769
|
{
|
|
702
770
|
value: adminConsoleUrl,
|
|
703
771
|
onChange: (event) => setAdminConsoleUrl(event.target.value),
|
|
704
772
|
placeholder: "https://localhost:30000",
|
|
705
|
-
className: "portal-input
|
|
773
|
+
className: "portal-input w-full"
|
|
706
774
|
}
|
|
707
|
-
)
|
|
775
|
+
) })
|
|
708
776
|
] })
|
|
709
777
|
] })
|
|
710
778
|
] }),
|
|
@@ -719,7 +787,12 @@ var LinuxInstallWizard = ({
|
|
|
719
787
|
children: "Back"
|
|
720
788
|
}
|
|
721
789
|
),
|
|
722
|
-
/* @__PURE__ */
|
|
790
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
791
|
+
"Step ",
|
|
792
|
+
hasPreInstall ? 3 : 2,
|
|
793
|
+
" of ",
|
|
794
|
+
hasPreInstall && hasPostInstall ? 4 : hasPreInstall || hasPostInstall ? 3 : 2
|
|
795
|
+
] }),
|
|
723
796
|
/* @__PURE__ */ jsx(
|
|
724
797
|
"button",
|
|
725
798
|
{
|
|
@@ -727,7 +800,7 @@ var LinuxInstallWizard = ({
|
|
|
727
800
|
onClick: handleFinish,
|
|
728
801
|
className: "rounded-xl px-4 py-2 font-medium text-white transition hover:brightness-90",
|
|
729
802
|
style: { backgroundColor: primaryColor },
|
|
730
|
-
children: "Finish"
|
|
803
|
+
children: hasPostInstall ? "Continue" : "Finish"
|
|
731
804
|
}
|
|
732
805
|
)
|
|
733
806
|
] }),
|
|
@@ -749,82 +822,114 @@ var LinuxInstallWizard = ({
|
|
|
749
822
|
] }) })
|
|
750
823
|
] });
|
|
751
824
|
}
|
|
752
|
-
|
|
753
|
-
/* @__PURE__ */
|
|
754
|
-
|
|
755
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
756
|
-
/* @__PURE__ */ jsxs("
|
|
757
|
-
"
|
|
758
|
-
|
|
759
|
-
"input",
|
|
760
|
-
{
|
|
761
|
-
value: instanceName,
|
|
762
|
-
onChange: (event) => setInstanceName(event.target.value),
|
|
763
|
-
placeholder: "Instance nickname",
|
|
764
|
-
"aria-invalid": showErrors && !instanceName.trim(),
|
|
765
|
-
className: `portal-input mt-1 w-full ${showErrors && !instanceName.trim() ? "border-rose-400 focus:border-rose-400 focus:ring-rose-200" : ""}`
|
|
766
|
-
}
|
|
767
|
-
),
|
|
768
|
-
showErrors && !instanceName.trim() ? /* @__PURE__ */ jsx("span", { className: "mt-1 block text-xs text-rose-500", children: "Instance name is required." }) : null
|
|
769
|
-
] }),
|
|
770
|
-
/* @__PURE__ */ jsxs("fieldset", { className: "space-y-2", children: [
|
|
771
|
-
/* @__PURE__ */ jsx("legend", { className: "text-sm font-medium text-gray-700", children: "Network Availability" }),
|
|
772
|
-
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
|
|
825
|
+
if (step === 2) {
|
|
826
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
827
|
+
/* @__PURE__ */ jsx(StepIndicator, { step: 2, primaryColor, hasPreInstall, hasPostInstall }),
|
|
828
|
+
/* @__PURE__ */ jsxs("div", { className: "rounded-2xl border border-gray-100 bg-gray-50 p-6", children: [
|
|
829
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
830
|
+
/* @__PURE__ */ jsxs("label", { className: "block text-sm font-medium text-gray-700", children: [
|
|
831
|
+
"Instance Name",
|
|
773
832
|
/* @__PURE__ */ jsx(
|
|
774
833
|
"input",
|
|
775
834
|
{
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
className:
|
|
835
|
+
value: instanceName,
|
|
836
|
+
onChange: (event) => setInstanceName(event.target.value),
|
|
837
|
+
placeholder: "Instance nickname",
|
|
838
|
+
"aria-invalid": showErrors && !instanceName.trim(),
|
|
839
|
+
className: `portal-input mt-1 w-full ${showErrors && !instanceName.trim() ? "border-rose-400 focus:border-rose-400 focus:ring-rose-200" : ""}`
|
|
781
840
|
}
|
|
782
841
|
),
|
|
783
|
-
"
|
|
842
|
+
showErrors && !instanceName.trim() ? /* @__PURE__ */ jsx("span", { className: "mt-1 block text-xs text-rose-500", children: "Instance name is required." }) : null
|
|
784
843
|
] }),
|
|
785
|
-
/* @__PURE__ */ jsxs("
|
|
786
|
-
/* @__PURE__ */ jsx(
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
844
|
+
/* @__PURE__ */ jsxs("fieldset", { className: "space-y-2", children: [
|
|
845
|
+
/* @__PURE__ */ jsx("legend", { className: "text-sm font-medium text-gray-700", children: "Network Availability" }),
|
|
846
|
+
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
|
|
847
|
+
/* @__PURE__ */ jsx(
|
|
848
|
+
"input",
|
|
849
|
+
{
|
|
850
|
+
type: "radio",
|
|
851
|
+
name: "network-availability",
|
|
852
|
+
checked: networkAvailability === "online",
|
|
853
|
+
onChange: () => setNetworkAvailability("online"),
|
|
854
|
+
className: "portal-radio"
|
|
855
|
+
}
|
|
856
|
+
),
|
|
857
|
+
"Outbound requests allowed"
|
|
858
|
+
] }),
|
|
859
|
+
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
|
|
860
|
+
/* @__PURE__ */ jsx(
|
|
861
|
+
"input",
|
|
862
|
+
{
|
|
863
|
+
type: "radio",
|
|
864
|
+
name: "network-availability",
|
|
865
|
+
checked: networkAvailability === "proxy",
|
|
866
|
+
onChange: () => setNetworkAvailability("proxy"),
|
|
867
|
+
className: "portal-radio"
|
|
868
|
+
}
|
|
869
|
+
),
|
|
870
|
+
"Outbound requests require HTTPS Proxy"
|
|
871
|
+
] }),
|
|
872
|
+
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
|
|
873
|
+
/* @__PURE__ */ jsx(
|
|
874
|
+
"input",
|
|
875
|
+
{
|
|
876
|
+
type: "radio",
|
|
877
|
+
name: "network-availability",
|
|
878
|
+
checked: networkAvailability === "airgap",
|
|
879
|
+
onChange: () => setNetworkAvailability("airgap"),
|
|
880
|
+
className: "portal-radio"
|
|
881
|
+
}
|
|
882
|
+
),
|
|
883
|
+
"No outbound requests allowed (air gap)"
|
|
884
|
+
] })
|
|
797
885
|
] }),
|
|
798
|
-
/* @__PURE__ */
|
|
799
|
-
/* @__PURE__ */ jsx(
|
|
800
|
-
"input",
|
|
801
|
-
{
|
|
802
|
-
type: "radio",
|
|
803
|
-
name: "network-availability",
|
|
804
|
-
checked: networkAvailability === "airgap",
|
|
805
|
-
onChange: () => setNetworkAvailability("airgap"),
|
|
806
|
-
className: "portal-radio"
|
|
807
|
-
}
|
|
808
|
-
),
|
|
809
|
-
"No outbound requests allowed (air gap)"
|
|
810
|
-
] })
|
|
886
|
+
apiError ? /* @__PURE__ */ jsx("div", { className: "rounded-xl border border-rose-200 bg-rose-50 p-3 text-sm text-rose-600", children: apiError }) : null
|
|
811
887
|
] }),
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
888
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-6 flex items-center justify-between text-sm text-gray-500", children: [
|
|
889
|
+
hasPreInstall ? /* @__PURE__ */ jsx(
|
|
890
|
+
"button",
|
|
891
|
+
{
|
|
892
|
+
type: "button",
|
|
893
|
+
onClick: handleBack,
|
|
894
|
+
className: "rounded-xl px-4 py-2 font-medium text-gray-500 transition hover:bg-gray-100",
|
|
895
|
+
children: "Back"
|
|
896
|
+
}
|
|
897
|
+
) : /* @__PURE__ */ jsx("span", {}),
|
|
898
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
899
|
+
"Step ",
|
|
900
|
+
hasPreInstall ? 2 : 1,
|
|
901
|
+
" of ",
|
|
902
|
+
hasPreInstall && hasPostInstall ? 4 : hasPreInstall || hasPostInstall ? 3 : 2
|
|
903
|
+
] }),
|
|
904
|
+
/* @__PURE__ */ jsx(
|
|
905
|
+
"button",
|
|
906
|
+
{
|
|
907
|
+
type: "button",
|
|
908
|
+
onClick: handleContinue,
|
|
909
|
+
disabled: isCreatingServiceAccount || isWaitingForNavigation,
|
|
910
|
+
className: "rounded-xl px-4 py-2 font-medium text-white transition-opacity duration-200 hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",
|
|
911
|
+
style: { backgroundColor: primaryColor },
|
|
912
|
+
children: isCreatingServiceAccount || isWaitingForNavigation ? "Saving..." : "Continue"
|
|
913
|
+
}
|
|
914
|
+
)
|
|
915
|
+
] })
|
|
827
916
|
] })
|
|
917
|
+
] });
|
|
918
|
+
}
|
|
919
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
920
|
+
/* @__PURE__ */ jsx(StepIndicator, { step: 1, primaryColor, hasPreInstall, hasPostInstall }),
|
|
921
|
+
/* @__PURE__ */ jsxs("div", { className: "rounded-2xl border border-gray-100 bg-gray-50 p-6", children: [
|
|
922
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsx(MarkdownRenderer, { children: preInstallMarkdown || "" }) }),
|
|
923
|
+
/* @__PURE__ */ jsx("div", { className: "mt-6 flex items-center justify-end text-sm text-gray-500", children: /* @__PURE__ */ jsx(
|
|
924
|
+
"button",
|
|
925
|
+
{
|
|
926
|
+
type: "button",
|
|
927
|
+
onClick: handleContinueFromPreInstall,
|
|
928
|
+
className: "rounded-xl px-4 py-2 font-medium text-white transition hover:brightness-90",
|
|
929
|
+
style: { backgroundColor: primaryColor },
|
|
930
|
+
children: "Continue"
|
|
931
|
+
}
|
|
932
|
+
) })
|
|
828
933
|
] })
|
|
829
934
|
] });
|
|
830
935
|
};
|
|
@@ -1218,6 +1323,45 @@ var fetchCustomBrandingImpl = async () => {
|
|
|
1218
1323
|
};
|
|
1219
1324
|
};
|
|
1220
1325
|
cache(fetchCustomBrandingImpl);
|
|
1326
|
+
var fetchDocumentationImpl = async () => {
|
|
1327
|
+
const { cookies } = await import('next/headers');
|
|
1328
|
+
const sessionStore = await cookies();
|
|
1329
|
+
const session = sessionStore.get("portal_session");
|
|
1330
|
+
const token = session?.value;
|
|
1331
|
+
if (!token) {
|
|
1332
|
+
throw new Error("Authentication required");
|
|
1333
|
+
}
|
|
1334
|
+
const url = `${getApiOrigin()}/enterprise-portal/documentation`;
|
|
1335
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1336
|
+
console.debug(
|
|
1337
|
+
"[portal-components] fetching documentation via %s (Enterprise Portal API)",
|
|
1338
|
+
url
|
|
1339
|
+
);
|
|
1340
|
+
}
|
|
1341
|
+
const response = await authenticatedFetch(url, {
|
|
1342
|
+
method: "GET",
|
|
1343
|
+
token,
|
|
1344
|
+
headers: {
|
|
1345
|
+
accept: "application/json"
|
|
1346
|
+
}
|
|
1347
|
+
});
|
|
1348
|
+
if (!response.ok) {
|
|
1349
|
+
throw new Error(
|
|
1350
|
+
`Documentation request failed (${response.status} ${response.statusText})`
|
|
1351
|
+
);
|
|
1352
|
+
}
|
|
1353
|
+
const data = await response.json();
|
|
1354
|
+
return {
|
|
1355
|
+
helmPreInstall: data.helmPreInstall || "",
|
|
1356
|
+
helmPostInstall: data.helmPostInstall || "",
|
|
1357
|
+
embeddedClusterPreInstall: data.embeddedClusterPreInstall || "",
|
|
1358
|
+
embeddedClusterPostInstall: data.embeddedClusterPostInstall || "",
|
|
1359
|
+
helmInstallUrl: data.helmInstallUrl || "",
|
|
1360
|
+
embeddedClusterInstallUrl: data.embeddedClusterInstallUrl || "",
|
|
1361
|
+
valuesOverrideUrl: data.valuesOverrideUrl || ""
|
|
1362
|
+
};
|
|
1363
|
+
};
|
|
1364
|
+
cache(fetchDocumentationImpl);
|
|
1221
1365
|
|
|
1222
1366
|
export { LINUX_INSTALL_OPTIONS_KEY, LINUX_INSTALL_SERVICE_ACCOUNT_KEY, LinuxInstallWizard, createInstallOptions, createServiceAccount, fetchChannelReleases, filterEmbeddedClusterReleases, getInstallOptions, updateInstallOptions };
|
|
1223
1367
|
//# sourceMappingURL=linux-install-wizard.js.map
|