The Job List can shows jobs across projects now

This commit is contained in:
Matt Aitken
2023-11-07 14:50:52 +00:00
parent 8b13681afc
commit de7f133ef9
3 changed files with 3 additions and 4 deletions
@@ -27,7 +27,6 @@ import { JobStatusBadge } from "./JobStatusBadge";
export function JobsTable({ jobs, noResultsText }: { jobs: ProjectJob[]; noResultsText: string }) {
const organization = useOrganization();
const project = useProject();
return (
<Table containerClassName="mb-4">
@@ -45,7 +44,7 @@ export function JobsTable({ jobs, noResultsText }: { jobs: ProjectJob[]; noResul
<TableBody>
{jobs.length > 0 ? (
jobs.map((job) => {
const path = jobPath(organization, project, job);
const path = jobPath(organization, { slug: job.projectSlug }, job);
return (
<TableRow key={job.id} className="group">
<TableCell to={path}>
@@ -153,7 +152,7 @@ export function JobsTable({ jobs, noResultsText }: { jobs: ProjectJob[]; noResul
<TableCellMenu isSticky>
<PopoverMenuItem to={path} title="View Job" icon="eye" />
<PopoverMenuItem
to={jobTestPath(organization, project, job)}
to={jobTestPath(organization, { slug: job.projectSlug }, job)}
title="Test Job"
icon="beaker"
/>
@@ -207,6 +207,7 @@ export class JobListPresenter {
lastRun,
properties,
environments,
projectSlug: job.project.slug,
};
})
.filter(Boolean);
@@ -16,7 +16,6 @@ import {
PageTitleRow,
} from "~/components/primitives/PageHeader";
import { useOrganization } from "~/hooks/useOrganizations";
import { useProject } from "~/hooks/useProject";
import { useTypedMatchData } from "~/hooks/useTypedMatchData";
import { IntegrationClientPresenter } from "~/presenters/IntegrationClientPresenter.server";
import { requireUser } from "~/services/session.server";