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 2018/08/02 17:11:56 UTC

[airavata-django-portal] 02/03: Add editorConfig to InputEditorMixin

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

commit 733dc92ecf7c61452c8585b53d16b11594b683f4
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Wed Jul 25 23:52:54 2018 -0400

    Add editorConfig to InputEditorMixin
---
 .../js/input-editors/InputEditorMixin.js                              | 3 +++
 .../apps/workspace/django-airavata-workspace-plugin-api/package.json  | 2 +-
 .../js/components/experiment/input-editors/RadioButtonInputEditor.vue | 4 ++--
 .../js/components/experiment/input-editors/TextareaInputEditor.vue    | 4 ++--
 4 files changed, 8 insertions(+), 5 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 2a1d24d..446b46e 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
@@ -39,6 +39,9 @@ export default {
         componentValidState: function() {
             return this.inputHasBegun && !this.valid ? 'invalid' : null;
         },
+        editorConfig: function() {
+            return this.experimentInput.editorConfig;
+        }
     },
     methods: {
         valueChanged: function() {
diff --git a/django_airavata/apps/workspace/django-airavata-workspace-plugin-api/package.json b/django_airavata/apps/workspace/django-airavata-workspace-plugin-api/package.json
index 9a5efe9..ccfc95f 100644
--- a/django_airavata/apps/workspace/django-airavata-workspace-plugin-api/package.json
+++ b/django_airavata/apps/workspace/django-airavata-workspace-plugin-api/package.json
@@ -1,7 +1,7 @@
 {
   "name": "django-airavata-workspace-plugin-api",
   "description": "API code for workspace plugins (custom input editors, etc.)",
-  "version": "1.0.0-beta.1",
+  "version": "1.0.0-beta.2",
   "author": "Marcus Christie <ma...@apache.org>",
   "private": false,
   "main": "./dist/index.js",
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 5915402..2003234 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
@@ -23,8 +23,8 @@ export default {
     },
     computed: {
         options: function() {
-            return 'options' in this.experimentInput.editorConfig
-                ? this.experimentInput.editorConfig['options'].map(option => {
+            return 'options' in this.editorConfig
+                ? this.editorConfig['options'].map(option => {
                     return {
                         text: option[CONFIG_OPTION_TEXT_KEY],
                         value: option[CONFIG_OPTION_VALUE_KEY],
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 5491147..1862ae9 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
@@ -22,8 +22,8 @@ export default {
     },
     computed: {
         rows: function() {
-            return 'rows' in this.experimentInput.editorConfig
-                ? this.experimentInput.editorConfig['rows']
+            return 'rows' in this.editorConfig
+                ? this.editorConfig['rows']
                 : DEFAULT_ROWS;
         }
     }