@replicated/portal-components 0.0.2 → 0.0.3
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 +83 -2
- package/components/metadata/registry.md +27 -2
- package/dist/actions/index.d.mts +566 -3
- package/dist/actions/index.d.ts +566 -3
- package/dist/actions/index.js +1853 -12
- package/dist/actions/index.js.map +1 -1
- package/dist/airgap-instances.d.mts +26 -0
- package/dist/airgap-instances.d.ts +26 -0
- package/dist/airgap-instances.js +354 -0
- package/dist/airgap-instances.js.map +1 -0
- package/dist/error-page.d.mts +14 -0
- package/dist/error-page.d.ts +14 -0
- package/dist/error-page.js +153 -0
- package/dist/error-page.js.map +1 -0
- package/dist/error.d.mts +15 -0
- package/dist/error.d.ts +15 -0
- package/dist/error.js +144 -0
- package/dist/error.js.map +1 -0
- package/dist/esm/actions/index.js +1816 -13
- package/dist/esm/actions/index.js.map +1 -1
- package/dist/esm/airgap-instances.js +352 -0
- package/dist/esm/airgap-instances.js.map +1 -0
- package/dist/esm/error-page.js +151 -0
- package/dist/esm/error-page.js.map +1 -0
- package/dist/esm/error.js +142 -0
- package/dist/esm/error.js.map +1 -0
- package/dist/esm/helm-install-wizard.js +1007 -0
- package/dist/esm/helm-install-wizard.js.map +1 -0
- package/dist/esm/index.js +2232 -155
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/install-actions.js +746 -0
- package/dist/esm/install-actions.js.map +1 -0
- package/dist/esm/install-card.js +115 -0
- package/dist/esm/install-card.js.map +1 -0
- package/dist/esm/install-targets.js +48 -0
- package/dist/esm/install-targets.js.map +1 -0
- package/dist/esm/instance-card.js +197 -0
- package/dist/esm/instance-card.js.map +1 -0
- package/dist/esm/join-team.js +218 -0
- package/dist/esm/join-team.js.map +1 -0
- package/dist/esm/license-card.js +131 -0
- package/dist/esm/license-card.js.map +1 -0
- package/dist/esm/license-details.js +667 -0
- package/dist/esm/license-details.js.map +1 -0
- package/dist/esm/linux-install-wizard.js +1083 -0
- package/dist/esm/linux-install-wizard.js.map +1 -0
- package/dist/esm/login.js +261 -0
- package/dist/esm/login.js.map +1 -0
- package/dist/esm/online-instance-list.js +287 -0
- package/dist/esm/online-instance-list.js.map +1 -0
- package/dist/esm/pending-installations.js +235 -0
- package/dist/esm/pending-installations.js.map +1 -0
- package/dist/esm/release-history-panel.js +100 -0
- package/dist/esm/release-history-panel.js.map +1 -0
- package/dist/esm/release-notes-card.js +23 -0
- package/dist/esm/release-notes-card.js.map +1 -0
- package/dist/esm/security-card.js +700 -0
- package/dist/esm/security-card.js.map +1 -0
- package/dist/esm/support-bundle-collection-card.js +170 -0
- package/dist/esm/support-bundle-collection-card.js.map +1 -0
- package/dist/esm/support-bundles-card.js +306 -0
- package/dist/esm/support-bundles-card.js.map +1 -0
- package/dist/esm/support-card.js +305 -0
- package/dist/esm/support-card.js.map +1 -0
- package/dist/esm/team-selection.js +117 -0
- package/dist/esm/team-selection.js.map +1 -0
- package/dist/esm/team-settings-card.js +78 -0
- package/dist/esm/team-settings-card.js.map +1 -0
- package/dist/esm/team-settings.js +136 -0
- package/dist/esm/team-settings.js.map +1 -0
- package/dist/esm/top-nav-user-menu.js +173 -0
- package/dist/esm/top-nav-user-menu.js.map +1 -0
- package/dist/esm/top-nav.js +398 -0
- package/dist/esm/top-nav.js.map +1 -0
- package/dist/esm/update-layout.js +405 -0
- package/dist/esm/update-layout.js.map +1 -0
- package/dist/esm/updates-card.js +85 -0
- package/dist/esm/updates-card.js.map +1 -0
- package/dist/esm/upload-support-bundle-modal.js +143 -0
- package/dist/esm/upload-support-bundle-modal.js.map +1 -0
- package/dist/esm/user-settings-card.js +21 -0
- package/dist/esm/user-settings-card.js.map +1 -0
- package/dist/esm/user-settings.js +368 -0
- package/dist/esm/user-settings.js.map +1 -0
- package/dist/esm/utils/index.js +170 -0
- package/dist/esm/utils/index.js.map +1 -0
- package/dist/helm-install-wizard.d.mts +38 -0
- package/dist/helm-install-wizard.d.ts +38 -0
- package/dist/helm-install-wizard.js +1011 -0
- package/dist/helm-install-wizard.js.map +1 -0
- package/dist/index.d.mts +11 -27
- package/dist/index.d.ts +11 -27
- package/dist/index.js +2258 -154
- package/dist/index.js.map +1 -1
- package/dist/install-B19AaKF_.d.mts +233 -0
- package/dist/install-Bi1qJ8Bu.d.ts +233 -0
- package/dist/install-actions.d.mts +141 -0
- package/dist/install-actions.d.ts +141 -0
- package/dist/install-actions.js +765 -0
- package/dist/install-actions.js.map +1 -0
- package/dist/install-card.d.mts +15 -0
- package/dist/install-card.d.ts +15 -0
- package/dist/install-card.js +117 -0
- package/dist/install-card.js.map +1 -0
- package/dist/install-targets.d.mts +19 -0
- package/dist/install-targets.d.ts +19 -0
- package/dist/install-targets.js +50 -0
- package/dist/install-targets.js.map +1 -0
- package/dist/instance-card.d.mts +22 -0
- package/dist/instance-card.d.ts +22 -0
- package/dist/instance-card.js +199 -0
- package/dist/instance-card.js.map +1 -0
- package/dist/join-team.d.mts +30 -0
- package/dist/join-team.d.ts +30 -0
- package/dist/join-team.js +220 -0
- package/dist/join-team.js.map +1 -0
- package/dist/license-card.d.mts +15 -0
- package/dist/license-card.d.ts +15 -0
- package/dist/license-card.js +133 -0
- package/dist/license-card.js.map +1 -0
- package/dist/license-details.d.mts +10 -0
- package/dist/license-details.d.ts +10 -0
- package/dist/license-details.js +669 -0
- package/dist/license-details.js.map +1 -0
- package/dist/linux-install-wizard.d.mts +66 -0
- package/dist/linux-install-wizard.d.ts +66 -0
- package/dist/linux-install-wizard.js +1093 -0
- package/dist/linux-install-wizard.js.map +1 -0
- package/dist/login.d.mts +37 -0
- package/dist/login.d.ts +37 -0
- package/dist/login.js +263 -0
- package/dist/login.js.map +1 -0
- package/dist/online-instance-list.d.mts +22 -0
- package/dist/online-instance-list.d.ts +22 -0
- package/dist/online-instance-list.js +289 -0
- package/dist/online-instance-list.js.map +1 -0
- package/dist/pending-installations.d.mts +15 -0
- package/dist/pending-installations.d.ts +15 -0
- package/dist/pending-installations.js +237 -0
- package/dist/pending-installations.js.map +1 -0
- package/dist/release-history-panel.d.mts +22 -0
- package/dist/release-history-panel.d.ts +22 -0
- package/dist/release-history-panel.js +102 -0
- package/dist/release-history-panel.js.map +1 -0
- package/dist/release-notes-card.d.mts +13 -0
- package/dist/release-notes-card.d.ts +13 -0
- package/dist/release-notes-card.js +25 -0
- package/dist/release-notes-card.js.map +1 -0
- package/dist/security-card.d.mts +73 -0
- package/dist/security-card.d.ts +73 -0
- package/dist/security-card.js +702 -0
- package/dist/security-card.js.map +1 -0
- package/dist/styles.css +1877 -194
- package/dist/support-bundle-collection-card.d.mts +20 -0
- package/dist/support-bundle-collection-card.d.ts +20 -0
- package/dist/support-bundle-collection-card.js +172 -0
- package/dist/support-bundle-collection-card.js.map +1 -0
- package/dist/support-bundles-card.d.mts +19 -0
- package/dist/support-bundles-card.d.ts +19 -0
- package/dist/support-bundles-card.js +308 -0
- package/dist/support-bundles-card.js.map +1 -0
- package/dist/support-card.d.mts +8 -0
- package/dist/support-card.d.ts +8 -0
- package/dist/support-card.js +307 -0
- package/dist/support-card.js.map +1 -0
- package/dist/team-selection.d.mts +23 -0
- package/dist/team-selection.d.ts +23 -0
- package/dist/team-selection.js +119 -0
- package/dist/team-selection.js.map +1 -0
- package/dist/team-settings-card-Dq1d9b5c.d.mts +14 -0
- package/dist/team-settings-card-Dq1d9b5c.d.ts +14 -0
- package/dist/team-settings-card.d.mts +2 -0
- package/dist/team-settings-card.d.ts +2 -0
- package/dist/team-settings-card.js +80 -0
- package/dist/team-settings-card.js.map +1 -0
- package/dist/team-settings.d.mts +25 -0
- package/dist/team-settings.d.ts +25 -0
- package/dist/team-settings.js +138 -0
- package/dist/team-settings.js.map +1 -0
- package/dist/top-nav-0mb1K_H0.d.mts +32 -0
- package/dist/top-nav-0mb1K_H0.d.ts +32 -0
- package/dist/top-nav-user-menu.d.mts +18 -0
- package/dist/top-nav-user-menu.d.ts +18 -0
- package/dist/top-nav-user-menu.js +175 -0
- package/dist/top-nav-user-menu.js.map +1 -0
- package/dist/top-nav.d.mts +3 -0
- package/dist/top-nav.d.ts +3 -0
- package/dist/top-nav.js +400 -0
- package/dist/top-nav.js.map +1 -0
- package/dist/update-layout.d.mts +12 -0
- package/dist/update-layout.d.ts +12 -0
- package/dist/update-layout.js +407 -0
- package/dist/update-layout.js.map +1 -0
- package/dist/updates-card-BbubBrVR.d.mts +18 -0
- package/dist/updates-card-BbubBrVR.d.ts +18 -0
- package/dist/updates-card.d.mts +2 -0
- package/dist/updates-card.d.ts +2 -0
- package/dist/updates-card.js +87 -0
- package/dist/updates-card.js.map +1 -0
- package/dist/upload-support-bundle-modal.d.mts +19 -0
- package/dist/upload-support-bundle-modal.d.ts +19 -0
- package/dist/upload-support-bundle-modal.js +145 -0
- package/dist/upload-support-bundle-modal.js.map +1 -0
- package/dist/user-settings-card.d.mts +8 -0
- package/dist/user-settings-card.d.ts +8 -0
- package/dist/user-settings-card.js +23 -0
- package/dist/user-settings-card.js.map +1 -0
- package/dist/user-settings.d.mts +47 -0
- package/dist/user-settings.d.ts +47 -0
- package/dist/user-settings.js +370 -0
- package/dist/user-settings.js.map +1 -0
- package/dist/utils/index.d.mts +70 -0
- package/dist/utils/index.d.ts +70 -0
- package/dist/utils/index.js +177 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +163 -3
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { PortalActionContext } from './actions/index.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Install-related server actions for the Linux and Helm installation wizards.
|
|
5
|
+
*
|
|
6
|
+
* These actions handle the complete installation flow including:
|
|
7
|
+
* - Fetching available releases (channel releases)
|
|
8
|
+
* - Creating/updating/fetching install options
|
|
9
|
+
* - Generating installation instructions
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
interface EmbeddedClusterInstallationType {
|
|
13
|
+
version?: string;
|
|
14
|
+
}
|
|
15
|
+
interface HelmInstallationType {
|
|
16
|
+
version?: string;
|
|
17
|
+
}
|
|
18
|
+
interface InstallationTypes {
|
|
19
|
+
embeddedCluster?: EmbeddedClusterInstallationType;
|
|
20
|
+
helm?: HelmInstallationType;
|
|
21
|
+
}
|
|
22
|
+
interface ChannelRelease {
|
|
23
|
+
channelId: string;
|
|
24
|
+
channelName: string;
|
|
25
|
+
channelSlug: string;
|
|
26
|
+
channelSequence: number;
|
|
27
|
+
releaseSequence: number;
|
|
28
|
+
versionLabel: string;
|
|
29
|
+
releaseNotes?: string;
|
|
30
|
+
createdAt: string;
|
|
31
|
+
isRequired?: boolean;
|
|
32
|
+
installationTypes?: InstallationTypes;
|
|
33
|
+
}
|
|
34
|
+
interface FetchChannelReleasesInput {
|
|
35
|
+
token: string;
|
|
36
|
+
channelId?: string;
|
|
37
|
+
}
|
|
38
|
+
interface FetchChannelReleasesResult {
|
|
39
|
+
channelReleases: ChannelRelease[];
|
|
40
|
+
}
|
|
41
|
+
type NetworkAvailability = "online" | "proxy" | "airgap";
|
|
42
|
+
type InstallType = "linux" | "helm";
|
|
43
|
+
type RegistryAvailability = "online" | "partial" | "offline";
|
|
44
|
+
type KubernetesDistribution = "vanilla" | "openshift" | "rancher" | "aks" | "eks" | "gke";
|
|
45
|
+
type InstallStatus = "in_progress" | "completed" | "discarded";
|
|
46
|
+
interface InstallStep {
|
|
47
|
+
step_number: number;
|
|
48
|
+
step_name: string;
|
|
49
|
+
title: string;
|
|
50
|
+
description?: string;
|
|
51
|
+
commands: string[];
|
|
52
|
+
/** If true, this step can be marked as completed (shows checkmark UI) */
|
|
53
|
+
maybe_completed?: boolean;
|
|
54
|
+
}
|
|
55
|
+
interface InstallInstructions {
|
|
56
|
+
format: "basic" | "mdx";
|
|
57
|
+
install_type: string;
|
|
58
|
+
title: string;
|
|
59
|
+
steps?: InstallStep[];
|
|
60
|
+
mdx_template?: string;
|
|
61
|
+
context?: Record<string, unknown>;
|
|
62
|
+
renderer_version?: number;
|
|
63
|
+
}
|
|
64
|
+
interface InstallOptions {
|
|
65
|
+
id: string;
|
|
66
|
+
customer_id: string;
|
|
67
|
+
install_type: InstallType;
|
|
68
|
+
instance_name: string;
|
|
69
|
+
instance_id?: string;
|
|
70
|
+
service_account_id?: string;
|
|
71
|
+
service_account_email_address?: string;
|
|
72
|
+
license_id?: string;
|
|
73
|
+
started_at: string;
|
|
74
|
+
completed_at?: string;
|
|
75
|
+
network_availability?: NetworkAvailability;
|
|
76
|
+
is_multi_node?: boolean;
|
|
77
|
+
channel_id?: string;
|
|
78
|
+
channel_release_sequence?: number;
|
|
79
|
+
registry_availability?: RegistryAvailability;
|
|
80
|
+
kubernetes_distribution?: KubernetesDistribution;
|
|
81
|
+
admin_console_url?: string;
|
|
82
|
+
status?: InstallStatus;
|
|
83
|
+
}
|
|
84
|
+
interface CreateInstallOptionsInput {
|
|
85
|
+
token: string;
|
|
86
|
+
installType: InstallType;
|
|
87
|
+
instanceName: string;
|
|
88
|
+
serviceAccountId: string;
|
|
89
|
+
networkAvailability: NetworkAvailability;
|
|
90
|
+
isMultiNode?: boolean;
|
|
91
|
+
channelId?: string;
|
|
92
|
+
channelReleaseSequence?: number;
|
|
93
|
+
registryAvailability?: RegistryAvailability;
|
|
94
|
+
kubernetesDistribution?: KubernetesDistribution;
|
|
95
|
+
}
|
|
96
|
+
interface CreateInstallOptionsResult {
|
|
97
|
+
install_options: InstallOptions;
|
|
98
|
+
instructions?: InstallInstructions;
|
|
99
|
+
}
|
|
100
|
+
interface GetInstallOptionsInput {
|
|
101
|
+
token: string;
|
|
102
|
+
installOptionsId: string;
|
|
103
|
+
includeInstructions?: boolean;
|
|
104
|
+
privateRegistryHostname?: string;
|
|
105
|
+
proxyUrl?: string;
|
|
106
|
+
}
|
|
107
|
+
interface GetInstallOptionsResult {
|
|
108
|
+
id: string;
|
|
109
|
+
customer_id: string;
|
|
110
|
+
install_type: InstallType;
|
|
111
|
+
instance_name: string;
|
|
112
|
+
instance_id?: string;
|
|
113
|
+
service_account_id?: string;
|
|
114
|
+
service_account_email_address?: string;
|
|
115
|
+
started_at: string;
|
|
116
|
+
completed_at?: string;
|
|
117
|
+
network_availability?: NetworkAvailability;
|
|
118
|
+
is_multi_node?: boolean;
|
|
119
|
+
channel_id?: string;
|
|
120
|
+
channel_release_sequence?: number;
|
|
121
|
+
registry_availability?: RegistryAvailability;
|
|
122
|
+
kubernetes_distribution?: KubernetesDistribution;
|
|
123
|
+
admin_console_url?: string;
|
|
124
|
+
status?: InstallStatus;
|
|
125
|
+
instructions?: InstallInstructions;
|
|
126
|
+
/** Timestamp when assets were downloaded (for progress tracking) */
|
|
127
|
+
assets_downloaded_at?: string;
|
|
128
|
+
/** Timestamp when registry authentication was completed (for Helm progress tracking) */
|
|
129
|
+
registry_authenticated_at?: string;
|
|
130
|
+
/** Timestamp when images were pulled (for Helm progress tracking) */
|
|
131
|
+
images_pulled_at?: string;
|
|
132
|
+
/** Timestamp when installation was completed (for progress tracking) */
|
|
133
|
+
installation_completed_at?: string;
|
|
134
|
+
}
|
|
135
|
+
interface UpdateInstallOptionsInput {
|
|
136
|
+
token: string;
|
|
137
|
+
installOptionsId: string;
|
|
138
|
+
installType?: InstallType;
|
|
139
|
+
channelId?: string;
|
|
140
|
+
channelReleaseSequence?: number;
|
|
141
|
+
networkAvailability?: NetworkAvailability;
|
|
142
|
+
registryAvailability?: RegistryAvailability;
|
|
143
|
+
kubernetesDistribution?: KubernetesDistribution;
|
|
144
|
+
isMultiNode?: boolean;
|
|
145
|
+
serviceAccountId?: string;
|
|
146
|
+
adminConsoleUrl?: string | null;
|
|
147
|
+
status?: InstallStatus;
|
|
148
|
+
includeInstructions?: boolean;
|
|
149
|
+
privateRegistryHostname?: string;
|
|
150
|
+
proxyUrl?: string;
|
|
151
|
+
}
|
|
152
|
+
interface UpdateInstallOptionsResult {
|
|
153
|
+
install_options: InstallOptions;
|
|
154
|
+
instructions?: InstallInstructions;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Fetches available channel releases for the customer.
|
|
158
|
+
* These are filtered to show only releases that have embedded cluster installers.
|
|
159
|
+
*/
|
|
160
|
+
declare function fetchChannelReleases(input: FetchChannelReleasesInput, context?: PortalActionContext): Promise<FetchChannelReleasesResult>;
|
|
161
|
+
/**
|
|
162
|
+
* Creates a new install options record to track an installation attempt.
|
|
163
|
+
* This is called after creating a service account and before showing install commands.
|
|
164
|
+
*/
|
|
165
|
+
declare function createInstallOptions(input: CreateInstallOptionsInput, context?: PortalActionContext): Promise<CreateInstallOptionsResult>;
|
|
166
|
+
/**
|
|
167
|
+
* Fetches existing install options by ID.
|
|
168
|
+
* Can optionally include generated installation instructions.
|
|
169
|
+
*/
|
|
170
|
+
declare function getInstallOptions(input: GetInstallOptionsInput, context?: PortalActionContext): Promise<GetInstallOptionsResult>;
|
|
171
|
+
/**
|
|
172
|
+
* Updates existing install options.
|
|
173
|
+
* Typically called when user selects a different version or changes settings.
|
|
174
|
+
* Returns updated options with regenerated installation instructions.
|
|
175
|
+
*/
|
|
176
|
+
declare function updateInstallOptions(input: UpdateInstallOptionsInput, context?: PortalActionContext): Promise<UpdateInstallOptionsResult>;
|
|
177
|
+
/**
|
|
178
|
+
* Filters channel releases to only include those with embedded cluster installers.
|
|
179
|
+
* Use this when populating the version dropdown for Linux installs.
|
|
180
|
+
*/
|
|
181
|
+
declare function filterEmbeddedClusterReleases(releases: ChannelRelease[]): ChannelRelease[];
|
|
182
|
+
/**
|
|
183
|
+
* Filters channel releases to only include those with Helm chart support.
|
|
184
|
+
* Use this when populating the version dropdown for Helm installs.
|
|
185
|
+
*/
|
|
186
|
+
declare function filterHelmReleases(releases: ChannelRelease[]): ChannelRelease[];
|
|
187
|
+
interface GetUpdateInstructionsInput {
|
|
188
|
+
token: string;
|
|
189
|
+
/** Install options ID (if known) */
|
|
190
|
+
installOptionsId?: string;
|
|
191
|
+
/** Instance ID (used if installOptionsId is not available) */
|
|
192
|
+
instanceId?: string;
|
|
193
|
+
/** Target channel ID for the update */
|
|
194
|
+
targetChannelId: string;
|
|
195
|
+
/** Target channel sequence for the update */
|
|
196
|
+
targetChannelSequence: number;
|
|
197
|
+
/** Private registry hostname (for airgap with private registry) */
|
|
198
|
+
privateRegistryHostname?: string;
|
|
199
|
+
}
|
|
200
|
+
interface UpdateInstructions {
|
|
201
|
+
format: string;
|
|
202
|
+
install_type: string;
|
|
203
|
+
title: string;
|
|
204
|
+
steps: InstallStep[];
|
|
205
|
+
}
|
|
206
|
+
interface GetUpdateInstructionsResult {
|
|
207
|
+
instructions: UpdateInstructions;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Fetches update instructions for an instance.
|
|
211
|
+
* Returns step-by-step commands for updating to a target version.
|
|
212
|
+
*/
|
|
213
|
+
declare function getUpdateInstructions(input: GetUpdateInstructionsInput, context?: PortalActionContext): Promise<GetUpdateInstructionsResult>;
|
|
214
|
+
interface FetchPendingInstallationsInput {
|
|
215
|
+
token: string;
|
|
216
|
+
}
|
|
217
|
+
interface PendingInstallation {
|
|
218
|
+
id: string;
|
|
219
|
+
name: string;
|
|
220
|
+
method: "helm" | "linux";
|
|
221
|
+
startedBy: string;
|
|
222
|
+
startedAt: string;
|
|
223
|
+
}
|
|
224
|
+
interface FetchPendingInstallationsResult {
|
|
225
|
+
installations: PendingInstallation[];
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Fetches pending (in-progress) installations for the current user.
|
|
229
|
+
* Returns up to 5 most recent installations, ordered by creation date descending.
|
|
230
|
+
*/
|
|
231
|
+
declare function fetchPendingInstallations(input: FetchPendingInstallationsInput, context?: PortalActionContext): Promise<FetchPendingInstallationsResult>;
|
|
232
|
+
|
|
233
|
+
export { type ChannelRelease as C, type EmbeddedClusterInstallationType as E, type FetchChannelReleasesResult as F, type GetInstallOptionsInput as G, type HelmInstallationType as H, type InstallOptions as I, type KubernetesDistribution as K, type NetworkAvailability as N, type PendingInstallation as P, type RegistryAvailability as R, type UpdateInstallOptionsInput as U, type CreateInstallOptionsInput as a, type CreateInstallOptionsResult as b, type GetInstallOptionsResult as c, type UpdateInstallOptionsResult as d, createInstallOptions as e, fetchChannelReleases as f, getInstallOptions as g, filterEmbeddedClusterReleases as h, type InstallInstructions as i, type InstallStep as j, type FetchPendingInstallationsResult as k, fetchPendingInstallations as l, getUpdateInstructions as m, filterHelmReleases as n, type InstallationTypes as o, type FetchChannelReleasesInput as p, type InstallType as q, type InstallStatus as r, type FetchPendingInstallationsInput as s, type GetUpdateInstructionsInput as t, updateInstallOptions as u, type GetUpdateInstructionsResult as v, type UpdateInstructions as w };
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { PortalActionContext } from './actions/index.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Install-related server actions for the Linux and Helm installation wizards.
|
|
5
|
+
*
|
|
6
|
+
* These actions handle the complete installation flow including:
|
|
7
|
+
* - Fetching available releases (channel releases)
|
|
8
|
+
* - Creating/updating/fetching install options
|
|
9
|
+
* - Generating installation instructions
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
interface EmbeddedClusterInstallationType {
|
|
13
|
+
version?: string;
|
|
14
|
+
}
|
|
15
|
+
interface HelmInstallationType {
|
|
16
|
+
version?: string;
|
|
17
|
+
}
|
|
18
|
+
interface InstallationTypes {
|
|
19
|
+
embeddedCluster?: EmbeddedClusterInstallationType;
|
|
20
|
+
helm?: HelmInstallationType;
|
|
21
|
+
}
|
|
22
|
+
interface ChannelRelease {
|
|
23
|
+
channelId: string;
|
|
24
|
+
channelName: string;
|
|
25
|
+
channelSlug: string;
|
|
26
|
+
channelSequence: number;
|
|
27
|
+
releaseSequence: number;
|
|
28
|
+
versionLabel: string;
|
|
29
|
+
releaseNotes?: string;
|
|
30
|
+
createdAt: string;
|
|
31
|
+
isRequired?: boolean;
|
|
32
|
+
installationTypes?: InstallationTypes;
|
|
33
|
+
}
|
|
34
|
+
interface FetchChannelReleasesInput {
|
|
35
|
+
token: string;
|
|
36
|
+
channelId?: string;
|
|
37
|
+
}
|
|
38
|
+
interface FetchChannelReleasesResult {
|
|
39
|
+
channelReleases: ChannelRelease[];
|
|
40
|
+
}
|
|
41
|
+
type NetworkAvailability = "online" | "proxy" | "airgap";
|
|
42
|
+
type InstallType = "linux" | "helm";
|
|
43
|
+
type RegistryAvailability = "online" | "partial" | "offline";
|
|
44
|
+
type KubernetesDistribution = "vanilla" | "openshift" | "rancher" | "aks" | "eks" | "gke";
|
|
45
|
+
type InstallStatus = "in_progress" | "completed" | "discarded";
|
|
46
|
+
interface InstallStep {
|
|
47
|
+
step_number: number;
|
|
48
|
+
step_name: string;
|
|
49
|
+
title: string;
|
|
50
|
+
description?: string;
|
|
51
|
+
commands: string[];
|
|
52
|
+
/** If true, this step can be marked as completed (shows checkmark UI) */
|
|
53
|
+
maybe_completed?: boolean;
|
|
54
|
+
}
|
|
55
|
+
interface InstallInstructions {
|
|
56
|
+
format: "basic" | "mdx";
|
|
57
|
+
install_type: string;
|
|
58
|
+
title: string;
|
|
59
|
+
steps?: InstallStep[];
|
|
60
|
+
mdx_template?: string;
|
|
61
|
+
context?: Record<string, unknown>;
|
|
62
|
+
renderer_version?: number;
|
|
63
|
+
}
|
|
64
|
+
interface InstallOptions {
|
|
65
|
+
id: string;
|
|
66
|
+
customer_id: string;
|
|
67
|
+
install_type: InstallType;
|
|
68
|
+
instance_name: string;
|
|
69
|
+
instance_id?: string;
|
|
70
|
+
service_account_id?: string;
|
|
71
|
+
service_account_email_address?: string;
|
|
72
|
+
license_id?: string;
|
|
73
|
+
started_at: string;
|
|
74
|
+
completed_at?: string;
|
|
75
|
+
network_availability?: NetworkAvailability;
|
|
76
|
+
is_multi_node?: boolean;
|
|
77
|
+
channel_id?: string;
|
|
78
|
+
channel_release_sequence?: number;
|
|
79
|
+
registry_availability?: RegistryAvailability;
|
|
80
|
+
kubernetes_distribution?: KubernetesDistribution;
|
|
81
|
+
admin_console_url?: string;
|
|
82
|
+
status?: InstallStatus;
|
|
83
|
+
}
|
|
84
|
+
interface CreateInstallOptionsInput {
|
|
85
|
+
token: string;
|
|
86
|
+
installType: InstallType;
|
|
87
|
+
instanceName: string;
|
|
88
|
+
serviceAccountId: string;
|
|
89
|
+
networkAvailability: NetworkAvailability;
|
|
90
|
+
isMultiNode?: boolean;
|
|
91
|
+
channelId?: string;
|
|
92
|
+
channelReleaseSequence?: number;
|
|
93
|
+
registryAvailability?: RegistryAvailability;
|
|
94
|
+
kubernetesDistribution?: KubernetesDistribution;
|
|
95
|
+
}
|
|
96
|
+
interface CreateInstallOptionsResult {
|
|
97
|
+
install_options: InstallOptions;
|
|
98
|
+
instructions?: InstallInstructions;
|
|
99
|
+
}
|
|
100
|
+
interface GetInstallOptionsInput {
|
|
101
|
+
token: string;
|
|
102
|
+
installOptionsId: string;
|
|
103
|
+
includeInstructions?: boolean;
|
|
104
|
+
privateRegistryHostname?: string;
|
|
105
|
+
proxyUrl?: string;
|
|
106
|
+
}
|
|
107
|
+
interface GetInstallOptionsResult {
|
|
108
|
+
id: string;
|
|
109
|
+
customer_id: string;
|
|
110
|
+
install_type: InstallType;
|
|
111
|
+
instance_name: string;
|
|
112
|
+
instance_id?: string;
|
|
113
|
+
service_account_id?: string;
|
|
114
|
+
service_account_email_address?: string;
|
|
115
|
+
started_at: string;
|
|
116
|
+
completed_at?: string;
|
|
117
|
+
network_availability?: NetworkAvailability;
|
|
118
|
+
is_multi_node?: boolean;
|
|
119
|
+
channel_id?: string;
|
|
120
|
+
channel_release_sequence?: number;
|
|
121
|
+
registry_availability?: RegistryAvailability;
|
|
122
|
+
kubernetes_distribution?: KubernetesDistribution;
|
|
123
|
+
admin_console_url?: string;
|
|
124
|
+
status?: InstallStatus;
|
|
125
|
+
instructions?: InstallInstructions;
|
|
126
|
+
/** Timestamp when assets were downloaded (for progress tracking) */
|
|
127
|
+
assets_downloaded_at?: string;
|
|
128
|
+
/** Timestamp when registry authentication was completed (for Helm progress tracking) */
|
|
129
|
+
registry_authenticated_at?: string;
|
|
130
|
+
/** Timestamp when images were pulled (for Helm progress tracking) */
|
|
131
|
+
images_pulled_at?: string;
|
|
132
|
+
/** Timestamp when installation was completed (for progress tracking) */
|
|
133
|
+
installation_completed_at?: string;
|
|
134
|
+
}
|
|
135
|
+
interface UpdateInstallOptionsInput {
|
|
136
|
+
token: string;
|
|
137
|
+
installOptionsId: string;
|
|
138
|
+
installType?: InstallType;
|
|
139
|
+
channelId?: string;
|
|
140
|
+
channelReleaseSequence?: number;
|
|
141
|
+
networkAvailability?: NetworkAvailability;
|
|
142
|
+
registryAvailability?: RegistryAvailability;
|
|
143
|
+
kubernetesDistribution?: KubernetesDistribution;
|
|
144
|
+
isMultiNode?: boolean;
|
|
145
|
+
serviceAccountId?: string;
|
|
146
|
+
adminConsoleUrl?: string | null;
|
|
147
|
+
status?: InstallStatus;
|
|
148
|
+
includeInstructions?: boolean;
|
|
149
|
+
privateRegistryHostname?: string;
|
|
150
|
+
proxyUrl?: string;
|
|
151
|
+
}
|
|
152
|
+
interface UpdateInstallOptionsResult {
|
|
153
|
+
install_options: InstallOptions;
|
|
154
|
+
instructions?: InstallInstructions;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Fetches available channel releases for the customer.
|
|
158
|
+
* These are filtered to show only releases that have embedded cluster installers.
|
|
159
|
+
*/
|
|
160
|
+
declare function fetchChannelReleases(input: FetchChannelReleasesInput, context?: PortalActionContext): Promise<FetchChannelReleasesResult>;
|
|
161
|
+
/**
|
|
162
|
+
* Creates a new install options record to track an installation attempt.
|
|
163
|
+
* This is called after creating a service account and before showing install commands.
|
|
164
|
+
*/
|
|
165
|
+
declare function createInstallOptions(input: CreateInstallOptionsInput, context?: PortalActionContext): Promise<CreateInstallOptionsResult>;
|
|
166
|
+
/**
|
|
167
|
+
* Fetches existing install options by ID.
|
|
168
|
+
* Can optionally include generated installation instructions.
|
|
169
|
+
*/
|
|
170
|
+
declare function getInstallOptions(input: GetInstallOptionsInput, context?: PortalActionContext): Promise<GetInstallOptionsResult>;
|
|
171
|
+
/**
|
|
172
|
+
* Updates existing install options.
|
|
173
|
+
* Typically called when user selects a different version or changes settings.
|
|
174
|
+
* Returns updated options with regenerated installation instructions.
|
|
175
|
+
*/
|
|
176
|
+
declare function updateInstallOptions(input: UpdateInstallOptionsInput, context?: PortalActionContext): Promise<UpdateInstallOptionsResult>;
|
|
177
|
+
/**
|
|
178
|
+
* Filters channel releases to only include those with embedded cluster installers.
|
|
179
|
+
* Use this when populating the version dropdown for Linux installs.
|
|
180
|
+
*/
|
|
181
|
+
declare function filterEmbeddedClusterReleases(releases: ChannelRelease[]): ChannelRelease[];
|
|
182
|
+
/**
|
|
183
|
+
* Filters channel releases to only include those with Helm chart support.
|
|
184
|
+
* Use this when populating the version dropdown for Helm installs.
|
|
185
|
+
*/
|
|
186
|
+
declare function filterHelmReleases(releases: ChannelRelease[]): ChannelRelease[];
|
|
187
|
+
interface GetUpdateInstructionsInput {
|
|
188
|
+
token: string;
|
|
189
|
+
/** Install options ID (if known) */
|
|
190
|
+
installOptionsId?: string;
|
|
191
|
+
/** Instance ID (used if installOptionsId is not available) */
|
|
192
|
+
instanceId?: string;
|
|
193
|
+
/** Target channel ID for the update */
|
|
194
|
+
targetChannelId: string;
|
|
195
|
+
/** Target channel sequence for the update */
|
|
196
|
+
targetChannelSequence: number;
|
|
197
|
+
/** Private registry hostname (for airgap with private registry) */
|
|
198
|
+
privateRegistryHostname?: string;
|
|
199
|
+
}
|
|
200
|
+
interface UpdateInstructions {
|
|
201
|
+
format: string;
|
|
202
|
+
install_type: string;
|
|
203
|
+
title: string;
|
|
204
|
+
steps: InstallStep[];
|
|
205
|
+
}
|
|
206
|
+
interface GetUpdateInstructionsResult {
|
|
207
|
+
instructions: UpdateInstructions;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Fetches update instructions for an instance.
|
|
211
|
+
* Returns step-by-step commands for updating to a target version.
|
|
212
|
+
*/
|
|
213
|
+
declare function getUpdateInstructions(input: GetUpdateInstructionsInput, context?: PortalActionContext): Promise<GetUpdateInstructionsResult>;
|
|
214
|
+
interface FetchPendingInstallationsInput {
|
|
215
|
+
token: string;
|
|
216
|
+
}
|
|
217
|
+
interface PendingInstallation {
|
|
218
|
+
id: string;
|
|
219
|
+
name: string;
|
|
220
|
+
method: "helm" | "linux";
|
|
221
|
+
startedBy: string;
|
|
222
|
+
startedAt: string;
|
|
223
|
+
}
|
|
224
|
+
interface FetchPendingInstallationsResult {
|
|
225
|
+
installations: PendingInstallation[];
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Fetches pending (in-progress) installations for the current user.
|
|
229
|
+
* Returns up to 5 most recent installations, ordered by creation date descending.
|
|
230
|
+
*/
|
|
231
|
+
declare function fetchPendingInstallations(input: FetchPendingInstallationsInput, context?: PortalActionContext): Promise<FetchPendingInstallationsResult>;
|
|
232
|
+
|
|
233
|
+
export { type ChannelRelease as C, type EmbeddedClusterInstallationType as E, type FetchChannelReleasesResult as F, type GetInstallOptionsInput as G, type HelmInstallationType as H, type InstallOptions as I, type KubernetesDistribution as K, type NetworkAvailability as N, type PendingInstallation as P, type RegistryAvailability as R, type UpdateInstallOptionsInput as U, type CreateInstallOptionsInput as a, type CreateInstallOptionsResult as b, type GetInstallOptionsResult as c, type UpdateInstallOptionsResult as d, createInstallOptions as e, fetchChannelReleases as f, getInstallOptions as g, filterEmbeddedClusterReleases as h, type InstallInstructions as i, type InstallStep as j, type FetchPendingInstallationsResult as k, fetchPendingInstallations as l, getUpdateInstructions as m, filterHelmReleases as n, type InstallationTypes as o, type FetchChannelReleasesInput as p, type InstallType as q, type InstallStatus as r, type FetchPendingInstallationsInput as s, type GetUpdateInstructionsInput as t, updateInstallOptions as u, type GetUpdateInstructionsResult as v, type UpdateInstructions as w };
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { I as InstallOptions, C as ChannelRelease } from './install-B19AaKF_.mjs';
|
|
2
|
+
export { a as CreateInstallOptionsInput, b as CreateInstallOptionsResult, E as EmbeddedClusterInstallationType, p as FetchChannelReleasesInput, F as FetchChannelReleasesResult, s as FetchPendingInstallationsInput, k as FetchPendingInstallationsResult, G as GetInstallOptionsInput, c as GetInstallOptionsResult, t as GetUpdateInstructionsInput, v as GetUpdateInstructionsResult, H as HelmInstallationType, i as InstallInstructions, r as InstallStatus, j as InstallStep, q as InstallType, o as InstallationTypes, K as KubernetesDistribution, N as NetworkAvailability, P as PendingInstallation, R as RegistryAvailability, U as UpdateInstallOptionsInput, d as UpdateInstallOptionsResult, w as UpdateInstructions, e as createInstallOptions, f as fetchChannelReleases, l as fetchPendingInstallations, h as filterEmbeddedClusterReleases, n as filterHelmReleases, g as getInstallOptions, m as getUpdateInstructions, u as updateInstallOptions } from './install-B19AaKF_.mjs';
|
|
3
|
+
import { PortalActionContext } from './actions/index.mjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Instance-related server actions for the Update page.
|
|
7
|
+
*
|
|
8
|
+
* These actions handle fetching and managing instances including:
|
|
9
|
+
* - Listing all instances (online and airgap)
|
|
10
|
+
* - Fetching install options for instances
|
|
11
|
+
* - Calculating update availability
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
type ResourceStatus = "ready" | "updating" | "unknown" | "missing" | "unavailable" | "degraded";
|
|
15
|
+
interface ResourceState {
|
|
16
|
+
kind: string;
|
|
17
|
+
name: string;
|
|
18
|
+
namespace: string;
|
|
19
|
+
state: ResourceStatus;
|
|
20
|
+
}
|
|
21
|
+
interface InstanceTag {
|
|
22
|
+
key: string;
|
|
23
|
+
value: string;
|
|
24
|
+
origin?: string;
|
|
25
|
+
}
|
|
26
|
+
interface Instance {
|
|
27
|
+
id: string;
|
|
28
|
+
firstCheckin: string;
|
|
29
|
+
firstReadyAt?: string;
|
|
30
|
+
lastCheckin: string;
|
|
31
|
+
isAirgap: boolean;
|
|
32
|
+
appStatus?: string;
|
|
33
|
+
resourceStates?: ResourceState[];
|
|
34
|
+
versionLabel?: string;
|
|
35
|
+
channelId?: string;
|
|
36
|
+
channelSequence?: number;
|
|
37
|
+
serviceAccountId?: string;
|
|
38
|
+
embeddedClusterId?: string;
|
|
39
|
+
kotsInstallId?: string;
|
|
40
|
+
kurlInstallId?: string;
|
|
41
|
+
k8sVersion?: string;
|
|
42
|
+
k8sDistribution?: string;
|
|
43
|
+
tags?: InstanceTag[];
|
|
44
|
+
}
|
|
45
|
+
interface FetchInstancesInput {
|
|
46
|
+
token: string;
|
|
47
|
+
}
|
|
48
|
+
interface FetchInstancesResult {
|
|
49
|
+
instances: Instance[];
|
|
50
|
+
online: Instance[];
|
|
51
|
+
airgap: Instance[];
|
|
52
|
+
}
|
|
53
|
+
interface FetchInstallOptionsByInstanceIdsInput {
|
|
54
|
+
token: string;
|
|
55
|
+
instanceIds: string[];
|
|
56
|
+
}
|
|
57
|
+
interface FetchInstallOptionsByInstanceIdsResult {
|
|
58
|
+
installOptions: InstallOptions[];
|
|
59
|
+
}
|
|
60
|
+
/** 24 hours in milliseconds - threshold for active vs inactive instances */
|
|
61
|
+
declare const ACTIVE_INSTANCE_THRESHOLD_MS: number;
|
|
62
|
+
/**
|
|
63
|
+
* Determines if an instance is active based on last check-in time.
|
|
64
|
+
* Active = last check-in within the last 24 hours.
|
|
65
|
+
*/
|
|
66
|
+
declare function isInstanceActive(instance: Instance): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Filters instances into active and inactive lists.
|
|
69
|
+
*/
|
|
70
|
+
declare function filterActiveInactiveInstances(instances: Instance[]): {
|
|
71
|
+
activeInstances: Instance[];
|
|
72
|
+
inactiveInstances: Instance[];
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Gets the install type for an instance based on instance data and install options.
|
|
76
|
+
*/
|
|
77
|
+
declare function getInstallType(instance: Instance, installOptions?: InstallOptions[]): "helm" | "embedded cluster" | null;
|
|
78
|
+
/**
|
|
79
|
+
* Calculates the number of available updates for an instance.
|
|
80
|
+
*/
|
|
81
|
+
declare function calculateUpdatesForInstance(instance: Instance, channelReleases: ChannelRelease[]): number;
|
|
82
|
+
/**
|
|
83
|
+
* Gets the instance name from tags or returns truncated ID.
|
|
84
|
+
*/
|
|
85
|
+
declare function getInstanceName(instance: Instance): string;
|
|
86
|
+
/**
|
|
87
|
+
* Fetches all instances for the customer.
|
|
88
|
+
* Returns instances split into online and airgap categories.
|
|
89
|
+
*/
|
|
90
|
+
declare function fetchInstances(input: FetchInstancesInput, context?: PortalActionContext): Promise<FetchInstancesResult>;
|
|
91
|
+
type AirgapInstanceStatus = "unavailable" | "missing";
|
|
92
|
+
interface CreateAirgapInstanceInput {
|
|
93
|
+
token: string;
|
|
94
|
+
serviceAccountId: string;
|
|
95
|
+
instanceName?: string;
|
|
96
|
+
channelId: string;
|
|
97
|
+
channelSequence: number;
|
|
98
|
+
k8sVersion?: string;
|
|
99
|
+
k8sDistribution?: string;
|
|
100
|
+
appStatus?: AirgapInstanceStatus;
|
|
101
|
+
}
|
|
102
|
+
interface CreateAirgapInstanceResult {
|
|
103
|
+
instanceId: string;
|
|
104
|
+
licenseId: string;
|
|
105
|
+
createdAt: string;
|
|
106
|
+
lastActive: string;
|
|
107
|
+
appFirstReadyAt: string | null;
|
|
108
|
+
appStatus: string;
|
|
109
|
+
isAirgap: boolean;
|
|
110
|
+
channelId?: string;
|
|
111
|
+
channelSequence?: number;
|
|
112
|
+
k8sVersion?: string;
|
|
113
|
+
k8sDistribution?: string;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Creates an air gap instance record manually.
|
|
117
|
+
* This is used when customers want to track air gap instances that can't check in.
|
|
118
|
+
*/
|
|
119
|
+
declare function createAirgapInstance(input: CreateAirgapInstanceInput, context?: PortalActionContext): Promise<CreateAirgapInstanceResult>;
|
|
120
|
+
interface UpdateAirgapInstanceInput {
|
|
121
|
+
token: string;
|
|
122
|
+
instanceId: string;
|
|
123
|
+
serviceAccountId?: string;
|
|
124
|
+
channelId: string;
|
|
125
|
+
channelSequence: number;
|
|
126
|
+
}
|
|
127
|
+
interface UpdateAirgapInstanceResult {
|
|
128
|
+
success: boolean;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Updates an air gap instance record (mark update complete).
|
|
132
|
+
* This is called after completing an air gap update to update the instance version.
|
|
133
|
+
*/
|
|
134
|
+
declare function updateAirgapInstance(input: UpdateAirgapInstanceInput, context?: PortalActionContext): Promise<UpdateAirgapInstanceResult>;
|
|
135
|
+
/**
|
|
136
|
+
* Fetches install options for a batch of instance IDs.
|
|
137
|
+
* Handles chunking automatically if more than 50 IDs are provided.
|
|
138
|
+
*/
|
|
139
|
+
declare function fetchInstallOptionsByInstanceIds(input: FetchInstallOptionsByInstanceIdsInput, context?: PortalActionContext): Promise<FetchInstallOptionsByInstanceIdsResult>;
|
|
140
|
+
|
|
141
|
+
export { ACTIVE_INSTANCE_THRESHOLD_MS, type AirgapInstanceStatus, ChannelRelease, type CreateAirgapInstanceInput, type CreateAirgapInstanceResult, type FetchInstallOptionsByInstanceIdsInput, type FetchInstallOptionsByInstanceIdsResult, type FetchInstancesInput, type FetchInstancesResult, InstallOptions, type Instance, type InstanceTag, type ResourceState, type ResourceStatus, type UpdateAirgapInstanceInput, type UpdateAirgapInstanceResult, calculateUpdatesForInstance, createAirgapInstance, fetchInstallOptionsByInstanceIds, fetchInstances, filterActiveInactiveInstances, getInstallType, getInstanceName, isInstanceActive, updateAirgapInstance };
|