1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/web/ synced 2025-03-09 00:00:01 +01:00

remove some todos, fix error with notification (no host param provided)

This commit is contained in:
Sonja Happ 2020-08-24 10:01:32 +02:00
parent 8a6de4b8cf
commit 536e87d29a

View file

@ -42,19 +42,16 @@ class InfrastructureComponentStore extends ArrayStore {
return super.reduce(state, action);
case 'ics/open-sockets':
// open websocket for each IC contained in array action.data
// TODO should be done when dashboard is loaded
// TODO action.data should contain only those IC used by the scenario
// action.data contains only those IC used by the scenario
for (let ic of action.data) {
if (ic.host != null && ic.host !== '') {
// TODO connection should be closed again when dashboard is closed
ICDataDataManager.open(ic.host, ic.id);
} else {
// TODO add to pool of notifications
const IC_WEBSOCKET_HOST_ERROR = {
title: 'Host of websocket not available',
message: action.error.response.body.message,
title: 'Websocket connection warning',
message: "Websocket host parameter not available for IC " + ic.name + "(" + ic.uuid + "), connection not possible",
level: 'warning'
};
NotificationsDataManager.addNotification(IC_WEBSOCKET_HOST_ERROR);