11789: Merge branch 'master' into 11789-arvput-exclude-flag
[arvados.git] / apps / workbench / app / views / collections / show_file_links.html.erb
index 042e4ff71f7de8a7fca3f478e36950de6c3d99a0..8a2ce6b8268195605ba370153c1292be0a2a0c03 100644 (file)
@@ -1,3 +1,7 @@
+<%# Copyright (C) The Arvados Authors. All rights reserved.
+
+SPDX-License-Identifier: AGPL-3.0 %>
+
 <!DOCTYPE html>
 <html>
 <% coll_name = "Collection #{@object.uuid}" %>
@@ -44,10 +48,11 @@ the entire collection with wget, try:</p>
 
 <h2>File Listing</h2>
 
-<% if @object.andand.files_tree.andand.any? %>
+<% file_tree = @object.andand.files_tree %>
+<% if file_tree.andand.any? %>
   <ul id="collection_files" class="collection_files">
-  <% dirstack = [@object.files_tree.first.first] %>
-  <% @object.files_tree.each_with_index do |(dirname, filename, size), index| %>
+  <% dirstack = [file_tree.first.first] %>
+  <% file_tree.take(10000).each_with_index do |(dirname, filename, size), index| %>
     <% file_path = CollectionsHelper::file_path([dirname, filename]) %>
     <% while dirstack.any? and (dirstack.last != dirname) %>
       <% dirstack.pop %></ul></li>