@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,9 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var react = require('react');
|
|
4
|
+
var ReactMarkdown = require('react-markdown');
|
|
4
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
6
|
var buffer = require('buffer');
|
|
6
7
|
|
|
8
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
|
|
10
|
+
var ReactMarkdown__default = /*#__PURE__*/_interopDefault(ReactMarkdown);
|
|
11
|
+
|
|
7
12
|
/**
|
|
8
13
|
* Enterprise Portal Components
|
|
9
14
|
* This file is generated by tsup. Do not edit manually.
|
|
@@ -22,6 +27,7 @@ __export(tracer_exports, {
|
|
|
22
27
|
var tracer_default;
|
|
23
28
|
|
|
24
29
|
// src/utils/constants.ts
|
|
30
|
+
var DEFAULT_PRIMARY_COLOR = "#4f46e5";
|
|
25
31
|
var DEFAULT_SECONDARY_COLOR = "#6366f1";
|
|
26
32
|
function useCopyToClipboard(resetDelay = 2e3) {
|
|
27
33
|
const [copied, setCopied] = react.useState(false);
|
|
@@ -42,6 +48,9 @@ function useCopyToClipboard(resetDelay = 2e3) {
|
|
|
42
48
|
}, [resetDelay]);
|
|
43
49
|
return { copy, copied };
|
|
44
50
|
}
|
|
51
|
+
function MarkdownRenderer({ children }) {
|
|
52
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "markdown-content", children: /* @__PURE__ */ jsxRuntime.jsx(ReactMarkdown__default.default, { children }) });
|
|
53
|
+
}
|
|
45
54
|
var LINUX_INSTALL_SERVICE_ACCOUNT_KEY = "linux_install_service_account";
|
|
46
55
|
var LINUX_INSTALL_OPTIONS_KEY = "linux_install_options";
|
|
47
56
|
var navigateTo = (href) => {
|
|
@@ -54,35 +63,45 @@ var navigateTo = (href) => {
|
|
|
54
63
|
console.error("[linux-install-wizard] navigation failed", error);
|
|
55
64
|
}
|
|
56
65
|
};
|
|
57
|
-
var StepIndicator = ({
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
66
|
+
var StepIndicator = ({
|
|
67
|
+
step,
|
|
68
|
+
primaryColor = DEFAULT_PRIMARY_COLOR,
|
|
69
|
+
hasPreInstall = false,
|
|
70
|
+
hasPostInstall = false
|
|
71
|
+
}) => {
|
|
72
|
+
const visibleSteps = [];
|
|
73
|
+
if (hasPreInstall) visibleSteps.push(1);
|
|
74
|
+
visibleSteps.push(2, 3);
|
|
75
|
+
if (hasPostInstall) visibleSteps.push(4);
|
|
76
|
+
const stepCount = visibleSteps.length;
|
|
77
|
+
const currentVisibleIndex = visibleSteps.indexOf(step);
|
|
78
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center gap-3", children: visibleSteps.map((visibleStep, index) => {
|
|
79
|
+
const isCompleted = index < currentVisibleIndex;
|
|
80
|
+
const isCurrent = index === currentVisibleIndex;
|
|
81
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
82
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
83
|
+
"div",
|
|
65
84
|
{
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
85
|
+
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"}`,
|
|
86
|
+
style: isCurrent ? { borderColor: primaryColor } : void 0,
|
|
87
|
+
children: isCompleted ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
88
|
+
"svg",
|
|
89
|
+
{
|
|
90
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
91
|
+
viewBox: "0 0 16 16",
|
|
92
|
+
className: "h-3.5 w-3.5",
|
|
93
|
+
fill: "none",
|
|
94
|
+
stroke: "currentColor",
|
|
95
|
+
strokeWidth: "2",
|
|
96
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m3.5 8 3 3 6-6" })
|
|
97
|
+
}
|
|
98
|
+
) : isCurrent ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-2.5 w-2.5 rounded-full", style: { backgroundColor: primaryColor } }) : null
|
|
73
99
|
}
|
|
74
|
-
)
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
"div",
|
|
80
|
-
{
|
|
81
|
-
className: `flex h-10 w-10 items-center justify-center rounded-full border-2 ${step === 2 ? "border-gray-900" : "border-gray-200"}`,
|
|
82
|
-
children: step === 2 ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-2.5 w-2.5 rounded-full bg-gray-900" }) : null
|
|
83
|
-
}
|
|
84
|
-
)
|
|
85
|
-
] });
|
|
100
|
+
),
|
|
101
|
+
index < stepCount - 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `h-0.5 w-12 ${index < currentVisibleIndex ? "bg-gray-900" : "bg-gray-200"}` })
|
|
102
|
+
] }, visibleStep);
|
|
103
|
+
}) });
|
|
104
|
+
};
|
|
86
105
|
var CodeBlock = ({
|
|
87
106
|
command,
|
|
88
107
|
onCopy
|
|
@@ -114,7 +133,7 @@ var VersionDropdown = ({
|
|
|
114
133
|
onSelect,
|
|
115
134
|
isLoading,
|
|
116
135
|
error,
|
|
117
|
-
primaryColor =
|
|
136
|
+
primaryColor = DEFAULT_PRIMARY_COLOR
|
|
118
137
|
}) => {
|
|
119
138
|
if (isLoading) {
|
|
120
139
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-8 flex items-center gap-2 text-sm text-gray-500", children: [
|
|
@@ -159,7 +178,7 @@ var InstallationInstructions = ({
|
|
|
159
178
|
isLoading,
|
|
160
179
|
completedSteps = {},
|
|
161
180
|
isProxy = false,
|
|
162
|
-
primaryColor =
|
|
181
|
+
primaryColor = DEFAULT_PRIMARY_COLOR
|
|
163
182
|
}) => {
|
|
164
183
|
if (isLoading && !instructions?.steps?.length) {
|
|
165
184
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
@@ -174,13 +193,12 @@ var InstallationInstructions = ({
|
|
|
174
193
|
return null;
|
|
175
194
|
}
|
|
176
195
|
const stepOffset = isProxy ? 3 : 2;
|
|
177
|
-
|
|
178
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `min-w-0 space-y-4 transition-opacity duration-200 ${isLoading ? "opacity-60" : ""}`, children: [
|
|
196
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `min-w-0 ml-0 space-y-4 transition-opacity duration-200 ${isLoading ? "opacity-60" : ""}`, children: [
|
|
179
197
|
/* @__PURE__ */ jsxRuntime.jsxs("h3", { className: "text-lg font-semibold text-gray-900", children: [
|
|
180
198
|
"Installation Instructions",
|
|
181
199
|
isLoading && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2 inline-block h-4 w-4 animate-spin rounded-full border-2 border-gray-300", style: { borderTopColor: primaryColor } })
|
|
182
200
|
] }),
|
|
183
|
-
/* @__PURE__ */ jsxRuntime.jsx("ol", { className: "min-w-0 space-y-6 text-sm text-gray-700", children: instructions.steps.map((step, index) => {
|
|
201
|
+
/* @__PURE__ */ jsxRuntime.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) => {
|
|
184
202
|
const completableStepNames = ["download_assets", "install"];
|
|
185
203
|
const canComplete = completableStepNames.includes(step.step_name);
|
|
186
204
|
const isCompleted = canComplete && completedSteps[step.step_name];
|
|
@@ -205,7 +223,7 @@ var InstallationInstructions = ({
|
|
|
205
223
|
};
|
|
206
224
|
var LinuxInstallWizard = ({
|
|
207
225
|
token,
|
|
208
|
-
primaryColor =
|
|
226
|
+
primaryColor = DEFAULT_PRIMARY_COLOR,
|
|
209
227
|
secondaryColor = DEFAULT_SECONDARY_COLOR,
|
|
210
228
|
createServiceAccountAction,
|
|
211
229
|
fetchChannelReleasesAction,
|
|
@@ -219,9 +237,19 @@ var LinuxInstallWizard = ({
|
|
|
219
237
|
initialInstallOptionsId,
|
|
220
238
|
initialInstallOptionsData,
|
|
221
239
|
initialChannelReleases,
|
|
222
|
-
supportPortalLink
|
|
240
|
+
supportPortalLink,
|
|
241
|
+
preInstallMarkdown,
|
|
242
|
+
postInstallMarkdown,
|
|
243
|
+
completionUrl,
|
|
244
|
+
embeddedClusterInstallUrl
|
|
223
245
|
}) => {
|
|
224
|
-
const
|
|
246
|
+
const hasPreInstall = Boolean(preInstallMarkdown && preInstallMarkdown.trim());
|
|
247
|
+
const hasPostInstall = Boolean(postInstallMarkdown && postInstallMarkdown.trim());
|
|
248
|
+
const effectiveInitialStep = (() => {
|
|
249
|
+
if (initialStep) return initialStep;
|
|
250
|
+
return hasPreInstall ? 1 : 2;
|
|
251
|
+
})();
|
|
252
|
+
const [step, setStep] = react.useState(effectiveInitialStep);
|
|
225
253
|
const [instanceName, setInstanceName] = react.useState(initialInstallOptionsData?.instance_name ?? "");
|
|
226
254
|
const [networkAvailability, setNetworkAvailability] = react.useState(initialNetwork ?? "online");
|
|
227
255
|
const [adminConsoleUrl, setAdminConsoleUrl] = react.useState(initialInstallOptionsData?.admin_console_url ?? "");
|
|
@@ -229,6 +257,7 @@ var LinuxInstallWizard = ({
|
|
|
229
257
|
const [showErrors, setShowErrors] = react.useState(false);
|
|
230
258
|
const [isCreatingServiceAccount, setIsCreatingServiceAccount] = react.useState(false);
|
|
231
259
|
const [apiError, setApiError] = react.useState(null);
|
|
260
|
+
const [isWaitingForNavigation, setIsWaitingForNavigation] = react.useState(false);
|
|
232
261
|
const [installOptionsId, setInstallOptionsId] = react.useState(initialInstallOptionsId ?? null);
|
|
233
262
|
const [serviceAccountId, setServiceAccountId] = react.useState(initialInstallOptionsData?.service_account_id ?? null);
|
|
234
263
|
const [originalInstanceName, setOriginalInstanceName] = react.useState(initialInstallOptionsData?.instance_name ?? null);
|
|
@@ -247,7 +276,7 @@ var LinuxInstallWizard = ({
|
|
|
247
276
|
const [isLoadingInstructions, setIsLoadingInstructions] = react.useState(false);
|
|
248
277
|
const [completedSteps, setCompletedSteps] = react.useState({});
|
|
249
278
|
const hasLoadedReleases = react.useRef(!!initialChannelReleases?.length);
|
|
250
|
-
const hasResumedInstallation = react.useRef(!!initialInstallOptionsData);
|
|
279
|
+
const hasResumedInstallation = react.useRef(!!initialInstallOptionsData?.instructions);
|
|
251
280
|
const lastUpdateRef = react.useRef(
|
|
252
281
|
initialInstallOptionsData?.channel_id && initialInstallOptionsData?.channel_release_sequence ? { channelId: initialInstallOptionsData.channel_id, sequence: initialInstallOptionsData.channel_release_sequence } : {}
|
|
253
282
|
);
|
|
@@ -275,16 +304,28 @@ var LinuxInstallWizard = ({
|
|
|
275
304
|
react.useEffect(() => {
|
|
276
305
|
hasMountedRef.current = true;
|
|
277
306
|
}, []);
|
|
307
|
+
react.useEffect(() => {
|
|
308
|
+
if (step === 1 && !hasPreInstall) {
|
|
309
|
+
setStep(2);
|
|
310
|
+
if (onStepChange) {
|
|
311
|
+
onStepChange(2);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}, [step, hasPreInstall, onStepChange]);
|
|
278
315
|
react.useEffect(() => {
|
|
279
316
|
if (!hasMountedRef.current) {
|
|
280
317
|
prevStepRef.current = step;
|
|
281
318
|
return;
|
|
282
319
|
}
|
|
283
320
|
if (step !== prevStepRef.current) {
|
|
321
|
+
if (installOptionsId !== prevInstallOptionsIdRef.current) {
|
|
322
|
+
prevStepRef.current = step;
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
284
325
|
onStepChange?.(step);
|
|
285
326
|
prevStepRef.current = step;
|
|
286
327
|
}
|
|
287
|
-
}, [step, onStepChange]);
|
|
328
|
+
}, [step, installOptionsId, onStepChange]);
|
|
288
329
|
react.useEffect(() => {
|
|
289
330
|
if (!hasMountedRef.current) {
|
|
290
331
|
prevInstallOptionsIdRef.current = installOptionsId;
|
|
@@ -299,7 +340,7 @@ var LinuxInstallWizard = ({
|
|
|
299
340
|
selectedReleaseRef.current = selectedRelease;
|
|
300
341
|
}, [selectedRelease]);
|
|
301
342
|
react.useEffect(() => {
|
|
302
|
-
if (step !== 2 || !fetchChannelReleasesAction || hasLoadedReleases.current) {
|
|
343
|
+
if (step !== 2 && step !== 3 || !fetchChannelReleasesAction || hasLoadedReleases.current) {
|
|
303
344
|
return;
|
|
304
345
|
}
|
|
305
346
|
const loadReleases = async () => {
|
|
@@ -331,7 +372,7 @@ var LinuxInstallWizard = ({
|
|
|
331
372
|
return;
|
|
332
373
|
}
|
|
333
374
|
const firstRelease = embeddedClusterReleases[0];
|
|
334
|
-
if (step ===
|
|
375
|
+
if (step === 3 && firstRelease) {
|
|
335
376
|
setSelectedRelease(firstRelease);
|
|
336
377
|
hasAutoSelectedRelease.current = true;
|
|
337
378
|
}
|
|
@@ -350,12 +391,6 @@ var LinuxInstallWizard = ({
|
|
|
350
391
|
}
|
|
351
392
|
const updateOptions = async () => {
|
|
352
393
|
setIsLoadingInstructions(true);
|
|
353
|
-
console.debug("[linux-install-wizard] Updating install options with release", {
|
|
354
|
-
channelId,
|
|
355
|
-
sequence,
|
|
356
|
-
networkAvailability,
|
|
357
|
-
proxyUrl: networkAvailability === "proxy" ? proxyUrl : void 0
|
|
358
|
-
});
|
|
359
394
|
try {
|
|
360
395
|
const result = await updateInstallOptionsAction({
|
|
361
396
|
token,
|
|
@@ -367,10 +402,6 @@ var LinuxInstallWizard = ({
|
|
|
367
402
|
});
|
|
368
403
|
lastUpdateRef.current = { channelId, sequence };
|
|
369
404
|
if (result.instructions) {
|
|
370
|
-
console.debug("[linux-install-wizard] Instructions received from release update", {
|
|
371
|
-
stepsCount: result.instructions.steps?.length,
|
|
372
|
-
firstStepName: result.instructions.steps?.[0]?.step_name
|
|
373
|
-
});
|
|
374
405
|
setInstructions(result.instructions);
|
|
375
406
|
}
|
|
376
407
|
} catch (error) {
|
|
@@ -384,29 +415,16 @@ var LinuxInstallWizard = ({
|
|
|
384
415
|
}, [selectedRelease, installOptionsId, token, updateInstallOptionsAction, networkAvailability, proxyUrl]);
|
|
385
416
|
react.useEffect(() => {
|
|
386
417
|
if (networkAvailability !== "proxy" || !installOptionsId || !updateInstallOptionsAction || !selectedRelease) {
|
|
387
|
-
console.debug("[linux-install-wizard] Skipping proxy URL update effect", {
|
|
388
|
-
networkAvailability,
|
|
389
|
-
hasInstallOptionsId: !!installOptionsId,
|
|
390
|
-
hasUpdateAction: !!updateInstallOptionsAction,
|
|
391
|
-
hasSelectedRelease: !!selectedRelease
|
|
392
|
-
});
|
|
393
418
|
return;
|
|
394
419
|
}
|
|
395
420
|
if (!hasResumedInstallation.current) {
|
|
396
421
|
return;
|
|
397
422
|
}
|
|
398
|
-
console.debug("[linux-install-wizard] Proxy URL changed, will regenerate instructions after 500ms", { proxyUrl });
|
|
399
423
|
const timeoutId = setTimeout(async () => {
|
|
400
424
|
const currentRelease = selectedReleaseRef.current;
|
|
401
425
|
if (!currentRelease) {
|
|
402
|
-
console.debug("[linux-install-wizard] No release selected, skipping proxy URL update");
|
|
403
426
|
return;
|
|
404
427
|
}
|
|
405
|
-
console.debug("[linux-install-wizard] Regenerating instructions with proxy URL", {
|
|
406
|
-
proxyUrl,
|
|
407
|
-
channelId: currentRelease.channelId,
|
|
408
|
-
channelSequence: currentRelease.channelSequence
|
|
409
|
-
});
|
|
410
428
|
try {
|
|
411
429
|
const result = await updateInstallOptionsAction({
|
|
412
430
|
token,
|
|
@@ -417,9 +435,6 @@ var LinuxInstallWizard = ({
|
|
|
417
435
|
proxyUrl: proxyUrl || void 0
|
|
418
436
|
});
|
|
419
437
|
if (result.instructions) {
|
|
420
|
-
console.debug("[linux-install-wizard] Instructions updated with proxy URL", {
|
|
421
|
-
stepsCount: result.instructions.steps?.length
|
|
422
|
-
});
|
|
423
438
|
setInstructions(result.instructions);
|
|
424
439
|
}
|
|
425
440
|
} catch (error) {
|
|
@@ -432,7 +447,7 @@ var LinuxInstallWizard = ({
|
|
|
432
447
|
if (hasResumedInstallation.current) {
|
|
433
448
|
return;
|
|
434
449
|
}
|
|
435
|
-
if (!initialInstallOptionsId || !getInstallOptionsAction
|
|
450
|
+
if (!initialInstallOptionsId || !getInstallOptionsAction) {
|
|
436
451
|
return;
|
|
437
452
|
}
|
|
438
453
|
hasResumedInstallation.current = true;
|
|
@@ -478,9 +493,9 @@ var LinuxInstallWizard = ({
|
|
|
478
493
|
}
|
|
479
494
|
};
|
|
480
495
|
resumeInstallation();
|
|
481
|
-
}, [initialInstallOptionsId, getInstallOptionsAction, token,
|
|
496
|
+
}, [initialInstallOptionsId, getInstallOptionsAction, token, releases, networkAvailability, proxyUrl]);
|
|
482
497
|
react.useEffect(() => {
|
|
483
|
-
if (step !==
|
|
498
|
+
if (step !== 3 || !installOptionsId || !getInstallOptionsAction) {
|
|
484
499
|
return;
|
|
485
500
|
}
|
|
486
501
|
if (completedSteps["download_assets"] && completedSteps["install"]) {
|
|
@@ -513,9 +528,7 @@ var LinuxInstallWizard = ({
|
|
|
513
528
|
return () => clearInterval(pollInterval);
|
|
514
529
|
}, [step, installOptionsId, getInstallOptionsAction, token, completedSteps]);
|
|
515
530
|
const handleContinue = async () => {
|
|
516
|
-
console.debug("[linux-install-wizard] handleContinue called, instanceName:", JSON.stringify(instanceName));
|
|
517
531
|
if (!instanceName.trim()) {
|
|
518
|
-
console.debug("[linux-install-wizard] Validation failed: instanceName is empty");
|
|
519
532
|
setShowErrors(true);
|
|
520
533
|
return;
|
|
521
534
|
}
|
|
@@ -529,15 +542,7 @@ var LinuxInstallWizard = ({
|
|
|
529
542
|
setIsCreatingServiceAccount(true);
|
|
530
543
|
try {
|
|
531
544
|
const trimmedInstanceName = instanceName.trim();
|
|
532
|
-
console.debug("[linux-install-wizard] handleContinue - checking conditions", {
|
|
533
|
-
serviceAccountId: !!serviceAccountId,
|
|
534
|
-
originalInstanceName,
|
|
535
|
-
trimmedInstanceName,
|
|
536
|
-
networkAvailability,
|
|
537
|
-
installOptionsId: !!installOptionsId
|
|
538
|
-
});
|
|
539
545
|
if (serviceAccountId && originalInstanceName === trimmedInstanceName && installOptionsId && updateInstallOptionsAction) {
|
|
540
|
-
console.debug("[linux-install-wizard] Reusing existing service account, updating install options...");
|
|
541
546
|
const firstRelease = embeddedClusterReleases[0];
|
|
542
547
|
const result = await updateInstallOptionsAction({
|
|
543
548
|
token,
|
|
@@ -558,9 +563,8 @@ var LinuxInstallWizard = ({
|
|
|
558
563
|
if (result.instructions) {
|
|
559
564
|
setInstructions(result.instructions);
|
|
560
565
|
}
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
onStepChange?.(2);
|
|
566
|
+
setIsWaitingForNavigation(true);
|
|
567
|
+
onStepChange?.(3);
|
|
564
568
|
return;
|
|
565
569
|
}
|
|
566
570
|
if (typeof window !== "undefined" && window.sessionStorage) {
|
|
@@ -574,7 +578,6 @@ var LinuxInstallWizard = ({
|
|
|
574
578
|
setServiceAccountId(saData.service_account.id);
|
|
575
579
|
setOriginalInstanceName(trimmedInstanceName);
|
|
576
580
|
if (createInstallOptionsAction) {
|
|
577
|
-
console.debug("[linux-install-wizard] Creating install options...");
|
|
578
581
|
const firstRelease = embeddedClusterReleases[0];
|
|
579
582
|
const installOptionsResult = await createInstallOptionsAction({
|
|
580
583
|
token,
|
|
@@ -586,7 +589,6 @@ var LinuxInstallWizard = ({
|
|
|
586
589
|
channelId: firstRelease?.channelId,
|
|
587
590
|
channelReleaseSequence: firstRelease?.channelSequence
|
|
588
591
|
});
|
|
589
|
-
console.debug("[linux-install-wizard] Install options result:", installOptionsResult);
|
|
590
592
|
if (firstRelease) {
|
|
591
593
|
setSelectedRelease(firstRelease);
|
|
592
594
|
lastUpdateRef.current = {
|
|
@@ -606,8 +608,7 @@ var LinuxInstallWizard = ({
|
|
|
606
608
|
setInstructions(installOptionsResult.instructions);
|
|
607
609
|
}
|
|
608
610
|
}
|
|
609
|
-
|
|
610
|
-
setStep(2);
|
|
611
|
+
setIsWaitingForNavigation(true);
|
|
611
612
|
} catch (error) {
|
|
612
613
|
console.error("[linux-install-wizard] Failed to continue", error);
|
|
613
614
|
const errorMessage = error instanceof Error ? error.message : "Failed to continue";
|
|
@@ -616,15 +617,33 @@ var LinuxInstallWizard = ({
|
|
|
616
617
|
} else {
|
|
617
618
|
setApiError(errorMessage);
|
|
618
619
|
}
|
|
620
|
+
setIsWaitingForNavigation(false);
|
|
619
621
|
} finally {
|
|
620
622
|
setIsCreatingServiceAccount(false);
|
|
621
623
|
}
|
|
622
624
|
};
|
|
625
|
+
const handleContinueFromPreInstall = () => {
|
|
626
|
+
setStep(2);
|
|
627
|
+
onStepChange?.(2);
|
|
628
|
+
};
|
|
623
629
|
const handleBack = () => {
|
|
624
630
|
setApiError(null);
|
|
625
631
|
setShowErrors(false);
|
|
626
|
-
|
|
627
|
-
|
|
632
|
+
setIsWaitingForNavigation(false);
|
|
633
|
+
if (step === 4) {
|
|
634
|
+
setStep(3);
|
|
635
|
+
onStepChange?.(3);
|
|
636
|
+
} else if (step === 3) {
|
|
637
|
+
setStep(2);
|
|
638
|
+
onStepChange?.(2);
|
|
639
|
+
} else if (step === 2) {
|
|
640
|
+
const prevStep = hasPreInstall ? 1 : 2;
|
|
641
|
+
setStep(prevStep);
|
|
642
|
+
onStepChange?.(prevStep);
|
|
643
|
+
}
|
|
644
|
+
};
|
|
645
|
+
const handleCompletePostInstall = () => {
|
|
646
|
+
navigateTo(completionUrl);
|
|
628
647
|
};
|
|
629
648
|
const handleFinish = react.useCallback(async () => {
|
|
630
649
|
if (installOptionsId && updateInstallOptionsAction && adminConsoleUrl) {
|
|
@@ -638,18 +657,71 @@ var LinuxInstallWizard = ({
|
|
|
638
657
|
console.error("[linux-install-wizard] Failed to save admin console URL", error);
|
|
639
658
|
}
|
|
640
659
|
}
|
|
641
|
-
|
|
642
|
-
|
|
660
|
+
if (hasPostInstall) {
|
|
661
|
+
setStep(4);
|
|
662
|
+
onStepChange?.(4);
|
|
663
|
+
} else {
|
|
664
|
+
navigateTo(completionUrl);
|
|
665
|
+
}
|
|
666
|
+
}, [installOptionsId, updateInstallOptionsAction, adminConsoleUrl, token, hasPostInstall, onStepChange, completionUrl]);
|
|
643
667
|
const handleReleaseSelect = react.useCallback((release) => {
|
|
644
668
|
setSelectedRelease(release);
|
|
645
669
|
}, []);
|
|
646
670
|
const isProxy = networkAvailability === "proxy";
|
|
647
|
-
if (step ===
|
|
671
|
+
if (step === 4 && hasPostInstall) {
|
|
648
672
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
649
|
-
/* @__PURE__ */ jsxRuntime.jsx(StepIndicator, { step:
|
|
673
|
+
/* @__PURE__ */ jsxRuntime.jsx(StepIndicator, { step: 4, primaryColor, hasPreInstall, hasPostInstall }),
|
|
674
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-gray-100 bg-gray-50 p-6", children: [
|
|
675
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsxRuntime.jsx(MarkdownRenderer, { children: postInstallMarkdown || "" }) }),
|
|
676
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-6 flex items-center justify-between text-sm text-gray-500", children: [
|
|
677
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
678
|
+
"button",
|
|
679
|
+
{
|
|
680
|
+
type: "button",
|
|
681
|
+
onClick: handleBack,
|
|
682
|
+
className: "rounded-xl px-4 py-2 font-medium text-gray-500 transition hover:bg-gray-100",
|
|
683
|
+
children: "Back"
|
|
684
|
+
}
|
|
685
|
+
),
|
|
686
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Step 4 of 4" }),
|
|
687
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
688
|
+
"button",
|
|
689
|
+
{
|
|
690
|
+
type: "button",
|
|
691
|
+
onClick: handleCompletePostInstall,
|
|
692
|
+
className: "rounded-xl px-4 py-2 font-medium text-white transition hover:brightness-90",
|
|
693
|
+
style: { backgroundColor: primaryColor },
|
|
694
|
+
children: "Complete"
|
|
695
|
+
}
|
|
696
|
+
)
|
|
697
|
+
] })
|
|
698
|
+
] })
|
|
699
|
+
] });
|
|
700
|
+
}
|
|
701
|
+
if (step === 3) {
|
|
702
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
703
|
+
/* @__PURE__ */ jsxRuntime.jsx(StepIndicator, { step: 3, primaryColor, hasPreInstall, hasPostInstall }),
|
|
650
704
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-hidden rounded-2xl border border-gray-100 bg-gray-50 p-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 space-y-6", children: [
|
|
651
705
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
652
706
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-semibold text-gray-900", children: isProxy ? "Linux Single Node Proxy Install" : "Linux Single Node Online Install" }),
|
|
707
|
+
embeddedClusterInstallUrl && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mt-4 text-sm text-gray-700", children: [
|
|
708
|
+
"For a detailed description of the system requirements, please see our",
|
|
709
|
+
" ",
|
|
710
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
711
|
+
"a",
|
|
712
|
+
{
|
|
713
|
+
href: embeddedClusterInstallUrl,
|
|
714
|
+
target: "_blank",
|
|
715
|
+
rel: "noopener noreferrer",
|
|
716
|
+
className: "font-semibold hover:underline",
|
|
717
|
+
style: { color: secondaryColor },
|
|
718
|
+
children: [
|
|
719
|
+
"Embedded Cluster installation documentation",
|
|
720
|
+
/* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.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" }) })
|
|
721
|
+
]
|
|
722
|
+
}
|
|
723
|
+
)
|
|
724
|
+
] }),
|
|
653
725
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-6 space-y-6", children: [
|
|
654
726
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
655
727
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", style: { color: primaryColor }, children: [
|
|
@@ -673,15 +745,15 @@ var LinuxInstallWizard = ({
|
|
|
673
745
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-6 w-6 items-center justify-center rounded-full font-semibold", style: { backgroundColor: `${primaryColor}20` }, children: "2" }),
|
|
674
746
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-gray-900", children: "Configure proxy URL" })
|
|
675
747
|
] }),
|
|
676
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
748
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-8", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
677
749
|
"input",
|
|
678
750
|
{
|
|
679
751
|
value: proxyUrl,
|
|
680
752
|
onChange: (event) => setProxyUrl(event.target.value),
|
|
681
753
|
placeholder: "Enter proxy URL",
|
|
682
|
-
className: "portal-input
|
|
754
|
+
className: "portal-input w-full"
|
|
683
755
|
}
|
|
684
|
-
)
|
|
756
|
+
) })
|
|
685
757
|
] }),
|
|
686
758
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
687
759
|
InstallationInstructions,
|
|
@@ -698,15 +770,15 @@ var LinuxInstallWizard = ({
|
|
|
698
770
|
/* @__PURE__ */ jsxRuntime.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) }),
|
|
699
771
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-gray-900", children: "(Optional) Add the Admin Console URL" })
|
|
700
772
|
] }),
|
|
701
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
773
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-8", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
702
774
|
"input",
|
|
703
775
|
{
|
|
704
776
|
value: adminConsoleUrl,
|
|
705
777
|
onChange: (event) => setAdminConsoleUrl(event.target.value),
|
|
706
778
|
placeholder: "https://localhost:30000",
|
|
707
|
-
className: "portal-input
|
|
779
|
+
className: "portal-input w-full"
|
|
708
780
|
}
|
|
709
|
-
)
|
|
781
|
+
) })
|
|
710
782
|
] })
|
|
711
783
|
] })
|
|
712
784
|
] }),
|
|
@@ -721,7 +793,12 @@ var LinuxInstallWizard = ({
|
|
|
721
793
|
children: "Back"
|
|
722
794
|
}
|
|
723
795
|
),
|
|
724
|
-
/* @__PURE__ */ jsxRuntime.
|
|
796
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
797
|
+
"Step ",
|
|
798
|
+
hasPreInstall ? 3 : 2,
|
|
799
|
+
" of ",
|
|
800
|
+
hasPreInstall && hasPostInstall ? 4 : hasPreInstall || hasPostInstall ? 3 : 2
|
|
801
|
+
] }),
|
|
725
802
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
726
803
|
"button",
|
|
727
804
|
{
|
|
@@ -729,7 +806,7 @@ var LinuxInstallWizard = ({
|
|
|
729
806
|
onClick: handleFinish,
|
|
730
807
|
className: "rounded-xl px-4 py-2 font-medium text-white transition hover:brightness-90",
|
|
731
808
|
style: { backgroundColor: primaryColor },
|
|
732
|
-
children: "Finish"
|
|
809
|
+
children: hasPostInstall ? "Continue" : "Finish"
|
|
733
810
|
}
|
|
734
811
|
)
|
|
735
812
|
] }),
|
|
@@ -751,82 +828,114 @@ var LinuxInstallWizard = ({
|
|
|
751
828
|
] }) })
|
|
752
829
|
] });
|
|
753
830
|
}
|
|
754
|
-
|
|
755
|
-
/* @__PURE__ */ jsxRuntime.
|
|
756
|
-
|
|
757
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
758
|
-
/* @__PURE__ */ jsxRuntime.jsxs("
|
|
759
|
-
"
|
|
760
|
-
|
|
761
|
-
"input",
|
|
762
|
-
{
|
|
763
|
-
value: instanceName,
|
|
764
|
-
onChange: (event) => setInstanceName(event.target.value),
|
|
765
|
-
placeholder: "Instance nickname",
|
|
766
|
-
"aria-invalid": showErrors && !instanceName.trim(),
|
|
767
|
-
className: `portal-input mt-1 w-full ${showErrors && !instanceName.trim() ? "border-rose-400 focus:border-rose-400 focus:ring-rose-200" : ""}`
|
|
768
|
-
}
|
|
769
|
-
),
|
|
770
|
-
showErrors && !instanceName.trim() ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1 block text-xs text-rose-500", children: "Instance name is required." }) : null
|
|
771
|
-
] }),
|
|
772
|
-
/* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "space-y-2", children: [
|
|
773
|
-
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "text-sm font-medium text-gray-700", children: "Network Availability" }),
|
|
774
|
-
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
|
|
831
|
+
if (step === 2) {
|
|
832
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
833
|
+
/* @__PURE__ */ jsxRuntime.jsx(StepIndicator, { step: 2, primaryColor, hasPreInstall, hasPostInstall }),
|
|
834
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-gray-100 bg-gray-50 p-6", children: [
|
|
835
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
836
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "block text-sm font-medium text-gray-700", children: [
|
|
837
|
+
"Instance Name",
|
|
775
838
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
776
839
|
"input",
|
|
777
840
|
{
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
className:
|
|
841
|
+
value: instanceName,
|
|
842
|
+
onChange: (event) => setInstanceName(event.target.value),
|
|
843
|
+
placeholder: "Instance nickname",
|
|
844
|
+
"aria-invalid": showErrors && !instanceName.trim(),
|
|
845
|
+
className: `portal-input mt-1 w-full ${showErrors && !instanceName.trim() ? "border-rose-400 focus:border-rose-400 focus:ring-rose-200" : ""}`
|
|
783
846
|
}
|
|
784
847
|
),
|
|
785
|
-
"
|
|
848
|
+
showErrors && !instanceName.trim() ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1 block text-xs text-rose-500", children: "Instance name is required." }) : null
|
|
786
849
|
] }),
|
|
787
|
-
/* @__PURE__ */ jsxRuntime.jsxs("
|
|
788
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
850
|
+
/* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "space-y-2", children: [
|
|
851
|
+
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "text-sm font-medium text-gray-700", children: "Network Availability" }),
|
|
852
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
|
|
853
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
854
|
+
"input",
|
|
855
|
+
{
|
|
856
|
+
type: "radio",
|
|
857
|
+
name: "network-availability",
|
|
858
|
+
checked: networkAvailability === "online",
|
|
859
|
+
onChange: () => setNetworkAvailability("online"),
|
|
860
|
+
className: "portal-radio"
|
|
861
|
+
}
|
|
862
|
+
),
|
|
863
|
+
"Outbound requests allowed"
|
|
864
|
+
] }),
|
|
865
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
|
|
866
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
867
|
+
"input",
|
|
868
|
+
{
|
|
869
|
+
type: "radio",
|
|
870
|
+
name: "network-availability",
|
|
871
|
+
checked: networkAvailability === "proxy",
|
|
872
|
+
onChange: () => setNetworkAvailability("proxy"),
|
|
873
|
+
className: "portal-radio"
|
|
874
|
+
}
|
|
875
|
+
),
|
|
876
|
+
"Outbound requests require HTTPS Proxy"
|
|
877
|
+
] }),
|
|
878
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-3 text-sm text-gray-600", children: [
|
|
879
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
880
|
+
"input",
|
|
881
|
+
{
|
|
882
|
+
type: "radio",
|
|
883
|
+
name: "network-availability",
|
|
884
|
+
checked: networkAvailability === "airgap",
|
|
885
|
+
onChange: () => setNetworkAvailability("airgap"),
|
|
886
|
+
className: "portal-radio"
|
|
887
|
+
}
|
|
888
|
+
),
|
|
889
|
+
"No outbound requests allowed (air gap)"
|
|
890
|
+
] })
|
|
799
891
|
] }),
|
|
800
|
-
/* @__PURE__ */ jsxRuntime.
|
|
801
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
802
|
-
"input",
|
|
803
|
-
{
|
|
804
|
-
type: "radio",
|
|
805
|
-
name: "network-availability",
|
|
806
|
-
checked: networkAvailability === "airgap",
|
|
807
|
-
onChange: () => setNetworkAvailability("airgap"),
|
|
808
|
-
className: "portal-radio"
|
|
809
|
-
}
|
|
810
|
-
),
|
|
811
|
-
"No outbound requests allowed (air gap)"
|
|
812
|
-
] })
|
|
892
|
+
apiError ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-xl border border-rose-200 bg-rose-50 p-3 text-sm text-rose-600", children: apiError }) : null
|
|
813
893
|
] }),
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
894
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-6 flex items-center justify-between text-sm text-gray-500", children: [
|
|
895
|
+
hasPreInstall ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
896
|
+
"button",
|
|
897
|
+
{
|
|
898
|
+
type: "button",
|
|
899
|
+
onClick: handleBack,
|
|
900
|
+
className: "rounded-xl px-4 py-2 font-medium text-gray-500 transition hover:bg-gray-100",
|
|
901
|
+
children: "Back"
|
|
902
|
+
}
|
|
903
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("span", {}),
|
|
904
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
905
|
+
"Step ",
|
|
906
|
+
hasPreInstall ? 2 : 1,
|
|
907
|
+
" of ",
|
|
908
|
+
hasPreInstall && hasPostInstall ? 4 : hasPreInstall || hasPostInstall ? 3 : 2
|
|
909
|
+
] }),
|
|
910
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
911
|
+
"button",
|
|
912
|
+
{
|
|
913
|
+
type: "button",
|
|
914
|
+
onClick: handleContinue,
|
|
915
|
+
disabled: isCreatingServiceAccount || isWaitingForNavigation,
|
|
916
|
+
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",
|
|
917
|
+
style: { backgroundColor: primaryColor },
|
|
918
|
+
children: isCreatingServiceAccount || isWaitingForNavigation ? "Saving..." : "Continue"
|
|
919
|
+
}
|
|
920
|
+
)
|
|
921
|
+
] })
|
|
829
922
|
] })
|
|
923
|
+
] });
|
|
924
|
+
}
|
|
925
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
926
|
+
/* @__PURE__ */ jsxRuntime.jsx(StepIndicator, { step: 1, primaryColor, hasPreInstall, hasPostInstall }),
|
|
927
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-gray-100 bg-gray-50 p-6", children: [
|
|
928
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsxRuntime.jsx(MarkdownRenderer, { children: preInstallMarkdown || "" }) }),
|
|
929
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-6 flex items-center justify-end text-sm text-gray-500", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
930
|
+
"button",
|
|
931
|
+
{
|
|
932
|
+
type: "button",
|
|
933
|
+
onClick: handleContinueFromPreInstall,
|
|
934
|
+
className: "rounded-xl px-4 py-2 font-medium text-white transition hover:brightness-90",
|
|
935
|
+
style: { backgroundColor: primaryColor },
|
|
936
|
+
children: "Continue"
|
|
937
|
+
}
|
|
938
|
+
) })
|
|
830
939
|
] })
|
|
831
940
|
] });
|
|
832
941
|
};
|
|
@@ -1220,6 +1329,45 @@ var fetchCustomBrandingImpl = async () => {
|
|
|
1220
1329
|
};
|
|
1221
1330
|
};
|
|
1222
1331
|
react.cache(fetchCustomBrandingImpl);
|
|
1332
|
+
var fetchDocumentationImpl = async () => {
|
|
1333
|
+
const { cookies } = await import('next/headers');
|
|
1334
|
+
const sessionStore = await cookies();
|
|
1335
|
+
const session = sessionStore.get("portal_session");
|
|
1336
|
+
const token = session?.value;
|
|
1337
|
+
if (!token) {
|
|
1338
|
+
throw new Error("Authentication required");
|
|
1339
|
+
}
|
|
1340
|
+
const url = `${getApiOrigin()}/enterprise-portal/documentation`;
|
|
1341
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1342
|
+
console.debug(
|
|
1343
|
+
"[portal-components] fetching documentation via %s (Enterprise Portal API)",
|
|
1344
|
+
url
|
|
1345
|
+
);
|
|
1346
|
+
}
|
|
1347
|
+
const response = await authenticatedFetch(url, {
|
|
1348
|
+
method: "GET",
|
|
1349
|
+
token,
|
|
1350
|
+
headers: {
|
|
1351
|
+
accept: "application/json"
|
|
1352
|
+
}
|
|
1353
|
+
});
|
|
1354
|
+
if (!response.ok) {
|
|
1355
|
+
throw new Error(
|
|
1356
|
+
`Documentation request failed (${response.status} ${response.statusText})`
|
|
1357
|
+
);
|
|
1358
|
+
}
|
|
1359
|
+
const data = await response.json();
|
|
1360
|
+
return {
|
|
1361
|
+
helmPreInstall: data.helmPreInstall || "",
|
|
1362
|
+
helmPostInstall: data.helmPostInstall || "",
|
|
1363
|
+
embeddedClusterPreInstall: data.embeddedClusterPreInstall || "",
|
|
1364
|
+
embeddedClusterPostInstall: data.embeddedClusterPostInstall || "",
|
|
1365
|
+
helmInstallUrl: data.helmInstallUrl || "",
|
|
1366
|
+
embeddedClusterInstallUrl: data.embeddedClusterInstallUrl || "",
|
|
1367
|
+
valuesOverrideUrl: data.valuesOverrideUrl || ""
|
|
1368
|
+
};
|
|
1369
|
+
};
|
|
1370
|
+
react.cache(fetchDocumentationImpl);
|
|
1223
1371
|
|
|
1224
1372
|
exports.LINUX_INSTALL_OPTIONS_KEY = LINUX_INSTALL_OPTIONS_KEY;
|
|
1225
1373
|
exports.LINUX_INSTALL_SERVICE_ACCOUNT_KEY = LINUX_INSTALL_SERVICE_ACCOUNT_KEY;
|