-
Notifications
You must be signed in to change notification settings - Fork 443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-add lock file, fix build breaks #297
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -171,8 +171,8 @@ class RunView extends React.Component<IComponentProperties, IComponentState> { | |
<div className='ArgumentsControl'> | ||
{this.getArgumentsView()} | ||
</div> | ||
<DefaultButton id='RunButton' text='Run' | ||
disabled={!this.state.model || (this.state.capture === Capture.Debug && !(this.state.inputPath && this.state.outputPath))} | ||
<DefaultButton id='RunButton' text='Run' | ||
disabled={!this.state.model || (this.state.capture === Capture.Debug && !(this.state.inputPath && this.state.outputPath))} | ||
onClick={this.execModelRunner}/> | ||
</div> | ||
) | ||
|
@@ -322,9 +322,13 @@ class RunView extends React.Component<IComponentProperties, IComponentState> { | |
}); | ||
} | ||
|
||
private logError = (error: string | Error) => { | ||
const message = typeof error === 'string' ? error : (`${error.stack ? `${error.stack}: ` : ''}${error.message}`); | ||
log.error(message) | ||
private logError = (error: string | Error | Error[]) => { | ||
const toString = (error: string | Error) => typeof error === 'string' ? error : (`${error.stack ? `${error.stack}: ` : ''}${error.message}`); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TSLint would complain shadowing variable here. |
||
if (Array.isArray(error)) { | ||
log.error(error.map(toString).join('\n')); | ||
} else { | ||
log.error(toString(error)); | ||
} | ||
} | ||
|
||
private printMessage = (message: string) => { | ||
|
@@ -351,7 +355,7 @@ class RunView extends React.Component<IComponentProperties, IComponentState> { | |
save(ModelProtoSingleton.serialize(true), this.getDebugModelPath()); | ||
runPath = debugRunnerPath; | ||
procParameters = [this.getDebugModelPath(), this.state.inputPath]; | ||
} | ||
} | ||
|
||
this.setState({ | ||
console: '', | ||
|
@@ -367,7 +371,7 @@ class RunView extends React.Component<IComponentProperties, IComponentState> { | |
this.logError(e); | ||
this.printMessage("\n---------------------------\nRun Failed!\n") | ||
this.printMessage(`\n${(e as Error).message}`) | ||
|
||
log.info(this.state.model + " is failed to run"); | ||
this.setState({ | ||
currentStep: Step.Idle, | ||
|
@@ -393,7 +397,7 @@ class RunView extends React.Component<IComponentProperties, IComponentState> { | |
ncp.ncp(ModelProtoSingleton.getCurrentModelDebugDir(), filename, this.copyCallbackFunction); | ||
} | ||
|
||
private copyCallbackFunction = (err: Error) => { | ||
private copyCallbackFunction = (err: Error[] | null) => { | ||
const runDialogOptions = { | ||
message: '', | ||
title: 'run result', | ||
|
@@ -402,7 +406,6 @@ class RunView extends React.Component<IComponentProperties, IComponentState> { | |
this.logError(err); | ||
runDialogOptions.message = 'Run failed! See console log for details.' | ||
require('electron').remote.dialog.showMessageBox(require('electron').remote.getCurrentWindow(), runDialogOptions) | ||
|
||
} else { | ||
runDialogOptions.message = 'Run Successful: Debug capture saved to output path' | ||
require('electron').remote.dialog.showMessageBox(require('electron').remote.getCurrentWindow(), runDialogOptions) | ||
|
@@ -422,4 +425,4 @@ const mapDispatchToProps = { | |
setFile, | ||
} | ||
|
||
export default connect(mapStateToProps, mapDispatchToProps)(RunView); | ||
export default connect(mapStateToProps, mapDispatchToProps)(RunView); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the lower version of react-app-rewired because of this timarney/react-app-rewired#358. Or you can leave this, I can chnage this in my PR.