Skip to content
Open
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
1 change: 0 additions & 1 deletion frontend/packages/console-shared/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export * from './form-utils';
export * from './formik-fields';
export * from './getting-started';
export * from './lists';
export * from './log';
export * from './status';
export * from './pod';
export * from './popper';
Expand Down

This file was deleted.

19 changes: 0 additions & 19 deletions frontend/packages/console-shared/src/components/log/LogSnippet.tsx

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { FC } from 'react';
import { LogSnippet } from '@patternfly/react-component-groups';
import { Button, List, ListItem } from '@patternfly/react-core';
import { SyncAltIcon } from '@patternfly/react-icons/dist/esm/icons/sync-alt-icon';
import { Trans, useTranslation } from 'react-i18next';
Expand All @@ -19,7 +20,7 @@ import type { K8sResourceKind } from '@console/internal/module/k8s';
import { referenceFor } from '@console/internal/module/k8s';
import { BuildPhase, startBuild } from '@console/internal/module/k8s/builds';
import type { BuildConfigOverviewItem } from '@console/shared';
import { LogSnippet, Status } from '@console/shared';
import { Status } from '@console/shared';
import './BuildOverview.scss';

const MAX_VISIBLE = 3;
Expand Down Expand Up @@ -83,7 +84,13 @@ const BuildStatus = ({ build }: { build: K8sResourceKind }) => {
status: { logSnippet, message, phase },
} = build;
const unsuccessful = [BuildPhase.Error, BuildPhase.Failed].includes(phase);
return unsuccessful ? <LogSnippet message={message} logSnippet={logSnippet} /> : null;
return unsuccessful ? (
<LogSnippet
className="pf-v6-u-pt-sm pf-v6-u-pb-sm pf-v6-u-pl-md"
message={<p>{message}</p>}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LogSnippet should already wrap the content in a pre or code so the p isn't necessary

Copy link
Author

@stefanonardo stefanonardo Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@logonoff we do this to suppress the alert icon since we already display it in the component above the LogSnippet: https://github.com/patternfly/react-component-groups/blob/main/packages/module/src/LogSnippet/LogSnippet.tsx#L19

keep in mind that message is the "title" of the log snippet, the actual log is passed in logSnippet

logSnippet={logSnippet}
/>
) : null;
};

const BuildOverviewItem: FC<BuildOverviewListItemProps> = ({ build }) => {
Expand Down