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/10/18 03:52:20 UTC

[1/7] airavata-php-gateway git commit: AIRAVATA-2169 Adding edit icon back to browse projects

Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop 12827c150 -> b4899d1f2


AIRAVATA-2169 Adding edit icon back to browse projects


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

Branch: refs/heads/develop
Commit: 782b203007482f1745632de1459351bb52e4dce9
Parents: 12827c1
Author: Marcus Christie <ma...@gmail.com>
Authored: Mon Oct 17 09:09:54 2016 -0400
Committer: Marcus Christie <ma...@gmail.com>
Committed: Mon Oct 17 09:09:54 2016 -0400

----------------------------------------------------------------------
 app/views/project/browse.blade.php | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/782b2030/app/views/project/browse.blade.php
----------------------------------------------------------------------
diff --git a/app/views/project/browse.blade.php b/app/views/project/browse.blade.php
index 338498c..1c47b49 100755
--- a/app/views/project/browse.blade.php
+++ b/app/views/project/browse.blade.php
@@ -107,6 +107,11 @@
                 <tr>
                     <td>
                         {{$project->name}}
+                        @if($can_write[$project->projectID])
+                        <a href="{{URL::to('/')}}/project/edit?projId={{$project->projectID}}" title="Edit">
+                            <span class="glyphicon glyphicon-pencil"></span>
+                        </a>
+                        @endif
                     </td>
                     <td>
                         {{$project->owner}}


[6/7] airavata-php-gateway git commit: AIRAVATA-2173 Scroll sharing modal if too long

Posted by sc...@apache.org.
AIRAVATA-2173 Scroll sharing modal if too long


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

Branch: refs/heads/develop
Commit: cb001637084ceaf2399261f2814bd4879b2d5521
Parents: f6db137
Author: Marcus Christie <ma...@iu.edu>
Authored: Mon Oct 17 13:59:07 2016 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Mon Oct 17 13:59:07 2016 -0400

----------------------------------------------------------------------
 public/css/sharing.css | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/cb001637/public/css/sharing.css
----------------------------------------------------------------------
diff --git a/public/css/sharing.css b/public/css/sharing.css
index 4813fef..80f6b65 100755
--- a/public/css/sharing.css
+++ b/public/css/sharing.css
@@ -1,14 +1,20 @@
 #share-box {
 	position: fixed;
 	top: 100%;
+	bottom: 0px;
 	z-index: 1000;
 	left: 25%;
 	font-size: large;
 }
 
+#share-box .modal-dialog {
+	/* .modal-dialog has top/bottom margin of 30px */
+	height: calc(100% - 2 * 30px);
+}
+
 .modal-content {
 	background-color: #ecf0f1;
-	max-height: 90%;
+	max-height: 100%;
 	overflow: scroll;
 }
 


[7/7] airavata-php-gateway git commit: AIRAVATA-2174 Can change sharing of experiment after launch

Posted by sc...@apache.org.
AIRAVATA-2174 Can change sharing of experiment after launch


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

Branch: refs/heads/develop
Commit: b4899d1f2add5e9a5eecdb7f3c7028571ee49890
Parents: cb00163
Author: Marcus Christie <ma...@iu.edu>
Authored: Mon Oct 17 16:37:28 2016 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Mon Oct 17 16:37:28 2016 -0400

----------------------------------------------------------------------
 app/controllers/ExperimentController.php     |  7 ++++-
 app/libraries/ExperimentUtilities.php        |  4 +++
 app/views/partials/experiment-info.blade.php | 35 ++++++++++++++++-------
 3 files changed, 34 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b4899d1f/app/controllers/ExperimentController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ExperimentController.php b/app/controllers/ExperimentController.php
index 7da421b..d7fb40c 100755
--- a/app/controllers/ExperimentController.php
+++ b/app/controllers/ExperimentController.php
@@ -210,7 +210,12 @@ class ExperimentController extends BaseController
         } elseif (isset($_POST['cancel'])) {
             ExperimentUtilities::cancel_experiment($experiment->experimentId);
             return Redirect::to('experiment/summary?expId=' . $experiment->experimentId);
-
+        } elseif (isset($_POST['update-sharing'])) {
+            if(Config::get('pga_config.airavata')["data-sharing-enabled"]){
+                $share = $_POST['share-settings'];
+                ExperimentUtilities::update_experiment_sharing($experiment->experimentId, json_decode($share));
+            }
+            return Redirect::to('experiment/summary?expId=' . $experiment->experimentId);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b4899d1f/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index 49bcd19..8c137ea 100755
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -1335,6 +1335,10 @@ class ExperimentUtilities
         echo '</select>';
     }
 
+    public static function update_experiment_sharing($expId, $users) {
+        ExperimentUtilities::share_experiment($expId, $users);
+    }
+
     /**
      * Set sharing privileges for a given experiment.
      * @param $expId

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b4899d1f/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 dbdf579..08fca8e 100644
--- a/app/views/partials/experiment-info.blade.php
+++ b/app/views/partials/experiment-info.blade.php
@@ -77,7 +77,7 @@
                         <tr>
                             <td>Name</td>
                             <td>ID</td>
-                            <td>Status</td>SharingUtilities::userCanWrite(Session::get("username"), $experiment->experimentId, ResourceType::EXPERIMENT)
+                            <td>Status</td>
                             <td>Creation Time</td>
                         </tr>
                         <tr>
@@ -203,22 +203,24 @@
         @endforeach
     </table>
 
-    <div class="form-group">
-    @if(Config::get('pga_config.airavata')["data-sharing-enabled"])
-        @if($can_write === true)
-        @include('partials/sharing-display-body', array("form" => true))
-        @else
-        @include('partials/sharing-display-body', array("form" => false))
-        @endif
-    @endif
-    </div>
-
     @if(strcmp($expVal["applicationInterface"]->applicationName, "OpenMM_Stampede") === 0)
     @include('partials/streaming-data')
     @endif
 
     @if( !isset( $dashboard))
+
     <form action="{{URL::to('/') }}/experiment/summary" method="post" role="form">
+
+        <div class="form-group">
+        @if(Config::get('pga_config.airavata')["data-sharing-enabled"])
+            @if($can_write === true)
+            <!-- Only allow editing sharing here if the experiment isn't editable -->
+            @include('partials/sharing-display-body', array("form" => !$expVal["editable"]))
+            @else
+            @include('partials/sharing-display-body', array("form" => false))
+            @endif
+        @endif
+        </div>
         <div class="btn-toolbar">
             <input name="launch"
                    type="submit"
@@ -258,6 +260,17 @@
             </a>
             @endif
             @endif
+            <!-- Only owner can update sharing -->
+            @if(Config::get('pga_config.airavata')["data-sharing-enabled"] && Session::get('username') === $experiment->userName && !$expVal["editable"])
+            <button name="update-sharing"
+                   type="submit"
+                   class="btn btn-primary"
+                   value="Update Sharing"
+                   title="Update sharing settings">
+                <span class="glyphicon glyphicon-share"></span>
+                Update Sharing
+            </button>
+            @endif
         </div>
     </form>
     @endif


[2/7] airavata-php-gateway git commit: AIRAVATA-2169 Fix url encoding of projectID

Posted by sc...@apache.org.
AIRAVATA-2169 Fix url encoding of projectID

Ran into this problem when I created a project with a name that included
'#' in it.


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

Branch: refs/heads/develop
Commit: 5d7a4f1992373820605d80c446dfac5432be3a2d
Parents: 782b203
Author: Marcus Christie <ma...@iu.edu>
Authored: Mon Oct 17 10:13:59 2016 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Mon Oct 17 10:13:59 2016 -0400

----------------------------------------------------------------------
 app/views/project/browse.blade.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/5d7a4f19/app/views/project/browse.blade.php
----------------------------------------------------------------------
diff --git a/app/views/project/browse.blade.php b/app/views/project/browse.blade.php
index 1c47b49..bacd5a7 100755
--- a/app/views/project/browse.blade.php
+++ b/app/views/project/browse.blade.php
@@ -108,7 +108,7 @@
                     <td>
                         {{$project->name}}
                         @if($can_write[$project->projectID])
-                        <a href="{{URL::to('/')}}/project/edit?projId={{$project->projectID}}" title="Edit">
+                        <a href="{{URL::to('/')}}/project/edit?projId={{rawurlencode($project->projectID)}}" title="Edit">
                             <span class="glyphicon glyphicon-pencil"></span>
                         </a>
                         @endif


[5/7] airavata-php-gateway git commit: AIRAVATA-2170 Don't allow changing project owner

Posted by sc...@apache.org.
AIRAVATA-2170 Don't allow changing project owner


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

Branch: refs/heads/develop
Commit: f6db137a3e4538f524c6103303024da160977991
Parents: 68932f2
Author: Marcus Christie <ma...@iu.edu>
Authored: Mon Oct 17 11:55:30 2016 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Mon Oct 17 11:55:30 2016 -0400

----------------------------------------------------------------------
 app/controllers/ProjectController.php | 2 +-
 app/views/project/edit.blade.php      | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/f6db137a/app/controllers/ProjectController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ProjectController.php b/app/controllers/ProjectController.php
index 4c20886..9fe515e 100755
--- a/app/controllers/ProjectController.php
+++ b/app/controllers/ProjectController.php
@@ -126,7 +126,7 @@ class ProjectController extends BaseController
     public function editSubmit()
     {
         $projectDetails = array();
-        $projectDetails["owner"] = Session::get("username");
+        $projectDetails["owner"] = Input::get("projectOwner");
         $projectDetails["name"] = Input::get("project-name");
         $projectDetails["description"] = Input::get("project-description");
 

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/f6db137a/app/views/project/edit.blade.php
----------------------------------------------------------------------
diff --git a/app/views/project/edit.blade.php b/app/views/project/edit.blade.php
index 027bc3c..1e38dd7 100755
--- a/app/views/project/edit.blade.php
+++ b/app/views/project/edit.blade.php
@@ -36,6 +36,7 @@
                       name="project-description"
                       id="project-description" maxlength="200">{{ $project->description }}</textarea>
             <input type="hidden" name="projectId" value="{{ Input::get('projId') }}"/>
+            <input type="hidden" name="projectOwner" value="{{ $project->owner}}"/>
         </div>
 
         <div class="form-group">


[3/7] airavata-php-gateway git commit: AIRAVATA-2170 Only owner can edit sharing

Posted by sc...@apache.org.
AIRAVATA-2170 Only owner can edit sharing


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

Branch: refs/heads/develop
Commit: 88c9bdf06e8e1ebfb51bc2bd29c9dadb85dd02e7
Parents: 5d7a4f1
Author: Marcus Christie <ma...@iu.edu>
Authored: Mon Oct 17 10:29:25 2016 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Mon Oct 17 10:29:25 2016 -0400

----------------------------------------------------------------------
 app/controllers/ProjectController.php | 4 +++-
 app/views/project/edit.blade.php      | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/88c9bdf0/app/controllers/ProjectController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ProjectController.php b/app/controllers/ProjectController.php
index 3838898..4c20886 100755
--- a/app/controllers/ProjectController.php
+++ b/app/controllers/ProjectController.php
@@ -102,11 +102,13 @@ class ProjectController extends BaseController
                         $owner[$project->owner] = $users[$project->owner];
                         $users = array_diff_key($users, $owner);
                     }
+                    $canEditSharing = strcmp(Session::get("username"), $project->owner) === 0;
                     return View::make("project/edit",
                         array("projectId" => Input::get("projId"),
                             "project" => $project,
                             "users" => json_encode($users),
-                            "owner" => json_encode($owner)
+                            "owner" => json_encode($owner),
+                            "canEditSharing" => $canEditSharing
                         ));
                 }else {
                     return Redirect::to('project/summary?projId=' . Input::get("projId"))->with("error", "You do not have permission to edit this project.");

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/88c9bdf0/app/views/project/edit.blade.php
----------------------------------------------------------------------
diff --git a/app/views/project/edit.blade.php b/app/views/project/edit.blade.php
index edd8ac9..027bc3c 100755
--- a/app/views/project/edit.blade.php
+++ b/app/views/project/edit.blade.php
@@ -39,7 +39,7 @@
         </div>
 
         <div class="form-group">
-            @include('partials/sharing-display-body', array('form' => true))
+            @include('partials/sharing-display-body', array('form' => $canEditSharing))
         </div>
 
         <div class="btn-toolbar">


[4/7] airavata-php-gateway git commit: AIRAVATA-2170 Project edit submission might not have sharing settings

Posted by sc...@apache.org.
AIRAVATA-2170 Project edit submission might not have sharing settings

Only owners can update sharing settings. Users with write access to a
shared project can change the project but on form submission only the
project name and description will be POSTed.


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

Branch: refs/heads/develop
Commit: 68932f2721b425dffa748c4b10ea24f9c1d3c4a5
Parents: 88c9bdf
Author: Marcus Christie <ma...@iu.edu>
Authored: Mon Oct 17 11:12:44 2016 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Mon Oct 17 11:12:44 2016 -0400

----------------------------------------------------------------------
 app/libraries/ProjectUtilities.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/68932f27/app/libraries/ProjectUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ProjectUtilities.php b/app/libraries/ProjectUtilities.php
index ea65ddb..4f26782 100755
--- a/app/libraries/ProjectUtilities.php
+++ b/app/libraries/ProjectUtilities.php
@@ -218,7 +218,7 @@ class ProjectUtilities
             CommonUtilities::print_error_message('AiravataSystemException!<br><br>' . $ase->getMessage());
         }
 
-        if (Config::get('pga_config.airavata')["data-sharing-enabled"]){
+        if (Config::get('pga_config.airavata')["data-sharing-enabled"] && array_key_exists('share-settings', $_POST)){
             $share = $_POST['share-settings'];
             ProjectUtilities::share_project($projectId, json_decode($share));
         }