Revision a6b9836b
b/snf-cyclades-app/synnefo/ui/static/snf/css/main.css | ||
---|---|---|
4560 | 4560 |
overflow-y: scroll; |
4561 | 4561 |
overflow-x: hidden; |
4562 | 4562 |
} |
4563 |
|
|
4563 | 4564 |
.overlay .overlay-content .description.subinfo, .overlay .extra-info { |
4564 | 4565 |
margin-bottom:0; |
4565 | 4566 |
border-bottom: none; |
... | ... | |
4575 | 4576 |
color: #800000; |
4576 | 4577 |
} |
4577 | 4578 |
|
4579 |
.overlay .overlay-content .description.noborder { |
|
4580 |
margin-bottom:0; |
|
4581 |
border:0; |
|
4582 |
} |
|
4583 |
|
|
4578 | 4584 |
.overlay .overlay-content .description { |
4579 | 4585 |
color: #444; |
4580 | 4586 |
border-bottom: 1px solid #64a6c4; |
... | ... | |
4583 | 4589 |
font-size: 0.9em; |
4584 | 4590 |
line-height: 1.6em; |
4585 | 4591 |
} |
4592 |
|
|
4586 | 4593 |
.overlay .overlay-content .empty-message { |
4587 | 4594 |
margin-bottom: 5px; |
4588 | 4595 |
} |
... | ... | |
6961 | 6968 |
border: none; |
6962 | 6969 |
color: #800; |
6963 | 6970 |
} |
6971 |
|
|
6972 |
.single .suspended-notice { |
|
6973 |
right: 180px; |
|
6974 |
top: 0px; |
|
6975 |
padding: 7px; |
|
6976 |
padding-bottom: 6px; |
|
6977 |
} |
|
6978 |
|
|
6979 |
.icon .suspended-notice { |
|
6980 |
right: 192px; |
|
6981 |
top: 50px; |
|
6982 |
} |
|
6983 |
|
|
6984 |
.suspended-notice { |
|
6985 |
display: inline-block; |
|
6986 |
padding: 4px; |
|
6987 |
background-color: #8f1915; |
|
6988 |
cursor: pointer; |
|
6989 |
position: absolute; |
|
6990 |
color: #fff; |
|
6991 |
font-size: 0.6em; |
|
6992 |
display: none; |
|
6993 |
} |
|
6994 |
|
|
6995 |
.suspended .suspended-notice { |
|
6996 |
display: block; |
|
6997 |
} |
|
6998 |
|
|
6999 |
.suspended .action-indicator { |
|
7000 |
display: none !important; |
|
7001 |
} |
b/snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_main_view.js | ||
---|---|---|
84 | 84 |
|
85 | 85 |
}); |
86 | 86 |
|
87 |
views.SuspendedVMView = views.FeedbackView.extend({ |
|
88 |
view_id: "suspended_info_view", |
|
89 |
|
|
90 |
css_class: 'overlay-api-info overlay-error non-critical', |
|
91 |
overlay_id: "overlay-api-info", |
|
92 |
|
|
93 |
subtitle: "", |
|
94 |
title: "VM Suspended", |
|
95 |
|
|
96 |
beforeOpen: function() { |
|
97 |
views.SuspendedVMView.__super__.beforeOpen.apply(this); |
|
98 |
$(this.$(".description p")[0]).html($("#suspended-vm-overlay .description").html()) |
|
99 |
}, |
|
100 |
|
|
101 |
show: function(vm, data, collect_data, extra_data, cb) { |
|
102 |
this.vm = vm; |
|
103 |
data = "Suspended VM Details"; |
|
104 |
data += "\n===================="; |
|
105 |
data += "\nID: " + vm.id; |
|
106 |
data += "\nName: " + vm.get('name'); |
|
107 |
data += "\nPublic IP: " + vm.get_public_nic().get('ipv4'); |
|
108 |
data += "\n\n"; |
|
109 |
views.SuspendedVMView.__super__.show.call(this, data, collect_data, extra_data, cb); |
|
110 |
} |
|
111 |
|
|
112 |
}); |
|
113 |
|
|
87 | 114 |
views.ApiInfoView = views.Overlay.extend({ |
88 | 115 |
view_id: "api_info_view", |
89 | 116 |
|
... | ... | |
549 | 576 |
this.create_vm_view = new views.CreateVMView(); |
550 | 577 |
this.api_info_view = new views.ApiInfoView(); |
551 | 578 |
this.details_view = new views.DetailsView(); |
579 |
this.suspended_view = new views.SuspendedVMView(); |
|
552 | 580 |
//this.notice_view = new views.NoticeView(); |
553 | 581 |
}, |
554 | 582 |
|
b/snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_vms_base_view.js | ||
---|---|---|
208 | 208 |
|
209 | 209 |
// initialize vm specific event handlers |
210 | 210 |
this.__set_vm_handlers(vm); |
211 |
vm_view.find(".suspended-notice").click(function(){ |
|
212 |
synnefo.ui.main.suspended_view.show(vm); |
|
213 |
}) |
|
211 | 214 |
return vm_view; |
212 | 215 |
}, |
213 | 216 |
|
... | ... | |
322 | 325 |
this.action_views[vm.id].update_layout(); |
323 | 326 |
} |
324 | 327 |
|
328 |
var el = this.vm(vm); |
|
329 |
if (vm.get('suspended')) { |
|
330 |
el.addClass("suspended"); |
|
331 |
} else { |
|
332 |
el.removeClass("suspended"); |
|
333 |
} |
|
334 |
|
|
325 | 335 |
try { |
326 | 336 |
this.post_update_vm(vm); |
327 | 337 |
} catch (err) {}; |
b/snf-cyclades-app/synnefo/ui/templates/home.html | ||
---|---|---|
504 | 504 |
</div> |
505 | 505 |
</div> |
506 | 506 |
|
507 |
<div id="suspended-vm-overlay" class="overlay-content overlay-info hidden"> |
|
508 |
<div class="description noborder"> |
|
509 |
You VM has been suspended, please contact us for more details. |
|
510 |
</div> |
|
511 |
</div> |
|
512 |
|
|
507 | 513 |
<div id="api-info-overlay" class="overlay-content overlay-info hidden"> |
508 | 514 |
<div class="description"> |
509 | 515 |
<p>{% blocktrans with EXTERNAL_CLIENT_URL as EXTERNAL_CLIENT_URL %}Use the following API key along with the <a |
b/snf-cyclades-app/synnefo/ui/templates/partials/machines_icon.html | ||
---|---|---|
4 | 4 |
<div class="machine clearfix" id="machine-template"> |
5 | 5 |
|
6 | 6 |
<div class="machine-data-cont clearfix"> |
7 |
<div class="suspended-notice">SUSPENDED</div> |
|
7 | 8 |
<div class="machine-data clearfix"> |
8 | 9 |
<div class="machine-info clearfix"> |
9 | 10 |
<div class="machine-connect"> |
b/snf-cyclades-app/synnefo/ui/templates/partials/machines_single.html | ||
---|---|---|
27 | 27 |
</div> |
28 | 28 |
</div> |
29 | 29 |
<div class="title machine-detail name">My Desktop</div> |
30 |
<div class="suspended-notice">SUSPENDED</div> |
|
30 | 31 |
<div class="column2"> |
31 | 32 |
<div class="machine-labels"> |
32 | 33 |
<div class="machine-label cpus">{% trans "CPUs" %}:</div> |
Also available in: Unified diff