Files
weave-scope/client/app/scripts/components/status.js
David Kaltschmidt c87cc872ee clear nodes cache when websocket closes connection
* also show reconnection status

fixes #162
2015-06-15 18:10:02 +02:00

28 lines
660 B
JavaScript

const React = require('react');
const Status = React.createClass({
renderConnectionState: function(errorUrl) {
if (errorUrl) {
const title = 'Cannot reach Scope. Make sure the following URL is reachable: ' + errorUrl;
return (
<div className="status-connection" title={title}>
<span className="status-icon fa fa-exclamation-circle" />
<span className="status-label">Trying to reconnect...</span>
</div>
);
}
},
render: function() {
return (
<div className="status">
{this.renderConnectionState(this.props.errorUrl)}
</div>
);
}
});
module.exports = Status;