Commit 3e642c11 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

ui: Improve floating IP status display

parent b2c10385
......@@ -166,7 +166,6 @@
this.update_connecting_status();
this.update_actions();
}, this);
this.ports.bind("remove", function() {
this.pending_disconnects--;
this.update_connecting_status();
......@@ -473,13 +472,6 @@
},
proxy_attrs: {
'ext_status': [
['status'], function() {
if (_.contains(["DISCONNECTING"], this.get("ext_status"))) {
return this.get("ext_status")
}
return this.get("status")
}],
'ip': [
['floating_ip_adress'], function() {
return this.get('floating_ip_address');
......@@ -494,15 +486,19 @@
'status': [
['port_id', 'port'], function() {
var val = this.get('port_id');
if (!val) {
return 'DISCONNECTED'
var port_id = this.get('port_id');
if (!port_id) {
return 'DISCONNECTED'
} else {
if (this.get('port')) {
var port = this.get('port');
if (port) {
var port_status = port.get('status');
if (port_status == "DISCONNECTING") {
return port_status
}
return 'CONNECTED'
} else {
return 'CONNECTING'
}
return 'CONNECTED'
}
}
]
......
......@@ -116,7 +116,6 @@
},
disconnect_complete: function() {
this.model.set({status: 'DISCONNECTING'})
},
connect_vm: function(vms) {
......
......@@ -31,9 +31,9 @@
</div>
</div>
<div class="entry-right">
<div data-rv-class="model.ext_status|status_cls" class="status">
<div data-rv-class="model.status|status_cls" class="status">
<div class="status-title">
<span data-rv-text="model.ext_status|status_display">Active</span>
<span data-rv-text="model.status|status_display">Active</span>
<span data-rv-show="model.in_progress">...</span>
</div>
<div class="status-indicator clearfix">
......
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