diff options
author | Javier Sánchez Parra <jsanchez@soleta.eu> | 2020-11-25 12:56:30 +0100 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2020-11-25 15:37:28 +0100 |
commit | 4c4ea59598d9a432068dd8034005759fbfa54386 (patch) | |
tree | 5301820f1a527f80c1bfe66fc93a42507339efc6 /admin/WebConsole/comandos/Configurar.php | |
parent | a89da3dcfcee46b13d8d85f8889434a952c38d2a (diff) |
#1008 Add support for partitioning several disks
WebConsole only supports for partitioning and formatting the first disk
of the client. POST /setup calls in ogserver and ogclient support
for multiple disks. Update WebConsole to allow to choose which disk do
you want to partition and format.
Diffstat (limited to 'admin/WebConsole/comandos/Configurar.php')
-rw-r--r-- | admin/WebConsole/comandos/Configurar.php | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/admin/WebConsole/comandos/Configurar.php b/admin/WebConsole/comandos/Configurar.php index 5474294c..2ab5380c 100644 --- a/admin/WebConsole/comandos/Configurar.php +++ b/admin/WebConsole/comandos/Configurar.php @@ -41,6 +41,8 @@ $fk_sysFi=0; $fk_tamano=0; $fk_nombreSO=0; +$numdisk=1; + if (isset($_GET["idambito"])) $idambito=$_GET["idambito"]; if (isset($_GET["ambito"])) $ambito=$_GET["ambito"]; @@ -50,6 +52,8 @@ if (isset($_POST["ambito"])) $ambito=$_POST["ambito"]; if (isset($_POST["fk_sysFi"])) $fk_sysFi=$_POST["fk_sysFi"]; if (isset($_POST["fk_tamano"])) $fk_tamano=$_POST["fk_tamano"]; if (isset($_POST["fk_nombreSO"])) $fk_nombreSO=$_POST["fk_nombreSO"]; + +if (isset($_POST["numdisk"])) $numdisk=$_POST["numdisk"]; //________________________________________________________________________________________________________ ?> <HTML> @@ -122,7 +126,30 @@ if (isset($_POST["fk_nombreSO"])) $fk_nombreSO=$_POST["fk_nombreSO"]; } $sws=$fk_sysFi | $fk_tamano | $fk_nombreSO; - pintaConfiguraciones($cmd,$idambito,$ambito,7,$sws,false,"pintaParticionesConfigurar"); + $configs = pintaConfiguraciones($cmd, $idambito, $ambito, 7, $sws, false, "pintaParticionesConfigurar", "idordenador", $numdisk); + +?> + + <div align=center> + <span class=subcabeceras><?php echo $TbMsg["HD"] ?></span> + <form action="Configurar.php" name="disk" method="POST"> + <input type="hidden" name="idambito" value="<?php echo $idambito?>"> + <input type="hidden" name="ambito" value="<?php echo $ambito?>"> + <input type="hidden" name="cadenaid" value="<?php echo $cadenaid?>"> + <input type="hidden" name="nombreambito" value="<?php echo $nombreambito?>"> + <input type="hidden" name="idcomando" value="<?php echo $idcomando?>"> + <input type="hidden" name="descricomando" value="<?php echo $descricomando?>"> + <input type="hidden" name="gestor" value="<?php echo $gestor?>"> + <input type="hidden" name="funcion" value="<?php echo $funcion?>"> + <input type="hidden" name="current_numdisk" value="<?php echo $numdisk?>"> + <?php echo HTMLSELECT_disks($configs, $numdisk); ?> + <a href=#> + <img border=0 src="../images/boton_confirmar_<?php echo $idioma ?>.gif" onclick="document.disk.submit()"> + </a> + </form> + </div> + +<?php /* Dibuja tabla patron !OJO! no insertar caracteres entre las etiquetas*/ @@ -146,6 +173,25 @@ if (isset($_POST["fk_nombreSO"])) $fk_nombreSO=$_POST["fk_nombreSO"]; </HTML> <?php +function HTMLSELECT_disks($configs, $default_numdisk) +{ + foreach($configs as $config){ + $diskConfigs = splitConfigurationsByDisk($config); + $numdisks = count($diskConfigs); + if ( $mindisks > $numdisks ) + $mindisks = $numdisks; + } + + $options=""; + for ($i = 1; $i <= $numdisks; $i++) + $options.="$i=$i".chr(13); + + $SelectHtml=""; + $SelectHtml.=HTMLCTESELECT($options, "numdisk", "estilodesple", "", + $default_numdisk, 40, ""); + return($SelectHtml); +} + /*________________________________________________________________________________________________________ Crea la etiqueta html <SELECT> de los número de particiones ________________________________________________________________________________________________________*/ |