airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [41/50] [abbrv] airavata-php-gateway git commit: fixes for XSEDE
Date Wed, 27 Jul 2016 17:05:49 GMT
fixes for XSEDE


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

Branch: refs/heads/develop
Commit: 28b352ba6f7384674b736604db175113bc471aca
Parents: 7cc5699
Author: Jeff Kinnison <jeffdkinnison@gmail.com>
Authored: Fri Jul 15 15:03:58 2016 -0400
Committer: Jeff Kinnison <jeffdkinnison@gmail.com>
Committed: Fri Jul 15 15:03:58 2016 -0400

----------------------------------------------------------------------
 app/controllers/ProjectController.php             |  1 +
 app/libraries/ExperimentUtilities.php             |  7 +++++--
 app/libraries/ProjectUtilities.php                |  1 -
 app/views/partials/sharing-display-body.blade.php |  2 +-
 public/css/sharing.css                            |  2 ++
 public/js/sharing/share.js                        | 13 +++++++------
 public/js/sharing/sharing_utils.js                | 16 ++++++++--------
 7 files changed, 24 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/28b352ba/app/controllers/ProjectController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ProjectController.php b/app/controllers/ProjectController.php
index 5557675..6b874f2 100755
--- a/app/controllers/ProjectController.php
+++ b/app/controllers/ProjectController.php
@@ -70,6 +70,7 @@ class ProjectController extends BaseController
     public function editSubmit()
     {
         if (isset($_POST['save'])) {
+            $projectDetails = array();
             $projectDetails["owner"] = Session::get("username");
             $projectDetails["name"] = Input::get("project-name");
             $projectDetails["description"] = Input::get("project-description");

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/28b352ba/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index 8ff9406..5f44863 100644
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -633,9 +633,9 @@ class ExperimentUtilities
             $experiment->userConfigurationData->experimentDataDir = ExperimentUtilities::$experimentPath;
             Airavata::updateExperiment(Session::get('authz-token'), $cloneId, $experiment);
 
-            $share = json_encode(SharingUtilities::getAllUserPermissions($expId, ResourceType::EXPERIMENT));
+            $share = SharingUtilities::getAllUserPermissions($expId, ResourceType::EXPERIMENT);
             $share[Session::get("username")] = array("read" => true, "write" => true);
-            ExperimentUtilities::share_experiment($cloneId, json_decode($share));
+            ExperimentUtilities::share_experiment($cloneId, json_decode(json_encode($share)));
 
             return $cloneId;
         } catch (InvalidRequestException $ire) {
@@ -1323,6 +1323,7 @@ class ExperimentUtilities
      * @param $users A map of username => {read_permission, write_permission}
      */
     private static function share_experiment($expId, $users) {
+        $experiement = ExperimentUtilities::getExperiment(Session::get('authz-token'), $expId);
         $wadd = array();
         $wrevoke = array();
         $radd = array();
@@ -1349,5 +1350,7 @@ class ExperimentUtilities
 
         GrouperUtilities::shareResourceWithUsers($expId, ResourceType::EXPERIMENT, $radd);
         GrouperUtilities::revokeSharingOfResourceFromUsers($expId, ResourceType::EXPERIMENT,
$rrevoke);
+
+        GrouperUtilities::shareResourceWithUsers($experiment->projectId, ResourceType::PROJECT,
$radd);
     }
 }

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/28b352ba/app/libraries/ProjectUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ProjectUtilities.php b/app/libraries/ProjectUtilities.php
index 0b6e93e..98e0371 100644
--- a/app/libraries/ProjectUtilities.php
+++ b/app/libraries/ProjectUtilities.php
@@ -185,7 +185,6 @@ class ProjectUtilities
 
     public static function update_project($projectId, $projectDetails)
     {
-
         $updatedProject = new Project();
         $updatedProject->owner = $projectDetails["owner"];
         $updatedProject->name = $projectDetails["name"];

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/28b352ba/app/views/partials/sharing-display-body.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/sharing-display-body.blade.php b/app/views/partials/sharing-display-body.blade.php
index c34e09f..32372b7 100644
--- a/app/views/partials/sharing-display-body.blade.php
+++ b/app/views/partials/sharing-display-body.blade.php
@@ -2,7 +2,7 @@
 <label for="project-share">Sharing Settings</label><br />
 <button class="btn btn-default" name="project-share" id="project-share">Share With
Other Users</button><br />
 @else
-<h3>Sharing Settings</h3>
+<h3>Sharing Details</h3>
 @endif
 <!-- <label>Show</label>
 <div id="show-results-group" class="btn-group" role="group" aria-label="Show Groups or
Users">

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/28b352ba/public/css/sharing.css
----------------------------------------------------------------------
diff --git a/public/css/sharing.css b/public/css/sharing.css
index 8b194e2..4813fef 100755
--- a/public/css/sharing.css
+++ b/public/css/sharing.css
@@ -8,6 +8,8 @@
 
 .modal-content {
 	background-color: #ecf0f1;
+	max-height: 90%;
+	overflow: scroll;
 }
 
 #share-box-filter {

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/28b352ba/public/js/sharing/share.js
----------------------------------------------------------------------
diff --git a/public/js/sharing/share.js b/public/js/sharing/share.js
index 0aae840..83ae8ec 100755
--- a/public/js/sharing/share.js
+++ b/public/js/sharing/share.js
@@ -77,8 +77,9 @@ $(function() {
         }
         $('#share-settings').val(JSON.stringify(share_settings));
         $('.user-thumbnail').show();
+        $('.order-results-selector').trigger('change');
         //$('.group-thumbnail').show();
-    }
+    };
 
 
 
@@ -103,10 +104,10 @@ $(function() {
                 $e.find('.sharing-thumbnail-access').prop('disabled', false).show();
                 $e.find('.sharing-thumbnail-unshare').show();
                 $e.detach().appendTo($('#share-box-share'));
-            })
+            });
         }
         $original_shared_list = $('#share-box-share').children();
-        $('#share-box').animate({top: "1%"})
+        $('#share-box').animate({top: "1%"});
         return false;
     });
 
@@ -178,7 +179,7 @@ $(function() {
         var data, resource_id, $share_list, $update_list, share_settings, access;
         e.stopPropagation();
         e.preventDefault();
-        data = $("#share-box").data()
+        data = $("#share-box").data();
         $share_list = $("#share-box-share").children();
         $update_list = $('.sharing-updated');
         share_settings = {};
@@ -188,7 +189,7 @@ $(function() {
         }
         else {
             $('#shared-users').empty();
-            if ($share_list.filter('.sharing-thumbnail').length > 0) {
+            if ($update_list.length > 0) {
                 $share_list.sort(comparator_map.username);
                 $update_list.each(function(index, element) {
                     var $e, data, settings;
@@ -207,7 +208,7 @@ $(function() {
                 $('#shared-users').removeClass('text-align-center');
                 $share_list.detach().appendTo($('#shared-users'));
             }
-            else {
+            if ($share_list.length === 0) {
                 $('#shared-users').addClass('text-align-center');
                 $('#shared-users').prepend('<p>This has not been shared</p>');
             }

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/28b352ba/public/js/sharing/sharing_utils.js
----------------------------------------------------------------------
diff --git a/public/js/sharing/sharing_utils.js b/public/js/sharing/sharing_utils.js
index 03c3b6e..bd4471a 100644
--- a/public/js/sharing/sharing_utils.js
+++ b/public/js/sharing/sharing_utils.js
@@ -10,7 +10,7 @@ var access_text = [
   'Can write'
 ];
 
-var createThumbnail = function(username, firstname, lastname, email, access = access_enum.NONE,
share = true) {
+var createThumbnail = function(username, firstname, lastname, email, access, share) {
   var $thumbnail, data, select, options, access_text_current;
 
   data = {
@@ -75,7 +75,7 @@ var createThumbnail = function(username, firstname, lastname, email, access
= ac
    $thumbnail.data(data);
 
    return $thumbnail;
-}
+};
 
 var changeShareState = function($target) {
     var data;
@@ -101,7 +101,7 @@ var changeShareState = function($target) {
         $(".order-results-selector").trigger('change');
     }
     $target.toggleClass('share-box-users-item share-box-share-item');
-}
+};
 
 var usernameComparator = function(a, b) {
    var username_a, username_b;
@@ -115,7 +115,7 @@ var usernameComparator = function(a, b) {
    } else {
        return 0;
    }
-}
+};
 
 var firstLastComparator = function(a, b) {
    var firstname_a, firstname_b, lastname_a, lastname_b;
@@ -137,7 +137,7 @@ var firstLastComparator = function(a, b) {
            return 0;
        }
    }
-}
+};
 
 var lastFirstComparator = function(a, b) {
   var firstname_a, firstname_b, lastname_a, lastname_b;
@@ -159,7 +159,7 @@ var lastFirstComparator = function(a, b) {
            return 0;
        }
    }
-}
+};
 
 var emailComparator = function(a, b) {
    var email_a, email_b;
@@ -173,7 +173,7 @@ var emailComparator = function(a, b) {
    } else {
        return 0;
    }
-}
+};
 
 var userFilter = function(users, pattern) {
    re = new RegExp(pattern, 'i');
@@ -190,4 +190,4 @@ var userFilter = function(users, pattern) {
            $(element).hide();
        }
    });
-}
+};


Mime
View raw message