You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2019/06/02 17:14:28 UTC

[airavata-php-gateway] 01/01: Merge branch 'master' into dreg-gateway

This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch dreg-gateway
in repository https://gitbox.apache.org/repos/asf/airavata-php-gateway.git

commit e52fc972d8d6770038ff517652decd09ab16b984
Merge: b38e1fc 82c231f
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Sun Jun 2 13:13:58 2019 -0400

    Merge branch 'master' into dreg-gateway

 .gitignore                                         |     8 +-
 app/config/email_templates.json                    |    20 +-
 app/config/pga_config.php.template                 |    17 +-
 app/controllers/AccountController.php              |    73 +-
 app/controllers/AdminController.php                |    35 +-
 app/controllers/ExperimentController.php           |    52 +-
 app/controllers/GatewayRequestUpdateController.php |    14 +-
 app/controllers/HomeController.php                 |    12 +-
 app/controllers/UserSettingsController.php         |    34 +-
 app/libraries/AdminUtilities.php                   |    35 +-
 app/libraries/Airavata/API/Airavata.php            | 10257 ++++++------
 app/libraries/Airavata/API/Error/Types.php         |     2 +-
 .../API/Sharing/SharingRegistryService.php         | 15735 +++++++++++++++++++
 .../{Service/Profile => API/Sharing}/Types.php     |     4 +-
 app/libraries/Airavata/API/Types.php               |     2 +-
 .../Model/AppCatalog/AccountProvisioning/Types.php |   345 +
 .../Model/AppCatalog/AppDeployment/Types.php       |     2 +-
 .../Model/AppCatalog/AppInterface/Types.php        |     2 +-
 .../Model/AppCatalog/ComputeResource/Types.php     |     2 +-
 .../Model/AppCatalog/GatewayProfile/Types.php      |   145 +-
 .../Model/AppCatalog/Parallelism/Types.php         |     2 +-
 .../Model/AppCatalog/StorageResource/Types.php     |     2 +-
 .../Model/AppCatalog/UserResourceProfile/Types.php |    30 +-
 .../Airavata/Model/Application/Io/Types.php        |     2 +-
 app/libraries/Airavata/Model/Commons/Types.php     |     2 +-
 .../Airavata/Model/Credential/Store/Types.php      |     2 +-
 .../Airavata/Model/Data/Movement/Types.php         |     2 +-
 .../Airavata/Model/Data/Replica/Types.php          |     2 +-
 app/libraries/Airavata/Model/Dbevent/Types.php     |     2 +-
 app/libraries/Airavata/Model/Experiment/Types.php  |     2 +-
 app/libraries/Airavata/Model/Group/Types.php       |     2 +-
 app/libraries/Airavata/Model/Job/Types.php         |     2 +-
 .../Airavata/Model/Messaging/Event/Types.php       |     2 +-
 app/libraries/Airavata/Model/Process/Types.php     |     2 +-
 app/libraries/Airavata/Model/Scheduling/Types.php  |     2 +-
 app/libraries/Airavata/Model/Security/Types.php    |     2 +-
 app/libraries/Airavata/Model/Sharing/Types.php     |  2481 +++
 app/libraries/Airavata/Model/Status/Types.php      |     4 +-
 app/libraries/Airavata/Model/Task/Types.php        |     2 +-
 app/libraries/Airavata/Model/Tenant/Types.php      |   412 +-
 app/libraries/Airavata/Model/Types.php             |     2 +-
 app/libraries/Airavata/Model/User/Types.php        |   662 +-
 app/libraries/Airavata/Model/Workspace/Types.php   |     2 +-
 .../Service/Iam/Admin/Services/CPI/Error/Types.php |     2 +-
 .../Iam/Admin/Services/CPI/IamAdminServices.php    |   298 +-
 .../Service/Iam/Admin/Services/CPI/Types.php       |     2 +-
 .../{Tenant => Groupmanager}/CPI/Error/Types.php   |    10 +-
 .../Groupmanager/CPI/GroupManagerService.php}      |  1354 +-
 .../Profile/{Tenant => Groupmanager}/CPI/Types.php |    14 +-
 .../Service/Profile/Tenant/CPI/Error/Types.php     |     2 +-
 .../Profile/Tenant/CPI/TenantProfileService.php    |     4 +-
 .../Airavata/Service/Profile/Tenant/CPI/Types.php  |     2 +-
 app/libraries/Airavata/Service/Profile/Types.php   |     2 +-
 .../Service/Profile/User/CPI/Error/Types.php       |     2 +-
 .../Airavata/Service/Profile/User/CPI/Types.php    |     2 +-
 .../Profile/User/CPI/UserProfileService.php        |     4 +-
 app/libraries/AppUtilities.php                     |     2 +-
 app/libraries/CRUtilities.php                      |     5 +
 app/libraries/CommonUtilities.php                  |    12 +-
 app/libraries/EmailUtilities.php                   |   146 +-
 app/libraries/ExperimentUtilities.php              |   173 +-
 app/libraries/IamAdminServicesUtilities.php        |     8 +-
 app/libraries/Keycloak/API/RoleMapper.php          |     9 +
 app/libraries/Keycloak/API/Roles.php               |     3 +
 app/libraries/Keycloak/API/Users.php               |     9 +
 app/libraries/Keycloak/Keycloak.php                |    27 +-
 app/libraries/Keycloak/KeycloakUtil.php            |     4 +-
 app/libraries/URPUtilities.php                     |   120 +-
 app/views/account/create.blade.php                 |    36 +-
 app/views/account/credential-store.blade.php       |    11 +-
 app/views/account/dashboard.blade.php              |     3 +
 app/views/account/login-desktop.blade.php          |    36 +-
 app/views/account/login.blade.php                  |    40 +-
 app/views/account/update.blade.php                 |    34 -
 app/views/admin/manage-gateway.blade.php           |    44 +-
 app/views/admin/manage-users.blade.php             |    20 +-
 app/views/experiment/edit.blade.php                |     1 -
 .../partials/auto-provisioned-accounts.blade.php   |    58 +
 app/views/partials/experiment-info.blade.php       |    11 +-
 app/views/partials/experiment-inputs.blade.php     |     6 +-
 .../partials/experiment-queue-block.blade.php      |    69 +-
 .../partials/interface-output-block.blade.php      |     8 +
 app/views/partials/login-external.blade.php        |    14 +-
 .../user-compute-resource-preferences.blade.php    |    27 +-
 public/.htaccess                                   |     5 +-
 public/css/bootstrap.min.css                       |    27 +
 public/js/filemanager.js                           |     4 +-
 public/js/util.js                                  |     2 +-
 88 files changed, 26632 insertions(+), 6461 deletions(-)

diff --cc app/libraries/ExperimentUtilities.php
index ade7873,b6295d5..5902a3d
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@@ -99,8 -97,13 +97,13 @@@ class ExperimentUtilitie
                          $fileName = basename($input->value);
                      }
  
-                     echo '<p>' . $input->name . ':&nbsp;<a target="_blank" href="' . URL::to("/") . '/download/?id='
-                         . $input->value . '">' . $fileName . ' <span class="glyphicon glyphicon-save"></span></a></p>';
+                     $path = parse_url($currentInputPath)['path'];
+                     if(file_exists($path)){
+                         echo '<p>' . $input->name . ':&nbsp;<a target="_blank" href="' . URL::to("/") . '/download/?id='
 -                            . $input->value . '">' . $fileName . ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
++                            . $input->value . '">' . $fileName . ' <span class="glyphicon glyphicon-save"></span></a></p>';
+                     } else {
+                         echo '<p>' . $input->name . ':&nbsp;' . $fileName . self::FILE_UNAVAILABLE_ICON_TOOLTIP;
+                     }
  
                  }else if($input->type == DataType::URI_COLLECTION) {
                      $uriList = $input->value;
@@@ -121,8 -124,13 +124,13 @@@
                              $fileName = basename($input->value);
                          }
  
-                         $optFilesHtml = $optFilesHtml . '<a target="_blank" href="' . URL::to("/") . '/download/?id='
-                             . $uri . '">' . $fileName . ' <span class="glyphicon glyphicon-save"></span></a>&nbsp;';
+                         $path = parse_url($currentInputPath)['path'];
+                         if(file_exists($path)){
+                             $optFilesHtml = $optFilesHtml . '<a target="_blank" href="' . URL::to("/") . '/download/?id='
 -                                . $uri . '">' . $fileName . ' <span class="glyphicon glyphicon-new-window"></span></a>&nbsp;';
++                                . $uri . '">' . $fileName . ' <span class="glyphicon glyphicon-save"></span></a>&nbsp;';
+                         } else {
+                             $optFilesHtml = $optFilesHtml . $fileName . self::FILE_UNAVAILABLE_ICON_TOOLTIP;
+                         }
  
                      }
  
@@@ -399,24 -407,17 +407,27 @@@
                      }
                  }
              } elseif ($applicationInput->type == DataType::URI) {
 -                if ($_FILES[$applicationInput->sanitizedFormName]['name']) {
 -
 -                    $file = $_FILES[$applicationInput->sanitizedFormName];
 -                    if ($file['error'] != 0) {
 -                        throw new Exception("Failure occurred while uploading file '"
 -                            . $file['name'] . "'. File upload error code is " . $file['error'] . ".");
 -                    }
 +//Changed for dREG gateway
 +//Here use new file upload method: Resumable uploading method provided by Tus package
 +                if (isset($_POST[ $applicationInput->sanitizedFormName ])) {
 +//                if ($_FILES[$applicationInput->sanitizedFormName]['name']) {
 +//                    $file = $_FILES[$applicationInput->sanitizedFormName];
 +//                    if ($file['error'] != 0) {
 +//                        throw new Exception("Failure occurred while uploading file '"
 +//                            . $file['name'] . "'. File upload error code is " . $file['error'] . ".");
 +//                    }
 +
 +//changed for dREG gateway
 +                    $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir();
 +// The _POST doesn't contain file data again. the URI value = [filename]:http://website/experiment/upload/[uploadpath]
 +                    $fileUpload = $_POST[$applicationInput->sanitizedFormName];
 +                    $filePieces = explode(":", $fileUpload);
 +                    $filename  = $filePieces[0];
 +                    $fileTemp = $tmp_dir . "/" . substr($filePieces[2], strrpos($filePieces[2], '/')+1);
  
+                     //FIX - AIRAVATA - 2674
+                     //Replaced spaces with Underscore
+                     $file['name'] = str_replace(' ', '_', $file['name']);
                      //
                      // move file to experiment data directory
                      //
diff --cc app/views/partials/experiment-info.blade.php
index 4f43aee,e174900..046fb32
mode 100755,100644..100755
--- a/app/views/partials/experiment-info.blade.php
+++ b/app/views/partials/experiment-info.blade.php
diff --cc app/views/partials/experiment-inputs.blade.php
index f245b19,4c48fbd..15e2ab1
mode 100755,100644..100755
--- a/app/views/partials/experiment-inputs.blade.php
+++ b/app/views/partials/experiment-inputs.blade.php
diff --cc app/views/partials/experiment-queue-block.blade.php
index b78d391,61948d4..61948d4
mode 100755,100644..100755
--- a/app/views/partials/experiment-queue-block.blade.php
+++ b/app/views/partials/experiment-queue-block.blade.php