Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions libs/i18n/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -687,9 +687,6 @@
"{{appCount}} need attention": "{{appCount}} need attention",
"Custom data": "Custom data",
"No value reported": "No value reported",
"Not eligible": "Not eligible",
"Device eligible for delta updates, but oci-delta not found": "Device eligible for delta updates, but oci-delta not found",
"Eligible": "Eligible",
"Delta update status": "Delta update status",
"Update download size": "Update download size",
"Estimated download size for the current update. When a delta artifact is available, this reflects the smaller incremental download instead of the full OS image.": "Estimated download size for the current update. When a delta artifact is available, this reflects the smaller incremental download instead of the full OS image.",
Expand Down Expand Up @@ -805,8 +802,12 @@
"System status": "System status",
"Resource status": "Resource status",
"System services": "System services",
"Delta eligibility": "Delta eligibility",
"Whether this device can apply incremental OCI delta updates. Requires bootc and the oci-delta tool on the device": "Whether this device can apply incremental OCI delta updates. Requires bootc and the oci-delta tool on the device",
"Eligible": "Eligible",
"Not eligible": "Not eligible",
"Delta generation": "Delta generation",
"Delta updates download only the incremental changes between versions, reducing download size for updates. To receive delta updates, a device needs a compatible bootc version and the OCI delta package installed on its OS image.": "Delta updates download only the incremental changes between versions, reducing download size for updates. To receive delta updates, a device needs a compatible bootc version and the OCI delta package installed on its OS image.",
"Bootc version": "Bootc version",
"OCI delta version": "OCI delta version",
"OS mode": "OS mode",
"You do not have permission to access the device terminal.": "You do not have permission to access the device terminal.",
"Console type": "Console type",
Expand Down Expand Up @@ -1178,12 +1179,18 @@
"Preparing delta updates": "Preparing delta updates",
"Delta updates are being generated": "Delta updates are being generated",
"Delta updates generation is complete": "Delta updates generation is complete",
"Enrollment hook succeeded": "Enrollment hook succeeded",
"Enrollment hook failed": "Enrollment hook failed",
"Enrollment hook notify failed": "Enrollment hook notify failed",
"Enrollment hook has manual override": "Enrollment hook has manual override",
"Resource": "Resource",
"Edit fleet": "Edit fleet",
"Create fleet": "Create fleet",
"Delta updates create smaller incremental artifacts for operating system and application rollouts. Your devices download only what changed instead of full images.": "Delta updates create smaller incremental artifacts for operating system and application rollouts. Your devices download only what changed instead of full images.",
"This reduces bandwidth use across large fleets and constrained networks.": "This reduces bandwidth use across large fleets and constrained networks.",
"Deltas are stored in an OCI registry marked as a delta repository. Your administrator may have configured one at deployment. If not, mark an existing OCI registry in <1>Repositories</1>": "Deltas are stored in an OCI registry marked as a delta repository. Your administrator may have configured one at deployment. If not, mark an existing OCI registry in <1>Repositories</1>",
"Delta generation runs during fleet rollouts. The platform creates OCI delta artifacts between successive image digests and stores them in a writable registry so devices can pull a smaller update instead of the full artifact.": "Delta generation runs during fleet rollouts. The platform creates OCI delta artifacts between successive image digests and stores them in a writable registry so devices can pull a smaller update instead of the full artifact.",
"To apply deltas": "To apply deltas",
"Devices must report a compatible bootc version and OCI delta support.": "Devices must report a compatible bootc version and OCI delta support.",
"Enable and configure delta artifact storage in an OCI registry in <2>Repositories</2>": "Enable and configure delta artifact storage in an OCI registry in <2>Repositories</2>",
"If a delta artifact cannot be applied, the device falls back to the full artifact.": "If a delta artifact cannot be applied, the device falls back to the full artifact.",
"Failed to determine the number of selected devices": "Failed to determine the number of selected devices",
"{{ count }} devices matching the labels were selected._one": "{{ count }} device matching the labels was selected.",
"{{ count }} devices matching the labels were selected._other": "{{ count }} devices matching the labels were selected.",
Expand All @@ -1206,9 +1213,9 @@
"Maximum time to wait for delta generation before rollout continues without unfinished artifacts. Leave empty to use the deployment default.": "Maximum time to wait for delta generation before rollout continues without unfinished artifacts. Leave empty to use the deployment default.",
"Per-job generation timeout": "Per-job generation timeout",
"Maximum time allowed for each delta generation job. Jobs that exceed this deadline are cancelled. Leave empty to use the deployment default.": "Maximum time allowed for each delta generation job. Jobs that exceed this deadline are cancelled. Leave empty to use the deployment default.",
"Delta generation": "Delta generation",
"Generate deltas for this fleet": "Generate deltas for this fleet",
"Generates incremental update artifacts during rollouts so your devices download only what changed for operating systems and applications.": "Generates incremental update artifacts during rollouts so your devices download only what changed for operating systems and applications.",
"When delta generation is enabled for a fleet, the platform pushes only the incremental changes between versions, reducing download size and bandwidth demand for updates. Ensure your devices and OCI registry are configured to apply deltas.": "When delta generation is enabled for a fleet, the platform pushes only the incremental changes between versions, reducing download size and bandwidth demand for updates. Ensure your devices and OCI registry are configured to apply deltas.",
"Learn how delta updates work": "Learn how delta updates work",
"Delta storage not configured": "Delta storage not configured",
"Delta generation is enabled, but no repository is configured for delta artifact storage. Create one before this fleet rolls out updates.": "Delta generation is enabled, but no repository is configured for delta artifact storage. Create one before this fleet rolls out updates.",
"Go to Repositories": "Go to Repositories",
Expand Down Expand Up @@ -2258,7 +2265,6 @@
"TPM vendor info": "TPM vendor info",
"Architecture": "Architecture",
"Distro": "Distro",
"Bootc version": "Bootc version",
"Boot ID": "Boot ID",
"Kernel": "Kernel",
"Net interface default": "Net interface default",
Expand Down
6 changes: 3 additions & 3 deletions libs/types/models/ApplicationImageDigest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
/* tslint:disable */
/* eslint-disable */
/**
* An image reference and its content digest in local storage.
* An image reference and, when known, its content digest in local storage.
*/
export type ApplicationImageDigest = {
/**
* Image reference as it appears in the rendered application spec.
*/
image: string;
/**
* Content digest of the image in local storage (e.g. sha256:abc...).
* Content digest of the image in local storage (e.g. sha256:abc...). Omitted when the local digest is unknown.
*/
digest: string;
digest?: string;
};

4 changes: 2 additions & 2 deletions libs/types/models/DeviceApplicationStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ export type DeviceApplicationStatus = {
volumes?: Array<ApplicationVolumeStatus>;
lastDelta?: DeviceDeltaApplyStatus;
/**
* Image references this application uses and their digests in local storage. image is the ref from the current rendered spec (tag or digest). digest is what is in storage. When image is already a digest ref it matches digest.
* Image references this application uses and their known content digests in local storage. image is the ref from the current rendered spec (tag or digest). digest is omitted when the local digest is unknown. When image is already a digest ref, digest matches the ref's digest.
*/
imageDigests?: Array<ApplicationImageDigest>;
/**
* Expected total download size for this application update in IEC units (e.g. "245.3 MiB", "1 GiB"). Computed as the sum of all image pair sizes (parent + nested + volumes), using delta size when available or full manifest size otherwise. Absent when no size information is available.
* Expected total download size for this application update in IEC units (e.g. "245.3 MiB", "1 GiB"). Computed as the sum of all required image pair sizes (parent + nested + volumes), using delta payload size when available or full image payload size otherwise. Absent when no image download is required or any required image size is unknown.
*/
size?: string;
};
Expand Down
4 changes: 4 additions & 0 deletions libs/types/models/Event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ export namespace Event {
PREPARE_DELTAS = 'PrepareDeltas',
DELTA_GENERATION_PROGRESS = 'DeltaGenerationProgress',
DELTA_GENERATION_COMPLETED = 'DeltaGenerationCompleted',
ENROLLMENT_HOOK_SUCCEEDED = 'EnrollmentHookSucceeded',
ENROLLMENT_HOOK_FAILED = 'EnrollmentHookFailed',
ENROLLMENT_HOOK_NOTIFY_FAILED = 'EnrollmentHookNotifyFailed',
ENROLLMENT_HOOK_MANUAL_OVERRIDE = 'EnrollmentHookManualOverride',
}
/**
* The type of the event. One of Normal, Warning.
Expand Down
4 changes: 4 additions & 0 deletions libs/types/models/ImageDeltaHint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* A delta hint for a nested image within an application.
*/
export type ImageDeltaHint = {
/**
* The target image reference this delta applies to.
*/
targetImage: string;
/**
* The content digest of the target image.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/types/models/ImageSpec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export type ImageSpec = {
*/
deltaImage?: string;
/**
* Optional hints for nested images within this application (e.g. service images in a compose app, OCI volume images). Each entry maps a target digest to its delta artifact reference.
* Optional hints for nested images within this application (e.g. service images in a compose app, OCI volume images). Each entry identifies a target image reference and digest and names its delta artifact reference.
*/
deltaImages?: Array<ImageDeltaHint>;
};
Expand Down
5 changes: 5 additions & 0 deletions libs/types/models/InlineApplicationProviderSpec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@
/* tslint:disable */
/* eslint-disable */
import type { ApplicationContent } from './ApplicationContent';
import type { ImageDeltaHint } from './ImageDeltaHint';
export type InlineApplicationProviderSpec = {
/**
* A list of application content.
*/
inline: Array<ApplicationContent>;
/**
* Optional hints for nested OCI images referenced by this inline application. Each entry identifies a target image reference and digest and names its delta artifact.
*/
deltaImages?: Array<ImageDeltaHint>;
};

2 changes: 1 addition & 1 deletion libs/types/models/ResourceUpdatedDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type ResourceUpdatedDetails = {
/**
* List of fields that were updated in the resource.
*/
updatedFields: Array<'owner' | 'labels' | 'spec' | 'spec.selector' | 'spec.template'>;
updatedFields: Array<'owner' | 'labels' | 'spec' | 'spec.selector' | 'spec.template' | 'status.conditions.EnrollmentHooks'>;
/**
* The previous owner (if applicable).
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import * as React from 'react';
import { DescriptionListDescription, DescriptionListGroup, DescriptionListTerm } from '@patternfly/react-core';

import type { DeviceDeltaApplyStatus } from '@flightctl/types';
import type { DeviceApplicationStatus } from '@flightctl/types';
import { useTranslation } from '../../hooks/useTranslation';
import LabelWithHelperText from '../common/WithHelperText';

const ApplicationDeltaStatusFields = ({ lastDelta }: { lastDelta?: DeviceDeltaApplyStatus }) => {
const ApplicationDeltaStatusFields = ({ appStatus }: { appStatus: DeviceApplicationStatus }) => {
const { t } = useTranslation();

const lastDeltaSize = lastDelta?.size;
const lastReason = lastDelta?.fallbackReason;

if (!lastDeltaSize && !lastReason) {
// Applications use the "status.applications.size" field
const deltaSize = appStatus.size;
const fallbackReason = appStatus.lastDelta?.fallbackReason;
if (!deltaSize && !fallbackReason) {
return null;
}

return (
<>
{lastDeltaSize && (
{deltaSize && (
<DescriptionListGroup>
<DescriptionListTerm>
<LabelWithHelperText
Expand All @@ -27,10 +27,10 @@ const ApplicationDeltaStatusFields = ({ lastDelta }: { lastDelta?: DeviceDeltaAp
)}
/>
</DescriptionListTerm>
<DescriptionListDescription>{lastDeltaSize}</DescriptionListDescription>
<DescriptionListDescription>{deltaSize}</DescriptionListDescription>
</DescriptionListGroup>
)}
{lastReason && (
{fallbackReason && (
<DescriptionListGroup>
<DescriptionListTerm>
<LabelWithHelperText
Expand All @@ -40,7 +40,7 @@ const ApplicationDeltaStatusFields = ({ lastDelta }: { lastDelta?: DeviceDeltaAp
)}
/>
</DescriptionListTerm>
<DescriptionListDescription>{lastReason}</DescriptionListDescription>
<DescriptionListDescription>{fallbackReason}</DescriptionListDescription>
</DescriptionListGroup>
)}
</>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as React from 'react';
import type { TFunction } from 'i18next';
import {
DescriptionList,
DescriptionListDescription,
Expand All @@ -12,24 +13,47 @@ import { useTranslation } from '../../../hooks/useTranslation';
import { getDeviceCapability } from '../../../utils/capabilities';
import { OsModeLabel } from '../../common/OsModeContent';
import LabelWithHelperText from '../../common/WithHelperText';
import DeviceDeltaUpdateDetails from './DeviceDeltaUpdateDetails';

const DeltaDescriptionGroupItem = ({ deviceStatus }: { deviceStatus: DeviceStatus | undefined }) => {
const getEligibilityStatus = (t: TFunction, isDeltaEligible?: string) => {
if (isDeltaEligible === undefined) {
return t('Unknown');
}
return Boolean(isDeltaEligible) ? t('Eligible') : t('Not eligible');
};

const DeltaGenerationDescriptionGroups = ({ deviceStatus }: { deviceStatus: DeviceStatus | undefined }) => {
const { t } = useTranslation();

const { bootcVersion, ociDeltaVersion, deltaEligible } = deviceStatus?.systemInfo || {};

return (
<DescriptionListGroup>
<DescriptionListTerm>
<LabelWithHelperText
label={t('Delta eligibility')}
content={t(
'Whether this device can apply incremental OCI delta updates. Requires bootc and the oci-delta tool on the device',
)}
/>
</DescriptionListTerm>
<DescriptionListDescription>
<DeviceDeltaUpdateDetails deviceStatus={deviceStatus} />
</DescriptionListDescription>
</DescriptionListGroup>
<>
<DescriptionListGroup>
<DescriptionListTerm>
<LabelWithHelperText
label={t('Delta generation')}
content={t(
'Delta updates download only the incremental changes between versions, reducing download size for updates. To receive delta updates, a device needs a compatible bootc version and the OCI delta package installed on its OS image.',
)}
/>
</DescriptionListTerm>
<DescriptionListDescription aria-live="polite">
{getEligibilityStatus(t, deltaEligible)}
</DescriptionListDescription>
</DescriptionListGroup>
{bootcVersion && (
<DescriptionListGroup className="pf-v6-u-ml-md">
<DescriptionListTerm>{t('Bootc version')}</DescriptionListTerm>
<DescriptionListDescription>{bootcVersion}</DescriptionListDescription>
</DescriptionListGroup>
)}
{ociDeltaVersion && (
<DescriptionListGroup className="pf-v6-u-ml-md">
<DescriptionListTerm>{t('OCI delta version')}</DescriptionListTerm>
<DescriptionListDescription>{ociDeltaVersion}</DescriptionListDescription>
</DescriptionListGroup>
)}
</>
);
};

Expand All @@ -46,7 +70,7 @@ export const CapabilitiesFieldsList = ({ deviceStatus }: { deviceStatus: DeviceS
<OsModeLabel osMode={osModeCapability} />
</DescriptionListDescription>
</DescriptionListGroup>
<DeltaDescriptionGroupItem deviceStatus={deviceStatus} />
<DeltaGenerationDescriptionGroups deviceStatus={deviceStatus} />
</SidebarDescriptionList>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const VmAppExpandedDetails = ({
<DesiredStateLabel desiredState={desiredState} />
</DescriptionListDescription>
</DescriptionListGroup>
<ApplicationDeltaStatusFields lastDelta={appStatus.lastDelta} />
<ApplicationDeltaStatusFields appStatus={appStatus} />
</DescriptionList>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const WorkloadAppExpandedDetails = ({
<DesiredStateLabel desiredState={desiredState} />
</DescriptionListDescription>
</DescriptionListGroup>
<ApplicationDeltaStatusFields lastDelta={appStatus.lastDelta} />
<ApplicationDeltaStatusFields appStatus={appStatus} />
{volumes.length > 0 && <ApplicationVolumesDescriptionList volumes={volumes} />}
</DescriptionList>
);
Expand Down
5 changes: 5 additions & 0 deletions libs/ui-components/src/components/Events/useEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ const getEventReasonTitles = (t: TFunction, kindType: string): Record<Event.reas
[Event.reason.PREPARE_DELTAS]: t('Preparing delta updates'),
[Event.reason.DELTA_GENERATION_PROGRESS]: t('Delta updates are being generated'),
[Event.reason.DELTA_GENERATION_COMPLETED]: t('Delta updates generation is complete'),
// Enrollment hook events
[Event.reason.ENROLLMENT_HOOK_SUCCEEDED]: t('Enrollment hook succeeded'),
[Event.reason.ENROLLMENT_HOOK_FAILED]: t('Enrollment hook failed'),
[Event.reason.ENROLLMENT_HOOK_NOTIFY_FAILED]: t('Enrollment hook notify failed'),
[Event.reason.ENROLLMENT_HOOK_MANUAL_OVERRIDE]: t('Enrollment hook has manual override'),
};
};

Expand Down
Loading
Loading