Merge from 1.5 branch: NIHVIVO-3973 If the Solr index is not available, do not offer the user the ability to re-index. Show an error message instead.

This commit is contained in:
j2blake 2012-09-26 16:02:27 +00:00
parent eb1d4b9631
commit 9cdffd0c09
2 changed files with 36 additions and 6 deletions

View file

@ -6,9 +6,20 @@
<h2>Search Index Status</h2>
<#if worklevel == "IDLE">
<#if !indexIsConnected>
<!-- Can't contact the Solr server. Indexing would be impossible. Show an error message. -->
<section id="error-alert" role="alert">
<img src="${urls.images}/iconAlert.png" width="24" height="24" alert="Error alert icon" />
<p>The search index is not connected.</p>
<p><tt>SolrServer.ping()</tt> failed.
<p>Check startup status page and/or Tomcat logs for more information.</p>
</section>
<#elseif worklevel == "IDLE">
<!-- Solr indexer is idle. Show the button that rebuilds the index. -->
<h3>The search indexer is idle.</h3>
<#if hasPreviousBuild??>
<p>Most recent update was at ${since?string("hh:mm:ss a, MMMM dd, yyyy")}</p>
<p>The most recent update was at ${since?string("hh:mm:ss a, MMMM dd, yyyy")}</p>
</#if>
<form action="${actionUrl}" method="POST">
@ -17,11 +28,16 @@
Reset the search index and re-populate it.
</p>
</form>
<#elseif totalToDo == 0>
<!-- Solr indexer is preparing the list of records. Show elapsed time since request. -->
<h3>Preparing to rebuild the search index. </h3>
<p>since ${since?string("hh:mm:ss a, MMMM dd, yyyy")}, elapsed time ${elapsed}</p>
<#else>
<h3>The search index is currently being ${currentTask}.</h3>
<!-- Solr indexer is re-building the index. Show the progress. -->
<h3>${currentTask} the search index.</h3>
<p>since ${since?string("hh:mm:ss a, MMMM dd, yyyy")}, elapsed time ${elapsed}, estimated total time ${expected}</p>
<p>Completed ${completedCount} out of ${totalToDo} index records.</p>
</#if>