package/ui/phpvirtualbox/js/utils.js
/**
 * Return the correct icon relative to images/vbox/ for the VM state.
 * @param {String} state - virtual machine state
 * @return {String} icon file name
 */
Return the correct icon relative to images/vbox/ for the VM state.
@param {String} state - virtual machine state
@return {String} icon file name
Return the correct icon relative to images / vbox / for the VM state . @param { String } state - virtual machine state @return { String } icon file name
function vboxMachineStateIcon(state)
{
	var strIcon = "state_powered_off_16px.png";
    var strNoIcon = "state_running_16px.png";
    switch (state)
    {
        case "PoweredOff": strIcon = "state_powered_off_16px.png"; break;
        case "Saved": strIcon = "state_saved_16px.png"; break;
        case "Saving": strIcon = "state_saving_16px.png"; break;
        case "Snapshotting": strIcon = "snapshot_offline_16px.png"; break;
        case "LiveSnapshotting": strIcon = "snapshot_online_16px.png"; break;
        case "Aborted": strIcon = "state_aborted_16px.png"; break;
        case "Running": strIcon = "state_running_16px.png"; break;
        case "Paused": strIcon = "state_paused_16px.png"; break;
        case "Stuck": strIcon = "state_stuck_16px.png"; break;
        case "Saving": strIcon = "state_discarding_16px.png"; break;
        case "Restoring": strIcon = "vm_settings_16px.png"; break;
        case "RestoringSnapshot": strIcon = "discard_cur_state_16px.png"; break;
        case "DeletingSnapshot": strIcon = "state_discarding_16px.png"; break;
        case "Hosting" : strIcon = "vm_settings_16px.png"; break;
        case "Inaccessible": strIcon = "state_aborted_16px.png"; break;
        default:
            strIcon = strNoIcon;
    }
    return strIcon;
}
function vboxMachineStateIcon ( state ) { var strIcon = "state_powered_off_16px.png" ; var strNoIcon = "state_running_16px.png" ; switch ( state ) { case "PoweredOff" : strIcon = "state_powered_off_16px.png" ; break ; case "Saved" : strIcon = "state_saved_16px.png" ; break ; case "Saving" : strIcon = "state_saving_16px.png" ; break ; case "Snapshotting" : strIcon = "snapshot_offline_16px.png" ; break ; case "LiveSnapshotting" : strIcon = "snapshot_online_16px.png" ; break ; case "Aborted" : strIcon = "state_aborted_16px.png" ; break ; case "Running" : strIcon = "state_running_16px.png" ; break ; case "Paused" : strIcon = "state_paused_16px.png" ; break ; case "Stuck" : strIcon = "state_stuck_16px.png" ; break ; case "Saving" : strIcon = "state_discarding_16px.png" ; break ; case "Restoring" : strIcon = "vm_settings_16px.png" ; break ; case "RestoringSnapshot" : strIcon = "discard_cur_state_16px.png" ; break ; case "DeletingSnapshot" : strIcon = "state_discarding_16px.png" ; break ; case "Hosting" : strIcon = "vm_settings_16px.png" ; break ; case "Inaccessible" : strIcon = "state_aborted_16px.png" ; break ; default : strIcon = strNoIcon ; } return strIcon ; }
Return the correct icon relative to images/vbox/ for the VM state.
Return the correct icon relative to images / vbox / for the VM state .