diff options
author | ramon <ramongomez@us.es> | 2012-05-26 09:11:46 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2012-05-26 09:11:46 +0000 |
commit | 46af42ecf0099f966b26896526e47dede7edd574 (patch) | |
tree | 3342ecd7e8435e3c3370d1213d32dc82c306b368 /admin/WebConsole/asistentes/includes | |
parent | bd0eca946b0ef9e03f62cc5add2fbd305a6e899e (diff) |
Versión 1.0.4, #526: Formulario de particionado soporta discos GPT.
git-svn-id: https://opengnsys.es/svn/branches/version1.0@3078 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/WebConsole/asistentes/includes')
4 files changed, 241 insertions, 119 deletions
diff --git a/admin/WebConsole/asistentes/includes/asistentes/AyudanteFormularios.php b/admin/WebConsole/asistentes/includes/asistentes/AyudanteFormularios.php index 0f59bfd5..2c7aae74 100644 --- a/admin/WebConsole/asistentes/includes/asistentes/AyudanteFormularios.php +++ b/admin/WebConsole/asistentes/includes/asistentes/AyudanteFormularios.php @@ -329,6 +329,30 @@ if ($npart <= 4) { return($SelectHtml); } +function htmlForm_typepartnotcacheGPT($npart) +{ +$SelectHtml=""; +if ($npart == 4) { + $SelectHtml.='<OPTION value="CACHE"> CACHE </OPTION>'; +} +$SelectHtml.='<OPTION value="FAT12"> FAT12 </OPTION>'; +$SelectHtml.='<OPTION value="FAT16"> FAT16 </OPTION>'; +$SelectHtml.='<OPTION value="FAT32"> FAT32 </OPTION>'; +$SelectHtml.='<OPTION value="HFAT32"> Hidden FAT32 </OPTION>'; +$SelectHtml.='<OPTION value="NTFS"> NTFS </OPTION>'; +$SelectHtml.='<OPTION value="HNTFS"> Hidden NTFS </OPTION>'; +#$SelectHtml.='<OPTION value="EXT2"> EXT2 </OPTION>'; +#$SelectHtml.='<OPTION value="EXT3"> EXT3 </OPTION>'; +$SelectHtml.='<OPTION value="EXT4"> LINUX:EXT[2:3:4] </OPTION>'; +$SelectHtml.='<OPTION value="LINUX-SWAP"> LINUX-SWAP </OPTION>'; +$SelectHtml.='<OPTION value="REISERFS"> REISERFS </OPTION>'; +$SelectHtml.='<OPTION value="REISER4"> RESISER4 </OPTION>'; +$SelectHtml.='<OPTION value="XFS"> XFS </OPTION>'; +$SelectHtml.='<OPTION value="JFS"> JFS </OPTION>'; +$SelectHtml.='<OPTION value="LINUX-RAID"> LINUX-RAID </OPTION>'; +$SelectHtml.='<OPTION value="LINUX-LVM"> LINUX-LVM </OPTION>'; +return($SelectHtml); +} function htmlForm_sizepart($cmd,$numpar) { @@ -355,7 +379,7 @@ function pintaParticiones($cmd,$configuraciones,$idordenadores,$cc) global $tbKeys; // Tabla contenedora de claves de configuración global $conKeys; // Contador de claves de configuración global $TbMsg; - + $colums=7; echo '<TR height=16>'; echo '<TH align=center> '.$TbMsg[20].' </TH>'; // Número de partición diff --git a/admin/WebConsole/asistentes/includes/asistentes/formParticionado.php b/admin/WebConsole/asistentes/includes/asistentes/formParticionado.php index 46207e15..4ee38039 100644 --- a/admin/WebConsole/asistentes/includes/asistentes/formParticionado.php +++ b/admin/WebConsole/asistentes/includes/asistentes/formParticionado.php @@ -1,126 +1,21 @@ - <tr> <td> -<table id="primarias"> -<caption><?php echo $TbMsg[36]?></caption> -<tr> -<td><?php echo $TbMsg[20]?></td> -<td><?php echo $TbMsg[24]?></td> -<td><?php echo $TbMsg[22]?></td> -</tr> - -<?php -for ($p=1; $p<4; $p++) { - echo ' -<tr> -<td> -<input type="checkbox" name="check'.$p.'" value="check'.$p.'" onclick="clickPartitionCheckbox(this.form, '.$p.');" /> '.$TbMsg[20].' '.$p.'</td> -<td> -<select name="part'.$p.'" id="part'.$p.'" style="width:220" disabled="true" onclick=" - //if (this.form.part'.$p.'.options[this.form.part'.$p.'.selectedIndex].value == \'CUSTOM\') { - if (this.options[this.selectedIndex].value == \'CUSTOM\') { - this.form.part'.$p.'custom.disabled=false; - } else { - this.form.part'.$p.'custom.disabled=true; - } -" onchange="checkExtendedPartition(form);">' - .htmlForm_typepart($cmd,$p).' - <option value="CUSTOM"> '.$TbMsg[39].' </option> -</select> -<br> -<select name="part'.$p.'custom" id="part'.$p.'custom" style="width:220" disabled="true" onchange="checkExtendedPartition(form);">'. htmlForm_typepartnotcacheEngine10($p) .'</select> -</td> -<td> -<select name="size'.$p.'" id="size'.$p.'" style="width:220" disabled="true" onclick=" - if (this.form.size'.$p.'.options[this.form.size'.$p.'.selectedIndex].value == \'CUSTOM\') { - this.form.size'.$p.'custom.disabled=false; - } else { - this.form.size'.$p.'custom.disabled=true; - } -" onchange="calculateFreeDisk(this.form);">' - .htmlForm_sizepart($cmd,$p).' - <option value="CUSTOM"> '.$TbMsg[39].'</option> -</select> -<br /> -<input type="text" style="width:100" name="size'.$p.'custom" value="0" disabled="true" onchange="calculateFreeDisk(this.form);" /> -</td> -</tr> - '; -} -?> - -<tr> -<td><input type="checkbox" name="check4" value="check4" onclick="clickPartitionCheckbox(this.form, 4);" /> <?php echo $TbMsg[20].' '.$p;?> </td> -<td><input type="label" readonly size="8" name="part4" disabled="true" value="CACHE" /></td> -<td><select name="size4" id="size4" style="width:220" disabled="true" onclick="if (this.form.size4.options[this.form.size4.selectedIndex].value == 'CUSTOM') { this.form.size4custom.disabled=false } else { this.form.size4custom.disabled=true }" onchange="calculateFreeDisk(this.form);" /> - <option value="0"> <?php echo $TbMsg[40];?> </option> - <?php echo ''. htmlForm_sizepart($cmd,4) .''; ?> - <option value="CUSTOM"> <?php echo $TbMsg[39];?> </option> -</select> -<br /> -<input type="text" style="width:100" name="size4custom" value="0" disabled="true" onchange="calculateFreeDisk(this.form);" /></td> -</tr> - -</table> + Aplicar acciones al disco: + <input type="text" name="n_disk" value="1"> </td> - -<td> -<table id="logicas" style="visibility:hidden"> -<caption><?php echo $TbMsg[37]?></caption> -<tr> -<td><?php echo $TbMsg[20]?></td> -<td><?php echo $TbMsg[24]?></td> -<td><?php echo $TbMsg[22]?></td> </tr> - -<?php -for ($p=5; $p<=9; $p++) { - echo ' <tr> <td> -<input type="checkbox" name="check'.$p.'" value="check'.$p.'" onclick="clickPartitionCheckbox(this.form, '.$p.');" /> '.$TbMsg[20].' '.$p.'</td> -<td> -<select name="part'.$p.'" id="part'.$p.'" style="width:220" disabled="true" onclick=" - if (this.form.part'.$p.'.options[this.form.part'.$p.'.selectedIndex].value == \'CUSTOM\') { - this.form.part'.$p.'custom.disabled=false; - } else { - this.form.part'.$p.'custom.disabled=true; - } -">'. htmlForm_typepart($cmd,$p). ' - <option value="CUSTOM"> '.$TbMsg[39].' </option> -</select> -<br> -<select name="part'.$p.'custom" id="part'.$p.'custom" style="width:220" disabled="true" >'. htmlForm_typepartnotcacheEngine10($p) .'</select> -</td> -<td> -<select name="size'.$p.'" id="size'.$p.'" style="width:220" disabled="true" onclick=" - if (this.form.size'.$p.'.options[this.form.size'.$p.'.selectedIndex].value == \'CUSTOM\') { - this.form.size'.$p.'custom.disabled=false; - } else { - this.form.size'.$p.'custom.disabled=true; - } -" onchange="calculateFreeDisk(this.form);" -">'.htmlForm_sizepart($cmd,$p).' - <option value="CUSTOM"> '.$TbMsg[39].'</option> -</select> -<br /> -<input type="text" style="width:100" name="size'.$p.'custom" value="0" disabled="true" /> -</td> -</tr> - '; -} -?> - -</table> + Tabla de particiones: + <select name="tipo_part_table" id="tipo_part_table" onchange="showPartitionForm(this.value)"> + <option value="MSDOS">MSDOS</option> + <option value="GPT">GPT</option> + </select> </td> - -</tr> - -<tr> -<th> -<input type="hidden" id="minsize" /> -<?php echo $TbMsg[38];?>: <input type="text" id="freedisk" width="15" disabled="true" /> -</th> </tr> - - +<div id="formMSDOS"> + <? include_once("includes/asistentes/formParticionado_msdos.php");?> +</div> +<div id="formGPT"> + <? include_once("includes/asistentes/formParticionado_gpt.php");?> +</div> diff --git a/admin/WebConsole/asistentes/includes/asistentes/formParticionado_gpt.php b/admin/WebConsole/asistentes/includes/asistentes/formParticionado_gpt.php new file mode 100644 index 00000000..1a002387 --- /dev/null +++ b/admin/WebConsole/asistentes/includes/asistentes/formParticionado_gpt.php @@ -0,0 +1,77 @@ +<tr> +<td> +<table id="particionesGPT"> +<caption><?php echo $TbMsg[36]?></caption> +<tr> +<td><?php echo $TbMsg[20]?></td> +<td><?php echo $TbMsg[24]?></td> +<td><?php echo $TbMsg[22]?></td> +</tr> + +<?php +for ($p=1; $p<4; $p++) { + echo ' +<tr id="trPartition'.$p.'"> +<td> +<input type="checkbox" name="checkGPT'.$p.'" value="checkGPT'.$p.'" onclick="clickPartitionCheckbox(this.form, '.$p.',true);" /> '.$TbMsg[20].' '.$p.'</td> +<td> +<select name="partGPT'.$p.'" id="partGPT'.$p.'" style="width:220" disabled="true" onclick=" + //if (this.form.part'.$p.'.options[this.form.part'.$p.'.selectedIndex].value == \'CUSTOM\') { + if (this.options[this.selectedIndex].value == \'CUSTOM\') { + this.form.partGPT'.$p.'custom.disabled=false; + } else { + this.form.partGPT'.$p.'custom.disabled=true; + }">'.htmlForm_typepart($cmd,$p).'<option value="CUSTOM"> '.$TbMsg[39].' </option> +</select> +<br> +<select name="partGPT'.$p.'custom" id="partGPT'.$p.'custom" style="width:220" disabled="true" >'. htmlForm_typepartnotcacheGPT($p) .'</select> +</td> +<td> +<select name="sizeGPT'.$p.'" id="sizeGPT'.$p.'" style="width:220" disabled="true" onclick=" + if (this.form.sizeGPT'.$p.'.options[this.form.sizeGPT'.$p.'.selectedIndex].value == \'CUSTOM\') { + this.form.sizeGPT'.$p.'custom.disabled=false; + } else { + this.form.sizeGPT'.$p.'custom.disabled=true; + } +" onchange="calculateFreeGPTDisk(this.form);">'.htmlForm_sizepart($cmd,$p).' +<option value="CUSTOM"> '.$TbMsg[39].'</option> +</select> +<br /> +<input type="text" style="width:100" name="sizeGPT'.$p.'custom" value="0" disabled="true" onchange="calculateFreeDisk(this.form);" /> +</td> +</tr> + '; +} +?> + +<tr id="trPartition4"> +<td><input type="checkbox" name="checkGPT4" value="checkGPT4" onclick="clickPartitionCheckbox(this.form, 4,true);" /> <?php echo $TbMsg[20].' '.$p;?> </td> +<td><input type="label" readonly size="8" name="partGPT4" disabled="true" value="CACHE" /></td> +<td><select name="sizeGPT4" id="sizeGPT4" style="width:220" disabled="true" onclick="if (this.form.sizeGPT4.options[this.form.sizeGPT4.selectedIndex].value == 'CUSTOM') { this.form.sizeGPT4custom.disabled=false } else { this.form.sizeGPT4custom.disabled=true }" onchange="calculateFreeGPTDisk(this.form);" /> + <option value="0"> <?php echo $TbMsg[40];?> </option> + <?php echo ''. htmlForm_sizepart($cmd,4) .''; ?> + <option value="CUSTOM"> <?php echo $TbMsg[39];?> </option> +</select> +<br /> +<input type="text" style="width:100" name="sizeGPT4custom" value="0" disabled="true" onchange="calculateFreeGPTDisk(this.form);" /></td> +</tr> +</table> +</td> +</tr> +<tr> + <td> + <input type="button" value="Añadir particion" onclick="addGPTPartition()"/> + <input type="button" value="Eliminar particion" onclick="deleteGPTPartition()"/> + </td> + +</tr> +<tr> +<th> +<input type="hidden" id="numGPTpartitions" value="4"/> +<input type="hidden" id="minsizeGPT" /> +<?php echo $TbMsg[38];?>: <input type="text" id="freediskGPT" width="15" disabled="true" /> +</th> +</tr> + +</td> + diff --git a/admin/WebConsole/asistentes/includes/asistentes/formParticionado_msdos.php b/admin/WebConsole/asistentes/includes/asistentes/formParticionado_msdos.php new file mode 100644 index 00000000..46207e15 --- /dev/null +++ b/admin/WebConsole/asistentes/includes/asistentes/formParticionado_msdos.php @@ -0,0 +1,126 @@ + +<tr> +<td> +<table id="primarias"> +<caption><?php echo $TbMsg[36]?></caption> +<tr> +<td><?php echo $TbMsg[20]?></td> +<td><?php echo $TbMsg[24]?></td> +<td><?php echo $TbMsg[22]?></td> +</tr> + +<?php +for ($p=1; $p<4; $p++) { + echo ' +<tr> +<td> +<input type="checkbox" name="check'.$p.'" value="check'.$p.'" onclick="clickPartitionCheckbox(this.form, '.$p.');" /> '.$TbMsg[20].' '.$p.'</td> +<td> +<select name="part'.$p.'" id="part'.$p.'" style="width:220" disabled="true" onclick=" + //if (this.form.part'.$p.'.options[this.form.part'.$p.'.selectedIndex].value == \'CUSTOM\') { + if (this.options[this.selectedIndex].value == \'CUSTOM\') { + this.form.part'.$p.'custom.disabled=false; + } else { + this.form.part'.$p.'custom.disabled=true; + } +" onchange="checkExtendedPartition(form);">' + .htmlForm_typepart($cmd,$p).' + <option value="CUSTOM"> '.$TbMsg[39].' </option> +</select> +<br> +<select name="part'.$p.'custom" id="part'.$p.'custom" style="width:220" disabled="true" onchange="checkExtendedPartition(form);">'. htmlForm_typepartnotcacheEngine10($p) .'</select> +</td> +<td> +<select name="size'.$p.'" id="size'.$p.'" style="width:220" disabled="true" onclick=" + if (this.form.size'.$p.'.options[this.form.size'.$p.'.selectedIndex].value == \'CUSTOM\') { + this.form.size'.$p.'custom.disabled=false; + } else { + this.form.size'.$p.'custom.disabled=true; + } +" onchange="calculateFreeDisk(this.form);">' + .htmlForm_sizepart($cmd,$p).' + <option value="CUSTOM"> '.$TbMsg[39].'</option> +</select> +<br /> +<input type="text" style="width:100" name="size'.$p.'custom" value="0" disabled="true" onchange="calculateFreeDisk(this.form);" /> +</td> +</tr> + '; +} +?> + +<tr> +<td><input type="checkbox" name="check4" value="check4" onclick="clickPartitionCheckbox(this.form, 4);" /> <?php echo $TbMsg[20].' '.$p;?> </td> +<td><input type="label" readonly size="8" name="part4" disabled="true" value="CACHE" /></td> +<td><select name="size4" id="size4" style="width:220" disabled="true" onclick="if (this.form.size4.options[this.form.size4.selectedIndex].value == 'CUSTOM') { this.form.size4custom.disabled=false } else { this.form.size4custom.disabled=true }" onchange="calculateFreeDisk(this.form);" /> + <option value="0"> <?php echo $TbMsg[40];?> </option> + <?php echo ''. htmlForm_sizepart($cmd,4) .''; ?> + <option value="CUSTOM"> <?php echo $TbMsg[39];?> </option> +</select> +<br /> +<input type="text" style="width:100" name="size4custom" value="0" disabled="true" onchange="calculateFreeDisk(this.form);" /></td> +</tr> + +</table> +</td> + +<td> +<table id="logicas" style="visibility:hidden"> +<caption><?php echo $TbMsg[37]?></caption> +<tr> +<td><?php echo $TbMsg[20]?></td> +<td><?php echo $TbMsg[24]?></td> +<td><?php echo $TbMsg[22]?></td> +</tr> + +<?php +for ($p=5; $p<=9; $p++) { + echo ' +<tr> +<td> +<input type="checkbox" name="check'.$p.'" value="check'.$p.'" onclick="clickPartitionCheckbox(this.form, '.$p.');" /> '.$TbMsg[20].' '.$p.'</td> +<td> +<select name="part'.$p.'" id="part'.$p.'" style="width:220" disabled="true" onclick=" + if (this.form.part'.$p.'.options[this.form.part'.$p.'.selectedIndex].value == \'CUSTOM\') { + this.form.part'.$p.'custom.disabled=false; + } else { + this.form.part'.$p.'custom.disabled=true; + } +">'. htmlForm_typepart($cmd,$p). ' + <option value="CUSTOM"> '.$TbMsg[39].' </option> +</select> +<br> +<select name="part'.$p.'custom" id="part'.$p.'custom" style="width:220" disabled="true" >'. htmlForm_typepartnotcacheEngine10($p) .'</select> +</td> +<td> +<select name="size'.$p.'" id="size'.$p.'" style="width:220" disabled="true" onclick=" + if (this.form.size'.$p.'.options[this.form.size'.$p.'.selectedIndex].value == \'CUSTOM\') { + this.form.size'.$p.'custom.disabled=false; + } else { + this.form.size'.$p.'custom.disabled=true; + } +" onchange="calculateFreeDisk(this.form);" +">'.htmlForm_sizepart($cmd,$p).' + <option value="CUSTOM"> '.$TbMsg[39].'</option> +</select> +<br /> +<input type="text" style="width:100" name="size'.$p.'custom" value="0" disabled="true" /> +</td> +</tr> + '; +} +?> + +</table> +</td> + +</tr> + +<tr> +<th> +<input type="hidden" id="minsize" /> +<?php echo $TbMsg[38];?>: <input type="text" id="freedisk" width="15" disabled="true" /> +</th> +</tr> + + |