예제 #1
0
}
$html_select_vm_console_buttons .= '
							<input name="nonce" value=' . $nonce . ' type="hidden" />
						</form>';
$vm_cdrom_table = ace_vm_get_cdrom_table($_POST['vm_id']);
$html_vm_cdrom_dropdown_list = NULL;
foreach ($vm_cdrom_table as $cdrom) {
    $volume_display_name = ace_volume_get_display_name_by_id($cdrom['volume_id']);
    $html_volume_display_name = $volume_display_name ? ' : ' . $volume_display_name : '';
    $html_vm_cdrom_dropdown_list .= '<option value="' . $cdrom['instance'] . '">cd' . $cdrom['instance'] . $html_volume_display_name . '</option>';
}
$vm_cdrom_exists = FALSE;
if (is_array($vm_cdrom_table)) {
    $vm_cdrom_exists = TRUE;
}
$iso_table = ace_get_iso_table();
$html_vm_media_dropdown_list = '<option value="none">none</option>';
foreach ($iso_table as $volume) {
    if ($volume['user_visible'] == 1) {
        $volume_display_name = $volume['display_name'];
        $volume_id = $volume['id'];
        $html_vm_media_dropdown_list .= '<option value="' . $volume_id . '">' . $volume_display_name . '</option>';
    }
}
if (isset($_POST['vm_id']) && $_POST['vm_id'] != NULL) {
    $vm_id = $_POST['vm_id'];
    $console_disabled = '';
    //if (ace_vm_is_active($vm_id)) {
    if (ace_vm_get_virt_state($vm_id)) {
        $console_url = ace_vm_get_console_url($vm_id);
        $html_console_control_form_power_button = '<button name="action" value="vm_power_off" type="submit">Power Off</button>';
예제 #2
0
									<td>
										<select name="select_host_role_id">
											' . $html_select_host_roles . '
										</select>
										<button name="operation" value="host_role_add" type="submit">Add</button>
									</td>
								</tr>
							</table>
						</form>
					</div>
				</div>
			</div>';
        break;
    case 'resources':
        $active_host_array = ace_get_active_hosts();
        $media_array = ace_get_iso_table();
        $base_volume_array = ace_get_shared_volume_table();
        $html = '
            <div class="element_table">
                <div class="element_column">
                    <div class="element">
                        <p align="center"><strong>Media</strong></p>
                    </div>
                    <div class="element">
                        <table>';
        if (is_array($media_array)) {
            foreach ($media_array as $media) {
                $html .= '
                            <tr>
                                <td>' . $media['display_name'] . '</td>
                            </tr>';