diff --git a/react-ui/src/pages/Experiment/Info/index.jsx b/react-ui/src/pages/Experiment/Info/index.jsx index 3c1eda2f..1d883daa 100644 --- a/react-ui/src/pages/Experiment/Info/index.jsx +++ b/react-ui/src/pages/Experiment/Info/index.jsx @@ -112,6 +112,8 @@ function ExperimentText() { }, 5 * 1000); } + // 如果状态是 Pending, 打开第一个节点 + // 如果状态是 Running,打开第一个运行中的节点,如果没有运行中的节点,打开第一个节点 if (first && status === ExperimentStatus.Pending) { const node = workflowData.nodes[0]; if (node) { diff --git a/react-ui/src/pages/Experiment/Info/props.tsx b/react-ui/src/pages/Experiment/Info/props.tsx index 5940756a..4f852716 100644 --- a/react-ui/src/pages/Experiment/Info/props.tsx +++ b/react-ui/src/pages/Experiment/Info/props.tsx @@ -10,13 +10,6 @@ import LogList from '../components/LogList'; import { experimentStatusInfo } from '../status'; import styles from './props.less'; -export type ExperimentLog = { - log_type: 'normal' | 'resource'; // 日志类型 - pod_name?: string; // 分布式名称 - log_content?: string; // 日志内容 - start_time?: string; // 日志开始时间 -}; - type ExperimentDrawerProps = { open: boolean; onClose: () => void; @@ -25,8 +18,8 @@ type ExperimentDrawerProps = { instanceNamespace?: string; // 实验实例 namespace instanceNodeData: PipelineNodeModelSerialize; // 节点数据,在定时刷新实验实例状态中不会变化 workflowId?: string; // 实验实例工作流 id - instanceNodeStatus?: ExperimentStatus; // 在定时刷新实验实例状态中,变化一两次 - instanceNodeStartTime?: string; // 在定时刷新实验实例状态中,变化一两次 + instanceNodeStatus?: ExperimentStatus; // 实例节点状态 + instanceNodeStartTime?: string; // 开始时间 instanceNodeEndTime?: string; // 在定时刷新实验实例状态中,会经常变化 }; diff --git a/react-ui/src/pages/Experiment/components/LogGroup/index.tsx b/react-ui/src/pages/Experiment/components/LogGroup/index.tsx index ffb6eb1d..4440c9cb 100644 --- a/react-ui/src/pages/Experiment/components/LogGroup/index.tsx +++ b/react-ui/src/pages/Experiment/components/LogGroup/index.tsx @@ -6,12 +6,12 @@ import { ExperimentStatus } from '@/enums'; import { useStateRef } from '@/hooks'; -import { ExperimentLog } from '@/pages/Experiment/Info/props'; import { getExperimentPodsLog } from '@/services/experiment/index.js'; import { DoubleRightOutlined, DownOutlined, UpOutlined } from '@ant-design/icons'; import { Button } from 'antd'; import classNames from 'classnames'; import { useEffect, useRef, useState } from 'react'; +import { ExperimentLog } from '../LogList'; import styles from './index.less'; export type LogGroupProps = ExperimentLog & { diff --git a/react-ui/src/pages/Experiment/components/LogList/index.tsx b/react-ui/src/pages/Experiment/components/LogList/index.tsx index f9fbccea..911bf5d9 100644 --- a/react-ui/src/pages/Experiment/components/LogList/index.tsx +++ b/react-ui/src/pages/Experiment/components/LogList/index.tsx @@ -1,5 +1,4 @@ import { ExperimentStatus } from '@/enums'; -import { ExperimentLog } from '@/pages/Experiment/Info/props'; import { getQueryByExperimentLog } from '@/services/experiment/index.js'; import { to } from '@/utils/promise'; import dayjs from 'dayjs'; @@ -7,6 +6,13 @@ import { useEffect, useState } from 'react'; import LogGroup from '../LogGroup'; import styles from './index.less'; +export type ExperimentLog = { + log_type: 'normal' | 'resource'; // 日志类型 + pod_name?: string; // 分布式名称 + log_content?: string; // 日志内容 + start_time?: string; // 日志开始时间 +}; + type LogListProps = { instanceName?: string; // 实验实例 name instanceNamespace?: string; // 实验实例 namespace