|
@@ -128,12 +128,7 @@ class MigrationWizard extends Reflux.Component {
|
|
|
|
|
|
|
|
finish() {
|
|
finish() {
|
|
|
let newMigration = this.state
|
|
let newMigration = this.state
|
|
|
- // TODO: Integrate tasks
|
|
|
|
|
- newMigration.tasks = {
|
|
|
|
|
- completed: 1,
|
|
|
|
|
- remaining: 12
|
|
|
|
|
- }
|
|
|
|
|
- newMigration.status = "PAUSED"
|
|
|
|
|
|
|
+ this.setState({ valid: false }) // disables finish button
|
|
|
newMigration.created = new Date()
|
|
newMigration.created = new Date()
|
|
|
|
|
|
|
|
MigrationActions.addMigration(newMigration, () => {
|
|
MigrationActions.addMigration(newMigration, () => {
|
|
@@ -144,6 +139,8 @@ class MigrationWizard extends Reflux.Component {
|
|
|
} else {
|
|
} else {
|
|
|
Location.push('/migrations')
|
|
Location.push('/migrations')
|
|
|
}
|
|
}
|
|
|
|
|
+ }, () => {
|
|
|
|
|
+ this.setState({ valid: true }) // re-enable button in case of error
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|