Commit 92b55e8b authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

ui: Improve port view progress indicator

when port has an associated vm which is in transitional state
parent fcb5bab7
......@@ -6875,6 +6875,8 @@ input.has-errors {
text-align: right;
margin-right: 4px;
margin-top: 5px;
float: right;
width: 125px;
}
.model-item .status-indicator {
......
......@@ -720,6 +720,11 @@
['status', 'state'], function() {
return !_.contains(['ACTIVE', 'STOPPED'], this.get('status'));
}
],
'in_progress': [
['status', 'state'], function() {
return this.in_transition();
}
]
},
......@@ -1685,7 +1690,9 @@
'START',
'REBOOT',
'BUILD',
'RESIZE'
'RESIZE',
'DISCONNECT',
'CONNECT'
]
models.VM.ACTIVE_STATES = [
......
......@@ -358,6 +358,7 @@
var status_ok = _.contains(['DOWN', 'ACTIVE', 'CONNECTED'],
this.get('status'));
var vm_status_ok = this.get('vm') && this.get('vm').can_connect();
var vm_status = this.get('vm') && this.get('vm').get('status');
return status_ok && vm_status_ok
}]
},
......@@ -384,8 +385,8 @@
}
],
'in_progress': [
['ext_status'], function() {
return _.contains(["DISCONNECTING", "CONNECTING"], this.get("ext_status"))
['ext_status', 'vm'], function() {
return _.contains(["BUILD", "DISCONNECTING", "CONNECTING"], this.get("ext_status"))
}
],
'firewall_running': [
......
......@@ -103,10 +103,15 @@
<span data-rv-text="item:ip_address" class="ip">IP</span>
</li>
</ul>
<div class="firewall">
<img data-rv-show="model.in_progress"
src="{{ SYNNEFO_IMAGES_URL }}icons/indicators/small/progress.gif"
class="progress-indicator" />
<img data-rv-show="model.vm.in_progress"
src="{{ SYNNEFO_IMAGES_URL }}icons/indicators/small/progress.gif"
class="progress-indicator" />
</div>
<div data-rv-show="model.network.is_public" class="firewall">
<img data-rv-show="model.in_progress"
src="{{ SYNNEFO_IMAGES_URL }}icons/indicators/small/progress.gif"
class="progress-indicator" />
<img data-rv-show="model.firewall_running"
src="{{ SYNNEFO_IMAGES_URL }}icons/indicators/small/progress.gif"
class="progress-indicator" />
......@@ -170,14 +175,14 @@
<img class="logo" data-rv-src="model.is_public|get_network_icon" />
<div class="entry">
<div data-rv-show="model"
data-rv-model-view="model|ModelRenameView"></div>
data-rv-model-view="model|ModelRenameView">
</div>
<div class="toggler-wrap clearfix network-ports-toggler">
<div class="cont-toggler">
<span class="label machines-label">
Connections (<span
data-rv-text="model.ports|collection_size">0</span>)
</span>
<!--| Interfaces (<span data-rv-text="model.ports|collection_size">0</span>)-->
<span class="network-progress-indicator">
<img src="{{ SYNNEFO_IMAGES_URL }}icons/indicators/small/progress.gif" />
</span>
......
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