diff --git a/react-ui/src/pages/ActiveLearn/Instance/index.tsx b/react-ui/src/pages/ActiveLearn/Instance/index.tsx
index 5655e60d..d3cbb4b8 100644
--- a/react-ui/src/pages/ActiveLearn/Instance/index.tsx
+++ b/react-ui/src/pages/ActiveLearn/Instance/index.tsx
@@ -153,7 +153,7 @@ function ActiveLearnInstance() {
className={styles['active-learn-instance__basic']}
info={experimentInfo}
runStatus={workflowStatus}
- instanceStatus={instanceInfo?.status}
+ instanceStatus={instanceInfo?.status as ExperimentStatus}
isInstance
/>
),
diff --git a/react-ui/src/pages/ActiveLearn/components/ExperimentLog/index.tsx b/react-ui/src/pages/ActiveLearn/components/ExperimentLog/index.tsx
index 1d9682c3..6b1f4b5d 100644
--- a/react-ui/src/pages/ActiveLearn/components/ExperimentLog/index.tsx
+++ b/react-ui/src/pages/ActiveLearn/components/ExperimentLog/index.tsx
@@ -1,5 +1,6 @@
import { ExperimentStatus } from '@/enums';
import { ActiveLearnInstanceData } from '@/pages/ActiveLearn/types';
+import EmptyLog from '@/pages/AutoML/components/ExperimentLog/empty';
import LogList from '@/pages/Experiment/components/LogList';
import { NodeStatus } from '@/types';
import { Tabs } from 'antd';
@@ -64,7 +65,7 @@ function ExperimentLog({ instanceInfo, nodes }: ExperimentLogProps) {
// icon: ,
children: (
- {trainCloneNodeStatus && (
+ {trainCloneNodeStatus ? (
+ ) : (
+
)}
),
@@ -83,7 +86,7 @@ function ExperimentLog({ instanceInfo, nodes }: ExperimentLogProps) {
// icon: ,
children: (
- {hpoNodeStatus && (
+ {hpoNodeStatus ? (
+ ) : (
+
)}
),
diff --git a/react-ui/src/pages/AutoML/Instance/index.tsx b/react-ui/src/pages/AutoML/Instance/index.tsx
index e0fb5e4d..a24bf37f 100644
--- a/react-ui/src/pages/AutoML/Instance/index.tsx
+++ b/react-ui/src/pages/AutoML/Instance/index.tsx
@@ -95,7 +95,10 @@ function AutoMLInstance() {
};
const setupSSE = (name: string, namespace: string) => {
- const { origin } = location;
+ let { origin } = location;
+ if (process.env.NODE_ENV === 'development') {
+ origin = 'http://172.20.32.235:31213';
+ }
const params = encodeURIComponent(`metadata.namespace=${namespace},metadata.name=${name}`);
const evtSource = new EventSource(
`${origin}/api/v1/realtimeStatus?listOptions.fieldSelector=${params}`,
@@ -156,7 +159,7 @@ function AutoMLInstance() {
className={styles['auto-ml-instance__basic']}
info={autoMLInfo}
runStatus={workflowStatus}
- instanceStatus={instanceInfo?.status}
+ instanceStatus={instanceInfo?.status as ExperimentStatus}
isInstance
/>
),
diff --git a/react-ui/src/pages/AutoML/components/ExperimentLog/empty.tsx b/react-ui/src/pages/AutoML/components/ExperimentLog/empty.tsx
new file mode 100644
index 00000000..219a8710
--- /dev/null
+++ b/react-ui/src/pages/AutoML/components/ExperimentLog/empty.tsx
@@ -0,0 +1,7 @@
+import styles from './index.less';
+
+function EmptyLog() {
+ return 暂无日志
;
+}
+
+export default EmptyLog;
diff --git a/react-ui/src/pages/AutoML/components/ExperimentLog/index.less b/react-ui/src/pages/AutoML/components/ExperimentLog/index.less
index beaacea3..d0c76f5b 100644
--- a/react-ui/src/pages/AutoML/components/ExperimentLog/index.less
+++ b/react-ui/src/pages/AutoML/components/ExperimentLog/index.less
@@ -5,3 +5,14 @@
height: 100%;
}
}
+
+.empty-log {
+ height: 100%;
+ padding: 15px;
+ color: white;
+ font-size: 14px;
+ white-space: pre-line;
+ text-align: center;
+ word-break: break-all;
+ background: #19253b;
+}
diff --git a/react-ui/src/pages/AutoML/components/ExperimentLog/index.tsx b/react-ui/src/pages/AutoML/components/ExperimentLog/index.tsx
index 219e5782..157aae80 100644
--- a/react-ui/src/pages/AutoML/components/ExperimentLog/index.tsx
+++ b/react-ui/src/pages/AutoML/components/ExperimentLog/index.tsx
@@ -2,6 +2,7 @@ import { ExperimentStatus } from '@/enums';
import { AutoMLInstanceData } from '@/pages/AutoML/types';
import LogList from '@/pages/Experiment/components/LogList';
import { NodeStatus } from '@/types';
+import EmptyLog from './empty';
import styles from './index.less';
const NodePrefix = 'auto-ml';
@@ -19,7 +20,7 @@ function ExperimentLog({ instanceInfo, nodes }: ExperimentLogProps) {
return (
- {nodeStatus && (
+ {nodeStatus ? (
+ ) : (
+
)}
diff --git a/react-ui/src/pages/Experiment/components/LogGroup/index.tsx b/react-ui/src/pages/Experiment/components/LogGroup/index.tsx
index 43297512..7456bba1 100644
--- a/react-ui/src/pages/Experiment/components/LogGroup/index.tsx
+++ b/react-ui/src/pages/Experiment/components/LogGroup/index.tsx
@@ -54,7 +54,10 @@ function LogGroup({
useEffect(() => {
// 建立 socket 连接
const setupSockect = () => {
- const { host } = location;
+ let { host } = location;
+ if (process.env.NODE_ENV === 'development') {
+ host = '172.20.32.235:31213';
+ }
const socket = new WebSocket(
`ws://${host}/newlog/realtimeLog?start=${start_time}&query={pod="${pod_name}"}`,
);
diff --git a/react-ui/src/pages/HyperParameter/Instance/index.tsx b/react-ui/src/pages/HyperParameter/Instance/index.tsx
index 79905c36..246b1943 100644
--- a/react-ui/src/pages/HyperParameter/Instance/index.tsx
+++ b/react-ui/src/pages/HyperParameter/Instance/index.tsx
@@ -168,7 +168,7 @@ function HyperParameterInstance() {
className={styles['hyper-parameter-instance__basic']}
info={experimentInfo}
runStatus={workflowStatus}
- instanceStatus={instanceInfo?.status}
+ instanceStatus={instanceInfo?.status as ExperimentStatus}
isInstance
/>
),
diff --git a/react-ui/src/pages/HyperParameter/components/ExperimentLog/index.tsx b/react-ui/src/pages/HyperParameter/components/ExperimentLog/index.tsx
index d7639094..6237adf0 100644
--- a/react-ui/src/pages/HyperParameter/components/ExperimentLog/index.tsx
+++ b/react-ui/src/pages/HyperParameter/components/ExperimentLog/index.tsx
@@ -1,4 +1,5 @@
import { ExperimentStatus } from '@/enums';
+import EmptyLog from '@/pages/AutoML/components/ExperimentLog/empty';
import LogList from '@/pages/Experiment/components/LogList';
import { HyperParameterInstanceData } from '@/pages/HyperParameter/types';
import { NodeStatus } from '@/types';
@@ -64,7 +65,7 @@ function ExperimentLog({ instanceInfo, nodes }: ExperimentLogProps) {
// icon: ,
children: (
- {trainCloneNodeStatus && (
+ {trainCloneNodeStatus ? (
+ ) : (
+
)}
),
@@ -83,7 +86,7 @@ function ExperimentLog({ instanceInfo, nodes }: ExperimentLogProps) {
// icon: ,
children: (
- {hpoNodeStatus && (
+ {hpoNodeStatus ? (
+ ) : (
+
)}
),