bbovenzi commented on code in PR #64387:
URL: https://github.com/apache/airflow/pull/64387#discussion_r3029763873
##########
airflow-core/src/airflow/ui/src/layouts/Details/Gantt/Gantt.tsx:
##########
@@ -224,21 +234,70 @@ export const Gantt = ({ dagRunState, limit, runType,
triggeringUser }: Props) =>
};
return (
- <Box
- height={`${fixedHeight}px`}
- minW="250px"
- ml={-2}
- mt={`${GRID_BODY_OFFSET_PX}px`}
- onMouseLeave={handleChartMouseLeave}
- w="100%"
- >
- <Bar
- data={chartData}
- options={chartOptions}
- style={{
- paddingTop: flatNodes.length === 1 ? 15 : 1.5,
- }}
- />
- </Box>
+ <>
+ {/* Date inputs that trigger a new API fetch when changed */}
+ <Box mb="4" display="flex" gap="4" alignItems="flex-end">
+ <Box display="flex" flexDirection="column">
+ <Text color="fg.muted" fontSize="xs" mb={1}>
+ {translate("startDate")}
+ </Text>
+ <Input
+ fontSize="sm"
+ fontWeight="medium"
+ maxW="200px"
+ onChange={(e) => {
+ const value = e.target.value;
+ if (filterEndDate && value > filterEndDate) {
+ alert("Start date cannot be after end date");
+ return;
+ }
Review Comment:
Oh yes, this is a good catch. We definitely should not be using `alert()`
--
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]