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/05/31 20:20:32 UTC

[airavata-django-portal] branch master updated (1e58442 -> 05b7241)

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

machristie pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git.


    from 1e58442  AIRAVATA-3049 Fixing query for most recent project when cloning
     new 603efcd  AIRAVATA-3052 Fixing display issue with very long input values
     new 05b7241  AIRAVATA-3016 Fixing user storage dir for shared data products

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 django_airavata/apps/api/data_products_helper.py     | 20 ++++++++++++--------
 django_airavata/apps/api/datastore.py                |  6 +++---
 .../js/components/experiment/ExperimentSummary.vue   |  2 +-
 3 files changed, 16 insertions(+), 12 deletions(-)


[airavata-django-portal] 01/02: AIRAVATA-3052 Fixing display issue with very long input values

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git

commit 603efcd64cf174b861305e1b22e9f6da0d0ad655
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Fri May 31 16:18:19 2019 -0400

    AIRAVATA-3052 Fixing display issue with very long input values
---
 .../js/components/experiment/ExperimentSummary.vue                      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/ExperimentSummary.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/ExperimentSummary.vue
index 72dd87b..424afb6 100644
--- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/ExperimentSummary.vue
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/ExperimentSummary.vue
@@ -159,7 +159,7 @@
                       <li v-for="input in experiment.experimentInputs" :key="input.name">
                         {{ input.name }}:
                         <template v-if="input.type.isSimpleValueType">
-                          {{ input.value }}
+                          <span class="text-break">{{ input.value }}</span>
                         </template>
                         <data-product-viewer v-for="dp in inputDataProducts[input.name]"
                           v-else-if="input.type.isFileValueType"


[airavata-django-portal] 02/02: AIRAVATA-3016 Fixing user storage dir for shared data products

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git

commit 05b7241d1c60bbb1b10add9b4ac4be70ab928f64
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Fri May 31 16:19:59 2019 -0400

    AIRAVATA-3016 Fixing user storage dir for shared data products
---
 django_airavata/apps/api/data_products_helper.py | 20 ++++++++++++--------
 django_airavata/apps/api/datastore.py            |  6 +++---
 2 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/django_airavata/apps/api/data_products_helper.py b/django_airavata/apps/api/data_products_helper.py
index 943ea4b..fe0f0b3 100644
--- a/django_airavata/apps/api/data_products_helper.py
+++ b/django_airavata/apps/api/data_products_helper.py
@@ -59,8 +59,12 @@ def move_input_file_upload(request, data_product, path):
     source_path = _get_replica_filepath(data_product)
     file_name = data_product.productName
     target_path = os.path.join(path, file_name)
-    full_path = datastore.move(request.user.username, source_path, target_path)
-    _delete_data_product(request, source_path)
+    full_path = datastore.move(
+        data_product.ownerName,
+        source_path,
+        request.user.username,
+        target_path)
+    _delete_data_product(data_product.ownerName, source_path)
     data_product = _save_data_product(request, full_path, name=file_name)
     return data_product
 
@@ -68,13 +72,13 @@ def move_input_file_upload(request, data_product, path):
 def open(request, data_product):
     "Return file object for replica if it exists in user storage."
     path = _get_replica_filepath(data_product)
-    return datastore.open(request.user.username, path)
+    return datastore.open(data_product.ownerName, path)
 
 
 def exists(request, data_product):
     "Return True if replica for data_product exists in user storage."
     path = _get_replica_filepath(data_product)
-    return datastore.exists(request.user.username, path)
+    return datastore.exists(data_product.ownerName, path)
 
 
 def dir_exists(request, path):
@@ -99,8 +103,8 @@ def delete(request, data_product):
     "Delete replica for data product in this data store."
     path = _get_replica_filepath(data_product)
     try:
-        datastore.delete(request.user.username, path)
-        _delete_data_product(request, path)
+        datastore.delete(data_product.ownerName, path)
+        _delete_data_product(data_product.ownerName, path)
     except Exception as e:
         logger.exception("Unable to delete file {} for data product uri {}"
                          .format(path, data_product.productUri))
@@ -185,11 +189,11 @@ def _save_data_product(request, full_path, name=None):
     return data_product
 
 
-def _delete_data_product(request, full_path):
+def _delete_data_product(username, full_path):
     # TODO: call API to delete data product from replica catalog when it is
     # available (not currently implemented)
     user_file = models.User_Files.objects.filter(
-        username=request.user.username, file_path=full_path)
+        username=username, file_path=full_path)
     if user_file.exists():
         user_file.delete()
 
diff --git a/django_airavata/apps/api/datastore.py b/django_airavata/apps/api/datastore.py
index 2707db0..2438939 100644
--- a/django_airavata/apps/api/datastore.py
+++ b/django_airavata/apps/api/datastore.py
@@ -41,9 +41,9 @@ def save(username, path, file, name=None):
     return input_file_fullpath
 
 
-def move(username, source_path, target_path):
-    source_full_path = path_(username, source_path)
-    target_full_path = path_(username, target_path)
+def move(source_username, source_path, target_username, target_path):
+    source_full_path = path_(source_username, source_path)
+    target_full_path = path_(target_username, target_path)
     file_move_safe(source_full_path, target_full_path)
     return target_full_path