Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge pull request #378 from zanata/rhbz1060628
Browse files Browse the repository at this point in the history
rhbz1060628 fix display for search reindex operation progress
  • Loading branch information
Alex Eng committed Feb 16, 2014
2 parents 5c53092 + e8147cd commit 02820e0
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 26 deletions.
4 changes: 2 additions & 2 deletions zanata-war/src/main/resources/messages.properties
Expand Up @@ -740,8 +740,8 @@ jsf.ManageSearch.SelectNone=Clear Selection
jsf.ManageSearch.PerformSelectedActions=Perform Selected Actions
jsf.ManageSearch.CurrentProgress=Current Progress
jsf.ManageSearch.NoOperationsRunning=No operations are running
jsf.ManageSearch.Completed=Completed successfully (ran for #{reindexAction.elapsedTime})
jsf.ManageSearch.Aborted=Aborted by user (ran for #{reindexAction.elapsedTime})
jsf.ManageSearch.Completed=Completed successfully
jsf.ManageSearch.Aborted=Aborted by user
jsf.manageSearch.ErrorMessage=Due to an error, some objects could not be reindexed. See server log for details.
jsf.manageSearch.PleaseReindex=Please reindex again to ensure the search index is up-to-date.
jsf.manageSearch.ProgressMessage=#{reindexAction.reindexProgress} of #{reindexAction.reindexCount} operations complete
Expand Down
51 changes: 27 additions & 24 deletions zanata-war/src/main/webapp/admin/search.xhtml
Expand Up @@ -131,21 +131,23 @@

<a4j:outputPanel id="progress">
<h2>#{messages['jsf.ManageSearch.CurrentProgress']}</h2>
<h:outputText rendered="#{!reindexAction.inProgress}" escape="false">
<p>#{messages['jsf.ManageSearch.NoOperationsRunning']}</p>
</h:outputText>
<h:outputText
rendered="#{!reindexAction.inProgress and !reindexAction.canceled and !reindexAction.error}">
<p>#{messages['jsf.ManageSearch.Completed']}</p>
</h:outputText>
<h:outputText rendered="#{reindexAction.canceled}" escape="false">
<p>#{messages['jsf.ManageSearch.Aborted']}</p>
</h:outputText>
<h:outputText rendered="#{reindexAction.error}" escape="false">
<p>#{messages['jsf.manageSearch.ErrorMessage']}</p>

<p>#{messages['jsf.manageSearch.PleaseReindex']}</p>
</h:outputText>
<s:fragment rendered="#{!reindexAction.inProgress}">
<p><h:outputText escape="false"
value="#{messages['jsf.ManageSearch.NoOperationsRunning']}" /></p>
</s:fragment>
<ui:remove>
<!-- FIXME this shows even if no reindex has been done at all. -->
<s:fragment rendered="#{!reindexAction.inProgress and !reindexAction.canceled and !reindexAction.error}">
<p><h:outputText value="#{messages['jsf.ManageSearch.Completed']}" /></p>
</s:fragment>
</ui:remove>
<s:fragment rendered="#{reindexAction.canceled}">
<p><h:outputText escape="false" value="#{messages['jsf.ManageSearch.Aborted']}" /></p>
</s:fragment>
<s:fragment rendered="#{reindexAction.error}">
<p><h:outputText escape="false" value="#{messages['jsf.manageSearch.ErrorMessage']}" /></p>
<p><h:outputText escape="false" value="#{messages['jsf.manageSearch.PleaseReindex']}" /></p>
</s:fragment>

<a4j:outputPanel>
<!-- Using a js function to rerender as reRenderAfterComplete is not working properly -->
Expand All @@ -167,15 +169,16 @@
</a4j:outputPanel>

<a4j:outputPanel id="timeEstimate">
<h:outputText
rendered="#{reindexAction.inProgress || reindexAction.canceled || reindexAction.error}">
<p>#{messages['jsf.manageSearch.CurrentTable']}</p>
</h:outputText>
<h:outputText rendered="#{reindexAction.inProgress}">
<p>#{messages['jsf.ManageSearch.ElapsedTime']}</p>

<p>#{messages['jsf.ManageSearch.RemainingTime']}</p>
</h:outputText>
<s:fragment rendered="#{reindexAction.inProgress || reindexAction.canceled || reindexAction.error}">
<p><h:outputText value="#{messages['jsf.manageSearch.CurrentTable']}" /></p>
</s:fragment>
<ui:remove>
<!-- FIXME action bean needs to be updated with working methods for elapsed and remaining time -->
<s:fragment rendered="#{reindexAction.inProgress}">
<p><h:outputText value="#{messages['jsf.ManageSearch.ElapsedTime']}" /></p>
<p><h:outputText value="#{messages['jsf.ManageSearch.RemainingTime']}" /></p>
</s:fragment>
</ui:remove>
</a4j:outputPanel>

<a4j:commandButton id="cancel"
Expand Down

0 comments on commit 02820e0

Please sign in to comment.