bbovenzi commented on code in PR #29413:
URL: https://github.com/apache/airflow/pull/29413#discussion_r1119101266


##########
airflow/www/static/js/dag/details/index.tsx:
##########
@@ -17,23 +17,89 @@
  * under the License.
  */
 
-import React from 'react';
+import React, { useEffect, useState } from 'react';
 import {
   Flex,
-  Box,
   Divider,
+  Tabs,
+  TabList,
+  TabPanel,
+  TabPanels,
+  Tab,
+  Text,
 } from '@chakra-ui/react';
+import { useSearchParams } from 'react-router-dom';
 
 import useSelection from 'src/dag/useSelection';
+import URLSearchParamsWrapper from 'src/utils/URLSearchParamWrapper';
+import { getTask, getMetaValue } from 'src/utils';
+import { useGridData, useTaskInstance } from 'src/api';
 
 import Header from './Header';
 import TaskInstanceContent from './taskInstance';
 import DagRunContent from './dagRun';
 import DagContent from './Dag';
+import Graph from './graph';
+import MappedInstances from './taskInstance/MappedInstances';
+import Logs from './taskInstance/Logs';
+import BackToTaskSummary from './taskInstance/BackToTaskSummary';
 
-const Details = () => {
+const SHOW_GRAPH_PARAM = 'show_graph';
+const dagId = getMetaValue('dag_id')!;
+
+interface Props {
+  openGroupIds: string[];
+  onToggleGroups: (groupIds: string[]) => void;
+}
+
+const Details = ({ openGroupIds, onToggleGroups }: Props) => {
   const { selected: { runId, taskId, mapIndex }, onSelect } = useSelection();
 
+  const [searchParams, setSearchParams] = useSearchParams();
+  const showGraph = !!searchParams.get(SHOW_GRAPH_PARAM);
+  const [tabIndex, setTabIndex] = useState(showGraph ? 1 : 0);
+
+  // TODO: restore preferred tab index logic

Review Comment:
   I just updated this to store the tab location in the url params.



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to