@replicated/portal-components 0.0.16 → 0.0.17
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/index.d.mts +1 -637
- package/dist/actions/index.d.ts +1 -637
- package/dist/actions/index.js +2 -1
- package/dist/actions/index.js.map +1 -1
- package/dist/airgap-instances.d.mts +5 -3
- package/dist/airgap-instances.d.ts +5 -3
- package/dist/airgap-instances.js +94 -5
- package/dist/airgap-instances.js.map +1 -1
- package/dist/esm/actions/index.js +2 -1
- package/dist/esm/actions/index.js.map +1 -1
- package/dist/esm/airgap-instances.js +90 -5
- package/dist/esm/airgap-instances.js.map +1 -1
- package/dist/esm/helm-install-wizard.js +28 -15
- package/dist/esm/helm-install-wizard.js.map +1 -1
- package/dist/esm/index.js +3 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/install-actions.js +54 -11
- package/dist/esm/install-actions.js.map +1 -1
- package/dist/esm/instance-card.js +79 -3
- package/dist/esm/instance-card.js.map +1 -1
- package/dist/esm/license-details.js +2 -1
- package/dist/esm/license-details.js.map +1 -1
- package/dist/esm/linux-install-wizard.js +90 -14
- package/dist/esm/linux-install-wizard.js.map +1 -1
- package/dist/esm/online-instance-list.js +90 -5
- package/dist/esm/online-instance-list.js.map +1 -1
- package/dist/esm/pending-installations.js +187 -103
- package/dist/esm/pending-installations.js.map +1 -1
- package/dist/esm/security-card.js +76 -16
- package/dist/esm/security-card.js.map +1 -1
- package/dist/esm/support-card.js +2 -1
- package/dist/esm/support-card.js.map +1 -1
- package/dist/esm/top-nav-user-menu.js +4 -2
- package/dist/esm/top-nav-user-menu.js.map +1 -1
- package/dist/esm/top-nav.js +2 -1
- package/dist/esm/top-nav.js.map +1 -1
- package/dist/esm/update-layout.js +2 -1
- package/dist/esm/update-layout.js.map +1 -1
- package/dist/esm/upload-support-bundle-modal.js +19 -19
- package/dist/esm/upload-support-bundle-modal.js.map +1 -1
- package/dist/esm/utils/index.js +2 -1
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/helm-install-wizard.d.mts +5 -4
- package/dist/helm-install-wizard.d.ts +5 -4
- package/dist/helm-install-wizard.js +28 -15
- package/dist/helm-install-wizard.js.map +1 -1
- package/dist/index-DkjaogsF.d.mts +891 -0
- package/dist/index-DkjaogsF.d.ts +891 -0
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/install-actions.d.mts +2 -3
- package/dist/install-actions.d.ts +2 -3
- package/dist/install-actions.js +54 -10
- package/dist/install-actions.js.map +1 -1
- package/dist/install-card.d.mts +1 -1
- package/dist/install-card.d.ts +1 -1
- package/dist/instance-card.d.mts +5 -3
- package/dist/instance-card.d.ts +5 -3
- package/dist/instance-card.js +83 -3
- package/dist/instance-card.js.map +1 -1
- package/dist/license-card.d.mts +1 -1
- package/dist/license-card.d.ts +1 -1
- package/dist/license-details.js +2 -1
- package/dist/license-details.js.map +1 -1
- package/dist/linux-install-wizard.d.mts +6 -6
- package/dist/linux-install-wizard.d.ts +6 -6
- package/dist/linux-install-wizard.js +90 -14
- package/dist/linux-install-wizard.js.map +1 -1
- package/dist/online-instance-list.d.mts +5 -3
- package/dist/online-instance-list.d.ts +5 -3
- package/dist/online-instance-list.js +94 -5
- package/dist/online-instance-list.js.map +1 -1
- package/dist/pending-installations.d.mts +3 -3
- package/dist/pending-installations.d.ts +3 -3
- package/dist/pending-installations.js +186 -102
- package/dist/pending-installations.js.map +1 -1
- package/dist/security-card.d.mts +3 -2
- package/dist/security-card.d.ts +3 -2
- package/dist/security-card.js +76 -16
- package/dist/security-card.js.map +1 -1
- package/dist/styles.css +43 -0
- package/dist/support-bundles-card.d.mts +1 -1
- package/dist/support-bundles-card.d.ts +1 -1
- package/dist/support-card.js +2 -1
- package/dist/support-card.js.map +1 -1
- package/dist/top-nav-user-menu.d.mts +3 -1
- package/dist/top-nav-user-menu.d.ts +3 -1
- package/dist/top-nav-user-menu.js +4 -2
- package/dist/top-nav-user-menu.js.map +1 -1
- package/dist/top-nav.js +2 -1
- package/dist/top-nav.js.map +1 -1
- package/dist/update-layout.js +2 -1
- package/dist/update-layout.js.map +1 -1
- package/dist/upload-support-bundle-modal.d.mts +7 -3
- package/dist/upload-support-bundle-modal.d.ts +7 -3
- package/dist/upload-support-bundle-modal.js +19 -19
- package/dist/upload-support-bundle-modal.js.map +1 -1
- package/dist/utils/index.js +2 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/install-B19AaKF_.d.mts +0 -233
- package/dist/install-Bi1qJ8Bu.d.ts +0 -233
|
@@ -86,7 +86,8 @@ var fetchCustomBrandingImpl = async () => {
|
|
|
86
86
|
title: payload.appName,
|
|
87
87
|
customColor1: payload.primaryColor,
|
|
88
88
|
customColor2: payload.secondaryColor,
|
|
89
|
-
favicon: payload.faviconUrl
|
|
89
|
+
favicon: payload.faviconUrl,
|
|
90
|
+
supportPortalLink: payload.supportPortalLink || ""
|
|
90
91
|
};
|
|
91
92
|
const brandingData = Buffer.from(JSON.stringify(brandingObject)).toString("base64");
|
|
92
93
|
return {
|
|
@@ -358,7 +359,9 @@ function filterEmbeddedClusterReleases(releases) {
|
|
|
358
359
|
}
|
|
359
360
|
function filterHelmReleases(releases) {
|
|
360
361
|
return releases.filter(
|
|
361
|
-
(release) =>
|
|
362
|
+
(release) => {
|
|
363
|
+
return release.helmCharts && release.helmCharts.length > 0;
|
|
364
|
+
}
|
|
362
365
|
);
|
|
363
366
|
}
|
|
364
367
|
async function getUpdateInstructions(input, context) {
|
|
@@ -379,9 +382,23 @@ async function getUpdateInstructions(input, context) {
|
|
|
379
382
|
if (targetChannelSequence === void 0 || targetChannelSequence === null) {
|
|
380
383
|
throw new Error("Target channel sequence is required");
|
|
381
384
|
}
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
+
if (!installOptionsId) {
|
|
386
|
+
const errorInstructions = {
|
|
387
|
+
format: "error",
|
|
388
|
+
install_type: "kots",
|
|
389
|
+
// Assume kots if no install options
|
|
390
|
+
title: "Unable to generate update instructions",
|
|
391
|
+
steps: [
|
|
392
|
+
{
|
|
393
|
+
step_number: 1,
|
|
394
|
+
step_name: "error_message",
|
|
395
|
+
title: "Automated update instructions are not supported for this installation",
|
|
396
|
+
description: "Please update through the admin console.\n\nIf you believe this is an error, please select a different release or contact support.",
|
|
397
|
+
commands: []
|
|
398
|
+
}
|
|
399
|
+
]
|
|
400
|
+
};
|
|
401
|
+
return { instructions: errorInstructions };
|
|
385
402
|
}
|
|
386
403
|
getCustomerIdFromToken(token);
|
|
387
404
|
const origin = getApiOrigin();
|
|
@@ -391,11 +408,7 @@ async function getUpdateInstructions(input, context) {
|
|
|
391
408
|
if (privateRegistryHostname?.trim()) {
|
|
392
409
|
queryParams.set("privateRegistryHostname", privateRegistryHostname.trim());
|
|
393
410
|
}
|
|
394
|
-
|
|
395
|
-
queryParams.set("instance_id", instanceId);
|
|
396
|
-
}
|
|
397
|
-
const pathId = installOptionsId || "placeholder";
|
|
398
|
-
const url = `${origin}/enterprise-portal/install-options/${pathId}/update-instructions?${queryParams.toString()}`;
|
|
411
|
+
const url = `${origin}/enterprise-portal/install-options/${installOptionsId}/update-instructions?${queryParams.toString()}`;
|
|
399
412
|
if (process.env.NODE_ENV !== "production") {
|
|
400
413
|
console.debug("[portal-components] fetching update instructions via %s", url);
|
|
401
414
|
}
|
|
@@ -469,6 +482,36 @@ async function fetchPendingInstallations(input, context) {
|
|
|
469
482
|
installations
|
|
470
483
|
};
|
|
471
484
|
}
|
|
485
|
+
async function discardInstallation(input, context) {
|
|
486
|
+
const { token, installOptionsId } = input;
|
|
487
|
+
if (typeof token !== "string" || token.trim().length === 0) {
|
|
488
|
+
throw new Error("discardInstallation requires a non-empty token");
|
|
489
|
+
}
|
|
490
|
+
if (typeof installOptionsId !== "string" || installOptionsId.trim().length === 0) {
|
|
491
|
+
throw new Error("discardInstallation requires a non-empty installOptionsId");
|
|
492
|
+
}
|
|
493
|
+
const origin = getApiOrigin();
|
|
494
|
+
const response = await authenticatedFetch(
|
|
495
|
+
`${origin}/enterprise-portal/install-options/${installOptionsId.trim()}`,
|
|
496
|
+
{
|
|
497
|
+
method: "DELETE",
|
|
498
|
+
token,
|
|
499
|
+
headers: {
|
|
500
|
+
accept: "application/json"
|
|
501
|
+
},
|
|
502
|
+
signal: context?.signal
|
|
503
|
+
}
|
|
504
|
+
);
|
|
505
|
+
if (!response.ok) {
|
|
506
|
+
const errorText = await response.text();
|
|
507
|
+
throw new Error(
|
|
508
|
+
`Discard install options failed (${response.status} ${response.statusText}): ${errorText}`
|
|
509
|
+
);
|
|
510
|
+
}
|
|
511
|
+
return {
|
|
512
|
+
success: true
|
|
513
|
+
};
|
|
514
|
+
}
|
|
472
515
|
|
|
473
516
|
// src/actions/instances.ts
|
|
474
517
|
var ACTIVE_INSTANCE_THRESHOLD_MS = 24 * 60 * 60 * 1e3;
|
|
@@ -736,6 +779,6 @@ async function fetchInstallOptionsByInstanceIds(input, context) {
|
|
|
736
779
|
return { installOptions: allInstallOptions };
|
|
737
780
|
}
|
|
738
781
|
|
|
739
|
-
export { ACTIVE_INSTANCE_THRESHOLD_MS, calculateUpdatesForInstance, createAirgapInstance, createInstallOptions, fetchChannelReleases, fetchInstallOptionsByInstanceIds, fetchInstances2 as fetchInstances, fetchPendingInstallations, filterActiveInactiveInstances, filterEmbeddedClusterReleases, filterHelmReleases, getInstallOptions, getInstallType, getInstanceName, getUpdateInstructions, isInstanceActive, updateAirgapInstance, updateInstallOptions };
|
|
782
|
+
export { ACTIVE_INSTANCE_THRESHOLD_MS, calculateUpdatesForInstance, createAirgapInstance, createInstallOptions, discardInstallation, fetchChannelReleases, fetchInstallOptionsByInstanceIds, fetchInstances2 as fetchInstances, fetchPendingInstallations, filterActiveInactiveInstances, filterEmbeddedClusterReleases, filterHelmReleases, getInstallOptions, getInstallType, getInstanceName, getUpdateInstructions, isInstanceActive, updateAirgapInstance, updateInstallOptions };
|
|
740
783
|
//# sourceMappingURL=install-actions.js.map
|
|
741
784
|
//# sourceMappingURL=install-actions.js.map
|