diff --git a/src/ic/ic-store.js b/src/ic/ic-store.js index 385af58..eb6acf9 100644 --- a/src/ic/ic-store.js +++ b/src/ic/ic-store.js @@ -118,13 +118,17 @@ class InfrastructureComponentStore extends ArrayStore { tempIC.state = action.data.state; tempIC.uptime = action.data.time_now - action.data.time_started; tempIC.statusupdateraw = action.data + tempIC.uuid = action.data.uuid AppDispatcher.dispatch({ type: 'ics/start-edit', data: tempIC, token: action.token, }); - ICsDataManager.getConfig(action.url, action.token, tempIC); + if(tempIC.type === "villas-node"){ + ICsDataManager.getConfig(action.url, action.token, tempIC); + } + } return super.reduce(state, action); @@ -148,7 +152,10 @@ class InfrastructureComponentStore extends ArrayStore { data: temp, token: action.token, }); - ICsDataManager.getStatistics(action.url, action.token, temp); + + if(temp.type === "villas-node") { + ICsDataManager.getStatistics(action.url, action.token, temp); + } } return super.reduce(state, action); diff --git a/src/ic/ic.js b/src/ic/ic.js index ed5c8ef..0bbd368 100644 --- a/src/ic/ic.js +++ b/src/ic/ic.js @@ -63,7 +63,7 @@ class InfrastructureComponent extends React.Component { refresh() { // get status of VILLASnode and VILLASrelay ICs - if ((this.state.ic.type === "villas-node" || this.state.ic.type === "villas-relay") + if (this.state.ic.category === "gateway" && (this.state.ic.type === "villas-node" || this.state.ic.type === "villas-relay") && this.state.ic.apiurl !== '' && this.state.ic.apiurl !== undefined && this.state.ic.apiurl !== null && !this.state.ic.managedexternally) { AppDispatcher.dispatch({ type: 'ics/get-status', diff --git a/src/ic/ics.js b/src/ic/ics.js index f0d7a8d..7452fa8 100644 --- a/src/ic/ics.js +++ b/src/ic/ics.js @@ -137,7 +137,7 @@ class InfrastructureComponents extends Component { // get status of VILLASnode and VILLASrelay ICs this.state.ics.forEach(ic => { - if ((ic.type === "villas-node" || ic.type === "villas-relay") + if (ic.category === "gateway" && (ic.type === "villas-node" || ic.type === "villas-relay") && ic.apiurl !== '' && ic.apiurl !== undefined && ic.apiurl !== null && !ic.managedexternally) { AppDispatcher.dispatch({ type: 'ics/get-status',