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/05/08 12:56:11 UTC

[airavata-django-portal] branch airavata-2975 updated (e37dd5e -> 78a2bea)

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

machristie pushed a change to branch airavata-2975
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git.


 discard e37dd5e  Merge pull request #26 from aravindparappil46/bulleted-list
    omit bc548e9  Fixing conflicts
    omit f5c8a3b  AIRAVATA-2975 Bulleted list for inputs. Added input name for data products
     add fb8d142  Bug fix: save disabled if form invalid *or* input uploading
     add 9e9f78f  AIRAVATA-3031 Fixing typo checking if output is a file type
     add af75e79  Removing "resource selection" column
     new b832d99  AIRAVATA-2975 Bulleted list for inputs. Added input name for data products
     new cc2f55d  AIRAVATA-2975 Change data product lookup to computed props
     new 78a2bea  AIRAVATA-2975 Remove unused function, css class

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (e37dd5e)
            \
             N -- N -- N   refs/heads/airavata-2975 (78a2bea)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../js/components/experiment/ExperimentEditor.vue  |  8 +-
 .../js/components/experiment/ExperimentSummary.vue | 95 +++++++---------------
 2 files changed, 29 insertions(+), 74 deletions(-)


[airavata-django-portal] 02/03: AIRAVATA-2975 Change data product lookup to computed props

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch airavata-2975
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git

commit cc2f55d0cf27d7e50bc32154889c2a74ba11bdd3
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Tue May 7 19:00:20 2019 -0400

    AIRAVATA-2975 Change data product lookup to computed props
---
 .../js/components/experiment/ExperimentSummary.vue | 46 +++++++++-------------
 1 file changed, 18 insertions(+), 28 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 dedf98f..e7e9496 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
@@ -59,7 +59,7 @@
                           {{ output.value }}
                         </template>
                         <template v-else-if="output.type.isFileValueType">
-                          <data-product-viewer v-for="dp in getDataProducts(output, localFullExperiment.outputDataProducts)"
+                          <data-product-viewer v-for="dp in outputDataProducts[output.name]"
                             :data-product="dp" class="data-product" :key="dp.productUri"/>
                         </template>
                       </li>
@@ -158,7 +158,7 @@
                         <template v-if="input.type.isSimpleValueType">
                           {{ input.value }}
                         </template>
-                        <data-product-viewer v-for="dp in getDataProducts(input, localFullExperiment.inputDataProducts)"
+                        <data-product-viewer v-for="dp in inputDataProducts[input.name]"
                           v-else-if="input.type.isFileValueType"
                           :data-product="dp" :input-file="true" class="data-product" :key="dp.productUri"/>
                       </li>
@@ -212,33 +212,23 @@ export default {
     "share-button": components.ShareButton
   },
   computed: {
-    stringInputs: function() {
-      return this.localFullExperiment.experiment.experimentInputs.filter(function (e) {
-          return e.type.value == 0
-      })
+    inputDataProducts() {
+      const result = {};
+      if (this.localFullExperiment && this.localFullExperiment.inputDataProducts) {
+        this.localFullExperiment.experiment.experimentInputs.forEach(input => {
+          result[input.name] = this.getDataProducts(input, this.localFullExperiment.inputDataProducts);
+        });
+      }
+      return result;
     },
-    dataProductInputs: function(){
-      // Filters out only data products. These objects will contain
-      // name of the file and inputOrder also
-      var allFileInputs = this.localFullExperiment.experiment.experimentInputs.filter(function (e) {
-            return e.type.value == 3;
-      });
-
-      // For each data product, find the "name" and "inputOrder" field for it
-      // from the array evaluated above. Product URI is used as a key to find
-      // matching data products (as it is unique to each file)
-      // Returns the array sorted by inputOrder in ascending order
-      var allDataProducts =  this.localFullExperiment.inputDataProducts.filter(function (dp) {
-        for(var i = 0; i < allFileInputs.length; i++){
-          if(allFileInputs[i]["value"] == dp["productUri"]){
-            dp["name"] = allFileInputs[i]["name"]
-            dp["inputOrder"] = allFileInputs[i]["inputOrder"]
-          }
-        }
-        return dp
-      })
-
-      return sortByKey(allDataProducts, "inputOrder");
+    outputDataProducts() {
+      const result = {};
+      if (this.localFullExperiment && this.localFullExperiment.outputDataProducts) {
+        this.localFullExperiment.experiment.experimentOutputs.forEach(output => {
+          result[output.name] = this.getDataProducts(output, this.localFullExperiment.outputDataProducts);
+        });
+      }
+      return result;
     },
     creationTime: function() {
       return moment(this.localFullExperiment.experiment.creationTime).fromNow();


[airavata-django-portal] 03/03: AIRAVATA-2975 Remove unused function, css class

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch airavata-2975
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git

commit 78a2bea0f6e462c01d100d14038b55088a95c06f
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Wed May 8 08:55:54 2019 -0400

    AIRAVATA-2975 Remove unused function, css class
---
 .../js/components/experiment/ExperimentSummary.vue | 24 ----------------------
 1 file changed, 24 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 e7e9496..f2003d5 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
@@ -301,34 +301,10 @@ export default {
     this.initPollingExperiment();
   }
 };
-/**
-*  Generic function that sorts an array
-*  of objects by key
-*  Default sorting order is ascending
-*  @param {Array} array
-*  @param {string} key
-*  @param {string} order (either asc or desc)
-*/
-function sortByKey(array, key, order = "asc") {
-  return array.sort(function(obj1, obj2) {
-    // If key doesn't exist, returns 0
-    if(!obj1.hasOwnProperty(key) || !obj2.hasOwnProperty(key)) {
-      return 0;
-    }
-    let sortOrder = (order == 'desc') ? -1 : 1;
-    var val1 = (typeof obj1[key] === 'string') ? obj1[key].toLowerCase() : obj1[key];
-    var val2 = (typeof obj2[key] === 'string') ? obj2[key].toLowerCase() : obj2[key];
-    return ((val1 < val2) ? -1 * sortOrder : ((val1 > val2) ? 1 * sortOrder : 0));
-    });
-  }
 </script>
 
 <style scoped>
 .data-product + .data-product {
   margin-left: 0.5em;
 }
-.input-list {
-  padding-left: .5em;
-  margin-bottom: 0;
-}
 </style>


[airavata-django-portal] 01/03: AIRAVATA-2975 Bulleted list for inputs. Added input name for data products

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch airavata-2975
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git

commit b832d99c52ca58a34fa0f9eeef81b49d3d7aa340
Author: aparappi <ap...@iu.edu>
AuthorDate: Sun May 5 17:31:09 2019 -0400

    AIRAVATA-2975 Bulleted list for inputs. Added input name for data products
---
 .../js/components/experiment/ExperimentSummary.vue | 54 ++++++++++++++++++++++
 1 file changed, 54 insertions(+)

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 123c07e..dedf98f 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
@@ -200,9 +200,11 @@ export default {
     }
   },
   data() {
+
     return {
       localFullExperiment: this.fullExperiment.clone()
     };
+
   },
   components: {
     DataProductViewer,
@@ -210,6 +212,34 @@ export default {
     "share-button": components.ShareButton
   },
   computed: {
+    stringInputs: function() {
+      return this.localFullExperiment.experiment.experimentInputs.filter(function (e) {
+          return e.type.value == 0
+      })
+    },
+    dataProductInputs: function(){
+      // Filters out only data products. These objects will contain
+      // name of the file and inputOrder also
+      var allFileInputs = this.localFullExperiment.experiment.experimentInputs.filter(function (e) {
+            return e.type.value == 3;
+      });
+
+      // For each data product, find the "name" and "inputOrder" field for it
+      // from the array evaluated above. Product URI is used as a key to find
+      // matching data products (as it is unique to each file)
+      // Returns the array sorted by inputOrder in ascending order
+      var allDataProducts =  this.localFullExperiment.inputDataProducts.filter(function (dp) {
+        for(var i = 0; i < allFileInputs.length; i++){
+          if(allFileInputs[i]["value"] == dp["productUri"]){
+            dp["name"] = allFileInputs[i]["name"]
+            dp["inputOrder"] = allFileInputs[i]["inputOrder"]
+          }
+        }
+        return dp
+      })
+
+      return sortByKey(allDataProducts, "inputOrder");
+    },
     creationTime: function() {
       return moment(this.localFullExperiment.experiment.creationTime).fromNow();
     },
@@ -281,10 +311,34 @@ export default {
     this.initPollingExperiment();
   }
 };
+/**
+*  Generic function that sorts an array
+*  of objects by key
+*  Default sorting order is ascending
+*  @param {Array} array
+*  @param {string} key
+*  @param {string} order (either asc or desc)
+*/
+function sortByKey(array, key, order = "asc") {
+  return array.sort(function(obj1, obj2) {
+    // If key doesn't exist, returns 0
+    if(!obj1.hasOwnProperty(key) || !obj2.hasOwnProperty(key)) {
+      return 0;
+    }
+    let sortOrder = (order == 'desc') ? -1 : 1;
+    var val1 = (typeof obj1[key] === 'string') ? obj1[key].toLowerCase() : obj1[key];
+    var val2 = (typeof obj2[key] === 'string') ? obj2[key].toLowerCase() : obj2[key];
+    return ((val1 < val2) ? -1 * sortOrder : ((val1 > val2) ? 1 * sortOrder : 0));
+    });
+  }
 </script>
 
 <style scoped>
 .data-product + .data-product {
   margin-left: 0.5em;
 }
+.input-list {
+  padding-left: .5em;
+  margin-bottom: 0;
+}
 </style>