Unverified Commit 8fd3cf00 authored by Guoxin's avatar Guoxin Committed by GitHub
Browse files

Merge pull request #1350 from lvybriage/dev-fix-hyper-bug

[fix issue#1332] Double check for trial does not have final result in webui
parents 8016c710 92d75bc0
...@@ -15,7 +15,6 @@ class IntermediateVal extends React.Component<IntermediateValProps, {}> { ...@@ -15,7 +15,6 @@ class IntermediateVal extends React.Component<IntermediateValProps, {}> {
render() { render() {
const { record } = this.props; const { record } = this.props;
const interArr = record.description.intermediate; const interArr = record.description.intermediate;
const status = record.status;
let lastVal; let lastVal;
let wei = 0; let wei = 0;
if (interArr !== undefined) { if (interArr !== undefined) {
...@@ -29,8 +28,11 @@ class IntermediateVal extends React.Component<IntermediateValProps, {}> { ...@@ -29,8 +28,11 @@ class IntermediateVal extends React.Component<IntermediateValProps, {}> {
result = `${lastVal.toFixed(6)}`; result = `${lastVal.toFixed(6)}`;
} }
} }
if (status === 'SUCCEEDED') { // some trial haven't final result
if (record.acc !== undefined) {
if (record.acc.default !== undefined) {
result = `${result} (FINAL)`; result = `${result} (FINAL)`;
}
} else { } else {
result = `${result} (LATEST)`; result = `${result} (LATEST)`;
} }
......
...@@ -276,7 +276,10 @@ class Para extends React.Component<ParaProps, ParaState> { ...@@ -276,7 +276,10 @@ class Para extends React.Component<ParaProps, ParaState> {
} }
}); });
if (this._isMounted) { if (this._isMounted) {
this.setState({ max: Math.max(...accPara), min: Math.min(...accPara) }, () => { // if not return final result
const maxVal = accPara.length === 0 ? 1 : Math.max(...accPara);
const minVal = accPara.length === 0 ? 1 : Math.min(...accPara);
this.setState({ max: maxVal, min: minVal }, () => {
this.getParallelAxis(dimName, parallelAxis, accPara, eachTrialParams, lenOfDataSource); this.getParallelAxis(dimName, parallelAxis, accPara, eachTrialParams, lenOfDataSource);
}); });
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment