Commit 5f487888 authored by Francesco Lucchi's avatar Francesco Lucchi
Browse files

Fix unuseful data refresh

parent 2e1b1c51
......@@ -7,6 +7,19 @@ angular.module("cockpitModule").service("cockpitModule_realtimeServices",functio
var rt=this;
broadcast = function(message, dsLabel){
if(this.oldDataMap && this.oldDataMap[message.channel]){
if(this.oldDataMap[message.channel] != message.data){
this.oldDataMap[message.channel] = message.data;
}else{
return;
}
}else{
if(!this.oldDataMap){
this.oldDataMap = {};
}
this.oldDataMap[message.channel] = message.data;
}
var event = "UPDATE_FROM_REALTIME";
var data=JSON.parse(message.data);
if(data.isFoundInCache) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment