Skip to content

Commit 4fb74ce

Browse files
authored
Migrate archival storage search to Vue
* Migrate archival storage search to Vue * Rewrite localizeTimestampElements as a core feature * Replace pager jump handler with vanilla JS * Drop jQuery from FPR form toggles * Remove unused vendor assets * Refresh ES status updates before redirect reads Archival Storage now issues an immediate search after redirecting from AIP deletion requests. Without an index refresh, update_by_query can remain invisible to that first read, so the UI may still show "Stored" instead of "Deletion requested". Requesting refresh=True on update_by_query makes the status transition observable right away and removes this timing race across UIs. * Map rejected monitor status to cancel.png The Vue monitor currently maps STATUS_REJECTED to control_stop_blue.png. That icon existed historically (added in cb5f427, the 2012 import), but was deleted in d069446 (2016-11-09, "Dashboard: remove dead code"). The mapping then persisted in legacy Backbone monitor code and was carried into the Vue monitor implementation in 848dd6f (2026-02-03). Map STATUS_REJECTED to cancel.png so rejected rows use an existing asset and avoid broken /media/images/control_stop_blue.png requests. * Support DataTables-style quoted search tokens * Update archivematica-acceptance-tests
1 parent 9d59845 commit 4fb74ce

File tree

138 files changed

+4317
-14572
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+4317
-14572
lines changed

src/archivematica/dashboard/components/archival_storage/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ def view_aip(request, uuid):
878878
request, response.get("message", _("Deletion request submitted."))
879879
)
880880
search_service = setup_search_service_from_conf(settings)
881-
search_service.mark_aip_for_deletion(uuid)
881+
search_service.mark_aip_for_deletion(uuid, refresh=True)
882882
return redirect("archival_storage:archival_storage_index")
883883

884884
context = {

src/archivematica/dashboard/fpr/templates/fpr/format/form.html

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,35 @@
4848
{% endblock app_content %}
4949

5050
{% block extra_js %}
51-
{{ block.super }}
5251
<script type="text/javascript">
5352

54-
function display_extra_form() {
55-
val = $("#id_f-group option:selected").val();
56-
if (val == 'new') {
57-
$('#format_group_form').show();
53+
function toggleExtraForm(selectElement, formElement) {
54+
if (selectElement.value === 'new') {
55+
formElement.style.display = '';
56+
if (window.getComputedStyle(formElement).display === 'none') {
57+
formElement.style.display = 'block';
58+
}
5859
} else {
59-
$('#format_group_form').hide();
60+
formElement.style.display = 'none';
6061
}
6162
}
6263

63-
$(document).ready(function () {
64-
display_extra_form();
65-
$("#id_f-group").change(function () {display_extra_form();});
64+
function initFormToggle() {
65+
var groupSelect = document.getElementById('id_f-group');
66+
var groupForm = document.getElementById('format_group_form');
67+
68+
if (!groupSelect || !groupForm) {
69+
return;
70+
}
71+
72+
groupSelect.addEventListener('change', function () {
73+
toggleExtraForm(groupSelect, groupForm);
74+
});
75+
76+
toggleExtraForm(groupSelect, groupForm);
77+
}
6678

67-
});
79+
initFormToggle();
6880

6981
</script>
7082
{% endblock extra_js %}

src/archivematica/dashboard/fpr/templates/fpr/fprule/form.html

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,33 @@
4848
{% block extra_js %}
4949
<script type="text/javascript">
5050

51-
function display_extra_form() {
52-
val = $("#id_f-command option:selected").val();
53-
if (val == 'new') {
54-
$('#fprule_command_form').show();
51+
function toggleExtraForm(selectElement, formElement) {
52+
if (selectElement.value === 'new') {
53+
formElement.style.display = '';
54+
if (window.getComputedStyle(formElement).display === 'none') {
55+
formElement.style.display = 'block';
56+
}
5557
} else {
56-
$('#fprule_command_form').hide();
58+
formElement.style.display = 'none';
5759
}
5860
}
5961

60-
$(document).ready(function () {
61-
display_extra_form();
62-
$("#id_f-command").change(function () {display_extra_form();});
62+
function initFormToggle() {
63+
var commandSelect = document.getElementById('id_f-command');
64+
var commandForm = document.getElementById('fprule_command_form');
6365

64-
});
66+
if (!commandSelect || !commandForm) {
67+
return;
68+
}
69+
70+
commandSelect.addEventListener('change', function () {
71+
toggleExtraForm(commandSelect, commandForm);
72+
});
73+
74+
toggleExtraForm(commandSelect, commandForm);
75+
}
76+
77+
initFormToggle();
6578

6679
</script>
6780
{% endblock %}

0 commit comments

Comments
 (0)