summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/mediatorApp/src/handlers/mediatorServerHandler.ts
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wt/odlux/apps/mediatorApp/src/handlers/mediatorServerHandler.ts')
-rw-r--r--sdnr/wt/odlux/apps/mediatorApp/src/handlers/mediatorServerHandler.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/sdnr/wt/odlux/apps/mediatorApp/src/handlers/mediatorServerHandler.ts b/sdnr/wt/odlux/apps/mediatorApp/src/handlers/mediatorServerHandler.ts
index 0d137b396..246634cbe 100644
--- a/sdnr/wt/odlux/apps/mediatorApp/src/handlers/mediatorServerHandler.ts
+++ b/sdnr/wt/odlux/apps/mediatorApp/src/handlers/mediatorServerHandler.ts
@@ -17,7 +17,7 @@
*/
import { XmlFileInfo, MediatorConfig, BusySymbol, MediatorConfigResponse, MediatorServerDevice } from "../models/mediatorServer";
import { IActionHandler } from "../../../../framework/src/flux/action";
-import { SetMediatorServerVersion, SetMediatorServerInfo, SetAllMediatorServerConfigurations, SetMediatorServerBusy, SetMediatorServerSupportedDevices } from "../actions/mediatorServerActions";
+import { SetMediatorServerVersion, SetMediatorServerInfo, SetAllMediatorServerConfigurations, SetMediatorServerBusy, SetMediatorServerSupportedDevices, SetMediatorServerReachable } from "../actions/mediatorServerActions";
import { SetMediatorBusyByName, UpdateMediatorConfig, AddMediatorConfig, RemoveMediatorConfig } from "../actions/mediatorConfigActions";
export type MediatorServerState = {
@@ -30,6 +30,7 @@ export type MediatorServerState = {
nexmls: XmlFileInfo[];
configurations: MediatorConfigResponse[];
supportedDevices: MediatorServerDevice[];
+ isReachable: boolean;
}
const mediatorServerInit: MediatorServerState = {
@@ -41,7 +42,8 @@ const mediatorServerInit: MediatorServerState = {
mediatorVersion: null,
nexmls: [],
configurations: [],
- supportedDevices: []
+ supportedDevices: [],
+ isReachable: true
}
export const mediatorServerHandler: IActionHandler<MediatorServerState> = (state = mediatorServerInit, action) => {
@@ -111,6 +113,8 @@ export const mediatorServerHandler: IActionHandler<MediatorServerState> = (state
...state.configurations.slice(index + 1)
]
};
+ } else if( action instanceof SetMediatorServerReachable){
+ state = {...state, isReachable: action.isReachable}
}
return state;
} \ No newline at end of file