Code

Fixed progress estimation
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 5 Aug 2008 12:36:57 +0000 (12:36 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 5 Aug 2008 12:36:57 +0000 (12:36 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12151 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/gosa-si-server

index 982b2343e967dc53dafb83f9ec050f0a8c49e3c1..cb598734b93d1dedaa050185dafa7c9c2ff0bf94 100755 (executable)
@@ -1514,7 +1514,6 @@ sub watch_for_opsi_jobs {
         my $progress = $hit->{'progress'};
 
         # Ask OPSI for an update of the running jobs
-print STDERR "$hostId\n";
         my $result= {};
         
         # For hosts, only return the products that are or get installed
@@ -1529,7 +1528,7 @@ print STDERR "$hostId\n";
         if (&check_opsi_res($hres)){
             my $htmp= $hres->result->{$hostId};
         
-        # check state != not_installed or action == setup -> load and add
+            # check state != not_installed or action == setup -> load and add
             my $products= 0;
             my $installed= 0;
             my $error= 0;
@@ -1538,14 +1537,14 @@ print STDERR "$hostId\n";
                 if ($product->{'installationStatus'} ne "not_installed" or
                         $product->{'actionRequest'} eq "setup"){
 
-        # Increase number of products for this host
+                    # Increase number of products for this host
                     $products++;
         
                     if ($product->{'installationStatus'} eq "failed"){
                         $result->{$product->{'productId'}}= "error";
                         $error++;
                     }
-                    if ($product->{'installationStatus'} eq "installed"){
+                    if ($product->{'installationStatus'} eq "installed" && $product->{'actionRequest'}  eq "none"){
                         $result->{$product->{'productId'}}= "installed";
                         $installed++;
                     }