-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into hyrax-4-valkyrie-support
* main: ♻️ Favor member_ids_ssim over file_set_ids_ssim (#929) 🐛 Fix exporter page for Bootstrap 3 applications (#928) ♻️ Favor configuration over hard-coding (#927) Fix exporters show page - 2 (#926) Redo records with the remove_and_rerun property in the data, move individual remove and rerun to a background job (#923) Mark records as skipped if we do not see them during an import run (#922) For every importer / record combo there should be exactly one entry (#921) Add Skip to the datatabels (#920) Update Importer Index and Show Entries With Search, Filtering, Sort and More (#914) Restore rails5 support (#919) Strip out all special characters from csv headers (#918) Need to Include dry/monads in sample app to get generators working (#917) Found another place we need to include the monad lib. This time so that generators work Denormalize Status Message to that Entry Look Up Can Be Fast (#913)
- Loading branch information
Showing
52 changed files
with
1,038 additions
and
405 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
Blacklight.onLoad(function() { | ||
if($('#importer-show-table').length) { | ||
$('#importer-show-table').DataTable( { | ||
'processing': true, | ||
'serverSide': true, | ||
"ajax": window.location.href.replace(/(\/(importers|exporters)\/\d+)/, "$1/entry_table.json"), | ||
"pageLength": 30, | ||
"lengthMenu": [[30, 100, 200], [30, 100, 200]], | ||
"columns": [ | ||
{ "data": "identifier" }, | ||
{ "data": "id" }, | ||
{ "data": "status_message" }, | ||
{ "data": "type" }, | ||
{ "data": "updated_at" }, | ||
{ "data": "errors", "orderable": false }, | ||
{ "data": "actions", "orderable": false } | ||
], | ||
initComplete: function () { | ||
// Add entry class filter | ||
entrySelect.bind(this)() | ||
// Add status filter | ||
statusSelect.bind(this)() | ||
// Add refresh link | ||
refreshLink.bind(this)() | ||
} | ||
} ); | ||
} | ||
|
||
if($('#importers-table').length) { | ||
$('#importers-table').DataTable( { | ||
'processing': true, | ||
'serverSide': true, | ||
"ajax": window.location.href.replace(/(\/importers)/, "$1/importer_table.json"), | ||
"pageLength": 30, | ||
"lengthMenu": [[30, 100, 200], [30, 100, 200]], | ||
"columns": [ | ||
{ "data": "name" }, | ||
{ "data": "status_message" }, | ||
{ "data": "last_imported_at" }, | ||
{ "data": "next_import_at" }, | ||
{ "data": "enqueued_records", "orderable": false }, | ||
{ "data": "processed_records", "orderable": false }, | ||
{ "data": "failed_records", "orderable": false }, | ||
{ "data": "deleted_records", "orderable": false }, | ||
{ "data": "total_collection_entries", "orderable": false }, | ||
{ "data": "total_work_entries", "orderable": false }, | ||
{ "data": "total_file_set_entries", "orderable": false }, | ||
{ "data": "actions", "orderable": false } | ||
], | ||
initComplete: function () { | ||
// Add status filter | ||
statusSelect.bind(this)() | ||
// Add refresh link | ||
refreshLink.bind(this)() | ||
} | ||
} ); | ||
} | ||
|
||
if($('#exporters-table').length) { | ||
$('#exporters-table').DataTable( { | ||
'processing': true, | ||
'serverSide': true, | ||
"ajax": window.location.href.replace(/(\/exporters)/, "$1/exporter_table.json"), | ||
"pageLength": 30, | ||
"lengthMenu": [[30, 100, 200], [30, 100, 200]], | ||
"columns": [ | ||
{ "data": "name" }, | ||
{ "data": "status_message" }, | ||
{ "data": "created_at" }, | ||
{ "data": "download" }, | ||
{ "data": "actions", "orderable": false } | ||
], | ||
initComplete: function () { | ||
// Add status filter | ||
statusSelect.bind(this)() | ||
// Add refresh link | ||
refreshLink.bind(this)() | ||
} | ||
} ); | ||
} | ||
|
||
}) | ||
|
||
function entrySelect() { | ||
let entrySelect = document.createElement('select') | ||
entrySelect.id = 'entry-filter' | ||
entrySelect.classList.value = 'form-control input-sm' | ||
entrySelect.style.marginRight = '10px' | ||
|
||
entrySelect.add(new Option('Filter by Entry Class', '')) | ||
// Read the options from the footer and add them to the entrySelect | ||
$('#importer-entry-classes').text().split('|').forEach(function (col, i) { | ||
entrySelect.add(new Option(col.trim())) | ||
}) | ||
document.querySelector('div#importer-show-table_filter').firstChild.prepend(entrySelect) | ||
|
||
// Apply listener for user change in value | ||
entrySelect.addEventListener('change', function () { | ||
var val = entrySelect.value; | ||
this.api() | ||
.search(val ? val : '', false, false) | ||
.draw(); | ||
}.bind(this)); | ||
} | ||
|
||
function statusSelect() { | ||
let statusSelect = document.createElement('select'); | ||
statusSelect.id = 'status-filter' | ||
statusSelect.classList.value = 'form-control input-sm' | ||
statusSelect.style.marginRight = '10px' | ||
|
||
statusSelect.add(new Option('Filter by Status', '')); | ||
statusSelect.add(new Option('Complete')) | ||
statusSelect.add(new Option('Pending')) | ||
statusSelect.add(new Option('Failed')) | ||
statusSelect.add(new Option('Skipped')) | ||
statusSelect.add(new Option('Deleted')) | ||
statusSelect.add(new Option('Complete (with failures)')) | ||
|
||
document.querySelector('div.dataTables_filter').firstChild.prepend(statusSelect) | ||
|
||
// Apply listener for user change in value | ||
statusSelect.addEventListener('change', function () { | ||
var val = statusSelect.value; | ||
this.api() | ||
.search(val ? val : '', false, false) | ||
.draw(); | ||
}.bind(this)); | ||
} | ||
|
||
function refreshLink() { | ||
let refreshLink = document.createElement('a'); | ||
refreshLink.onclick = function() { | ||
this.api().ajax.reload(null, false) | ||
}.bind(this) | ||
refreshLink.classList.value = 'glyphicon glyphicon-refresh' | ||
refreshLink.style.marginLeft = '10px' | ||
document.querySelector('div.dataTables_filter').firstChild.append(refreshLink) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.