[ARVADOS] updated: 0b51ce6bfc3c50155de18eb4440021688462fb6a

Git user git at public.curoverse.com
Thu Jul 20 13:05:25 EDT 2017


Summary of changes:
 apps/workbench/app/helpers/collections_helper.rb       | 6 +++++-
 apps/workbench/config/application.default.yml          | 2 +-
 apps/workbench/test/helpers/collections_helper_test.rb | 3 +++
 3 files changed, 9 insertions(+), 2 deletions(-)

       via  0b51ce6bfc3c50155de18eb4440021688462fb6a (commit)
       via  236a667953bc828576faa50af9d4d4225038f9e7 (commit)
      from  6cc4c2ed2e9503c07b33b8fb8469516af80b8a26 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 0b51ce6bfc3c50155de18eb4440021688462fb6a
Merge: 6cc4c2e 236a667
Author: radhika <radhika at curoverse.com>
Date:   Thu Jul 20 13:04:50 2017 -0400

    closes #11995
    
    Merge branch '11995-collecion-filetypes'
    
    Arvados-DCO-1.1-Signed-off-by: Radhika Chippada <radhika at curoverse.com>


commit 236a667953bc828576faa50af9d4d4225038f9e7
Author: radhika <radhika at curoverse.com>
Date:   Thu Jul 20 09:20:53 2017 -0400

    1195: add .bed and .cwl to file types that can previewed
    
    Arvados-DCO-1.1-Signed-off-by: Radhika Chippada <radhika at curoverse.com>

diff --git a/apps/workbench/app/helpers/collections_helper.rb b/apps/workbench/app/helpers/collections_helper.rb
index e249eaa..f5f5485 100644
--- a/apps/workbench/app/helpers/collections_helper.rb
+++ b/apps/workbench/app/helpers/collections_helper.rb
@@ -64,7 +64,11 @@ module CollectionsHelper
   def preview_allowed_for file_name
     file_type = MIME::Types.type_for(file_name).first
     if file_type.nil?
-      false
+      if file_name.downcase.end_with?('.cwl') # unknown mime type, but we support preview
+        true
+      else
+        false
+      end
     elsif (file_type.raw_media_type == "text") || (file_type.raw_media_type == "image")
       true
     elsif (file_type.raw_media_type == "application") &&
diff --git a/apps/workbench/config/application.default.yml b/apps/workbench/config/application.default.yml
index 943432d..8b9bf15 100644
--- a/apps/workbench/config/application.default.yml
+++ b/apps/workbench/config/application.default.yml
@@ -209,7 +209,7 @@ common:
   # would be enabled in a collection's show page.
   # It is sufficient to list only applications here.
   # No need to list text and image types.
-  application_mimetypes_with_view_icon: [fasta, go, javascript, json, pdf, python, r, rtf, sam, sh, xml, xsl]
+  application_mimetypes_with_view_icon: [cwl, fasta, go, javascript, json, pdf, python, r, rtf, sam, sh, vnd.realvnc.bed, xml, xsl]
 
   # the maximum number of bytes to load in the log viewer
   log_viewer_max_bytes: 1000000
diff --git a/apps/workbench/test/helpers/collections_helper_test.rb b/apps/workbench/test/helpers/collections_helper_test.rb
index ae41d84..e02b2ab 100644
--- a/apps/workbench/test/helpers/collections_helper_test.rb
+++ b/apps/workbench/test/helpers/collections_helper_test.rb
@@ -29,6 +29,9 @@ class CollectionsHelperTest < ActionView::TestCase
     ["filename.xml", true],
     ["filename.xsl", true],
     ["filename.yml", true],
+    ["filename.yaml", true],
+    ["filename.bed", true],
+    ["filename.cwl", true],
 
     ["filename.bam", false],
     ["filename.tar", false],

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list