Browse Source

HUE-1811 [search] Alert message when using a demo collection without a valid Solr

Romain Rigaux 11 years ago
parent
commit
38da4f377e
2 changed files with 133 additions and 3 deletions
  1. 126 3
      apps/search/src/search/examples.py
  2. 7 0
      apps/search/src/search/templates/search.mako

File diff suppressed because it is too large
+ 126 - 3
apps/search/src/search/examples.py


+ 7 - 0
apps/search/src/search/templates/search.mako

@@ -113,6 +113,13 @@ ${ commonheader(_('Search'), "search", user, "90px") | n,unicode }
 </div>
 % else:
 <div class="container results">
+
+% if 'is_demo' in response['responseHeader']:
+ <div class="alert alert-warn">
+  ${ _('A demo index is used. In order to be interactive, please ') } <a href="">${ _('create the indexes') }</a> ${ _(' in Solr.') }
+ </div>
+% endif 
+
   <div id="mainContent" class="row hide">
     % if response and 'response' in response and 'docs' in response['response'] and len(response['response']['docs']) > 0 and 'normalized_facets' in response:
       <% shown_facets = 0 %>

Some files were not shown because too many files changed in this diff