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/12/27 19:54:06 UTC
[airavata-django-portal] 03/03: AIRAVATA-2761 Error reporting for
misconfigured dependencies
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 4a06b004aba3d2288b2cd66ee3966d39b2a8336b
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Thu Dec 27 14:53:05 2018 -0500
AIRAVATA-2761 Error reporting for misconfigured dependencies
---
.../js/containers/CreateExperimentContainer.vue | 41 ++++++++++++++--------
.../js/entry-create-experiment.js | 3 ++
2 files changed, 30 insertions(+), 14 deletions(-)
diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/containers/CreateExperimentContainer.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/containers/CreateExperimentContainer.vue
index 49a0347..b4d4d6c 100644
--- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/containers/CreateExperimentContainer.vue
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/containers/CreateExperimentContainer.vue
@@ -1,11 +1,21 @@
<template>
- <experiment-editor v-if="experiment" :experiment="experiment" :app-module="appModule" @saved="handleSavedExperiment" @savedAndLaunched="handleSavedAndLaunchedExperiment">
- <span slot="title">Create a New Experiment</span>
- </experiment-editor>
+ <div>
+ <notifications-display />
+ <experiment-editor
+ v-if="experiment"
+ :experiment="experiment"
+ :app-module="appModule"
+ @saved="handleSavedExperiment"
+ @savedAndLaunched="handleSavedAndLaunchedExperiment"
+ >
+ <span slot="title">Create a New Experiment</span>
+ </experiment-editor>
+ </div>
</template>
<script>
import { models, services } from "django-airavata-api";
+import { components, notifications } from "django-airavata-common-ui";
import ExperimentEditor from "../components/experiment/ExperimentEditor.vue";
import moment from "moment";
@@ -20,14 +30,13 @@ export default {
};
},
components: {
- "experiment-editor": ExperimentEditor
+ "experiment-editor": ExperimentEditor,
+ "notifications-display": components.NotificationsDisplay
},
methods: {
handleSavedExperiment: function(experiment) {
// Redirect to experiment view
- window.location.assign(
- "/workspace/experiments"
- );
+ window.location.assign("/workspace/experiments");
},
handleSavedAndLaunchedExperiment: function(experiment) {
// Redirect to experiment view
@@ -41,22 +50,26 @@ export default {
computed: {},
mounted: function() {
const experiment = new models.Experiment();
- const loadAppModule = services.ApplicationModuleService.retrieve({
- lookup: this.appModuleId
- }).then(appModule => {
+ const loadAppModule = services.ApplicationModuleService.retrieve(
+ { lookup: this.appModuleId },
+ { ignoreErrors: true }
+ ).then(appModule => {
experiment.experimentName =
appModule.appModuleName + " on " + moment().format("lll");
this.appModule = appModule;
});
const loadAppInterface = services.ApplicationModuleService.getApplicationInterface(
- { lookup: this.appModuleId }
+ { lookup: this.appModuleId },
+ { ignoreErrors: true }
).then(appInterface => {
experiment.populateInputsOutputsFromApplicationInterface(appInterface);
experiment.executionId = appInterface.applicationInterfaceId;
});
- Promise.all([loadAppModule, loadAppInterface]).then(
- () => (this.experiment = experiment)
- );
+ Promise.all([loadAppModule, loadAppInterface])
+ .then(() => (this.experiment = experiment))
+ .catch(error => {
+ notifications.NotificationList.addError(error);
+ });
}
};
</script>
diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/entry-create-experiment.js b/django_airavata/apps/workspace/static/django_airavata_workspace/js/entry-create-experiment.js
index 6c68f7a..6806332 100644
--- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/entry-create-experiment.js
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/entry-create-experiment.js
@@ -1,6 +1,9 @@
import Vue from 'vue'
import BootstrapVue from 'bootstrap-vue'
import CreateExperimentContainer from './containers/CreateExperimentContainer.vue'
+import { errors } from "django-airavata-common-ui";
+
+errors.GlobalErrorHandler.init();
// This is imported globally on the website so no need to include it again in this view
// import 'bootstrap/dist/css/bootstrap.css'