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:
Jim Blake 2015-01-20 14:06:11 -05:00
parent 78491234db
commit 83a5523ace
7 changed files with 62 additions and 16 deletions

View file

@ -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());