-
Notifications
You must be signed in to change notification settings - Fork 712
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Make backend address configurable via env variable - `BACKEND_HOST=1.2.3.4:4040 npm start` points the frontend to the app on that server. Just for development - Render control icons - removed close x for details panel - added control icons in its space - closing of panel still works by clicking on same node, or background - Dont allow control while pending - Render and auto-dismiss control error - Make tests pass
- Loading branch information
Showing
20 changed files
with
267 additions
and
69 deletions.
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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const React = require('react'); | ||
const AppActions = require('../actions/app-actions'); | ||
|
||
const NodeControlButton = React.createClass({ | ||
|
||
render: function() { | ||
let className = `node-control-button fa ${this.props.control.icon}`; | ||
if (this.props.pending) { | ||
className += ' node-control-button-pending'; | ||
} | ||
return ( | ||
<span className={className} title={this.props.control.human} onClick={this.handleClick} /> | ||
); | ||
}, | ||
|
||
handleClick: function(ev) { | ||
ev.preventDefault(); | ||
AppActions.doControl(this.props.control.probeId, this.props.control.nodeId, this.props.control.id); | ||
} | ||
|
||
}); | ||
|
||
module.exports = NodeControlButton; |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const React = require('react'); | ||
|
||
const NodeControlButton = require('./node-control-button'); | ||
|
||
const NodeDetailsControls = React.createClass({ | ||
|
||
render: function() { | ||
return ( | ||
<div className="node-details-controls"> | ||
{this.props.error && <div className="node-details-controls-error" title={this.props.error}> | ||
<span className="node-details-controls-error-icon fa fa-warning" /> | ||
<span className="node-details-controls-error-messages">{this.props.error}</span> | ||
</div>} | ||
{this.props.controls && this.props.controls.map(control => { | ||
return ( | ||
<NodeControlButton control={control} pending={this.props.pending} /> | ||
); | ||
})} | ||
</div> | ||
); | ||
} | ||
|
||
}); | ||
|
||
module.exports = NodeDetailsControls; |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.