Commits

chul03 committed 587377c

turned off deamon temporarily
solved the problem that a threating guest doesn't come back to black, even though its traffic becomes normal, once it turns to red

Comments (0)

Files changed (2)

 
     
 if __name__ == "__main__":
-    with daemon.DaemonContext():
+#    with daemon.DaemonContext():
         conn = libvirt_wrapper.Connection()
         guests = conn.get_guests()
 

web/public/js/index.js

 $(function() {
-      var THREAT_LLC_LOADS = 100000;
+      var THREAT_LLC_LOADS = 10000000;
 
       window.ImageView = Backbone.View.extend(
           {
 
               },
 
-              unsetRed: function()
+              unsetRed: function(guest)
               {
-                  this.el.find('input').removeClass('red');
+                  this.el.find('span[id="span_' + guest + '"]').removeClass('red');
               }
           });
 
             });
 
       var count = 0;
+	  var old_threat_guest;
       var refresh = function()
       {
           var guests = guestView.getValues();
                 {
                     if (threat.value > THREAT_LLC_LOADS)
                     {
-                        guestView.unsetRed();
-                        guestView.setRed(threat.max_guest);
+                        guestView.unsetRed( old_threat_guest );
+						old_threat_guest = threat.max_guest;
+                        guestView.setRed( threat.max_guest );
                     }
                     else
                     {
-                        guestView.unsetRed();
+                        guestView.unsetRed( old_threat_guest );
                     }
                 });
       };