Skip to content

Commit

Permalink
HMS-4890: add data-uuid to latest snap config
Browse files Browse the repository at this point in the history
  • Loading branch information
xbhouse committed Jan 20, 2025
1 parent a047405 commit 007182e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ const SnapshotListModal = () => {

const isRedHatRepository = contentOrigin === ContentOrigin.REDHAT;

const latestSnapshotUUID = snapshotsList[0]?.uuid;

const rowActions = useCallback(
(snap_uuid: string): IAction[] =>
isRedHatRepository
Expand Down Expand Up @@ -275,7 +277,7 @@ const SnapshotListModal = () => {
</FlexItem>
</Hide>
<FlexItem>
<LatestRepoConfig repoUUID={uuid} />
<LatestRepoConfig repoUUID={uuid} snapUUID={latestSnapshotUUID} />
</FlexItem>
<FlexItem>
<Pagination
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ import RepoConfig from './RepoConfig';

interface Props {
repoUUID: string;
snapUUID: string;
}

const LatestRepoConfig = ({ repoUUID }: Props) => (
const LatestRepoConfig = ({ repoUUID, snapUUID }: Props) => (
<Flex>
<FlexItem>
<TextContent>
<Text component={TextVariants.p}>Latest Snapshot Config:</Text>
</TextContent>
</FlexItem>
<FlexItem>
<RepoConfig repoUUID={repoUUID} snapUUID='' latest />
<RepoConfig repoUUID={repoUUID} snapUUID={snapUUID} latest />
</FlexItem>
</Flex>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const RepoConfig = ({ repoUUID, snapUUID, latest }: Props) => {
variant='link'
className={classes.link}
onClick={() => copyConfigFile()}
data-uuid={snapUUID}
>
<Icon>
<CopyIcon />
Expand All @@ -69,6 +70,7 @@ const RepoConfig = ({ repoUUID, snapUUID, latest }: Props) => {
variant='link'
className={classes.link}
onClick={() => downloadConfigFile()}
data-uuid={snapUUID}
>
<Icon>
<DownloadIcon />
Expand Down

0 comments on commit 007182e

Please sign in to comment.