VIVO-869 Improve the display
Show exclusions count as separate from deletions count. When there is an error on the Ajax call, display the error status and stop asking for refreshes. When a rebuild is requested, redirect to just status, so refreshing the page would not request another rebuild.
This commit is contained in:
parent
78491234db
commit
83a5523ace
7 changed files with 62 additions and 16 deletions
|
@ -9,8 +9,12 @@ function updateSearchIndexerStatus() {
|
|||
url: searchIndexerStatusUrl,
|
||||
dataType: "html",
|
||||
complete: function(xhr, status) {
|
||||
updatePanelContents(xhr.responseText);
|
||||
setTimeout(updateSearchIndexerStatus,5000);
|
||||
if (xhr.status == 200) {
|
||||
updatePanelContents(xhr.responseText);
|
||||
setTimeout(updateSearchIndexerStatus,5000);
|
||||
} else {
|
||||
displayErrorMessage(xhr.status + " " + xhr.statusText);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -19,4 +23,9 @@ function updatePanelContents(contents) {
|
|||
document.getElementById("searchIndexerStatus").innerHTML = contents;
|
||||
}
|
||||
|
||||
function displayErrorMessage(message) {
|
||||
document.getElementById("searchIndexerError").innerHTML = "<h3>" + message + "</h3>";
|
||||
}
|
||||
|
||||
|
||||
$(document).ready(updateSearchIndexerStatus());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue