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/01/25 18:01:51 UTC
[airavata-django-portal] 03/06: AIRAVATA-3570 Refactor queue settings editor to be usable standalone
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
commit a1d5e9f1b34a5e3f42e8cff92a46e46d037d43c0
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Tue Jan 25 10:41:16 2022 -0500
AIRAVATA-3570 Refactor queue settings editor to be usable standalone
---
.../ExperimentComputeResourceSelector.vue | 23 +-
.../GroupResourceProfileSelector.vue | 5 +-
.../js/web-components/QueueSettingsEditor.vue | 69 ++++--
.../js/web-components/store.js | 268 ++++++++++++++++-----
4 files changed, 273 insertions(+), 92 deletions(-)
diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ExperimentComputeResourceSelector.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ExperimentComputeResourceSelector.vue
index 5a06d88..123f570 100644
--- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ExperimentComputeResourceSelector.vue
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ExperimentComputeResourceSelector.vue
@@ -14,15 +14,20 @@ import ComputeResourceSelector from "./ComputeResourceSelector.vue";
export default {
name: "experiment-compute-resource-selector",
props: {
+ value: {
+ type: String,
+ default: null,
+ },
applicationModuleId: {
type: String,
required: true,
},
},
- data() {
- return {
- initialized: false,
- };
+ created() {
+ this.$store.dispatch("initializeComputeResources", {
+ applicationModuleId: this.applicationModuleId,
+ resourceHostId: this.value,
+ });
},
store: store,
components: {
@@ -45,13 +50,11 @@ export default {
},
},
watch: {
- groupResourceProfileId(groupResourceProfileId) {
- if (!this.initialized && groupResourceProfileId) {
- this.$store.dispatch("initializeComputeResources", {
- applicationModuleId: this.applicationModuleId,
- groupResourceProfileId: groupResourceProfileId,
+ value(value) {
+ if (value && value !== this.resourceHostId) {
+ this.$store.dispatch("updateComputeResourceHostId", {
+ computeResourceId: value,
});
- this.initialized = true;
}
},
},
diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/GroupResourceProfileSelector.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/GroupResourceProfileSelector.vue
index b93fba9..7abd59d 100644
--- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/GroupResourceProfileSelector.vue
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/GroupResourceProfileSelector.vue
@@ -37,10 +37,11 @@ export default {
},
},
store: store,
- async created() {
- await this.$store.dispatch("initializeGroupResourceProfileId", {
+ created() {
+ this.$store.dispatch("initializeGroupResourceProfileId", {
groupResourceProfileId: this.value,
});
+ this.$store.dispatch("loadGroupResourceProfiles");
},
computed: {
...mapGetters(["groupResourceProfileId"]),
diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/QueueSettingsEditor.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/QueueSettingsEditor.vue
index c62e546..e78f4ef 100644
--- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/QueueSettingsEditor.vue
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/QueueSettingsEditor.vue
@@ -12,22 +12,22 @@
<div class="row">
<div class="col">
<h3 class="h5 mb-0">
- {{ nodeCount }}
+ {{ getNodeCount }}
</h3>
<span class="text-muted text-uppercase">NODE COUNT</span>
</div>
<div class="col">
<h3 class="h5 mb-0">
- {{ totalCPUCount }}
+ {{ getTotalCPUCount }}
</h3>
<span class="text-muted text-uppercase">CORE COUNT</span>
</div>
<div class="col">
- <h3 class="h5 mb-0">{{ wallTimeLimit }} minutes</h3>
+ <h3 class="h5 mb-0">{{ getWallTimeLimit }} minutes</h3>
<span class="text-muted text-uppercase">TIME LIMIT</span>
</div>
<div class="col" v-if="maxMemory > 0">
- <h3 class="h5 mb-0">{{ totalPhysicalMemory }} MB</h3>
+ <h3 class="h5 mb-0">{{ getTotalPhysicalMemory }} MB</h3>
<span class="text-muted text-uppercase">PHYSICAL MEMORY</span>
</div>
</div>
@@ -52,7 +52,7 @@
type="number"
min="1"
:max="maxAllowedNodes"
- :value="nodeCount"
+ :value="getNodeCount"
required
@input.native.stop="updateNodeCount"
>
@@ -68,7 +68,7 @@
type="number"
min="1"
:max="maxAllowedCores"
- :value="totalCPUCount"
+ :value="getTotalCPUCount"
required
@input.native.stop="updateTotalCPUCount"
>
@@ -88,7 +88,7 @@
type="number"
min="1"
:max="maxAllowedWalltime"
- :value="wallTimeLimit"
+ :value="getWallTimeLimit"
required
@input.native.stop="updateWallTimeLimit"
>
@@ -110,7 +110,7 @@
type="number"
min="0"
:max="maxMemory"
- :value="totalPhysicalMemory"
+ :value="getTotalPhysicalMemory"
@input.native.stop="updateTotalPhysicalMemory"
>
</b-form-input>
@@ -144,11 +144,27 @@ export default {
queueName: {
type: String,
},
+ nodeCount: {
+ type: String,
+ },
+ "total-cpu-count": {
+ type: String,
+ },
+ wallTimeLimit: {
+ type: String
+ },
+ totalPhysicalMemory: {
+ type: String
+ }
},
created() {
- if (this.queueName && this.selectedQueueName !== this.queueName) {
- this.queueChanged(this.queueName);
- }
+ this.$store.dispatch("initializeQueueSettings", {
+ queueName: this.queueName,
+ nodeCount: this.nodeCount,
+ totalCPUCount: this.totalCPUCount,
+ wallTimeLimit: this.wallTimeLimit,
+ totalPhysicalMemory: this.totalPhysicalMemory,
+ });
},
data() {
return {
@@ -164,11 +180,14 @@ export default {
maxAllowedWalltime: "maxAllowedWalltime",
maxMemory: "maxMemory",
selectedQueueName: "queueName",
- totalCPUCount: "totalCPUCount",
- nodeCount: "nodeCount",
- wallTimeLimit: "wallTimeLimit",
- totalPhysicalMemory: "totalPhysicalMemory",
+ getTotalCPUCount: "totalCPUCount",
+ getNodeCount: "nodeCount",
+ getWallTimeLimit: "wallTimeLimit",
+ getTotalPhysicalMemory: "totalPhysicalMemory",
}),
+ totalCPUCount() {
+ return this.totalCpuCount
+ },
queueOptions() {
if (!this.queues) {
return [];
@@ -217,6 +236,26 @@ export default {
this.queueChanged(value);
}
},
+ nodeCount(value) {
+ if (value && this.getNodeCount !== value) {
+ this.$store.dispatch("updateNodeCount", {nodeCount: value})
+ }
+ },
+ totalCPUCount(value) {
+ if (value && this.getTotalCPUCount !== value) {
+ this.$store.dispatch("updateTotalCPUCount", {totalCPUCount: value})
+ }
+ },
+ wallTimeLimit(value) {
+ if (value && this.getWallTimeLimit !== value) {
+ this.$store.dispatch("updateWallTimeLimit", {wallTimeLimit: value})
+ }
+ },
+ totalPhysicalMemory(value) {
+ if (value && this.getTotalPhysicalMemory !== value) {
+ this.$store.dispatch("updateTotalPhysicalMemory", {totalPhysicalMemory: value})
+ }
+ },
},
};
</script>
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 68d1a13..debc4cd 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
@@ -7,6 +7,17 @@ Vue.use(Vuex);
const PROMISES = {
workspacePreferences: null,
};
+let groupResourceProfileIdIsSet = false;
+let resourceHostIdIsSet = false;
+let queueSettingsAreSet = false;
+let applicationModuleIdIsSet = false;
+
+const areAllComputeResourceSettingsSet = () =>
+ groupResourceProfileIdIsSet &&
+ resourceHostIdIsSet &&
+ queueSettingsAreSet &&
+ applicationModuleIdIsSet;
+
export const mutations = {
setExperiment(state, { experiment }) {
state.experiment = experiment;
@@ -25,34 +36,54 @@ export const mutations = {
},
updateExperimentGroupResourceProfileId(state, { groupResourceProfileId }) {
state.experiment.userConfigurationData.groupResourceProfileId = groupResourceProfileId;
+ groupResourceProfileIdIsSet = true;
},
updateGroupResourceProfileId(state, { groupResourceProfileId }) {
state.groupResourceProfileId = groupResourceProfileId;
+ groupResourceProfileIdIsSet = true;
},
updateExperimentResourceHostId(state, { resourceHostId }) {
state.experiment.userConfigurationData.computationalResourceScheduling.resourceHostId = resourceHostId;
+ resourceHostIdIsSet = true;
},
updateResourceHostId(state, { resourceHostId }) {
state.resourceHostId = resourceHostId;
+ resourceHostIdIsSet = true;
},
- updateQueueName(state, { queueName }) {
+ updateExperimentQueueName(state, { queueName }) {
state.experiment.userConfigurationData.computationalResourceScheduling.queueName = queueName;
+ // Assume all queue settings are initialized at once
+ queueSettingsAreSet = true;
},
- setLazyQueueName(state, { queueName }) {
+ updateQueueName(state, { queueName }) {
state.queueName = queueName;
+ // Assume all queue settings are initialized at once
+ queueSettingsAreSet = true;
},
- updateTotalCPUCount(state, { totalCPUCount }) {
+ updateExperimentTotalCPUCount(state, { totalCPUCount }) {
state.experiment.userConfigurationData.computationalResourceScheduling.totalCPUCount = totalCPUCount;
},
- updateNodeCount(state, { nodeCount }) {
+ updateExperimentNodeCount(state, { nodeCount }) {
state.experiment.userConfigurationData.computationalResourceScheduling.nodeCount = nodeCount;
},
- updateWallTimeLimit(state, { wallTimeLimit }) {
+ updateExperimentWallTimeLimit(state, { wallTimeLimit }) {
state.experiment.userConfigurationData.computationalResourceScheduling.wallTimeLimit = wallTimeLimit;
},
- updateTotalPhysicalMemory(state, { totalPhysicalMemory }) {
+ updateExperimentTotalPhysicalMemory(state, { totalPhysicalMemory }) {
state.experiment.userConfigurationData.computationalResourceScheduling.totalPhysicalMemory = totalPhysicalMemory;
},
+ updateTotalCPUCount(state, { totalCPUCount }) {
+ state.totalCPUCount = totalCPUCount;
+ },
+ updateNodeCount(state, { nodeCount }) {
+ state.nodeCount = nodeCount;
+ },
+ updateWallTimeLimit(state, { wallTimeLimit }) {
+ state.wallTimeLimit = wallTimeLimit;
+ },
+ updateTotalPhysicalMemory(state, { totalPhysicalMemory }) {
+ state.totalPhysicalMemory = totalPhysicalMemory;
+ },
setProjects(state, { projects }) {
state.projects = projects;
},
@@ -67,6 +98,7 @@ export const mutations = {
},
setApplicationModuleId(state, { applicationModuleId }) {
state.applicationModuleId = applicationModuleId;
+ applicationModuleIdIsSet = true;
},
setApplicationDeployments(state, { applicationDeployments }) {
state.applicationDeployments = applicationDeployments;
@@ -118,6 +150,7 @@ export const actions = {
await Promise.all([
dispatch("loadProjects"),
dispatch("loadWorkspacePreferences"),
+ dispatch("loadGroupResourceProfiles"),
]);
if (!state.experiment.projectId) {
@@ -126,15 +159,20 @@ export const actions = {
});
}
- let groupResourceProfileId =
- state.experiment.userConfigurationData.groupResourceProfileId;
- await dispatch("initializeGroupResourceProfileId", {
- groupResourceProfileId,
- });
+ // Since experiment is set, all of the compute resource settings are now
+ // assumed to be initialized so we can do the cross component initialization
+ dispatch("initializeComputeResourceSettings");
+ },
+ async initializeComputeResourceSettings({ dispatch, getters }) {
+ // This method initializes GroupResourceProfile, ApplicationDeployments and
+ // Queue settings at once since there they are interdependent.
+ // This method should only be called after groupResourceProfileId,
+ // resourceHostId, queue settings and applicationModuleId are all set (see
+ // areAllComputeResourceSettingsSet).
- groupResourceProfileId =
- state.experiment.userConfigurationData.groupResourceProfileId;
- // If experiment has a group resource profile, load additional necessary
+ await dispatch("initializeGroupResourceProfile");
+ const groupResourceProfileId = getters.groupResourceProfileId;
+ // If there is a group resource profile, load additional necessary
// data and re-apply group resource profile
if (groupResourceProfileId) {
await dispatch("loadApplicationDeployments");
@@ -142,16 +180,14 @@ export const actions = {
await dispatch("applyGroupResourceProfile");
}
},
- async initializeGroupResourceProfileId(
- { commit, dispatch, getters, state },
- { groupResourceProfileId = null }
- ) {
+ async initializeGroupResourceProfile({ commit, dispatch, getters, state }) {
await dispatch("loadGroupResourceProfiles");
await dispatch("loadWorkspacePreferences");
- let result = groupResourceProfileId;
+ let result = getters.groupResourceProfileId;
+
if (
- !groupResourceProfileId ||
- !getters.findGroupResourceProfile(groupResourceProfileId)
+ !getters.groupResourceProfileId ||
+ !getters.findGroupResourceProfile(getters.groupResourceProfileId)
) {
// Figure out a default value for groupResourceProfileId
if (
@@ -177,6 +213,23 @@ export const actions = {
});
}
},
+ async initializeGroupResourceProfileId(
+ { commit, dispatch, state },
+ { groupResourceProfileId }
+ ) {
+ if (state.experiment) {
+ commit("updateExperimentGroupResourceProfileId", {
+ groupResourceProfileId,
+ });
+ } else {
+ commit("updateGroupResourceProfileId", {
+ groupResourceProfileId,
+ });
+ }
+ if (areAllComputeResourceSettingsSet()) {
+ dispatch("initializeComputeResourceSettings");
+ }
+ },
updateExperimentName({ commit }, { name }) {
commit("updateExperimentName", { name });
},
@@ -198,56 +251,106 @@ export const actions = {
} else {
commit("updateGroupResourceProfileId", { groupResourceProfileId });
}
- if (oldValue !== groupResourceProfileId && state.applicationModuleId) {
+ if (oldValue !== groupResourceProfileId) {
await dispatch("loadApplicationDeployments");
await dispatch("applyGroupResourceProfile");
}
},
async updateComputeResourceHostId(
- { commit, dispatch, getters },
+ { commit, dispatch, getters, state },
{ resourceHostId }
) {
if (getters.resourceHostId !== resourceHostId) {
- commit("updateResourceHostId", { resourceHostId });
+ if (state.experiment) {
+ commit("updateExperimentResourceHostId", { resourceHostId });
+ } else {
+ commit("updateResourceHostId", { resourceHostId });
+ }
await dispatch("loadAppDeploymentQueues");
await dispatch("setDefaultQueue");
}
},
- updateQueueName({ commit, dispatch, state }, { queueName }) {
+ async initializeQueueSettings(
+ { commit, dispatch, state },
+ { queueName, nodeCount, totalCPUCount, wallTimeLimit, totalPhysicalMemory }
+ ) {
if (state.experiment) {
+ commit("updateExperimentQueueName", { queueName });
+ commit("updateExperimentNodeCount", { nodeCount });
+ commit("updateExperimentTotalCPUCount", { totalCPUCount });
+ commit("updateExperimentWallTimeLimit", { wallTimeLimit });
+ commit("updateExperimentTotalPhysicalMemory", { totalPhysicalMemory });
+ } else {
commit("updateQueueName", { queueName });
- dispatch("initializeQueue");
+ commit("updateNodeCount", { nodeCount });
+ commit("updateTotalCPUCount", { totalCPUCount });
+ commit("updateWallTimeLimit", { wallTimeLimit });
+ commit("updateTotalPhysicalMemory", { totalPhysicalMemory });
+ }
+
+ if (areAllComputeResourceSettingsSet()) {
+ dispatch("initializeComputeResourceSettings");
+ }
+ },
+ updateQueueName({ commit, dispatch, state }, { queueName }) {
+ if (state.experiment) {
+ commit("updateExperimentQueueName", { queueName });
} else {
- commit("setLazyQueueName", { queueName });
+ commit("updateQueueName", { queueName });
}
+ dispatch("initializeQueue");
},
- updateTotalCPUCount({ commit, getters }, { totalCPUCount }) {
- commit("updateTotalCPUCount", { totalCPUCount });
+ updateTotalCPUCount({ commit, getters, state }, { totalCPUCount }) {
+ if (state.experiment) {
+ commit("updateExperimentTotalCPUCount", { totalCPUCount });
+ } else {
+ commit("updateTotalCPUCount", { totalCPUCount });
+ }
if (getters.queue.cpuPerNode > 0) {
const totalCPUCountInt = parseInt(totalCPUCount);
const nodeCount = Math.min(
Math.ceil(totalCPUCountInt / getters.queue.cpuPerNode),
getters.maxAllowedNodes
);
- commit("updateNodeCount", { nodeCount });
+ if (state.experiment) {
+ commit("updateExperimentNodeCount", { nodeCount });
+ } else {
+ commit("updateNodeCount", { nodeCount });
+ }
}
},
- updateNodeCount({ commit, getters }, { nodeCount }) {
- commit("updateNodeCount", { nodeCount });
+ updateNodeCount({ commit, getters, state }, { nodeCount }) {
+ if (state.experiment) {
+ commit("updateExperimentNodeCount", { nodeCount });
+ } else {
+ commit("updateNodeCount", { nodeCount });
+ }
if (getters.queue.cpuPerNode > 0) {
const nodeCountInt = parseInt(nodeCount);
const totalCPUCount = Math.min(
nodeCountInt * getters.queue.cpuPerNode,
getters.maxAllowedCores
);
- commit("updateTotalCPUCount", { totalCPUCount });
+ if (state.experiment) {
+ commit("updateExperimentTotalCPUCount", { totalCPUCount });
+ } else {
+ commit("updateTotalCPUCount", { totalCPUCount });
+ }
}
},
- updateWallTimeLimit({ commit }, { wallTimeLimit }) {
- commit("updateWallTimeLimit", { wallTimeLimit });
+ updateWallTimeLimit({ commit, state }, { wallTimeLimit }) {
+ if (state.experiment) {
+ commit("updateExperimentWallTimeLimit", { wallTimeLimit });
+ } else {
+ commit("updateWallTimeLimit", { wallTimeLimit });
+ }
},
- updateTotalPhysicalMemory({ commit }, { totalPhysicalMemory }) {
- commit("updateTotalPhysicalMemory", { totalPhysicalMemory });
+ updateTotalPhysicalMemory({ commit, state }, { totalPhysicalMemory }) {
+ if (state.experiment) {
+ commit("updateExperimentTotalPhysicalMemory", { totalPhysicalMemory });
+ } else {
+ commit("updateTotalPhysicalMemory", { totalPhysicalMemory });
+ }
},
async loadApplicationDeployments({ commit, getters, state }) {
const applicationDeployments = await services.ApplicationDeploymentService.list(
@@ -285,15 +388,21 @@ export const actions = {
}
},
async initializeComputeResources(
- { commit, dispatch },
- { applicationModuleId, groupResourceProfileId }
+ { commit, dispatch, state },
+ { applicationModuleId, resourceHostId }
) {
commit("setApplicationModuleId", { applicationModuleId });
-
- if (groupResourceProfileId) {
- await dispatch("loadApplicationDeployments");
- await dispatch("loadAppDeploymentQueues");
- await dispatch("applyGroupResourceProfile");
+ if (state.experiment) {
+ commit("updateExperimentResourceHostId", {
+ resourceHostId,
+ });
+ } else {
+ commit("updateResourceHostId", {
+ resourceHostId,
+ });
+ }
+ if (areAllComputeResourceSettingsSet()) {
+ dispatch("initializeComputeResourceSettings");
}
},
async initializeResourceHostId({ commit, dispatch, getters, state }) {
@@ -359,24 +468,48 @@ export const actions = {
dispatch("updateQueueName", { queueName: null });
}
},
- initializeQueue({ commit, getters }) {
+ initializeQueue({ commit, getters, state }) {
const queue = getters.queue;
if (queue) {
- commit("updateTotalCPUCount", {
- totalCPUCount: getters.getDefaultCPUCount(queue),
- });
- commit("updateNodeCount", {
- nodeCount: getters.getDefaultNodeCount(queue),
- });
- commit("updateWallTimeLimit", {
- wallTimeLimit: getters.getDefaultWalltime(queue),
- });
- commit("updateTotalPhysicalMemory", { totalPhysicalMemory: 0 });
+ if (state.experiment) {
+ commit("updateExperimentTotalCPUCount", {
+ totalCPUCount: getters.getDefaultCPUCount(queue),
+ });
+ commit("updateExperimentNodeCount", {
+ nodeCount: getters.getDefaultNodeCount(queue),
+ });
+ commit("updateExperimentWallTimeLimit", {
+ wallTimeLimit: getters.getDefaultWalltime(queue),
+ });
+ commit("updateExperimentTotalPhysicalMemory", {
+ totalPhysicalMemory: 0,
+ });
+ } else {
+ commit("updateTotalCPUCount", {
+ totalCPUCount: getters.getDefaultCPUCount(queue),
+ });
+ commit("updateNodeCount", {
+ nodeCount: getters.getDefaultNodeCount(queue),
+ });
+ commit("updateWallTimeLimit", {
+ wallTimeLimit: getters.getDefaultWalltime(queue),
+ });
+ commit("updateTotalPhysicalMemory", { totalPhysicalMemory: 0 });
+ }
} else {
- commit("updateTotalCPUCount", { totalCPUCount: 0 });
- commit("updateNodeCount", { nodeCount: 0 });
- commit("updateWallTimeLimit", { wallTimeLimit: 0 });
- commit("updateTotalPhysicalMemory", { totalPhysicalMemory: 0 });
+ if (state.experiment) {
+ commit("updateExperimentTotalCPUCount", { totalCPUCount: 0 });
+ commit("updateExperimentNodeCount", { nodeCount: 0 });
+ commit("updateExperimentWallTimeLimit", { wallTimeLimit: 0 });
+ commit("updateExperimentTotalPhysicalMemory", {
+ totalPhysicalMemory: 0,
+ });
+ } else {
+ commit("updateTotalCPUCount", { totalCPUCount: 0 });
+ commit("updateNodeCount", { nodeCount: 0 });
+ commit("updateWallTimeLimit", { wallTimeLimit: 0 });
+ commit("updateTotalPhysicalMemory", { totalPhysicalMemory: 0 });
+ }
}
},
applyBatchQueueResourcePolicy({ commit, getters }) {
@@ -555,7 +688,7 @@ export const getters = {
state.experiment.userConfigurationData.computationalResourceScheduling
? state.experiment.userConfigurationData.computationalResourceScheduling
.queueName
- : null;
+ : state.queueName;
},
totalCPUCount: (state) => {
return state.experiment &&
@@ -563,7 +696,7 @@ export const getters = {
state.experiment.userConfigurationData.computationalResourceScheduling
? state.experiment.userConfigurationData.computationalResourceScheduling
.totalCPUCount
- : null;
+ : state.totalCPUCount;
},
nodeCount: (state) => {
return state.experiment &&
@@ -571,7 +704,7 @@ export const getters = {
state.experiment.userConfigurationData.computationalResourceScheduling
? state.experiment.userConfigurationData.computationalResourceScheduling
.nodeCount
- : null;
+ : state.nodeCount;
},
wallTimeLimit: (state) => {
return state.experiment &&
@@ -579,7 +712,7 @@ export const getters = {
state.experiment.userConfigurationData.computationalResourceScheduling
? state.experiment.userConfigurationData.computationalResourceScheduling
.wallTimeLimit
- : null;
+ : state.wallTimeLimit;
},
totalPhysicalMemory: (state) => {
return state.experiment &&
@@ -587,7 +720,7 @@ export const getters = {
state.experiment.userConfigurationData.computationalResourceScheduling
? state.experiment.userConfigurationData.computationalResourceScheduling
.totalPhysicalMemory
- : null;
+ : state.totalPhysicalMemory;
},
queue: (state, getters) => {
return getters.queues && getters.queueName
@@ -703,8 +836,13 @@ export default new Vuex.Store({
applicationModuleId: null,
appDeploymentQueues: [],
workspacePreferences: null,
- // Lazy state fields that will be copied to the experiment once it is loaded
+ // These state variables are to enable using UI components outside of a
+ // normal experiment editing context
queueName: null,
+ nodeCount: null,
+ totalCPUCount: null,
+ wallTimeLimit: null,
+ totalPhysicalMemory: null,
groupResourceProfileId: null,
resourceHostId: null,
},