RoyLee1224 commented on code in PR #54865:
URL: https://github.com/apache/airflow/pull/54865#discussion_r2334804549
##########
airflow-core/src/airflow/ui/src/pages/DagRuns.tsx:
##########
@@ -364,6 +433,108 @@ export const DagRuns = () => {
</Select.Content>
</Select.Root>
</HStack>
+ <HStack flexWrap="wrap" gap={6} paddingY="4px">
+ {/* Start Date Range */}
+ <Box>
+ <HStack alignItems="flex-start">
+ <Box w="180px">
+ <Box marginBottom={1} minHeight="1.2em">
+ <Text
fontSize="xs">{translate("common:filters.startDateFromPlaceholder")}</Text>
+ </Box>
+ <DateTimeInput
+ onChange={(event) =>
handleStartDateRangeChange(event.target.value, startDateLte ?? "")}
+ size="sm"
+ value={startDateGte ?? ""}
+ />
+ </Box>
+ <Box w="180px">
+ <Box marginBottom={1} minHeight="1.2em">
+ <Text
fontSize="xs">{translate("common:filters.startDateToPlaceholder")}</Text>
+ </Box>
+ <DateTimeInput
+ onChange={(event) => handleStartDateRangeChange(startDateGte
?? "", event.target.value)}
+ size="sm"
+ value={startDateLte ?? ""}
+ />
+ </Box>
+ </HStack>
+ </Box>
+ {/* End Date Range */}
+ <Box>
+ <HStack alignItems="flex-start">
+ <Box w="180px">
+ <Box marginBottom={1} minHeight="1.2em">
+ <Text
fontSize="xs">{translate("common:filters.endDateFromPlaceholder")}</Text>
+ </Box>
+ <DateTimeInput
+ onChange={(event) =>
handleEndDateRangeChange(event.target.value, endDateLte ?? "")}
+ size="sm"
+ value={endDateGte ?? ""}
+ />
+ </Box>
+ <Box w="180px">
+ <Box marginBottom={1} minHeight="1.2em">
+ <Text
fontSize="xs">{translate("common:filters.endDateToPlaceholder")}</Text>
+ </Box>
+ <DateTimeInput
+ onChange={(event) => handleEndDateRangeChange(endDateGte ??
"", event.target.value)}
+ size="sm"
+ value={endDateLte ?? ""}
+ />
+ </Box>
+ </HStack>
+ </Box>
+ {/* Run After Range */}
+ <Box>
+ <HStack alignItems="flex-start">
+ <Box w="180px">
+ <Box marginBottom={1} minHeight="1.2em">
+ <Text
fontSize="xs">{translate("common:filters.runAfterFromPlaceholder")}</Text>
+ </Box>
+ <DateTimeInput
+ onChange={(event) =>
handleRunAfterRangeChange(event.target.value, runAfterLte ?? "")}
+ size="sm"
+ value={runAfterGte ?? ""}
+ />
+ </Box>
+ <Box w="180px">
+ <Box marginBottom={1} minHeight="1.2em">
+ <Text
fontSize="xs">{translate("common:filters.runAfterToPlaceholder")}</Text>
+ </Box>
+ <DateTimeInput
+ onChange={(event) => handleRunAfterRangeChange(runAfterGte ??
"", event.target.value)}
+ size="sm"
+ value={runAfterLte ?? ""}
+ />
+ </Box>
+ </HStack>
+ </Box>
+ {/* Clear Filters Button */}
+ <Box alignItems="flex-end" display="flex" height="100%">
Review Comment:
I think we could add `filterCount` for conditional reset button (see
`XComFilters.tsx`:138)
```suggestion
<Box alignSelf="end">
{filterCount > 0 && (
<Button onClick={handleResetFilters} size="sm" variant="outline">
<LuX />
{translate("common:table.filterReset", { count: filterCount })}
</Button>
)}
</Box>
```
See `XComFilters.tsx` lines 148-158 and 212-217 for the reference.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]