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/11/11 17:29:05 UTC

[1/3] airavata-php-gateway git commit: AIRAVATA-2212 Using setInterval so status check is turned back on

Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop 4487dd701 -> de3ac07ad


AIRAVATA-2212 Using setInterval so status check is turned back on

The way it was implemented with setTimeout the status checking
(autoRefresh) wouldn't start again once it was toggled back on. I
switched to setInterval since it is easier to just check the autoRefresh
flag every 3 seconds.


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/3910260e
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/3910260e
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/3910260e

Branch: refs/heads/develop
Commit: 3910260e58b3e1c5c554bada3dd33ded9e7fd403
Parents: 4487dd7
Author: Marcus Christie <ma...@iu.edu>
Authored: Fri Nov 11 08:26:17 2016 -0500
Committer: Marcus Christie <ma...@iu.edu>
Committed: Fri Nov 11 08:26:17 2016 -0500

----------------------------------------------------------------------
 app/views/experiment/summary.blade.php | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/3910260e/app/views/experiment/summary.blade.php
----------------------------------------------------------------------
diff --git a/app/views/experiment/summary.blade.php b/app/views/experiment/summary.blade.php
index 653e15f..32b11d8 100755
--- a/app/views/experiment/summary.blade.php
+++ b/app/views/experiment/summary.blade.php
@@ -27,25 +27,22 @@
     var isStatusChanged = function(experimentTimeOfStateChange, jobStatuses) {
 
         if ($.trim($("#lastModifiedTime").val()) != experimentTimeOfStateChange) {
-            // console.log("Detected lastModifiedTime changed");
             return true;
         }
         for (var jobId in jobStatuses) {
             if (jobId in currentJobStatuses) {
                 if (currentJobStatuses[jobId] !== jobStatuses[jobId]){
-                    // console.log("Detected job status changed", jobId, currentJobStatuses[jobId], jobStatuses[jobId]);
                     return true;
                 }
             } else {
-                // console.log("Found a new job", jobId, jobStatuses[jobId]);
                 return true; // if job not in currentJobStatuses
             }
         }
         return false;
     }
 
-    // Check for a status change at most once every 3 seconds
-    var checkForStatusChange = function () {
+    // Check for a status change every 3 seconds
+    var statusChangeInterval = setInterval(function () {
         if (($.trim($(".exp-status").html()) != "COMPLETED" && $.trim($(".exp-status").html()) != "FAILED"
                 && $.trim($(".exp-status").html()) != "CANCELLED") && autoRefresh) {
             $.ajax({
@@ -68,18 +65,12 @@
 
                     if (isStatusChanged(data.expVal["experimentTimeOfStateChange"], jobStatuses)) {
                         $(".refresh-exp").click();
-                    } else {
-                        setTimeout(checkForStatusChange, 3000);
+                        clearInterval(statusChangeInterval);
                     }
-                },
-                // In case of some spurious error, keep trying to check for status change
-                error: function() {
-                    setTimeout(checkForStatusChange, 3000);
                 }
             });
         }
-    };
-    setTimeout(checkForStatusChange, 3000);
+    }, 3000);
 
     $('.btn-toggle').click(function() {
         if(autoRefresh){


[2/3] airavata-php-gateway git commit: AIRAVATA-2193 Distinguish projects owned by other users

Posted by sc...@apache.org.
AIRAVATA-2193 Distinguish projects owned by other users


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/9faea85c
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/9faea85c
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/9faea85c

Branch: refs/heads/develop
Commit: 9faea85c25360f3df18eb967fcc2f83c764d781d
Parents: 4487dd7
Author: Marcus Christie <ma...@iu.edu>
Authored: Fri Nov 11 10:41:29 2016 -0500
Committer: Marcus Christie <ma...@iu.edu>
Committed: Fri Nov 11 10:41:29 2016 -0500

----------------------------------------------------------------------
 app/libraries/ProjectUtilities.php           | 13 ++++++++++++-
 app/views/partials/experiment-info.blade.php |  2 +-
 2 files changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/9faea85c/app/libraries/ProjectUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ProjectUtilities.php b/app/libraries/ProjectUtilities.php
index eeeadb2..baf2da1 100755
--- a/app/libraries/ProjectUtilities.php
+++ b/app/libraries/ProjectUtilities.php
@@ -22,6 +22,17 @@ class ProjectUtilities
 
         try {
             $userProjects = Airavata::getUserProjects(Session::get('authz-token'), $gatewayId, $username, -1, 0);
+
+            // Add a optionLabel that disambiguates shared projects
+            foreach ($userProjects as $project) {
+
+                $optionLabel = $project->name;
+                if ($project->owner != Session::get('username')) {
+                    $optionLabel = $optionLabel . ' (owned by ' . $project->owner . ')';
+                }
+                $project->optionLabel = $optionLabel;
+            }
+
             //var_dump( $userProjects); exit;
         } catch (InvalidRequestException $ire) {
             CommonUtilities::print_error_message('<p>There was a problem getting the user\'s projects.
@@ -107,7 +118,7 @@ class ProjectUtilities
                     $selected = '';
                 }
 
-                echo '<option value="' . $project->projectID . '" ' . $selected . '>' . $project->name . '</option>';
+                echo '<option value="' . $project->projectID . '" ' . $selected . '>' . $project->optionLabel . '</option>';
             }
         }
         echo '</select>';

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/9faea85c/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 6ba71df..eec614d 100644
--- a/app/views/partials/experiment-info.blade.php
+++ b/app/views/partials/experiment-info.blade.php
@@ -289,7 +289,7 @@
                             @if( $project->projectID == $experiment->projectId)
                             selected
                             @endif
-                        >{{{ $project->name }}}</option>
+                        >{{{ $project->optionLabel }}}</option>
                         @endforeach
                     </select>
                 </div>


[3/3] airavata-php-gateway git commit: Merge branch 'AIRAVATA-2212-autorefresh-prevents-page-from-loading' of https://github.com/machristie/airavata-php-gateway into develop

Posted by sc...@apache.org.
Merge branch 'AIRAVATA-2212-autorefresh-prevents-page-from-loading' of https://github.com/machristie/airavata-php-gateway into develop


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/de3ac07a
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/de3ac07a
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/de3ac07a

Branch: refs/heads/develop
Commit: de3ac07ad5bfc56044a28b1f3ce6fb80cdc3c144
Parents: 9faea85 3910260
Author: scnakandala <su...@gmail.com>
Authored: Fri Nov 11 12:28:54 2016 -0500
Committer: scnakandala <su...@gmail.com>
Committed: Fri Nov 11 12:28:54 2016 -0500

----------------------------------------------------------------------
 app/views/experiment/summary.blade.php | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)
----------------------------------------------------------------------