Commit 0f23c16c authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

ui: Fix hotplug enabled/disabled checks

parent 91849ce4
......@@ -1123,7 +1123,7 @@
},
can_connect: function() {
if (synnefo.config.hotplug_enabled && this.is_active()) { return false }
if (!synnefo.config.hotplug_enabled && this.is_active()) { return false }
return _.contains(["ACTIVE", "STOPPED"], this.get("status")) &&
!this.get('suspended')
},
......
......@@ -373,7 +373,7 @@
return false
}
var vm_active = this.get('vm') && this.get('vm').is_active();
if (synnefo.config.hotplug_enabled && vm_active) {
if (!synnefo.config.hotplug_enabled && this.get('vm') && vm_active) {
return false;
}
var status_ok = _.contains(['DOWN', 'ACTIVE', 'CONNECTED'],
......
Markdown is supported
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