bulkrax 6.0.1 → 7.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +7 -7
- data/app/assets/javascripts/bulkrax/bulkrax.js +11 -0
- data/app/assets/javascripts/bulkrax/datatables.js +139 -0
- data/app/assets/javascripts/bulkrax/exporters.js +4 -4
- data/app/assets/javascripts/bulkrax/importers.js.erb +15 -1
- data/app/assets/stylesheets/bulkrax/import_export.scss +6 -1
- data/app/controllers/bulkrax/entries_controller.rb +52 -3
- data/app/controllers/bulkrax/exporters_controller.rb +19 -7
- data/app/controllers/bulkrax/importers_controller.rb +29 -11
- data/app/controllers/concerns/bulkrax/datatables_behavior.rb +201 -0
- data/app/helpers/bulkrax/application_helper.rb +7 -3
- data/app/jobs/bulkrax/create_relationships_job.rb +1 -1
- data/app/jobs/bulkrax/delete_and_import_collection_job.rb +8 -0
- data/app/jobs/bulkrax/delete_and_import_file_set_job.rb +8 -0
- data/app/jobs/bulkrax/delete_and_import_job.rb +20 -0
- data/app/jobs/bulkrax/delete_and_import_work_job.rb +8 -0
- data/app/jobs/bulkrax/delete_job.rb +5 -1
- data/app/jobs/bulkrax/download_cloud_file_job.rb +1 -1
- data/app/jobs/bulkrax/import_collection_job.rb +1 -1
- data/app/jobs/bulkrax/import_file_set_job.rb +1 -1
- data/app/jobs/bulkrax/import_job.rb +7 -0
- data/app/jobs/bulkrax/import_work_job.rb +1 -1
- data/app/jobs/bulkrax/importer_job.rb +1 -1
- data/app/models/bulkrax/csv_collection_entry.rb +1 -3
- data/app/models/bulkrax/csv_entry.rb +2 -1
- data/app/models/bulkrax/entry.rb +2 -0
- data/app/models/bulkrax/exporter.rb +9 -2
- data/app/models/bulkrax/importer.rb +48 -7
- data/app/models/bulkrax/oai_set_entry.rb +1 -3
- data/app/models/bulkrax/rdf_collection_entry.rb +1 -4
- data/app/models/bulkrax/status.rb +10 -1
- data/app/models/concerns/bulkrax/file_set_entry_behavior.rb +4 -2
- data/app/models/concerns/bulkrax/import_behavior.rb +4 -16
- data/app/models/concerns/bulkrax/status_info.rb +8 -0
- data/app/parsers/bulkrax/application_parser.rb +90 -19
- data/app/parsers/bulkrax/bagit_parser.rb +0 -23
- data/app/parsers/bulkrax/csv_parser.rb +0 -52
- data/app/parsers/bulkrax/oai_dc_parser.rb +26 -16
- data/app/parsers/bulkrax/parser_export_record_set.rb +2 -2
- data/app/parsers/bulkrax/xml_parser.rb +18 -21
- data/app/services/bulkrax/factory_class_finder.rb +90 -0
- data/app/views/bulkrax/exporters/_form.html.erb +10 -10
- data/app/views/bulkrax/exporters/index.html.erb +13 -57
- data/app/views/bulkrax/exporters/show.html.erb +2 -10
- data/app/views/bulkrax/importers/_csv_fields.html.erb +7 -1
- data/app/views/bulkrax/importers/_edit_form_buttons.html.erb +8 -1
- data/app/views/bulkrax/importers/_edit_item_buttons.html.erb +18 -0
- data/app/views/bulkrax/importers/index.html.erb +20 -64
- data/app/views/bulkrax/importers/show.html.erb +7 -13
- data/app/views/bulkrax/shared/_entries_tab.html.erb +16 -0
- data/config/routes.rb +8 -2
- data/db/migrate/20240208005801_denormalize_status_message.rb +7 -0
- data/db/migrate/20240209070952_update_identifier_index.rb +6 -0
- data/lib/bulkrax/engine.rb +6 -0
- data/lib/bulkrax/persistence_layer/active_fedora_adapter.rb +27 -0
- data/lib/bulkrax/persistence_layer/valkyrie_adapter.rb +8 -0
- data/lib/bulkrax/persistence_layer.rb +38 -0
- data/lib/bulkrax/version.rb +1 -1
- data/lib/bulkrax.rb +88 -2
- data/lib/tasks/bulkrax_tasks.rake +12 -0
- metadata +46 -6
- data/app/views/bulkrax/shared/_collection_entries_tab.html.erb +0 -39
- data/app/views/bulkrax/shared/_file_set_entries_tab.html.erb +0 -39
- data/app/views/bulkrax/shared/_work_entries_tab.html.erb +0 -39
@@ -1,39 +0,0 @@
|
|
1
|
-
<div role="tabpanel" class="tab-pane bulkrax-nav-tab-table-left-align" id="file-set-entries">
|
2
|
-
<table class='table table-striped'>
|
3
|
-
<thead>
|
4
|
-
<tr>
|
5
|
-
<th><%= t('bulkrax.table_header.labels.identifier') %></th>
|
6
|
-
<th><%= t('bulkrax.table_header.labels.entry_id') %></th>
|
7
|
-
<th><%= t('bulkrax.table_header.labels.status') %></th>
|
8
|
-
<th><%= t('bulkrax.table_header.labels.errors') %></th>
|
9
|
-
<th><%= t('bulkrax.table_header.labels.status_set_at') %></th>
|
10
|
-
<th><%= t('bulkrax.table_header.labels.actions') %></th>
|
11
|
-
</tr>
|
12
|
-
</thead>
|
13
|
-
<tbody>
|
14
|
-
<% entries.each do |e| %>
|
15
|
-
<% entry_path = item.class.to_s.include?('Importer') ? bulkrax.importer_entry_path(item.id, e.id) : bulkrax.exporter_entry_path(item.id, e.id) %>
|
16
|
-
<tr>
|
17
|
-
<td><%= link_to e.identifier, entry_path %></td>
|
18
|
-
<td><%= e.id %></td>
|
19
|
-
<% if e.status == "Complete" %>
|
20
|
-
<td><span class="glyphicon glyphicon-ok" style="color: green;"></span> <%= e.status %></td>
|
21
|
-
<% elsif e.status == "Pending" %>
|
22
|
-
<td><span class="glyphicon glyphicon-option-horizontal" style="color: blue;"></span> <%= e.status %></td>
|
23
|
-
<% else %>
|
24
|
-
<td><span class="glyphicon glyphicon-remove" style="color: <%= e.status == 'Deleted' ? 'green' : 'red' %>;"></span> <%= e.status %></td>
|
25
|
-
<% end %>
|
26
|
-
<% if e.last_error.present? %>
|
27
|
-
<td><%= link_to e.last_error.dig("error_class"), entry_path %></td>
|
28
|
-
<% else %>
|
29
|
-
<td></td>
|
30
|
-
<% end %>
|
31
|
-
<td><%= e.status_at %></td>
|
32
|
-
<td><%= link_to raw('<span class="glyphicon glyphicon-info-sign"></span>'), entry_path %></td>
|
33
|
-
</tr>
|
34
|
-
<% end %>
|
35
|
-
</tbody>
|
36
|
-
</table>
|
37
|
-
<%= page_entries_info(entries) %><br />
|
38
|
-
<%= paginate(entries, theme: 'blacklight', param_name: :file_set_entries_page, params: { anchor: 'file-set-entries' }) %>
|
39
|
-
</div>
|
@@ -1,39 +0,0 @@
|
|
1
|
-
<div role="tabpanel" class="tab-pane active bulkrax-nav-tab-table-left-align" id="work-entries">
|
2
|
-
<table class='table table-striped'>
|
3
|
-
<thead>
|
4
|
-
<tr>
|
5
|
-
<th><%= t('bulkrax.table_header.labels.identifier') %></th>
|
6
|
-
<th><%= t('bulkrax.table_header.labels.entry_id') %></th>
|
7
|
-
<th><%= t('bulkrax.table_header.labels.status') %></th>
|
8
|
-
<th><%= t('bulkrax.table_header.labels.errors') %></th>
|
9
|
-
<th><%= t('bulkrax.table_header.labels.status_set_at') %></th>
|
10
|
-
<th><%= t('bulkrax.table_header.labels.actions') %></th>
|
11
|
-
</tr>
|
12
|
-
</thead>
|
13
|
-
<tbody>
|
14
|
-
<% entries.each do |e| %>
|
15
|
-
<% entry_path = item.class.to_s.include?('Importer') ? bulkrax.importer_entry_path(item.id, e.id) : bulkrax.exporter_entry_path(item.id, e.id) %>
|
16
|
-
<tr>
|
17
|
-
<td><%= link_to e.identifier, entry_path %></td>
|
18
|
-
<td><%= e.id %></td>
|
19
|
-
<% if e.status == "Complete" %>
|
20
|
-
<td><span class="glyphicon glyphicon-ok" style="color: green;"></span> <%= e.status %></td>
|
21
|
-
<% elsif e.status == "Pending" %>
|
22
|
-
<td><span class="glyphicon glyphicon-option-horizontal" style="color: blue;"></span> <%= e.status %></td>
|
23
|
-
<% else %>
|
24
|
-
<td><span class="glyphicon glyphicon-remove" style="color: <%= e.status == 'Deleted' ? 'green' : 'red' %>;"></span> <%= e.status %></td>
|
25
|
-
<% end %>
|
26
|
-
<% if e.last_error.present? %>
|
27
|
-
<td><%= link_to e.last_error.dig("error_class"), entry_path %></td>
|
28
|
-
<% else %>
|
29
|
-
<td></td>
|
30
|
-
<% end %>
|
31
|
-
<td><%= e.status_at %></td>
|
32
|
-
<td><%= link_to raw('<span class="glyphicon glyphicon-info-sign"></span>'), entry_path %></td>
|
33
|
-
</tr>
|
34
|
-
<% end %>
|
35
|
-
</tbody>
|
36
|
-
</table>
|
37
|
-
<%= page_entries_info(entries) %><br />
|
38
|
-
<%= paginate(entries, theme: 'blacklight', param_name: :work_entries_page, params: { anchor: 'work-entries' }) %>
|
39
|
-
</div>
|