summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1265f47)
raw | patch | inline | side by side (parent: 1265f47)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 6 Aug 2009 07:27:33 +0000 (07:27 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 6 Aug 2009 07:27:33 +0000 (07:27 +0000) |
-Display correct devices in available list.
-Fixed info list of used partitions.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13975 594d385d-05f5-0310-b6e9-bd551577e9d8
-Fixed info list of used partitions.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13975 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/fai/admin/fai/class_faiDiskEntry.inc b/gosa-plugins/fai/admin/fai/class_faiDiskEntry.inc
index 48815b6806bd9d57c4a17d9bace34f3411e47612..a3819d5cece1bb74199064ece9796d43f90417a7 100644 (file)
$objs = $disks;
foreach($disks as $disk){
foreach($disk['partitions'] as $id => $part){
- $objs[$disk['cn']] = $part;
+ $part['parentDisk'] = $disk;
+ $objs[$part['cn']] = $part;
}
}
$list = array();
foreach($this->lvmDevices as $device){
- $list[$device] = $device;
- if(isset($objs[$device]['FAIpartitionSize'])){
- $list[$device].= _("Size").": ";
- $list[$device].= $objs[$device]['FAIpartitionSize'];
+ $str = $device;
+ $str = preg_replace("/ /"," ",str_pad($str,20," "));
+
+ if(isset($objs[$device])){
+
+ if(isset($objs[$device]['FAIpartitionSize'])){
+ if($objs[$device]['parentDisk']['FAIdiskType'] == "raid"){
+ $str .= _("Disks").": ";
+ $str .= $objs[$device]['FAIpartitionSize'];
+ }else{
+ $str .= _("Size").": ";
+ $str .= $objs[$device]['FAIpartitionSize'];
+ }
+ }
}
+ $list[$device] = $str;
}
return($list);
}
$array = array();
foreach($this->parent->disks as $disk){
foreach($disk['partitions'] as $key => $part){
- $name = $disk['cn'];
+ $name = $part['cn'];
if(!isset($this->lvmDevices[$name])){
$array[$name] = $name;
}
diff --git a/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc b/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc
index dd66cffbc929619bde05d55ddff416bb857d4467..492d3c882d545ffbfdbd19ae3843056f005102af 100644 (file)
if ($this->FAIpartitionMethod == "setup-storage") {
if(isset($_POST['AddDisk'])) $type = "disk";
if(isset($_POST['AddRaid'])) $type = "raid";
- if(isset($_POST['AddAddVolgroup'])) $type = "lvm";
+ if(isset($_POST['AddVolgroup'])) $type = "lvm";
$this->dialog = new faiDiskEntry($this->config,$this->dn,$this, array(),$type);
} else {
$this->dialog = new faiPartitionTableEntry($this->config,$this->dn,$this);
diff --git a/gosa-plugins/fai/admin/fai/faiDiskEntry.tpl b/gosa-plugins/fai/admin/fai/faiDiskEntry.tpl
index 3b489d3682009745c8b324a48b94911568ddcd0b..7e25562fae4a05e226ff773ba5449279dae6dde5 100644 (file)
<td>
<h2>{t}Combined physical partitions{/t}</h2>
- <select name='physicalPartition' size=5 style="width:100%;">
+ <select style='font-family: monospace; width: 100%;'
+ name='physicalPartition' size=5>
{html_options options=$plist}
</select>
<br>