You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2016/02/09 16:55:32 UTC

[04/50] [abbrv] airavata-php-gateway git commit: Adding Color code for Job Status similar to Experiment Status in Project Summary

Adding Color code for Job Status similar to Experiment Status in Project 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/6e6960af
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/6e6960af
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/6e6960af

Branch: refs/heads/master
Commit: 6e6960afa5bd796a26861b620db382b993e3a0c3
Parents: 6bf5d8c
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Tue Jan 26 15:06:26 2016 -0500
Committer: Nipurn Doshi <ni...@gmail.com>
Committed: Tue Jan 26 15:06:26 2016 -0500

----------------------------------------------------------------------
 app/views/project/summary.blade.php | 31 +++++++++++++++++++++++++------
 1 file changed, 25 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/6e6960af/app/views/project/summary.blade.php
----------------------------------------------------------------------
diff --git a/app/views/project/summary.blade.php b/app/views/project/summary.blade.php
index a59f649..a28f4d0 100755
--- a/app/views/project/summary.blade.php
+++ b/app/views/project/summary.blade.php
@@ -52,16 +52,35 @@
             case 'CANCELING':
             case 'CANCELED':
             case 'UNKNOWN':
-                $textClass = 'text-warning';
+                $expStatustextClass = 'text-warning';
                 break;
             case 'FAILED':
-                $textClass = 'text-danger';
+                $expStatustextClass = 'text-danger';
                 break;
             case 'COMPLETED':
-                $textClass = 'text-success';
+                $expStatustextClass = 'text-success';
                 break;
             default:
-                $textClass = 'text-info';
+                $expStatustextClass = 'text-info';
+                break;
+        }
+        switch ($expValues["jobState"]) {
+            case 'CANCELING':
+            case 'CANCELED':
+            case 'UNKNOWN':
+                $jobStatustextClass = 'text-warning';
+                break;
+            case 'FAILED':
+                $jobStatustextClass = 'text-danger';
+                break;
+            case 'COMPLETED':
+                $jobStatustextClass = 'text-success';
+                break;
+            case 'COMPLETE':
+                $jobStatustextClass = 'text-success';
+                break;
+            default:
+                $jobStatustextClass = 'text-info';
                 break;
         }
 
@@ -103,10 +122,10 @@
         echo '<td class="time" unix-time="' . $expValues["experimentTimeOfStateChange"] . '"></td>';
 
 
-        echo '<td><div class="' . $textClass . '">' . $expValues["experimentStatusString"] . '</div></td>';
+        echo '<td><div class="' . $expStatustextClass . '">' . $expValues["experimentStatusString"] . '</div></td>';
 
         if (isset($expValues["jobState"])) echo '
-            <td>' . $expValues["jobState"] . '</td>';
+            <td><div class="' . $jobStatustextClass . '">' . $expValues["jobState"] . '</div></td>';
         else
             echo '<td></td>';
         echo '</tr>';