bulkrax 6.0.0 → 7.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +7 -7
  3. data/app/assets/javascripts/bulkrax/bulkrax.js +11 -0
  4. data/app/assets/javascripts/bulkrax/datatables.js +139 -0
  5. data/app/assets/javascripts/bulkrax/exporters.js +4 -4
  6. data/app/assets/javascripts/bulkrax/importers.js.erb +15 -1
  7. data/app/assets/stylesheets/bulkrax/import_export.scss +6 -1
  8. data/app/controllers/bulkrax/entries_controller.rb +52 -3
  9. data/app/controllers/bulkrax/exporters_controller.rb +19 -7
  10. data/app/controllers/bulkrax/importers_controller.rb +29 -11
  11. data/app/controllers/concerns/bulkrax/datatables_behavior.rb +201 -0
  12. data/app/helpers/bulkrax/application_helper.rb +7 -3
  13. data/app/jobs/bulkrax/create_relationships_job.rb +1 -1
  14. data/app/jobs/bulkrax/delete_and_import_collection_job.rb +8 -0
  15. data/app/jobs/bulkrax/delete_and_import_file_set_job.rb +8 -0
  16. data/app/jobs/bulkrax/delete_and_import_job.rb +20 -0
  17. data/app/jobs/bulkrax/delete_and_import_work_job.rb +8 -0
  18. data/app/jobs/bulkrax/delete_job.rb +5 -1
  19. data/app/jobs/bulkrax/download_cloud_file_job.rb +1 -1
  20. data/app/jobs/bulkrax/import_collection_job.rb +1 -1
  21. data/app/jobs/bulkrax/import_file_set_job.rb +1 -1
  22. data/app/jobs/bulkrax/import_job.rb +7 -0
  23. data/app/jobs/bulkrax/import_work_job.rb +1 -1
  24. data/app/jobs/bulkrax/importer_job.rb +1 -1
  25. data/app/models/bulkrax/csv_collection_entry.rb +1 -3
  26. data/app/models/bulkrax/csv_entry.rb +2 -1
  27. data/app/models/bulkrax/entry.rb +2 -0
  28. data/app/models/bulkrax/exporter.rb +9 -2
  29. data/app/models/bulkrax/importer.rb +48 -7
  30. data/app/models/bulkrax/oai_set_entry.rb +1 -3
  31. data/app/models/bulkrax/rdf_collection_entry.rb +1 -4
  32. data/app/models/bulkrax/status.rb +10 -1
  33. data/app/models/concerns/bulkrax/file_set_entry_behavior.rb +4 -2
  34. data/app/models/concerns/bulkrax/import_behavior.rb +4 -16
  35. data/app/models/concerns/bulkrax/status_info.rb +8 -0
  36. data/app/parsers/bulkrax/application_parser.rb +93 -22
  37. data/app/parsers/bulkrax/bagit_parser.rb +0 -23
  38. data/app/parsers/bulkrax/csv_parser.rb +0 -52
  39. data/app/parsers/bulkrax/oai_dc_parser.rb +26 -16
  40. data/app/parsers/bulkrax/parser_export_record_set.rb +2 -2
  41. data/app/parsers/bulkrax/xml_parser.rb +18 -21
  42. data/app/services/bulkrax/factory_class_finder.rb +90 -0
  43. data/app/views/bulkrax/exporters/_form.html.erb +10 -10
  44. data/app/views/bulkrax/exporters/index.html.erb +13 -57
  45. data/app/views/bulkrax/exporters/show.html.erb +2 -10
  46. data/app/views/bulkrax/importers/_csv_fields.html.erb +7 -1
  47. data/app/views/bulkrax/importers/_edit_form_buttons.html.erb +8 -1
  48. data/app/views/bulkrax/importers/_edit_item_buttons.html.erb +18 -0
  49. data/app/views/bulkrax/importers/index.html.erb +20 -64
  50. data/app/views/bulkrax/importers/show.html.erb +7 -13
  51. data/app/views/bulkrax/shared/_entries_tab.html.erb +16 -0
  52. data/config/routes.rb +8 -2
  53. data/db/migrate/20240208005801_denormalize_status_message.rb +7 -0
  54. data/db/migrate/20240209070952_update_identifier_index.rb +6 -0
  55. data/lib/bulkrax/engine.rb +6 -0
  56. data/lib/bulkrax/persistence_layer/active_fedora_adapter.rb +27 -0
  57. data/lib/bulkrax/persistence_layer/valkyrie_adapter.rb +8 -0
  58. data/lib/bulkrax/persistence_layer.rb +38 -0
  59. data/lib/bulkrax/version.rb +1 -1
  60. data/lib/bulkrax.rb +88 -2
  61. data/lib/tasks/bulkrax_tasks.rake +12 -0
  62. metadata +46 -6
  63. data/app/views/bulkrax/shared/_collection_entries_tab.html.erb +0 -39
  64. data/app/views/bulkrax/shared/_file_set_entries_tab.html.erb +0 -39
  65. 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="collection-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: :collections_entries_page, params: { anchor: 'collection-entries' }) %>
39
- </div>
@@ -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>