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
34 changes: 16 additions & 18 deletions libs/features/batch-operations/src/lib/BatchProgressBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,10 @@ export function BatchProgressBar({
<div className="flex flex-col gap-3.5">
<div className="flex translate-y-4 flex-col">
<span className="inline-flex transform items-baseline gap-1 text-lg font-normal text-gray-600 transition-all">
{successful ? (
<span className="transform text-blue-600 transition-all">
{successful}{' '}
<span className="text-0.5xs text-gray-500">succeeded</span>{' '}
</span>
) : (
<br />
)}{' '}
<span className="transform text-blue-600 transition-all">
{successful}{' '}
<span className="text-0.5xs text-gray-500">succeeded</span>{' '}
</span>{' '}
{!!failed && (
<Popover>
<PopoverTrigger>
Expand All @@ -97,7 +93,7 @@ export function BatchProgressBar({
</span>
</Button>
</span>
<PopoverContent>
<PopoverContent className="max-w-lg">
<DropdownSection
title={`Failed invocations ${(failedInvocations?.length || 0) === MAX_FAILED_INVOCATIONS ? `(last ${MAX_FAILED_INVOCATIONS})` : ''}`}
>
Expand Down Expand Up @@ -144,15 +140,17 @@ export function BatchProgressBar({
<div className="flex flex-col gap-3.5">
<div className="relative mt-1 flex h-3 w-full gap-0.5">
{/* Success portion */}
<div
className={progressBarStyles({
variant: 'success',
isZero: successful === 0,
})}
style={{
width: `${successRatio * 100}%`,
}}
/>
{successful > 0 && (
<div
className={progressBarStyles({
variant: 'success',
isZero: successful === 0,
})}
style={{
width: `${successRatio * 100}%`,
}}
/>
)}
{/* Failed portion */}
{failed > 0 && (
<div
Expand Down
10 changes: 10 additions & 0 deletions libs/features/invocations-route/src/lib/invocations.route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import {
ClientLoaderFunctionArgs,
Form,
ShouldRevalidateFunctionArgs,
useNavigate,
useSearchParams,
} from 'react-router';
import { useQueryClient } from '@tanstack/react-query';
Expand Down Expand Up @@ -477,6 +478,9 @@ function Component() {
setSelectedInvocationIds(new Set());
}, [isFetching, pageIndex]);

const navigate = useNavigate();
const { baseUrl } = useRestateContext();

return (
<SnapshotTimeProvider lastSnapshot={dataUpdate}>
<div className="relative flex flex-auto flex-col gap-2">
Expand Down Expand Up @@ -644,6 +648,12 @@ function Component() {
setSelectedInvocationIds(keys as Set<string>);
}
}}
onRowAction={(key) => {
navigate({
pathname: `${baseUrl}/invocations/${key}`,
search: searchParams.toString(),
});
}}
>
<TableHeader className="[&_th:nth-last-child(2)_[data-resizable-direction]]:invisible">
{sortedColumnsList.map((col) =>
Expand Down
1 change: 1 addition & 0 deletions libs/ui/table/src/lib/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ interface TableProps
| 'onSortChange'
| 'onSelectionChange'
| 'selectedKeys'
| 'onRowAction'
> {
className?: string;
}
Expand Down
Loading