Show the Next button back after training
@@ -25,7 +25,7 @@ class ModelTrain extends Component {
handleModelStatus = () => {
const { status, modelStatus } = this.props;
modelStatus()
- if (status=='trained') this.props.clearInterval(this.statusInterval)
+ if (status === 'trained') this.props.clearInterval(this.statusInterval)
}
@@ -41,11 +41,6 @@ class ModelTrain extends Component {
<Icon name='circle notched' loading />
) : null
- const trainingButton = (status === 'ready') ? (
- <Button onClick={this.handleModelTrain} disabled={!name}>
- { t('model.train.trainButton') }
- </Button>
- ) : null
return (
<div>
@@ -74,7 +69,8 @@ class ModelTrain extends Component {
<Message.Content>
<Message.Header>{ status }</Message.Header>
{stage_status &&
- Object.keys(stage_status).map((stage, i) => {
+ <div className="stages">
+ {Object.keys(stage_status).map((stage, i) => {
let name = stage_status[stage]["name"]
let status = stage_status[stage]["status"]
let message = stage_status[stage]["message"]
@@ -86,12 +82,25 @@ class ModelTrain extends Component {
<span className="divider">{message && <>|</>}</span>
<span className="message">{message}</span>
</p>
+ )
+ }
)}
- )}
+ </div>
+ }
</Message.Content>
</Message>
+
<Segment>
- {trainingButton}
+
+ <Button onClick={this.handleModelTrain} disabled={!name || status !== 'ready'}>
+ { t('model.train.trainButton') }
+ </Button>
+
+ <Button as={Link} to={urls.gui.model.results}
+ disabled={status === 'ready' || status === "training"}>
+ {t('common.nextButton')}
+ </Button>
+
</Segment>
