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/07/07 14:25:04 UTC

[airavata-django-portal] branch develop updated: AIRAVATA-3428 Reload app interface when it changes

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 a754a55  AIRAVATA-3428 Reload app interface when it changes
a754a55 is described below

commit a754a553cee84319d120e1fe46f29c31ae168a86
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Wed Jul 7 10:23:56 2021 -0400

    AIRAVATA-3428 Reload app interface when it changes
---
 .../common/js/components/ApplicationName.vue       | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/django_airavata/static/common/js/components/ApplicationName.vue b/django_airavata/static/common/js/components/ApplicationName.vue
index 00eded5..6fc425b 100644
--- a/django_airavata/static/common/js/components/ApplicationName.vue
+++ b/django_airavata/static/common/js/components/ApplicationName.vue
@@ -18,12 +18,17 @@ export default {
     };
   },
   created() {
-    services.ApplicationInterfaceService.retrieve(
-      { lookup: this.applicationInterfaceId },
-      { ignoreErrors: true, cache: true }
-    )
-      .then((appInterface) => (this.applicationInterface = appInterface))
-      .catch(() => (this.notAvailable = true));
+    this.loadApplicationInterface();
+  },
+  methods: {
+    loadApplicationInterface() {
+      services.ApplicationInterfaceService.retrieve(
+        { lookup: this.applicationInterfaceId },
+        { ignoreErrors: true, cache: true }
+      )
+        .then((appInterface) => (this.applicationInterface = appInterface))
+        .catch(() => (this.notAvailable = true));
+    },
   },
   computed: {
     applicationName() {
@@ -36,5 +41,10 @@ export default {
       }
     },
   },
+  watch: {
+    applicationInterfaceId() {
+      this.loadApplicationInterface();
+    },
+  },
 };
 </script>