Add connection health indicator

This commit is contained in:
Thomas Nordquist
2019-02-18 20:47:51 +01:00
parent 4b5d023d19
commit 55fbc642c4
8 changed files with 106 additions and 6 deletions

View File

@@ -25,16 +25,17 @@ export class DataSourceStateMachine {
public setError(error: Error) {
this.state = {
...this.state,
error: error.message,
connected: false,
connecting: false,
// connected: false,
// connecting: false,
}
this.onUpdate.dispatch(this.state)
}
public setConnecting() {
this.state = {
error: undefined,
...this.state,
connected: false,
connecting: true,
}