You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by nd...@apache.org on 2015/12/10 17:50:26 UTC

[13/23] airavata-php-gateway git commit: Fix for experiment summary unicode issue

Fix for experiment summary unicode issue


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

Branch: refs/heads/develop
Commit: 98f398ad4ef2550d9e27b0df3de10d4ef5a8e5ef
Parents: 0f017de
Author: Nipurn Doshi <Nipurn Doshi>
Authored: Tue Dec 1 12:28:45 2015 -0500
Committer: Nipurn Doshi <Nipurn Doshi>
Committed: Tue Dec 1 12:28:45 2015 -0500

----------------------------------------------------------------------
 app/controllers/ExperimentController.php     | 8 ++++++--
 app/views/experiment/summary.blade.php       | 6 ++++--
 app/views/partials/experiment-info.blade.php | 2 +-
 3 files changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/98f398ad/app/controllers/ExperimentController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ExperimentController.php b/app/controllers/ExperimentController.php
index 1e88d39..754c35f 100755
--- a/app/controllers/ExperimentController.php
+++ b/app/controllers/ExperimentController.php
@@ -79,7 +79,11 @@ class ExperimentController extends BaseController
 
     public function summary()
     {
-        $experiment = ExperimentUtilities::get_detailed_experiment_tree($_GET['expId']);
+        if (Input::has("dashboard"))
+            $experiment = ExperimentUtilities::get_detailed_experiment_tree($_GET['expId']);
+        else
+            $experiment = ExperimentUtilities::get_experiment( $_GET['expId']);
+
         if ($experiment != null) {
             $project = ProjectUtilities::get_project($experiment->projectId);
             $expVal = ExperimentUtilities::get_experiment_values($experiment, $project);
@@ -111,7 +115,7 @@ class ExperimentController extends BaseController
                     $data["dashboard"] = true;
                     return View::make("partials/experiment-info", $data);
                 } else
-                    return json_encode($experiment);
+                    return json_encode($data);
             } else {
                 return View::make("experiment/summary", $data);
             }

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/98f398ad/app/views/experiment/summary.blade.php
----------------------------------------------------------------------
diff --git a/app/views/experiment/summary.blade.php b/app/views/experiment/summary.blade.php
index 845e9ff..2643b5c 100755
--- a/app/views/experiment/summary.blade.php
+++ b/app/views/experiment/summary.blade.php
@@ -19,8 +19,10 @@
                 type: "GET",
                 url: "{{URL::to('/') }}/experiment/summary",
                 data: {expId: "{{ Input::get('expId') }}" },
-                success: function (exp) {
-                    if ($.trim($("#expObj").val()) != $.trim(exp)) {
+                success: function ( data) {
+                    data = $.parseJSON( data);
+                    //if ($.trim($("#expObj").val()) != $.trim(exp)) {
+                    if ($.trim($("#lastModifiedTime").val()) != $.trim( data.expVal["experimentTimeOfStateChange"])) {
                         $continue = false;
                         $(".refresh-exp").click();
                     }

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/98f398ad/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..bfaf10b 100644
--- a/app/views/partials/experiment-info.blade.php
+++ b/app/views/partials/experiment-info.blade.php
@@ -185,7 +185,7 @@
         </div>
     </form>
     @endif
-    <input type="hidden" id="expObj" value="{{ htmlentities( json_encode( $experiment)) }}"/>
+    <input type="hidden" id="lastModifiedTime" value="{{ $expVal['experimentTimeOfStateChange'] }}"/>
 
     <!-- check of correct experiment Id ends here -->
     @endif