aritra24 commented on code in PR #47821:
URL: https://github.com/apache/airflow/pull/47821#discussion_r1997641362


##########
airflow/ui/src/layouts/Details/DetailsLayout.tsx:
##########
@@ -89,7 +101,12 @@ export const DetailsLayout = ({ children, error, isLoading, 
tabs }: Props) => {
           <Panel defaultSize={dagView === "graph" ? 30 : 80} minSize={20}>
             <Box display="flex" flexDirection="column" h="100%">
               {children}
-              <ErrorAlert error={error} />
+              <VStack ml={2} my={2}>
+                <ErrorAlert error={error} />
+                {warning?.dag_warnings.map((warningItem) => (
+                  <WarningAlert key={warningItem.dag_id} warning={warningItem} 
/>

Review Comment:
   Since all the warnings come from the same dag I presume this would be the 
same for all alerts thus throwing an error?



##########
airflow/ui/src/layouts/Details/DetailsLayout.tsx:
##########
@@ -39,14 +40,25 @@ import { Grid } from "./Grid";
 import { NavTabs } from "./NavTabs";
 import { PanelButtons } from "./PanelButtons";
 
+type DagWarningItem = {
+  dag_id: string;
+  message: string;
+};
+
+type DagWarningsResponse = {
+  dag_warnings: Array<DagWarningItem>;
+  total_entries: number;
+};
+
 type Props = {
   readonly dag?: DAGResponse;
   readonly error?: unknown;
   readonly isLoading?: boolean;
   readonly tabs: Array<{ icon: ReactNode; label: string; value: string }>;
+  readonly warning?: DagWarningsResponse;

Review Comment:
   This can be of the type `DAGWarningCollectionResponse` which is the response 
type of `useDagWarningServiceListDagWarnings`



##########
airflow/ui/src/layouts/Details/DetailsLayout.tsx:
##########
@@ -39,14 +40,25 @@ import { Grid } from "./Grid";
 import { NavTabs } from "./NavTabs";
 import { PanelButtons } from "./PanelButtons";
 
+type DagWarningItem = {
+  dag_id: string;
+  message: string;
+};
+
+type DagWarningsResponse = {
+  dag_warnings: Array<DagWarningItem>;
+  total_entries: number;
+};
+

Review Comment:
   I don't this this needs to be defined.



-- 
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]

Reply via email to