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 2022/05/18 16:44:25 UTC
[airavata-django-portal] branch develop updated: AIRAVATA-3576 Load application interface when using standalone web components
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 58298b09 AIRAVATA-3576 Load application interface when using standalone web components
58298b09 is described below
commit 58298b09ade127a07021646564fb3a251fb8617f
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Wed May 18 12:44:16 2022 -0400
AIRAVATA-3576 Load application interface when using standalone web components
---
.../js/web-components/store.js | 25 ++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/store.js b/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/store.js
index 01a181cc..1e1053d5 100644
--- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/store.js
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/store.js
@@ -113,12 +113,10 @@ export const actions = {
const applicationModule = await services.ApplicationModuleService.retrieve({
lookup: applicationId,
});
- const applicationInterface = await services.ApplicationModuleService.getApplicationInterface(
- {
- lookup: applicationId,
- }
+ const applicationInterface = await dispatch(
+ "initializeApplicationInterface",
+ { applicationModuleId: applicationId }
);
- commit("setApplicationInterface", { applicationInterface });
const experiment = applicationInterface.createExperiment();
const currentDate = new Date().toLocaleString([], {
dateStyle: "medium",
@@ -168,7 +166,7 @@ export const actions = {
// assumed to be initialized so we can do the cross component initialization
dispatch("initializeComputeResourceSettings");
},
- async initializeComputeResourceSettings({ dispatch, getters }) {
+ async initializeComputeResourceSettings({ dispatch, getters, state }) {
// This method initializes GroupResourceProfile, ApplicationDeployments and
// Queue settings at once since there they are interdependent.
// This method should only be called after groupResourceProfileId,
@@ -176,6 +174,12 @@ export const actions = {
// areAllComputeResourceSettingsSet).
await dispatch("initializeGroupResourceProfile");
+ // applicationInterface is initialized already when creating/editing an
+ // experiment but needs to be done explicitly when using other web
+ // components standalone
+ await dispatch("initializeApplicationInterface", {
+ applicationModuleId: state.applicationModuleId,
+ });
const groupResourceProfileId = getters.groupResourceProfileId;
// If there is a group resource profile, load additional necessary
// data and re-apply group resource profile
@@ -185,6 +189,15 @@ export const actions = {
await dispatch("applyGroupResourceProfile");
}
},
+ async initializeApplicationInterface({ commit }, { applicationModuleId }) {
+ const applicationInterface = await services.ApplicationModuleService.getApplicationInterface(
+ {
+ lookup: applicationModuleId,
+ }
+ );
+ commit("setApplicationInterface", { applicationInterface });
+ return applicationInterface;
+ },
async initializeGroupResourceProfile({ commit, dispatch, getters, state }) {
await dispatch("loadGroupResourceProfiles");
await dispatch("loadWorkspacePreferences");