瀏覽代碼

[search] Add job collection to the examples

Romain Rigaux 11 年之前
父節點
當前提交
3c346f711b

+ 1 - 1
apps/search/examples/bin/create_collections.sh

@@ -15,7 +15,7 @@
 # limitations under the License.
 
 
-for c in "twitter_demo" "yelp_demo" "log_demo"; do
+for c in "twitter_demo" "yelp_demo" "log_demo" "jobs_demo"; do
   echo "Creating collection $c"
   solrctl instancedir --create $c ../collections/solr_configs_$c
   solrctl collection --create $c -s 1

+ 1 - 1
apps/search/examples/bin/post.sh

@@ -16,7 +16,7 @@
 
 URL=http://localhost:8983/solr
 
-for c in "log_demo" "twitter_demo" "yelp_demo"; do
+for c in "log_demo" "twitter_demo" "yelp_demo" "jobs_demo"; do
   u="$URL/$c/update"
   echo Posting file $c to $u
   FILE=../collections/solr_configs_$c/index_data.csv

+ 4 - 4
apps/search/src/search/templates/admin_collections.mako

@@ -29,12 +29,12 @@ ${ commonheader(_('Search'), "search", user, "29px") | n,unicode }
 <div class="search-bar" style="height: 30px">
     <div class="pull-right" style="margin-top: 4px; margin-right: 20px">
     <a class="btn" href="${ url('search:new_search') }"><i class="fa fa-file-o"></i> ${ _('New dasboard') }</a>
-    <button type="button" class="btn importBtn" data-bind="visible: collections().length > 0 && !isLoading()">
+    <button type="button" class="btn importBtn">
       <i class="fa fa-plus-circle"></i> ${ _('Import Index') }
-      </button>
-    <button type="button" class="btn importBtn" data-bind="visible: collections().length > 0 && !isLoading()">
+    </button>
+    <a class="btn importBtn" href="${ url('indexer:collections') }">
       <i class="fa fa-plus-circle"></i> ${ _('Create Index') }
-      </button>
+    </a>
     </div>
   <h4>${_('Dashboards')}</h4>
 </div>

+ 1 - 1
apps/search/src/search/templates/search2.mako

@@ -37,7 +37,7 @@ ${ commonheader(_('Search'), "search", user, "80px") | n,unicode }
       <button type="button" title="${ _('Share') }" rel="tooltip" data-placement="bottom" data-bind="css: {'btn': true}"><i class="fa fa-link"></i></button>
       &nbsp;&nbsp;&nbsp;            
       <a class="btn" href="${ url('search:new_search') }" title="${ _('New') }" rel="tooltip" data-placement="bottom" data-bind="css: {'btn': true}"><i class="fa fa-file-o"></i></a>
-      <a class="btn" href="${ url('indexer:collections') }" title="${ _('Collections') }" rel="tooltip" data-placement="bottom" data-bind="css: {'btn': true}"><i class="fa fa-tags"></i></a> 
+      <a class="btn" href="${ url('search:admin_collections') }" title="${ _('Collections') }" rel="tooltip" data-placement="bottom" data-bind="css: {'btn': true}"><i class="fa fa-tags"></i></a> 
     </div>
   % endif