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 2021/09/28 20:05:30 UTC
[airavata-django-portal] branch develop updated: AIRAVATA-3516
Disable download directory links when too large
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
The following commit(s) were added to refs/heads/develop by this push:
new d15277e AIRAVATA-3516 Disable download directory links when too large
d15277e is described below
commit d15277e784bb7285fe1dc71bb027691f34c6f8c7
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Tue Sep 28 16:03:58 2021 -0400
AIRAVATA-3516 Disable download directory links when too large
---
.../js/components/storage/UserStoragePathViewer.vue | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/storage/UserStoragePathViewer.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/storage/UserStoragePathViewer.vue
index 53d475e..ffa4541 100644
--- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/storage/UserStoragePathViewer.vue
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/storage/UserStoragePathViewer.vue
@@ -65,10 +65,12 @@
Download File
<i class="fa fa-download" aria-hidden="true"></i>
</b-link>
+ <!-- max download directory size is 1GB, see airavata_django_portal_sdk/views.py -->
<b-link
v-if="data.item.type === 'dir'"
class="action-link"
:href="`/sdk/download-dir?path=${data.item.path}`"
+ :disabled="data.item.size >= Math.pow(10, 9)"
>
Download Zip
<i class="fa fa-file-archive" aria-hidden="true"></i>
@@ -238,4 +240,8 @@ export default {
.action-link + .delete-link {
margin-left: 0.25rem;
}
+a.disabled {
+ pointer-events: none;
+ color: var(--secondary);
+}
</style>