@abi-software/simulationvuer 0.5.4 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/simulationvuer.common.js +107 -98
- package/dist/simulationvuer.common.js.map +1 -1
- package/dist/simulationvuer.css +1 -1
- package/dist/simulationvuer.umd.js +107 -98
- package/dist/simulationvuer.umd.js.map +1 -1
- package/dist/simulationvuer.umd.min.js +1 -1
- package/dist/simulationvuer.umd.min.js.map +1 -1
- package/package-lock.json +15530 -0
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/App.vue +0 -2
- package/src/components/SimulationVuer.vue +39 -29
package/package.json
CHANGED
package/src/.DS_Store
ADDED
|
Binary file
|
package/src/App.vue
CHANGED
|
@@ -37,14 +37,12 @@ export default {
|
|
|
37
37
|
},
|
|
38
38
|
normalEntry: {
|
|
39
39
|
dataset: "https://sparc.science/datasets/135?type=dataset",
|
|
40
|
-
discoverId: 135,
|
|
41
40
|
description: "CellML version of the Fabbri et al. 2017 mathematical model of the spontaneous electrical activity of a human sinoatrial node (SAN) pacemaker cell",
|
|
42
41
|
name: "Computational analysis of the human sinus node action potential - Model development and effects of mutations",
|
|
43
42
|
resource: "https://models.physiomeproject.org/workspace/486/rawfile/55879cbc485e2d4c41f3dc6d60424b849f94c4ee/HumanSAN_Fabbri_Fantini_Wilders_Severi_2017.cellml",
|
|
44
43
|
},
|
|
45
44
|
compositeEntry: {
|
|
46
45
|
dataset: "https://sparc.science/datasets/157?type=dataset",
|
|
47
|
-
discoverId: 157,
|
|
48
46
|
description: "CellML version of the Fabbri et al. 2017 human sinoatrial node (SAN) cell model and an ODE-based version of the Gerstner & Kistler 2002 brain stem model combined to demonstrate the effect of brain stem activity on heart rate",
|
|
49
47
|
name: "Fabbri-based composite SAN model",
|
|
50
48
|
resource: "https://models.physiomeproject.org/workspace/698/rawfile/f3fc911063ac72ed44e84c0c5af28df41c25d452/fabbri_et_al_based_composite_SAN_model.sedml",
|
|
@@ -178,48 +178,58 @@ export default {
|
|
|
178
178
|
},
|
|
179
179
|
},
|
|
180
180
|
created: function() {
|
|
181
|
-
|
|
182
|
-
this.showUserMessage = true;
|
|
181
|
+
let url = document.createElement("a");
|
|
183
182
|
|
|
184
|
-
|
|
183
|
+
url.href = this.entry.dataset;
|
|
185
184
|
|
|
186
|
-
let
|
|
185
|
+
let datasetId = url.pathname.replace("/datasets/", "");
|
|
187
186
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
xmlhttp.onreadystatechange = () => {
|
|
191
|
-
if (xmlhttp.readyState === 4) {
|
|
192
|
-
// Keep track of the simulation UI information.
|
|
187
|
+
if (datasetId !== "/undefined") {
|
|
188
|
+
// Let people know that we are retrieving our UI information.
|
|
193
189
|
|
|
194
|
-
|
|
190
|
+
this.userMessage = "Retrieving UI information...";
|
|
191
|
+
this.showUserMessage = true;
|
|
195
192
|
|
|
196
|
-
|
|
193
|
+
// Retrieve the simulation UI file for the given dataset.
|
|
197
194
|
|
|
198
|
-
|
|
195
|
+
let xmlhttp = new XMLHttpRequest();
|
|
199
196
|
|
|
200
|
-
|
|
201
|
-
|
|
197
|
+
xmlhttp.open("GET", this.apiLocation + "/simulation_ui_file/" + datasetId, true);
|
|
198
|
+
xmlhttp.setRequestHeader("Content-type", "application/json");
|
|
199
|
+
xmlhttp.onreadystatechange = () => {
|
|
200
|
+
if (xmlhttp.readyState === 4) {
|
|
201
|
+
// Keep track of the simulation UI information.
|
|
202
202
|
|
|
203
|
-
|
|
204
|
-
}
|
|
203
|
+
this.simulationUiInformation = JSON.parse(xmlhttp.responseText);
|
|
205
204
|
|
|
206
|
-
|
|
205
|
+
// Make sure that the simulation UI information is valid.
|
|
207
206
|
|
|
208
|
-
|
|
207
|
+
this.hasValidSimulationUiInformation = validJson(this.simulationUiInformation);
|
|
209
208
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
// idea how long it's going to take to retrieve the simulation UI
|
|
213
|
-
// information.
|
|
209
|
+
if (!this.hasValidSimulationUiInformation) {
|
|
210
|
+
this.showUserMessage = false;
|
|
214
211
|
|
|
215
|
-
|
|
216
|
-
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
217
214
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
215
|
+
// Initialise our UI.
|
|
216
|
+
|
|
217
|
+
initialiseUi(this);
|
|
218
|
+
|
|
219
|
+
// Finalise our UI.
|
|
220
|
+
// Note: we try both here and in the mounded() function since we have no
|
|
221
|
+
// idea how long it's going to take to retrieve the simulation UI
|
|
222
|
+
// information.
|
|
223
|
+
|
|
224
|
+
this.$nextTick(() => {
|
|
225
|
+
finaliseUi(this);
|
|
226
|
+
|
|
227
|
+
this.showUserMessage = false;
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
xmlhttp.send();
|
|
232
|
+
}
|
|
223
233
|
},
|
|
224
234
|
mounted: function() {
|
|
225
235
|
// Finalise our UI.
|