app/views/bulkrax/importers/show.html.erb in bulkrax-2.0.2 vs app/views/bulkrax/importers/show.html.erb in bulkrax-2.1.0

- old
+ new

@@ -54,25 +54,31 @@ </div> </div> <%= render partial: 'bulkrax/shared/bulkrax_field_mapping', locals: {item: @importer} %> - <p class="bulkrax-p-align"> + <p class="bulkrax-p-align" title="<%= @importer.last_run&.processed_works %> processed, <%= @importer.last_run&.failed_works %> failed"> <strong>Total Works:</strong> - <%= @importer.importer_runs.last&.total_work_entries %> + <%= @importer.last_run&.total_work_entries %> </p> - <p class="bulkrax-p-align"> + <p class="bulkrax-p-align" title="<%= @importer.last_run&.processed_collections %> processed, <%= @importer.last_run&.failed_collections %> failed"> <strong>Total Collections:</strong> - <%= @importer.importer_runs.last&.total_collection_entries %> + <%= @importer.last_run&.total_collection_entries %> </p> + <p class="bulkrax-p-align" title="<%= @importer.last_run&.processed_file_sets %> processed, <%= @importer.last_run&.failed_file_sets %> failed"> + <strong>Total File Sets:</strong> + <%= @importer.last_run&.total_file_set_entries %> + </p> + <div class="bulkrax-nav-tab-bottom-margin"> <!-- Nav tabs --> <ul class="bulkrax-nav-tab-top-margin tab-nav nav nav-tabs" role="tablist"> <li role="presentation" class='active'><a href="#work-entries" aria-controls="work-entries" role="tab" data-toggle="tab">Work Entries</a></li> <li role="presentation"><a href="#collection-entries" aria-controls="collection-entries" role="tab" data-toggle="tab">Collection Entries</a></li> + <li role="presentation"><a href="#file-set-entries" aria-controls="file-set-entries" role="tab" data-toggle="tab">File Set Entries</a></li> </ul> <!-- Tab panes --> <div class="tab-content outline"> <div role="tabpanel" class="tab-pane active bulkrax-nav-tab-table-left-align" id="work-entries"> <table class='table table-striped'> @@ -155,9 +161,45 @@ <% end %> </tbody> </table> <%= page_entries_info(@collection_entries) %><br /> <%= paginate(@collection_entries, theme: 'blacklight', param_name: :collections_entries_page, params: {anchor: 'collection-entries'}) %> + </div> + <div role="tabpanel" class="tab-pane bulkrax-nav-tab-table-left-align" id="file-set-entries"> + <table class='table table-striped'> + <thead> + <tr> + <th>Identifier</th> + <th>Entry ID</th> + <th>Status</th> + <th>Errors</th> + <th>Status Set At</th> + <th>Actions</th> + </tr> + </thead> + <tbody> + <% @file_set_entries.each do |e| %> + <tr> + <td><%= link_to e.identifier, bulkrax.importer_entry_path(@importer.id, e.id) %></td> + <td><%= e.id %></td> + <% if e.status == "Complete" %> + <td><span class="glyphicon glyphicon-ok" style="color: green;"></span> <%= e.status %></td> + <% else %> + <td><span class="glyphicon glyphicon-remove" style="color: red;"></span> <%= e.status %></td> + <% end %> + <% if e.last_error.present? %> + <td><%= link_to e.last_error.dig("error_class"), bulkrax.importer_entry_path(@importer.id, e.id) %></td> + <% else %> + <td></td> + <% end %> + <td><%= e.status_at %></td> + <td><%= link_to raw('<span class="glyphicon glyphicon-info-sign"></span>'), bulkrax.importer_entry_path(@importer.id, e.id) %></td> + </tr> + <% end %> + </tbody> + </table> + <%= page_entries_info(@file_set_entries) %><br /> + <%= paginate(@file_set_entries, theme: 'blacklight', param_name: :file_set_entries_page, params: {anchor: 'file-set-entries'}) %> </div> </div> </div> <p class="bulkrax-p-align">