Skip to content

Commit

Permalink
fix: add external link to Pipelines table
Browse files Browse the repository at this point in the history
  • Loading branch information
Venefilyn committed Jun 10, 2024
1 parent 829258f commit 6a29fd7
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions frontend/src/app/Pipelines/PipelinesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import coprLogo from "../../static/copr.ico";
import kojiLogo from "../../static/koji.ico";
import { useInfiniteQuery, useQueryClient } from "@tanstack/react-query";
import { Link } from "react-router-dom";
import { ExternalLinkAltIcon } from "@patternfly/react-icons";

interface StatusItem {
packit_id: number;
Expand Down Expand Up @@ -123,10 +124,10 @@ const PipelinesTable = () => {

// Headings
const columns = [
{ title: "" }, // space for forge icon
{ title: "Trigger", transforms: [cellWidth(15)] },
{ title: "Trigger", transforms: [cellWidth(20)] },
{ title: "Time Submitted", transforms: [cellWidth(10)] },
{ title: "Jobs", transforms: [cellWidth(70)] },
{ title: "Jobs", transforms: [cellWidth(60)] },
{ title: "External" },
];

// Fetch data from dashboard backend (or if we want, directly from the API)
Expand Down Expand Up @@ -156,12 +157,10 @@ const PipelinesTable = () => {
res.forEach((run) => {
const singleRow = {
cells: [
{
title: <ForgeIcon url={run.trigger.git_repo} />,
},
{
title: (
<strong>
<ForgeIcon url={run.trigger.git_repo} />{" "}
<Link to={`/pipelines/${run.merged_run_id}`}>
<TriggerSuffix trigger={run.trigger} />
</Link>
Expand Down Expand Up @@ -217,6 +216,13 @@ const PipelinesTable = () => {
</>
),
},
{
title: (
<TriggerLink trigger={run.trigger}>
<ExternalLinkAltIcon />
</TriggerLink>
),
},
],
};
rowsList.push(singleRow);
Expand Down

0 comments on commit 6a29fd7

Please sign in to comment.