@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.
Files changed (182) hide show
  1. package/components/metadata/registry.json +2 -2
  2. package/components/metadata/registry.md +2 -2
  3. package/dist/actions/change-team.js +39 -0
  4. package/dist/actions/change-team.js.map +1 -1
  5. package/dist/actions/index.d.mts +1 -1
  6. package/dist/actions/index.d.ts +1 -1
  7. package/dist/actions/index.js +40 -0
  8. package/dist/actions/index.js.map +1 -1
  9. package/dist/actions/install-actions.d.mts +1 -1
  10. package/dist/actions/install-actions.d.ts +1 -1
  11. package/dist/actions/install-actions.js +39 -0
  12. package/dist/actions/install-actions.js.map +1 -1
  13. package/dist/actions/service-account.d.mts +1 -1
  14. package/dist/actions/service-account.d.ts +1 -1
  15. package/dist/actions/service-account.js +39 -0
  16. package/dist/actions/service-account.js.map +1 -1
  17. package/dist/actions/support-bundles.d.mts +1 -1
  18. package/dist/actions/support-bundles.d.ts +1 -1
  19. package/dist/actions/support-bundles.js +39 -0
  20. package/dist/actions/support-bundles.js.map +1 -1
  21. package/dist/actions/team-settings.d.mts +1 -1
  22. package/dist/actions/team-settings.d.ts +1 -1
  23. package/dist/actions/team-settings.js +39 -0
  24. package/dist/actions/team-settings.js.map +1 -1
  25. package/dist/actions/trial-signup.js +39 -0
  26. package/dist/actions/trial-signup.js.map +1 -1
  27. package/dist/actions/user-settings.d.mts +1 -1
  28. package/dist/actions/user-settings.d.ts +1 -1
  29. package/dist/actions/user-settings.js +39 -0
  30. package/dist/actions/user-settings.js.map +1 -1
  31. package/dist/airgap-instances.d.mts +1 -1
  32. package/dist/airgap-instances.d.ts +1 -1
  33. package/dist/airgap-instances.js +3 -2
  34. package/dist/airgap-instances.js.map +1 -1
  35. package/dist/esm/actions/change-team.js +39 -0
  36. package/dist/esm/actions/change-team.js.map +1 -1
  37. package/dist/esm/actions/index.js +40 -1
  38. package/dist/esm/actions/index.js.map +1 -1
  39. package/dist/esm/actions/install-actions.js +39 -0
  40. package/dist/esm/actions/install-actions.js.map +1 -1
  41. package/dist/esm/actions/service-account.js +39 -0
  42. package/dist/esm/actions/service-account.js.map +1 -1
  43. package/dist/esm/actions/support-bundles.js +39 -0
  44. package/dist/esm/actions/support-bundles.js.map +1 -1
  45. package/dist/esm/actions/team-settings.js +39 -0
  46. package/dist/esm/actions/team-settings.js.map +1 -1
  47. package/dist/esm/actions/trial-signup.js +39 -0
  48. package/dist/esm/actions/trial-signup.js.map +1 -1
  49. package/dist/esm/actions/user-settings.js +39 -0
  50. package/dist/esm/actions/user-settings.js.map +1 -1
  51. package/dist/esm/airgap-instances.js +3 -2
  52. package/dist/esm/airgap-instances.js.map +1 -1
  53. package/dist/esm/helm-install-wizard.js +414 -189
  54. package/dist/esm/helm-install-wizard.js.map +1 -1
  55. package/dist/esm/index.js +89 -64
  56. package/dist/esm/index.js.map +1 -1
  57. package/dist/esm/install-actions.js +39 -0
  58. package/dist/esm/install-actions.js.map +1 -1
  59. package/dist/esm/instance-card.js +2 -1
  60. package/dist/esm/instance-card.js.map +1 -1
  61. package/dist/esm/license-details.js +39 -0
  62. package/dist/esm/license-details.js.map +1 -1
  63. package/dist/esm/linux-install-wizard.js +310 -166
  64. package/dist/esm/linux-install-wizard.js.map +1 -1
  65. package/dist/esm/logout-action.js +187 -0
  66. package/dist/esm/logout-action.js.map +1 -0
  67. package/dist/esm/logout-button.js +32 -0
  68. package/dist/esm/logout-button.js.map +1 -0
  69. package/dist/esm/markdown-renderer.js +16 -0
  70. package/dist/esm/markdown-renderer.js.map +1 -0
  71. package/dist/esm/middleware.js +3 -3
  72. package/dist/esm/middleware.js.map +1 -1
  73. package/dist/esm/online-instance-list.js +3 -2
  74. package/dist/esm/online-instance-list.js.map +1 -1
  75. package/dist/esm/saml-callback-client.js +5 -2
  76. package/dist/esm/saml-callback-client.js.map +1 -1
  77. package/dist/esm/saml-handlers.js +104 -0
  78. package/dist/esm/saml-handlers.js.map +1 -1
  79. package/dist/esm/support-bundle-collection-card.js +3 -2
  80. package/dist/esm/support-bundle-collection-card.js.map +1 -1
  81. package/dist/esm/support-bundles-card.js +2 -2
  82. package/dist/esm/support-bundles-card.js.map +1 -1
  83. package/dist/esm/support-card.js +39 -0
  84. package/dist/esm/support-card.js.map +1 -1
  85. package/dist/esm/top-nav-menu-close.js +46 -0
  86. package/dist/esm/top-nav-menu-close.js.map +1 -0
  87. package/dist/esm/top-nav.js +149 -59
  88. package/dist/esm/top-nav.js.map +1 -1
  89. package/dist/esm/trial-signup.js +6 -3
  90. package/dist/esm/trial-signup.js.map +1 -1
  91. package/dist/esm/update-layout.js +149 -59
  92. package/dist/esm/update-layout.js.map +1 -1
  93. package/dist/esm/upload-support-bundle-modal.js +2 -2
  94. package/dist/esm/upload-support-bundle-modal.js.map +1 -1
  95. package/dist/esm/user-menu-dropdown.js +52 -0
  96. package/dist/esm/user-menu-dropdown.js.map +1 -0
  97. package/dist/esm/user-settings.js +5 -5
  98. package/dist/esm/user-settings.js.map +1 -1
  99. package/dist/esm/utils/index.js +39 -0
  100. package/dist/esm/utils/index.js.map +1 -1
  101. package/dist/helm-install-wizard.d.mts +18 -7
  102. package/dist/helm-install-wizard.d.ts +18 -7
  103. package/dist/helm-install-wizard.js +418 -189
  104. package/dist/helm-install-wizard.js.map +1 -1
  105. package/dist/{index-sMbq94M7.d.ts → index-DXy7RxOX.d.ts} +18 -1
  106. package/dist/{index-DyzJ0yKD.d.mts → index-JX9-CIMA.d.mts} +18 -1
  107. package/dist/index.d.mts +1 -1
  108. package/dist/index.d.ts +1 -1
  109. package/dist/index.js +89 -64
  110. package/dist/index.js.map +1 -1
  111. package/dist/install-actions.d.mts +2 -2
  112. package/dist/install-actions.d.ts +2 -2
  113. package/dist/install-actions.js +39 -0
  114. package/dist/install-actions.js.map +1 -1
  115. package/dist/instance-card.d.mts +1 -1
  116. package/dist/instance-card.d.ts +1 -1
  117. package/dist/instance-card.js +2 -1
  118. package/dist/instance-card.js.map +1 -1
  119. package/dist/license-details.js +39 -0
  120. package/dist/license-details.js.map +1 -1
  121. package/dist/linux-install-wizard.d.mts +17 -7
  122. package/dist/linux-install-wizard.d.ts +17 -7
  123. package/dist/linux-install-wizard.js +314 -166
  124. package/dist/linux-install-wizard.js.map +1 -1
  125. package/dist/logout-action.d.mts +7 -0
  126. package/dist/logout-action.d.ts +7 -0
  127. package/dist/logout-action.js +189 -0
  128. package/dist/logout-action.js.map +1 -0
  129. package/dist/logout-button.d.mts +16 -0
  130. package/dist/logout-button.d.ts +16 -0
  131. package/dist/logout-button.js +34 -0
  132. package/dist/logout-button.js.map +1 -0
  133. package/dist/markdown-renderer.d.mts +12 -0
  134. package/dist/markdown-renderer.d.ts +12 -0
  135. package/dist/markdown-renderer.js +22 -0
  136. package/dist/markdown-renderer.js.map +1 -0
  137. package/dist/middleware.js +3 -3
  138. package/dist/middleware.js.map +1 -1
  139. package/dist/online-instance-list.d.mts +1 -1
  140. package/dist/online-instance-list.d.ts +1 -1
  141. package/dist/online-instance-list.js +3 -2
  142. package/dist/online-instance-list.js.map +1 -1
  143. package/dist/pending-installations.d.mts +1 -1
  144. package/dist/pending-installations.d.ts +1 -1
  145. package/dist/saml-callback-client.js +5 -2
  146. package/dist/saml-callback-client.js.map +1 -1
  147. package/dist/saml-handlers.js +104 -0
  148. package/dist/saml-handlers.js.map +1 -1
  149. package/dist/security-card.d.mts +1 -1
  150. package/dist/security-card.d.ts +1 -1
  151. package/dist/styles.css +39 -0
  152. package/dist/support-bundle-collection-card.js +3 -2
  153. package/dist/support-bundle-collection-card.js.map +1 -1
  154. package/dist/support-bundles-card.d.mts +2 -2
  155. package/dist/support-bundles-card.d.ts +2 -2
  156. package/dist/support-bundles-card.js +2 -2
  157. package/dist/support-bundles-card.js.map +1 -1
  158. package/dist/support-card.js +39 -0
  159. package/dist/support-card.js.map +1 -1
  160. package/dist/top-nav-menu-close.d.mts +10 -0
  161. package/dist/top-nav-menu-close.d.ts +10 -0
  162. package/dist/top-nav-menu-close.js +48 -0
  163. package/dist/top-nav-menu-close.js.map +1 -0
  164. package/dist/top-nav.js +149 -59
  165. package/dist/top-nav.js.map +1 -1
  166. package/dist/trial-signup.js +6 -3
  167. package/dist/trial-signup.js.map +1 -1
  168. package/dist/update-layout.js +149 -59
  169. package/dist/update-layout.js.map +1 -1
  170. package/dist/upload-support-bundle-modal.js +2 -2
  171. package/dist/upload-support-bundle-modal.js.map +1 -1
  172. package/dist/user-menu-dropdown.d.mts +25 -0
  173. package/dist/user-menu-dropdown.d.ts +25 -0
  174. package/dist/user-menu-dropdown.js +59 -0
  175. package/dist/user-menu-dropdown.js.map +1 -0
  176. package/dist/user-settings.js +5 -5
  177. package/dist/user-settings.js.map +1 -1
  178. package/dist/utils/index.d.mts +1 -1
  179. package/dist/utils/index.d.ts +1 -1
  180. package/dist/utils/index.js +39 -0
  181. package/dist/utils/index.js.map +1 -1
  182. 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 = ({ step, primaryColor = DEFAULT_SECONDARY_COLOR }) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-3", children: [
56
- /* @__PURE__ */ jsx(
57
- "div",
58
- {
59
- className: `flex h-10 w-10 items-center justify-center rounded-full border-2 ${step > 1 ? "border-gray-900 bg-gray-900 text-white" : ""}`,
60
- style: step === 1 ? { borderColor: primaryColor } : void 0,
61
- children: step > 1 ? /* @__PURE__ */ jsx(
62
- "svg",
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
- xmlns: "http://www.w3.org/2000/svg",
65
- viewBox: "0 0 16 16",
66
- className: "h-3.5 w-3.5",
67
- fill: "none",
68
- stroke: "currentColor",
69
- strokeWidth: "2",
70
- children: /* @__PURE__ */ jsx("path", { d: "m3.5 8 3 3 6-6" })
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
- ) : /* @__PURE__ */ jsx("span", { className: "h-2.5 w-2.5 rounded-full", style: { backgroundColor: primaryColor } })
73
- }
74
- ),
75
- /* @__PURE__ */ jsx("div", { className: `h-0.5 w-12 ${step > 1 ? "bg-gray-900" : "bg-gray-200"}` }),
76
- /* @__PURE__ */ jsx(
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 = DEFAULT_SECONDARY_COLOR
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 = DEFAULT_SECONDARY_COLOR
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
- console.debug("[InstallationInstructions] Rendering with stepOffset", { isProxy, stepOffset, stepsCount: instructions?.steps?.length });
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 = DEFAULT_SECONDARY_COLOR,
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 [step, setStep] = useState(initialStep ?? 1);
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 === 2 && firstRelease) {
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 || step !== 2) {
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, step, releases, networkAvailability, proxyUrl]);
490
+ }, [initialInstallOptionsId, getInstallOptionsAction, token, releases, networkAvailability, proxyUrl]);
480
491
  useEffect(() => {
481
- if (step !== 2 || !installOptionsId || !getInstallOptionsAction) {
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
- console.debug("[linux-install-wizard] Transitioning to step 2 (updated install options)");
560
- setStep(2);
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
- console.debug("[linux-install-wizard] Transitioning to step 2");
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
- setStep(1);
625
- onStepChange?.(1);
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
- navigateTo("/updates/checking");
640
- }, [installOptionsId, updateInstallOptionsAction, adminConsoleUrl, token]);
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 === 2) {
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: 2, primaryColor }),
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 ml-8 w-full"
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 ml-8 w-full"
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__ */ jsx("span", { children: "Step 2 of 2" }),
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
- return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
753
- /* @__PURE__ */ jsx(StepIndicator, { step: 1, primaryColor }),
754
- /* @__PURE__ */ jsxs("div", { className: "rounded-2xl border border-gray-100 bg-gray-50 p-6", children: [
755
- /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
756
- /* @__PURE__ */ jsxs("label", { className: "block text-sm font-medium text-gray-700", children: [
757
- "Instance Name",
758
- /* @__PURE__ */ jsx(
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
- type: "radio",
777
- name: "network-availability",
778
- checked: networkAvailability === "online",
779
- onChange: () => setNetworkAvailability("online"),
780
- className: "portal-radio"
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
- "Outbound requests allowed"
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("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
786
- /* @__PURE__ */ jsx(
787
- "input",
788
- {
789
- type: "radio",
790
- name: "network-availability",
791
- checked: networkAvailability === "proxy",
792
- onChange: () => setNetworkAvailability("proxy"),
793
- className: "portal-radio"
794
- }
795
- ),
796
- "Outbound requests require HTTPS Proxy"
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__ */ jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
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
- apiError ? /* @__PURE__ */ jsx("div", { className: "rounded-xl border border-rose-200 bg-rose-50 p-3 text-sm text-rose-600", children: apiError }) : null
813
- ] }),
814
- /* @__PURE__ */ jsxs("div", { className: "mt-6 flex items-center justify-between text-sm text-gray-500", children: [
815
- /* @__PURE__ */ jsx("span", { children: "Step 1 of 2" }),
816
- /* @__PURE__ */ jsx(
817
- "button",
818
- {
819
- type: "button",
820
- onClick: handleContinue,
821
- disabled: isCreatingServiceAccount,
822
- 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",
823
- style: { backgroundColor: primaryColor },
824
- children: isCreatingServiceAccount ? "Creating..." : "Continue"
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