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
10 changes: 10 additions & 0 deletions frontend/src/apiDefinitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,16 @@ export interface LogDetectiveResultGroup {
target_build: string | null;
run_ids: number[];
submitted_time: number | null;
branch_name: string | null;
pr_id: number | null;
issue_id: number | null;
release: string | null;
project_url: string;
repo_name: string;
repo_namespace: string;
anitya_version: string | null;
anitya_project_name: string | null;
anitya_package: string | null;
}

// /api/log-detective/groups/$id
Expand Down
28 changes: 24 additions & 4 deletions frontend/src/components/logdetective/LogDetectiveResultsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ import { SkeletonTable } from "@patternfly/react-component-groups";
import { useQuery } from "@tanstack/react-query";
import { logDetectiveResultsQueryOptions } from "../../queries/logdetective/logDetectiveResultsQuery";
import { ErrorConnection } from "../errors/ErrorConnection";
import { ForgeIcon } from "../icons/ForgeIcon";
import { PackitPagination } from "../shared/PackitPagination";
import { PackitPaginationContext } from "../shared/PackitPaginationContext";
import { Timestamp } from "../shared/Timestamp";
import { StatusLabel } from "../statusLabels/StatusLabel";
import { TriggerLink, TriggerSuffix } from "../trigger/TriggerLink";

export const LogDetectiveResultsTable = () => {
const [page, setPage] = useState(1);
Expand All @@ -29,6 +31,8 @@ export const LogDetectiveResultsTable = () => {

// Headings
const columnNames = {
forge: "Forge",
trigger: "Trigger",
packit_id: "Packit ID",
analysisId: "Analysis ID",
target: "Target",
Expand All @@ -41,19 +45,25 @@ export const LogDetectiveResultsTable = () => {
);

const TableHeads = [
<Th key={columnNames.forge} width={10}>
{columnNames.forge}
</Th>,
<Th key={columnNames.trigger} width={15}>
{columnNames.trigger}
</Th>,
<Th key={columnNames.packit_id} width={10}>
{columnNames.packit_id}
</Th>,
<Th key={columnNames.analysisId} width={20}>
<Th key={columnNames.analysisId} width={15}>
{columnNames.analysisId}
</Th>,
<Th key={columnNames.target} width={20}>
<Th key={columnNames.target} width={15}>
{columnNames.target}
</Th>,
<Th key={columnNames.commitSha} width={20}>
<Th key={columnNames.commitSha} width={15}>
{columnNames.commitSha}
</Th>,
<Th key={columnNames.timeSubmitted} width={20}>
<Th key={columnNames.timeSubmitted} width={15}>
{columnNames.timeSubmitted}
</Th>,
];
Expand Down Expand Up @@ -82,6 +92,16 @@ export const LogDetectiveResultsTable = () => {
<Tbody>
{data?.map((log_detective_result) => (
<Tr key={log_detective_result.packit_id}>
<Td dataLabel={columnNames.forge}>
<ForgeIcon url={log_detective_result.project_url} />
</Td>
<Td dataLabel={columnNames.trigger}>
<strong>
<TriggerLink trigger={log_detective_result}>
<TriggerSuffix trigger={log_detective_result} />
</TriggerLink>
</strong>
</Td>
<Td dataLabel={columnNames.packit_id}>
{log_detective_result.packit_id}
</Td>
Expand Down
Loading