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/08/18 21:36:12 UTC
[airavata-django-portal] 01/02: AIRAVATA-3637 Add support for URI and URI_COLLECTION input types in experiment editor web component
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 71f02dbc9037effc02e5fd15d853817fe4cc8856
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Thu Aug 18 17:35:12 2022 -0400
AIRAVATA-3637 Add support for URI and URI_COLLECTION input types in experiment editor web component
---
.../js/web-components/ExperimentEditor.vue | 25 +++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ExperimentEditor.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ExperimentEditor.vue
index e20e3e4f..c45d9f17 100644
--- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ExperimentEditor.vue
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ExperimentEditor.vue
@@ -84,8 +84,31 @@ export default {
textInput.setAttribute("name", input.name);
slot.appendChild(textInput);
this.$refs[input.name][0].append(slot);
+ } else if (input.type.name === "URI") {
+ slot.textContent = `${input.name} `;
+ const fileInputEditor = document.createElement(
+ "adpf-file-input-editor"
+ );
+ fileInputEditor.setAttribute(
+ "value",
+ input.value !== null ? input.value : ""
+ );
+ fileInputEditor.setAttribute("name", input.name);
+ slot.appendChild(fileInputEditor);
+ this.$refs[input.name][0].append(slot);
+ } else if (input.type.name === "URI_COLLECTION") {
+ slot.textContent = `${input.name} `;
+ const multiFileInputEditor = document.createElement(
+ "adpf-multi-file-input-editor"
+ );
+ multiFileInputEditor.setAttribute(
+ "value",
+ input.value !== null ? input.value : ""
+ );
+ multiFileInputEditor.setAttribute("name", input.name);
+ slot.appendChild(multiFileInputEditor);
+ this.$refs[input.name][0].append(slot);
}
- // TODO: add support for other input types
}
// this.injectPropsIntoSlottedInputs();