dinukadesilva commented on a change in pull request #52:
URL:
https://github.com/apache/airavata-django-portal/pull/52#discussion_r569924166
##########
File path: django_airavata/apps/api/serializers.py
##########
@@ -513,6 +515,13 @@ def get_isInputFileUpload(self, data_product):
request = self.context['request']
return user_storage.is_input_file(request, data_product)
+ def get_path(self, data_product):
+ """Getter for path field."""
+ if len(data_product.replicaLocations) > 0:
+ return re.sub(r'.*/tmp/[^/]*/', "",
user_storage._get_replica_filepath(data_product))
Review comment:
@machristie Actually the path is needed in the following two
1. If you go to storage and click on one of the files
2. You go to an application, select a file, right-click on the link and open
in a new tab.
It's because the "/api/user-storage/~/$path" endpoint needs the path to be
given as a param. Earlier this was taken from the window URL. But now we had to
change it since the window URL is not yet valid when it's at the experiments
window.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]