Code

Updated size rendering for partitions
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 13 May 2011 14:41:53 +0000 (14:41 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 13 May 2011 14:41:53 +0000 (14:41 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20825 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/goto/Device/class_AddPartitionDialog.inc
gosa-plugins/goto/admin/systems/goto/Device/class_DevicePartition.inc

index 6f1658178f6bfceb91475ffc995bbbc899e087ac..76938fb9eaf2cf05360c096b06ea274e8c651e90 100644 (file)
@@ -106,7 +106,7 @@ class AddPartitionDialog
                 "freeLvmPartitions" => "getUnassignedPhysicalVolumes",
                 "freeRaidPartitions" => "getUnassignedRaidPartitions");
         foreach($map as $target => $func){
-            $this->$target = @$this->partitionObject->$func('causes an error');
+            $this->$target = @$this->partitionObject->$func();
             if(!$this->partitionObject->success()){
                 $this->errorMsg = $this->partitionObject->getError();
                 return;
index 7e52149c119b31239d9a4f9fd8e84efbee7bf4c8..d5a074bf14fa4eeb8dfb91daf0115792ef826984 100644 (file)
@@ -178,7 +178,7 @@ class DevicePartition
 
                 $size = "";
                 if(isset($deviceUsage['raid'][$raid['target']])){
-                    $size = "<i>".$deviceUsage['raid'][$raid['target']]['size']."</i>";
+                    $size = "<i>".$this->__convertPartSize($deviceUsage['raid'][$raid['target']]['size'])."</i>";
                 }
 
                 $lData[] = array("data" => array($str, 
@@ -218,7 +218,7 @@ class DevicePartition
 
                 $size = "";
                 if(isset($deviceUsage['vg'][$vg['name']])){
-                    $size = "<b>".$deviceUsage['vg'][$vg['name']]['size']."</b>";
+                    $size = "<b>".$this->__convertPartSize($deviceUsage['vg'][$vg['name']]['size'])."</b>";
                 }
 
                 // Add entry to the list.
@@ -263,7 +263,7 @@ class DevicePartition
 
                 $size = "";
                 if(isset($deviceUsage['disk'][$disk['device']])){
-                    $size = "<b>".$deviceUsage['disk'][$disk['device']]['size']."</b>";
+                    $size = "<b>".$this->__convertPartSize($deviceUsage['disk'][$disk['device']]['size'])."</b>";
                 }
 
                 // Create remove icon