From commits-return-19479-archive-asf-public=cust-asf.ponee.io@airavata.apache.org Wed Jul 18 00:30:20 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id EC54F18067E for ; Wed, 18 Jul 2018 00:30:19 +0200 (CEST) Received: (qmail 95637 invoked by uid 500); 17 Jul 2018 22:30:19 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 95628 invoked by uid 99); 17 Jul 2018 22:30:19 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jul 2018 22:30:19 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 544FD81EBD; Tue, 17 Jul 2018 22:30:18 +0000 (UTC) Date: Tue, 17 Jul 2018 22:30:20 +0000 To: "commits@airavata.apache.org" Subject: [airavata-django-portal] 02/02: AIRAVATA-2805 Add ShareButton to App Deployments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: machristie@apache.org In-Reply-To: <153186661825.20983.8100983412598816686@gitbox.apache.org> References: <153186661825.20983.8100983412598816686@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: airavata-django-portal X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Rev: 240c7d31750a60e8ffc04b2334d5f7f68ce5e17e X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20180717223018.544FD81EBD@gitbox.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 240c7d31750a60e8ffc04b2334d5f7f68ce5e17e Author: Marcus Christie AuthorDate: Tue Jul 17 18:30:09 2018 -0400 AIRAVATA-2805 Add ShareButton to App Deployments --- .../components/admin/ApplicationDeployments.vue | 23 ++++++++++++++++------ django_airavata/apps/api/views.py | 1 + 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/ApplicationDeployments.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/ApplicationDeployments.vue index 41b7d7f..54317b0 100644 --- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/ApplicationDeployments.vue +++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/ApplicationDeployments.vue @@ -2,12 +2,15 @@

Application Deployments

-
+
Select an Application Deployment to Edit
+
+ +
Application module
@@ -131,12 +134,16 @@ import Loading from '../Loading.vue' import Utils from '../../utils' + import {components as comps} from 'django-airavata-common-ui' + import DjangoAiravataAPI from 'django-airavata-api' const {mapGetters, mapActions} = createNamespacedHelpers('newApplication/appDeploymentsTab') export default { components: { - NewApplicationButtons,Loading + NewApplicationButtons, + Loading, + "share-button": comps.ShareButton, }, mounted: function () { this.initializeAppDeployment(()=>{ @@ -145,13 +152,12 @@ }) }, data: function () { - var appDeployments = this.getCompleteData - console.log("Application Deployment Data", appDeployments) return { - "appDeployments": appDeployments, + "appDeployments": this.getCompleteData ? this.getCompleteData : {}, "computeHosts":[], "queues":[], - "appDeploymentIndex":null + "appDeploymentIndex":null, + sharedEntity: null, } }, computed: { @@ -214,6 +220,11 @@ var temp=this.appDeployments.appDeployments[value] temp.appDeployments=this.appDeployments.appDeployments this.appDeployments=temp + }, + "appDeployments.appDeploymentId": function (value) { + DjangoAiravataAPI.services.ServiceFactory.service("SharedEntities") + .retrieve({lookup: value}) + .then(sharedEntity => this.sharedEntity = sharedEntity); } } } diff --git a/django_airavata/apps/api/views.py b/django_airavata/apps/api/views.py index 791e972..c40bf7f 100644 --- a/django_airavata/apps/api/views.py +++ b/django_airavata/apps/api/views.py @@ -739,6 +739,7 @@ class SharedEntityViewSet(mixins.RetrieveModelMixin, GenericAPIBackedViewSet): serializer_class = serializers.SharedEntitySerializer lookup_field = 'entity_id' + lookup_value_regex = '[^/]+' def get_instance(self, lookup_value): users = {}