diff --git a/react-ui/config/routes.ts b/react-ui/config/routes.ts
index 8ec050ae..ec2d251f 100644
--- a/react-ui/config/routes.ts
+++ b/react-ui/config/routes.ts
@@ -141,12 +141,18 @@ export default [
{
name: '实验对比',
path: 'compare',
- component: './Experiment/Comparison/index',
- },
- {
- name: '实验可视化对比',
- path: 'compare-visual',
- component: './Experiment/Aim/index',
+ routes: [
+ {
+ name: '实验对比',
+ path: '',
+ component: './Experiment/Comparison/index',
+ },
+ {
+ name: '可视化对比',
+ path: 'compare-visual',
+ component: './Experiment/Aim/index',
+ },
+ ],
},
{
name: '可视化',
@@ -223,7 +229,18 @@ export default [
{
name: '实验实例详情',
path: 'instance/:experimentId/:id',
- component: './HyperParameter/Instance/index',
+ routes: [
+ {
+ name: '实验实例详情',
+ path: '',
+ component: './HyperParameter/Instance/index',
+ },
+ {
+ name: '可视化对比',
+ path: 'compare-visual',
+ component: './HyperParameter/Aim/index',
+ },
+ ],
},
],
},
diff --git a/react-ui/src/pages/Experiment/Comparison/index.tsx b/react-ui/src/pages/Experiment/Comparison/index.tsx
index 200b4ba1..d10e8069 100644
--- a/react-ui/src/pages/Experiment/Comparison/index.tsx
+++ b/react-ui/src/pages/Experiment/Comparison/index.tsx
@@ -77,7 +77,7 @@ function ExperimentComparison() {
const url = res.data;
// window.open(url, '_blank');
SessionStorage.setItem(SessionStorage.aimUrlKey, url);
- navigate('../compare-visual');
+ navigate('compare-visual');
}
};
diff --git a/react-ui/src/pages/HyperParameter/Aim/index.tsx b/react-ui/src/pages/HyperParameter/Aim/index.tsx
new file mode 100644
index 00000000..3a8d1d0d
--- /dev/null
+++ b/react-ui/src/pages/HyperParameter/Aim/index.tsx
@@ -0,0 +1,12 @@
+/*
+ * @Author: 赵伟
+ * @Date: 2025-03-31 16:38:59
+ * @Description: 实验对比 Aim
+ */
+
+import IframePage, { IframePageType } from '@/components/IFramePage';
+
+function AimPage() {
+ return ;
+}
+export default AimPage;
diff --git a/react-ui/src/pages/HyperParameter/components/ExperimentHistory/index.tsx b/react-ui/src/pages/HyperParameter/components/ExperimentHistory/index.tsx
index c9c9dce5..39ecebda 100644
--- a/react-ui/src/pages/HyperParameter/components/ExperimentHistory/index.tsx
+++ b/react-ui/src/pages/HyperParameter/components/ExperimentHistory/index.tsx
@@ -3,7 +3,9 @@ import TrialStatusCell from '@/pages/HyperParameter/components/TrialStatusCell';
import { HyperParameterTrial } from '@/pages/HyperParameter/types';
import { getExpMetricsReq } from '@/services/hyperParameter';
import { to } from '@/utils/promise';
+import SessionStorage from '@/utils/sessionStorage';
import tableCellRender, { TableCellValueType } from '@/utils/table';
+import { useNavigate } from '@umijs/max';
import { App, Button, Table, type TableProps } from 'antd';
import classNames from 'classnames';
import { useEffect, useState } from 'react';
@@ -36,6 +38,7 @@ function ExperimentHistory({ trialList = [] }: ExperimentHistoryProps) {
const metricAnalysis: Record = first?.metric_analysis ?? {};
const paramsNames = Object.keys(config);
const metricNames = Object.keys(metricAnalysis);
+ const navigate = useNavigate();
const trialColumns: TableProps['columns'] = [
{
@@ -160,7 +163,8 @@ function ExperimentHistory({ trialList = [] }: ExperimentHistoryProps) {
const [res] = await to(getExpMetricsReq(selectedRowKeys));
if (res && res.data) {
const url = res.data;
- window.open(url, '_blank');
+ SessionStorage.setItem(SessionStorage.aimUrlKey, url);
+ navigate('compare-visual');
}
};