diff --git a/packages/duron-dashboard/src/views/step-list.tsx b/packages/duron-dashboard/src/views/step-list.tsx
index 697e66c..e11d061 100644
--- a/packages/duron-dashboard/src/views/step-list.tsx
+++ b/packages/duron-dashboard/src/views/step-list.tsx
@@ -1,11 +1,13 @@
'use client'
-import { Search } from 'lucide-react'
+import { Clock, Search } from 'lucide-react'
import { useCallback, useState } from 'react'
+import { TimelineModal } from '@/components/timeline-modal'
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@/components/ui/accordion'
+import { Button } from '@/components/ui/button'
import { Input } from '@/components/ui/input'
-import { ScrollArea, ScrollBar } from '@/components/ui/scroll-area'
+import { ScrollArea } from '@/components/ui/scroll-area'
import { useDebouncedCallback } from '@/hooks/use-debounced-callback'
import { useStepsPolling } from '@/hooks/use-steps-polling'
import { useJobSteps } from '@/lib/api'
@@ -22,6 +24,7 @@ export function StepList({ jobId, selectedStepId, onStepSelect }: StepListProps)
const [inputValue, setInputValue] = useState('')
const [searchTerm, setSearchTerm] = useState('')
const [page, setPage] = useState(1)
+ const [timelineOpen, setTimelineOpen] = useState(false)
const pageSize = 20
// Debounce the search term update with 1000ms delay
@@ -56,86 +59,101 @@ export function StepList({ jobId, selectedStepId, onStepSelect }: StepListProps)
const steps = stepsData?.steps ?? []
return (
-
-
-
-
- handleSearchChange(e.target.value)}
- className="pl-8"
- />
-
-
-
-
-
- {stepsLoading ? (
-
Loading steps...
- ) : steps.length === 0 ? (
-
- {inputValue ? 'No steps found matching your search' : 'No steps found'}
+ <>
+
+
+
+
+
+ handleSearchChange(e.target.value)}
+ className="pl-8"
+ />
- ) : (
-
setTimelineOpen(true)}
+ className="shrink-0"
+ title="View Timeline"
>
- {steps.map((step, index) => {
- const stepNumber = (page - 1) * pageSize + index + 1
- return (
-
-
-
-
- #{stepNumber}
- {step.name}
-
-
-
-
-
-
-
-
- )
- })}
-
- )}
+
+ Timeline
+
+
+
- {stepsData && stepsData.total > pageSize && (
-
-
- Showing {(page - 1) * pageSize + 1} - {Math.min(page * pageSize, stepsData.total)} of {stepsData.total}{' '}
- steps
-
-
-
-
-
-
+ {stepsData && stepsData.total > pageSize && (
+
+
+ Showing {(page - 1) * pageSize + 1} - {Math.min(page * pageSize, stepsData.total)} of {stepsData.total}{' '}
+ steps
+
+
+ setPage((p) => Math.max(1, p - 1))}
+ disabled={page === 1}
+ className="px-3 py-1 text-sm border rounded disabled:opacity-50"
+ >
+ Previous
+
+ setPage((p) => p + 1)}
+ disabled={page * pageSize >= stepsData.total}
+ className="px-3 py-1 text-sm border rounded disabled:opacity-50"
+ >
+ Next
+
+
+
+ )}
+
+
+ >
)
}