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 2018/04/05 14:35:54 UTC
[airavata-django-portal] 03/03: AIRAVATA-2614 Add Application name
to experiment list
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 07c2a280fa614c942ecf7179f6a0a0aa2d5992dd
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Thu Apr 5 10:35:10 2018 -0400
AIRAVATA-2614 Add Application name to experiment list
---
.../js/services/ApplicationInterfaceService.js | 3 ++-
.../js/containers/ExperimentListContainer.vue | 20 ++++++++++++++++----
2 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/services/ApplicationInterfaceService.js b/django_airavata/apps/api/static/django_airavata_api/js/services/ApplicationInterfaceService.js
index 796c666..ce693b7 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/services/ApplicationInterfaceService.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/services/ApplicationInterfaceService.js
@@ -16,7 +16,8 @@ class ApplicationIterfaceService {
}
get(appInterfaceId) {
- // TODO
+ return FetchUtils.get('/api/application-interfaces/' + encodeURIComponent(appInterfaceId) + '/')
+ .then(json => new ApplicationInterfaceDefinition(json))
}
getForAppModuleId(appModuleId) {
diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/containers/ExperimentListContainer.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/containers/ExperimentListContainer.vue
index efaa360..9966940 100644
--- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/containers/ExperimentListContainer.vue
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/containers/ExperimentListContainer.vue
@@ -13,6 +13,7 @@
<thead>
<tr>
<th>Name</th>
+ <th>Application</th>
<th>Creation Time</th>
<th>Status</th>
<th>Actions</th>
@@ -21,6 +22,7 @@
<tbody>
<tr v-for="experiment in experiments" :key="experiment.experimentId">
<td>{{experiment.name}}</td>
+ <td>{{applicationName(experiment)}}</td>
<td><span :title="experiment.creationTime">{{ fromNow(experiment.creationTime) }}</span></td>
<td><experiment-status-badge :statusName="experiment.experimentStatus" /></td>
<td>
@@ -53,6 +55,7 @@ export default {
data () {
return {
experimentsPaginator: null,
+ applicationInterfaces: {},
}
},
components: {
@@ -71,6 +74,18 @@ export default {
},
viewLink: function(experiment) {
return '/workspace/experiments/' + encodeURIComponent(experiment.experimentId) + '/';
+ },
+ applicationName: function(experiment) {
+ if (experiment.executionId in this.applicationInterfaces){
+ if (this.applicationInterfaces[experiment.executionId] instanceof models.ApplicationInterfaceDefinition) {
+ return this.applicationInterfaces[experiment.executionId].applicationName;
+ }
+ } else {
+ const request = services.ApplicationInterfaceService.get(experiment.executionId)
+ .then(result => this.$set(this.applicationInterfaces, experiment.executionId, result));
+ this.$set(this.applicationInterfaces, experiment.executionId, request);
+ }
+ return "...";
}
},
computed: {
@@ -80,10 +95,7 @@ export default {
},
beforeMount: function () {
services.ExperimentSearchService.list(this.initialExperimentsData)
- .then(result => {
- this.experimentsPaginator = result
- console.log("experiments", result.results);
- });
+ .then(result => this.experimentsPaginator = result);
}
}
</script>
--
To stop receiving notification emails like this one, please contact
machristie@apache.org.