Revision 44660f58 ui/static/snf/js/ui/web/ui_single_view.js
b/ui/static/snf/js/ui/web/ui_single_view.js | ||
---|---|---|
45 | 45 |
|
46 | 46 |
selectors: { |
47 | 47 |
'vms': '.single-container', |
48 |
'vm': 'div#single-vm-{0}',
|
|
48 |
'vm': 'div#single-vm-', |
|
49 | 49 |
'view': '#machinesview-single', |
50 | 50 |
'tpl': 'div.single-container#machine-container-template', |
51 | 51 |
'spinner': '.large-spinner', |
... | ... | |
105 | 105 |
|
106 | 106 |
update_current_vm: function() { |
107 | 107 |
storage.vms.stop_stats_update(); |
108 |
|
|
109 | 108 |
try { |
110 | 109 |
this.current_vm_instance = storage.vms.at(this.current_vm); |
111 | 110 |
this.current_vm_instance.do_update_stats = true; |
... | ... | |
208 | 207 |
|
209 | 208 |
|
210 | 209 |
$("#" + this.link_id_tpl + this.current_vm).addClass("column3-selected"); |
210 |
try { |
|
211 |
this.update_details(vm); |
|
212 |
} catch (err) {}; |
|
211 | 213 |
}, |
212 | 214 |
|
213 | 215 |
show_vm_menu: function() { |
... | ... | |
241 | 243 |
// update vm details |
242 | 244 |
update_details: function(vm) { |
243 | 245 |
var el = this.vm(vm); |
246 |
if (vm != this.current_vm_instance) { return }; |
|
247 |
|
|
244 | 248 |
// truncate name |
245 | 249 |
el.find(".machine-detail.name").text(util.truncate(vm.get("name"), 35)); |
246 | 250 |
// set ips |
Also available in: Unified diff