Skip to content

Commit

Permalink
Added UI error message for query tool.
Browse files Browse the repository at this point in the history
  • Loading branch information
tblock79 committed Oct 8, 2024
1 parent ae64a35 commit cb8e883
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions webinterface/templates/dashboards/query.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ <h1 class="title is-4">DICOM Query</h1>
Redis connection not available, so this dashboard will not function.
</div>
{% endif %}
<div id="backend-error" class="notification is-danger is-hidden">
A communication error with the backend has occurred. Check console logs.
</div>

<form class="box" id="form">
<div class="field is-horizontal">
<div class="field-label is-normal">
Expand Down Expand Up @@ -144,13 +148,13 @@ <h1 class="title is-4">DICOM Query</h1>
<thead>
<tr>
<th></th>
<th>id</th>
<th>type</th>
<th>status</th>
<th>created_at</th>
<th>accession</th>
<th>result</th>
<th>progress</th>
<th>ID</th>
<th>Type</th>
<th>Status</th>
<th>Created at</th>
<th>Accession</th>
<th>Result</th>
<th>Progress</th>
</tr>
</thead>
<tbody></tbody>
Expand Down Expand Up @@ -338,6 +342,13 @@ <h1 class="title is-4">DICOM Query</h1>
order: [[4, 'desc']],
initComplete: function() {}
});

$.fn.dataTable.ext.errMode = 'throw';
$('#get-accessions-table').on('error.dt', function(e, settings, techNote, message) {
console.log( 'An error has been reported by DataTables: ', message);
$('#backend-error').removeClass("is-hidden");
})

var jobId;
var errMessage;
var accessionTableConfig = {
Expand Down

0 comments on commit cb8e883

Please sign in to comment.