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 2019/01/23 18:04:24 UTC
[airavata-django-portal] branch master updated: Fix validation
messages in experiment inputs
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
The following commit(s) were added to refs/heads/master by this push:
new 7a7124e Fix validation messages in experiment inputs
7a7124e is described below
commit 7a7124e3811742342560e5947a2d64e9cc1e45ce
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Wed Jan 23 12:37:31 2019 -0500
Fix validation messages in experiment inputs
---
.../js/input-editors/InputEditorMixin.js | 12 +++++++-----
.../experiment/input-editors/InputEditorContainer.vue | 2 +-
.../experiment/input-editors/RadioButtonInputEditor.vue | 3 +--
.../experiment/input-editors/TextareaInputEditor.vue | 3 +--
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/django_airavata/apps/workspace/django-airavata-workspace-plugin-api/js/input-editors/InputEditorMixin.js b/django_airavata/apps/workspace/django-airavata-workspace-plugin-api/js/input-editors/InputEditorMixin.js
index 5d52a7f..a4ec846 100644
--- a/django_airavata/apps/workspace/django-airavata-workspace-plugin-api/js/input-editors/InputEditorMixin.js
+++ b/django_airavata/apps/workspace/django-airavata-workspace-plugin-api/js/input-editors/InputEditorMixin.js
@@ -5,7 +5,7 @@ import {models} from 'django-airavata-api'
export default {
props: {
value: {
- required: true,
+ type: [String, File],
},
experimentInput: {
type: models.InputDataObjectType,
@@ -33,7 +33,11 @@ export default {
return this.validationMessages.length === 0;
},
componentValidState: function() {
- return this.inputHasBegun && !this.valid ? 'invalid' : null;
+ if (this.inputHasBegun) {
+ return this.valid ? 'valid' : 'invalid';
+ } else {
+ return null;
+ }
},
editorConfig: function() {
return this.experimentInput.editorConfig;
@@ -43,6 +47,7 @@ export default {
valueChanged: function() {
this.inputHasBegun = true;
this.$emit('input', this.data);
+ this.checkValidation();
},
checkValidation: function() {
if (this.valid) {
@@ -56,9 +61,6 @@ export default {
this.checkValidation();
},
watch: {
- valid() {
- this.checkValidation();
- },
value(newValue) {
this.data = newValue;
}
diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/InputEditorContainer.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/InputEditorContainer.vue
index 797c356..0c03fd1 100644
--- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/InputEditorContainer.vue
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/InputEditorContainer.vue
@@ -82,7 +82,7 @@ export default {
},
methods: {
recordValidInputEditorValue: function() {
- this.state = null;
+ this.state = 'valid';
this.$emit('valid');
},
recordInvalidInputEditorValue: function(feedbackMessages) {
diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/RadioButtonInputEditor.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/RadioButtonInputEditor.vue
index 2003234..c610e60 100644
--- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/RadioButtonInputEditor.vue
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/RadioButtonInputEditor.vue
@@ -18,7 +18,6 @@ export default {
props: {
value: {
type: String,
- required: true,
},
},
computed: {
@@ -34,4 +33,4 @@ export default {
}
}
}
-</script>
\ No newline at end of file
+</script>
diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/TextareaInputEditor.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/TextareaInputEditor.vue
index 1862ae9..2361fbc 100644
--- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/TextareaInputEditor.vue
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/TextareaInputEditor.vue
@@ -17,7 +17,6 @@ export default {
props: {
value: {
type: String,
- required: true,
},
},
computed: {
@@ -28,4 +27,4 @@ export default {
}
}
}
-</script>
\ No newline at end of file
+</script>