airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject [airavata-django-portal] 01/02: AIRAVATA-2876 Show all applications (not just accessible ones)
Date Tue, 11 Sep 2018 20:22:53 GMT
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 f7b2ec1c989f6d0d88ea59f35fc9336dab2dd35e
Author: Marcus Christie <machrist@iu.edu>
AuthorDate: Tue Sep 11 13:22:24 2018 -0400

    AIRAVATA-2876 Show all applications (not just accessible ones)
---
 .../django_airavata_admin/src/store/applications/app_modules.js   | 2 +-
 .../apps/api/static/django_airavata_api/js/service_config.js      | 5 +++++
 django_airavata/apps/api/views.py                                 | 8 ++++++++
 3 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/store/applications/app_modules.js
b/django_airavata/apps/admin/static/django_airavata_admin/src/store/applications/app_modules.js
index 7b3f890..e38320a 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/store/applications/app_modules.js
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/store/applications/app_modules.js
@@ -16,7 +16,7 @@ export default {
   },
   actions: {
     loadApplicationModules({ commit }) {
-      return services.ApplicationModuleService.list()
+      return services.ApplicationModuleService.listAll()
         .then(appModules => {
           commit('setModules', appModules);
           return appModules;
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/service_config.js b/django_airavata/apps/api/static/django_airavata_api/js/service_config.js
index 033958a..4782678 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/service_config.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/service_config.js
@@ -90,6 +90,11 @@ export default {
       url: "/api/applications/<lookup>/application_deployments/",
       requestType: 'get',
       modelClass: ApplicationDeploymentDescription
+    }, {
+      name: "listAll",
+      url: "/api/applications/list_all/",
+      requestType: 'get',
+      modelClass: ApplicationModule,
     }],
     modelClass: ApplicationModule,
   },
diff --git a/django_airavata/apps/api/views.py b/django_airavata/apps/api/views.py
index bb0b546..c258574 100644
--- a/django_airavata/apps/api/views.py
+++ b/django_airavata/apps/api/views.py
@@ -308,6 +308,14 @@ class ApplicationModuleViewSet(APIBackedViewSet):
                                                                             context={'request':
request})
         return Response(serializer.data)
 
+    @list_route()
+    def list_all(self, request, format=None):
+        all_modules = self.request.airavata_client.getAllAppModules(
+            self.authz_token, self.gateway_id)
+        serializer = self.serializer_class(
+            all_modules, many=True, context={'request': request})
+        return Response(serializer.data)
+
 
 # TODO convert to APIBackedViewSet
 class RegisterApplicationModule(APIView):


Mime
View raw message