This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch delta-topology-workshop
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
The following commit(s) were added to refs/heads/delta-topology-workshop by
this push:
new 199dc88 Copy all children of VNC html body tag into exp summary page
to get the VNC link
199dc88 is described below
commit 199dc88c8f247d2e3d53988a4653bd911fe37a17
Author: Marcus Christie <[email protected]>
AuthorDate: Wed Oct 13 09:39:55 2021 -0400
Copy all children of VNC html body tag into exp summary page to get the VNC
link
---
.../js/components/experiment/ExperimentSummary.vue | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git
a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/ExperimentSummary.vue
b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/ExperimentSummary.vue
index 8387e10..66d02d3 100644
---
a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/ExperimentSummary.vue
+++
b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/ExperimentSummary.vue
@@ -473,19 +473,24 @@ export default {
}
},
async localFullExperiment() {
- let vncInfo = "Please wait for the VNC URL to be available when the job
is active.";
+ let vncInfo = document.createElement('div');
+ vncInfo.textContent = "Please wait for the VNC URL to be available when
the job is active.";
if (this.localFullExperiment.jobDetails &&
this.localFullExperiment.jobDetails.length > 0 &&
this.localFullExperiment.jobDetails[0].jobStatusStateName === 'ACTIVE') {
const url =
`/static/vnc/${encodeURIComponent(this.localFullExperiment.jobDetails[0].jobName)}.html`;
// Check that the html file exists
const response = await fetch(url);
if (response.ok) {
- // Grab the text from the HTML file's body tag and replace vncInfo
+ // Copy all children from the HTML file's body tag and replace
vncInfo
const parser = new DOMParser();
const doc = parser.parseFromString(await response.text(),
'text/html');
- vncInfo = doc.querySelector('body').textContent;
+ vncInfo = document.createElement('div');
+ for (const child of doc.querySelector('body').children) {
+ vncInfo.append(child);
+ }
}
}
- this.$refs.vncInfo.textContent = vncInfo;
+ this.$refs.vncInfo.innerHTML = ''; // clear all contents
+ this.$refs.vncInfo.append(vncInfo);
}
},
mounted: function () {