airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndo...@apache.org
Subject [1/4] airavata-php-gateway git commit: Added all Job info to experiment summary.
Date Thu, 12 Nov 2015 15:21:53 GMT
Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop [created] ec87b34f3


Added all Job info to experiment summary.


Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/95211532
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/95211532
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/95211532

Branch: refs/heads/develop
Commit: 95211532c111a40ac4e9a7a9637630e9200116d1
Parents: 6aae243
Author: Nipurn Doshi <Nipurn Doshi>
Authored: Fri Nov 6 16:30:42 2015 -0500
Committer: Nipurn Doshi <Nipurn Doshi>
Committed: Fri Nov 6 16:30:42 2015 -0500

----------------------------------------------------------------------
 app/controllers/ExperimentController.php     | 13 ++++++++
 app/views/partials/experiment-info.blade.php | 36 ++++++++---------------
 2 files changed, 26 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/95211532/app/controllers/ExperimentController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ExperimentController.php b/app/controllers/ExperimentController.php
index 3ef331b..9a2eb27 100755
--- a/app/controllers/ExperimentController.php
+++ b/app/controllers/ExperimentController.php
@@ -84,11 +84,24 @@ class ExperimentController extends BaseController
             $project = ProjectUtilities::get_project($experiment->projectId);
             $expVal = ExperimentUtilities::get_experiment_values($experiment, $project);
             $jobDetails = ExperimentUtilities::get_job_details($experiment->experimentId);
+            //var_dump( $jobDetails); exit;
+            foreach( $jobDetails as $index => $jobDetail){
+                if(isset($jobDetail->jobStatus)){
+                    $jobDetails[ $index]->jobStatus->jobStateName = JobState::$__names[$jobDetail->jobStatus->jobState];
+                }
+                else{
+                    $jobDetails[ $index]->jobStatus = new stdClass();
+                    $jobDetails[ $index]->jobStatus->jobStateName = null;
+                }
+            }
+            $expVal["jobDetails"] = $jobDetails;
+            /*
             if(isset($jobDetails[0]->jobStatus)){
                 $expVal["jobState"] = JobState::$__names[$jobDetails[0]->jobStatus->jobState];
             }else{
                 $expVal["jobState"] = "";
             }
+            */
             // User should not clone or edit a failed experiment. Only create clones of it.
             if ($expVal["experimentStatusString"] == "FAILED")
                 $expVal["editable"] = false;

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/95211532/app/views/partials/experiment-info.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/experiment-info.blade.php b/app/views/partials/experiment-info.blade.php
index de8e212..5577a65 100644
--- a/app/views/partials/experiment-info.blade.php
+++ b/app/views/partials/experiment-info.blade.php
@@ -47,33 +47,23 @@
             <td><strong>Experiment Status</strong></td>
             <td class="exp-status"><?php echo $expVal["experimentStatusString"];
?></td>
         </tr>
-        @if( isset($dashboard))
-        <tr>
-            <td><strong>Job ID</strong></td>
-
-            <?php
-            foreach ($jobDetails as $job) echo '
-                <td>' . $job->jobId . '</td>
-            ';
-            ?>
-        </tr>
-        <tr>
-            <td><strong>Job Name</strong></td>
 
-            <?php
-            foreach ($jobDetails as $job) echo '
-                <td>' . $job->jobName . '</td>
-            ';
-            ?>
-        </tr>
-        @endif
-
-        @if($expVal["jobState"])
+        @foreach( $expVal["jobDetails"] as $index => $jobDetail)
+            <tr>
+                <th>Job Name : {{$jobDetail->jobName}}</th>
+                <td>Job ID : {{ $jobDetail->jobId}}</td>
+                <td> Status : {{$jobDetail->jobStatus->jobStateName }}</td>
+                <td> Creation Time : {{ date("F j, Y, g:i a", $jobDetail->creationTime
)}}</td>
+            </tr>
+        @endforeach
+        <!--
+        @if( isset( $expVal["jobState"]) )
             <tr>
                 <td><strong>Job Status</strong></td>
                 <td>{{ $expVal["jobState"] }}</td>
             </tr>
         @endif
+        -->
 
         @if( isset($dashboard))
         <tr>
@@ -98,11 +88,11 @@
 
         <tr>
             <td><strong>Creation time</strong></td>
-            <td class="time" unix-time="<?php echo $expVal["experimentCreationTime"];
?>"></td>
+            <td class="time" unix-time="{{ $expVal["experimentCreationTime"] }}"></td>
         </tr>
         <tr>
             <td><strong>Last Modified Time</strong></td>
-            <td class="time" unix-time="<?php echo $expVal["experimentTimeOfStateChange"];
?>"></td>
+            <td class="time" unix-time="{{ $expVal["experimentTimeOfStateChange"] }}"></td>
         </tr>
         <tr>
             <td><strong>Enable Auto Schedule</strong></td>


Mime
View raw message