Commit 79dd34445dc0d9db1c63129f1c2535c0e2b7b207

Authored by adumas
1 parent 98f24711

debug

src/main/java/net/floodlightcontroller/pelstats/rest/RESTExportStats.java
... ... @@ -153,7 +153,7 @@ public class RESTExportStats extends ServerResource{
153 153 out.println("Switch:\t"+entry.getKey());
154 154 out.println("Number of calls\tAverage iMOS");
155 155 for (double[] list:PELStats.cacStatsMap.get(entry.getKey())){
156   - out.println(list[0]+"\t"+list[1]);
  156 + if(list[1]!=0)out.println(list[0]+"\t"+list[1]);
157 157 }
158 158 out.println("\n");
159 159 }
... ... @@ -163,7 +163,7 @@ public class RESTExportStats extends ServerResource{
163 163 out.println("Switch:\t"+mySwitch);
164 164 out.println("Number of calls\tAverage iMOS");
165 165 for (double[] list:PELStats.cacStatsMap.get(mySwitch)){
166   - out.println(list[0]+"\t"+list[1]);
  166 + if(list[1]!=0)out.println(list[0]+"\t"+list[1]);
167 167 }
168 168 }
169 169  
... ...
src/main/java/org/openflow/protocol/Pel/statistics/StatisticVoIP_CAC.java
... ... @@ -27,7 +27,8 @@ public class StatisticVoIP_CAC extends Statistic{
27 27 averageMos=getDoubleBytes(b,1)/50;
28 28 bandwidth=((double)b.getInt())*8/1000;
29 29  
30   - if (nbCalls>0){
  30 + //TODO Change the condition
  31 + if (nbCalls>100 || (averageMos<3 &&nbCalls>50)){
31 32 cacStatus="Too much calls";
32 33 }
33 34 else
... ...
src/main/resources/web/js/views/voip.js
... ... @@ -148,7 +148,6 @@ window.VoIPView = Backbone.View.extend({
148 148  
149 149 initialize:function () {
150 150 //console.log("VoIPView init" )
151   - //this.eraseView();view=this;
152 151 this.template = _.template(tpl.get('voip'));
153 152 views[views.length]=this;
154 153 this.model.bind("add", this.render, this);
... ... @@ -161,14 +160,7 @@ window.VoIPView = Backbone.View.extend({
161 160 return this;
162 161 },
163 162  
164   - /*eraseView:function(){
165   - //////view.undelegateEvents();
166   - view$el.removeData().unbind();
167   - view.remove();
168   - Backbone.View.prototype.remove.call(view);
169   - },*/
170   -
171   - Export:function(e){
  163 + ExportVoIP:function(e){
172 164 var self=this;
173 165 console.log("Export on "+self.model.idswitch);
174 166 $.ajax({
... ... @@ -389,7 +381,6 @@ window.VoIPSwitchQueueListItemView = Backbone.View.extend({
389 381 initialize:function () {
390 382 //console.log("VSQLVI init" );
391 383 this.template = _.template(tpl.get('voip-switch-queue-list-item'));
392   - //views[views.length]=this;
393 384 this.bind("change", this.render, this);
394 385 },
395 386 render:function (eventName) {
... ... @@ -427,8 +418,6 @@ window.VoIPSwitchListView = Backbone.View.extend({
427 418 },
428 419 initialize:function () {
429 420 //console.log("SLV init" );
430   - //this.eraseView();
431   - //view=this;console.log("view: "+view);
432 421 this.template = _.template(tpl.get('voip-switch-list'));
433 422 views[views.length]=this;
434 423 this.model.bind("change", this.render, this);
... ... @@ -454,12 +443,6 @@ window.VoIPSwitchListView = Backbone.View.extend({
454 443 }, this);
455 444 return this;
456 445 },
457   - /*eraseView:function(){
458   - view.undelegateEvents();
459   - view$el.removeData().unbind();
460   - view.remove();
461   - Backbone.View.prototype.remove.call(view);
462   - },*/
463 446 addAllSIP:function(){
464 447 var self=this;
465 448 $(this.el).parent().find(".popupStats").each(function( i ) {
... ... @@ -520,7 +503,6 @@ window.VoIPSwitchListItemView = Backbone.View.extend({
520 503 initialize:function () {
521 504 //console.log("VSLVI init" );
522 505 this.template = _.template(tpl.get('voip-switch-list-item'));
523   - //views[views.length]=this;
524 506 this.model.bind("change", this.render, this);
525 507  
526 508  
... ...