diff --git a/client/app/scripts/components/app.js b/client/app/scripts/components/app.js
index 8fac2c886..b1df3f747 100644
--- a/client/app/scripts/components/app.js
+++ b/client/app/scripts/components/app.js
@@ -23,7 +23,8 @@ function getStateFromStores() {
nodeDetails: AppStore.getNodeDetails(),
nodes: AppStore.getNodes(),
topologies: AppStore.getTopologies(),
- version: AppStore.getVersion()
+ version: AppStore.getVersion(),
+ websocketClosed: AppStore.isWebsocketClosed()
};
}
@@ -66,7 +67,7 @@ const App = React.createClass({
-
+
@@ -17,7 +17,7 @@ const Status = React.createClass({
render: function() {
return (
- {this.renderConnectionState(this.props.errorUrl)}
+ {this.renderConnectionState(this.props.errorUrl, this.props.websocketClosed)}
);
}
diff --git a/client/app/scripts/stores/__tests__/app-store-test.js b/client/app/scripts/stores/__tests__/app-store-test.js
index 7fe4a514a..cb3671b05 100644
--- a/client/app/scripts/stores/__tests__/app-store-test.js
+++ b/client/app/scripts/stores/__tests__/app-store-test.js
@@ -151,6 +151,7 @@ describe('AppStore', function() {
expect(AppStore.getNodes()).toEqual(NODE_SET);
registeredCallback(CloseWebsocketAction);
+ expect(AppStore.isWebsocketClosed()).toBeTruthy();
expect(AppStore.getNodes()).toEqual(NODE_SET);
registeredCallback(ReceiveEmptyNodesDeltaAction);
diff --git a/client/app/scripts/stores/app-store.js b/client/app/scripts/stores/app-store.js
index 4309bf489..00ba823cb 100644
--- a/client/app/scripts/stores/app-store.js
+++ b/client/app/scripts/stores/app-store.js
@@ -127,6 +127,10 @@ const AppStore = assign({}, EventEmitter.prototype, {
getVersion: function() {
return version;
+ },
+
+ isWebsocketClosed: function() {
+ return websocketClosed;
}
});