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 2020/06/11 19:15:56 UTC

[airavata-django-portal] branch AIRAVATA-3336-readonly-experiment-inputs updated: AIRAVATA-3336 Support isReadOnly app inputs

This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch AIRAVATA-3336-readonly-experiment-inputs
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git


The following commit(s) were added to refs/heads/AIRAVATA-3336-readonly-experiment-inputs by this push:
     new ed9e1bb  AIRAVATA-3336 Support isReadOnly app inputs
ed9e1bb is described below

commit ed9e1bbf68ef557e362d8ea1c076fb2bbe28350c
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Thu Jun 11 15:15:36 2020 -0400

    AIRAVATA-3336 Support isReadOnly app inputs
---
 .../js/input-editors/InputEditorMixin.js                            | 4 ++++
 .../js/components/experiment/input-editors/CheckboxInputEditor.vue  | 1 +
 .../js/components/experiment/input-editors/FileInputEditor.vue      | 6 +++---
 .../js/components/experiment/input-editors/InputEditorContainer.vue | 1 +
 .../js/components/experiment/input-editors/MultiFileInputEditor.vue | 2 ++
 .../components/experiment/input-editors/RadioButtonInputEditor.vue  | 1 +
 .../js/components/experiment/input-editors/SelectInputEditor.vue    | 1 +
 .../js/components/experiment/input-editors/StringInputEditor.vue    | 1 +
 .../js/components/experiment/input-editors/TextareaInputEditor.vue  | 1 +
 9 files changed, 15 insertions(+), 3 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 585697d..535e382 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
@@ -19,6 +19,10 @@ export default {
             type: String,
             required: true,
         },
+        readOnly: {
+          type: Boolean,
+          default: false
+        }
     },
     data () {
         return {
diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/CheckboxInputEditor.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/CheckboxInputEditor.vue
index 2d103e2..9154a8e 100644
--- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/CheckboxInputEditor.vue
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/CheckboxInputEditor.vue
@@ -3,6 +3,7 @@
         :options="options"
         stacked
         :state="componentValidState"
+        :disabled="readOnly"
         @input="selectionsChanged"/>
 </template>
 
diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/FileInputEditor.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/FileInputEditor.vue
index 99e8797..eae1306 100644
--- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/FileInputEditor.vue
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/FileInputEditor.vue
@@ -23,14 +23,14 @@
         <pre>{{ fileContent }}</pre>
       </b-modal>
       <delete-link
-        v-if="dataProduct.isInputFileUpload"
+        v-if="!readOnly && dataProduct.isInputFileUpload"
         class="ml-2"
         @delete="deleteDataProduct"
       >
         Are you sure you want to delete input file <strong>{{ dataProduct.productName }}</strong>?
       </delete-link>
       <b-link
-        v-else
+        v-else-if="!readOnly"
         @click="unselect"
         class="ml-2 text-secondary"
       >
@@ -42,7 +42,7 @@
       </b-link>
     </div>
     <input-file-selector
-      v-if="!isDataProductURI || uploading"
+      v-if="!readOnly && (!isDataProductURI || uploading)"
       :selectedDataProductURIs="selectedDataProductURIs"
       @uploadstart="uploadStart"
       @uploadend="uploadEnd"
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 44b4489..1f4d3ea 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
@@ -5,6 +5,7 @@
             :id="inputEditorComponentId"
             :experiment-input="experimentInput"
             :experiment="experiment"
+            :read-only="experimentInput.isReadOnly"
             v-model="data"
             @invalid="recordInvalidInputEditorValue"
             @valid="recordValidInputEditorValue"
diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/MultiFileInputEditor.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/MultiFileInputEditor.vue
index 38dfc47..bcec4b5 100644
--- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/MultiFileInputEditor.vue
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/MultiFileInputEditor.vue
@@ -10,10 +10,12 @@
         :id="dataProductURI"
         :experiment="experiment"
         :experiment-input="experimentInput"
+        :read-only="readOnly"
         @input="updatedFile($event, dataProductURI)"
       />
     </div>
     <input-file-selector
+      v-if="!readOnly"
       :selectedDataProductURIs="selectedDataProductURIs"
       @selected="fileSelected"
       @uploadstart="$emit('uploadstart')"
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 c610e60..08e5354 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
@@ -3,6 +3,7 @@
         :options="options"
         stacked
         :state="componentValidState"
+        :disabled="readOnly"
         @input="valueChanged"/>
 </template>
 
diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/SelectInputEditor.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/SelectInputEditor.vue
index c132b46..eab5435 100644
--- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/SelectInputEditor.vue
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/SelectInputEditor.vue
@@ -4,6 +4,7 @@
     v-model="data"
     :options="options"
     stacked
+    :disabled="readOnly"
     :state="componentValidState"
     @input="valueChanged"
   />
diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/StringInputEditor.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/StringInputEditor.vue
index 538f070..2202fec 100644
--- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/StringInputEditor.vue
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/StringInputEditor.vue
@@ -1,6 +1,7 @@
 <template>
     <b-form-input :id="id" type="text" v-model="data"
         :state="componentValidState"
+        :disabled="readOnly"
         @input="valueChanged"/>
 </template>
 
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 35fd33e..06e39c5 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
@@ -1,6 +1,7 @@
 <template>
     <b-form-textarea :id="id" v-model="data"
         :rows="rows"
+        :disabled="readOnly"
         :state="componentValidState"
         @input="valueChanged"/>
 </template>