mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-23 22:50:09 +03:00
Bug #2295: Show hostname for VMs in poweroff
This commit is contained in:
parent
3075306915
commit
b00f9e9c34
@ -1092,7 +1092,7 @@ function vMachineElementArray(vm_json){
|
||||
var state = OpenNebula.Helper.resource_state("vm",vm.STATE);
|
||||
var hostname = "--";
|
||||
|
||||
if (state == tr("ACTIVE") || state == tr("SUSPENDED")){
|
||||
if (state == tr("ACTIVE") || state == tr("SUSPENDED") || state == tr("POWEROFF")){
|
||||
if (vm.HISTORY_RECORDS.HISTORY.constructor == Array){
|
||||
hostname = vm.HISTORY_RECORDS.HISTORY[vm.HISTORY_RECORDS.HISTORY.length-1].HOSTNAME;
|
||||
} else {
|
||||
@ -1392,7 +1392,7 @@ function updateVMInfo(request,vm){
|
||||
var vm_info = vm.VM;
|
||||
var vm_state = OpenNebula.Helper.resource_state("vm",vm_info.STATE);
|
||||
var hostname = "--"
|
||||
if (vm_state == tr("ACTIVE") || vm_state == tr("SUSPENDED")) {
|
||||
if (vm_state == tr("ACTIVE") || vm_state == tr("SUSPENDED") || vm_state == tr("POWEROFF")) {
|
||||
if (vm_info.HISTORY_RECORDS.HISTORY.constructor == Array){
|
||||
hostname = vm_info.HISTORY_RECORDS.HISTORY[vm_info.HISTORY_RECORDS.HISTORY.length-1].HOSTNAME
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user