added alias to view (#22219)

This commit is contained in:
Erik Jan de Wit 2023-08-09 15:42:38 +02:00 committed by GitHub
parent 66262d0055
commit 357ebafa16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View file

@ -82,6 +82,7 @@ export const FlowRow = ({
<FlowTitle <FlowTitle
id={execution.id} id={execution.id}
key={execution.id} key={execution.id}
alias={execution.alias!}
title={execution.displayName!} title={execution.displayName!}
/> />
)} )}
@ -89,7 +90,7 @@ export const FlowRow = ({
<> <>
{execution.displayName} <br />{" "} {execution.displayName} <br />{" "}
<Text component={TextVariants.small}> <Text component={TextVariants.small}>
{execution.description} {execution.alias} {execution.description}
</Text> </Text>
</> </>
)} )}

View file

@ -1,13 +1,14 @@
import { Card, CardBody } from "@patternfly/react-core"; import { Card, CardBody, Text, TextVariants } from "@patternfly/react-core";
import "./flow-title.css"; import "./flow-title.css";
type FlowTitleProps = { type FlowTitleProps = {
id?: string; id?: string;
title: string; title: string;
alias: string;
}; };
export const FlowTitle = ({ id, title }: FlowTitleProps) => { export const FlowTitle = ({ id, title, alias }: FlowTitleProps) => {
return ( return (
<Card <Card
data-testid={title} data-testid={title}
@ -15,7 +16,8 @@ export const FlowTitle = ({ id, title }: FlowTitleProps) => {
isFlat isFlat
> >
<CardBody data-id={id} id={`title-id-${id}`}> <CardBody data-id={id} id={`title-id-${id}`}>
{title} {title} <br />
<Text component={TextVariants.small}>{alias}</Text>
</CardBody> </CardBody>
</Card> </Card>
); );