Commit 6df1d868 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

ui: Styling for vms in error state in ips/network list view

parent a49abbb8
......@@ -7212,6 +7212,10 @@ input.has-errors {
background-color: #84B7D0;
}
.main-content.vm-status-error .title {
color: #f00 !important;
}
.entry.inline .model-item .inner,
.entry.inline *:hover .model-item .inner,
.entry.inline .model-item:hover .inner {
......
......@@ -51,6 +51,15 @@
}, this);
},
vm_status_cls: function(vm) {
var cls = 'inner clearfix main-content';
if (!this.model.get('vm')) { return cls }
if (this.model.get('vm').in_error_state()) {
cls += ' vm-status-error';
}
return cls
},
vm_style: function() {
var cls, icon_state;
var style = "background-image: url('{0}')";
......
......@@ -254,6 +254,15 @@
if (!this.model.get('vm')) { return '' }
return synnefo.ui.helpers.vm_icon_path(this.model.get('vm'), 'medium');
},
vm_status_cls: function(vm) {
var cls = 'inner clearfix main-content';
if (!this.model.get('vm')) { return cls }
if (this.model.get('vm').in_error_state()) {
cls += ' vm-status-error';
}
return cls
},
set_confirm: function(action) {
var parent = this.parent_view.parent_view.el;
......
......@@ -2,7 +2,7 @@
<div id="ip-port-view-tpl" class="hidden ip-port-view model-item">
<div class="outer">
<div class="inner clearfix main-content">
<div data-rv-class="model.vm.status|vm_status_cls">
<div class="model-logo vm-icon medium2 state1"
data-rv-style="model.vm.status|vm_style"></div>
<h3 class="title" data-rv-text="model.vm.name|truncate 30"></h3>
......
......@@ -91,7 +91,7 @@
data-rv-on-click="view.set_disconnect_confirm">X</i>
</div>
<div class="border2"></div>
<div class="inner clearfix main-content">
<div data-rv-class="model.vm.status|vm_status_cls">
<img class="model-logo" data-rv-src="model.vm.status|vm_logo_url" />
<h5 class="title" data-rv-text="model.vm.name|truncate 35"></h5>
<div class="state state-indicator">
......
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