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
11 changes: 10 additions & 1 deletion apps/webapp/app/components/runs/v3/TaskRunsTable.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -56,23 +56,28 @@ import{
TaskRunStatusCombo,
} from "./TaskRunStatus"
import{useOptimisticLocation } from "~/hooks/useOptimisticLocation"
import{useSearchParams } from "~/hooks/useSearchParam"

type RunsTableProps ={
total: number;
hasFilters: boolean;
filters: NextRunListAppliedFilters;
showJob?: boolean;
runs: NextRunListItem[];
rootOnlyDefault?: boolean;
isLoading?: boolean;
allowSelection?: boolean;
variant?: TableVariant;
disableAdjacentRows?: boolean;
};

export function TaskRunsTable({
total,
hasFilters,
filters,
runs,
rootOnlyDefault,
disableAdjacentRows = false,
isLoading = false,
allowSelection = false,
variant = "dimmed",
Expand All@@ -82,8 +87,12 @@ export function TaskRunsTable({
const checkboxes = useRef<(HTMLInputElement | null)[]>([]);
const{has, hasAll, select, deselect, toggle } = useSelectedItems(allowSelection);
const{isManagedCloud } = useFeatures();
const{value } = useSearchParams();
const location = useOptimisticLocation();
const tableStateParam = encodeURIComponent(location.search ? `${location.search}&rt=1` : "rt=1");
const rootOnly = value("rootOnly") ? `` : `rootOnly=${rootOnlyDefault}`;
const search = rootOnly ? `${rootOnly}&${location.search}` : location.search;
/** TableState has to be encoded as a separate URI component, so it's merged under one, 'tableState' param */
const tableStateParam = disableAdjacentRows ? '' : encodeURIComponent(search);

const showCompute = isManagedCloud;

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -298,6 +298,7 @@ function RunsList({
runs={list.runs}
isLoading={isLoading}
allowSelection
rootOnlyDefault={rootOnlyDefault}
/>
</div>
)}
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -318,6 +318,7 @@ export default function Page(){
runs={schedule.runs}
isLoading={false}
variant="bright"
disableAdjacentRows
/>
</div>
<div className="flex flex-col gap-1 pt-2">
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -126,6 +126,7 @@ export default function Page(){
runs={waitpoint.connectedRuns}
isLoading={false}
variant="bright"
disableAdjacentRows
/>
</div>
</div>
Expand Down