浏览代码

[search] Install search templates

Romain Rigaux 11 年之前
父节点
当前提交
8af533f

+ 0 - 8
apps/about/src/about/templates/admin_wizard.mako

@@ -107,14 +107,6 @@ ${ header.menubar() }
                 </a>
               </li>
           % endif
-          % if 'indexer' in app_names:
-              <li>
-                <a href="#" class="installBtn" data-loading-text="${ _('Installing...') }"
-                   data-sample-url="${ url('indexer:install_examples') }">
-                  <i class="fa fa-download"></i> ${ apps['indexer'].nice_name }
-                </a>
-              </li>
-          % endif
           % if 'search' in app_names:
               <li>
                 <a href="#" class="installBtn" data-loading-text="${ _('Installing...') }"

文件差异内容过多而无法显示
+ 13 - 0
apps/search/src/search/fixtures/initial_search_examples.json


+ 1 - 1
apps/search/src/search/models.py

@@ -36,7 +36,7 @@ LOG = logging.getLogger(__name__)
 
 
 """
-Collection manger contains all the data now.
+Collection model contains all the data now.
 """
 
 

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

@@ -46,7 +46,7 @@ ${ commonheader(_('Search'), "search", user, "29px") | n,unicode }
       <input type="text" placeholder="${_('Filter dashboards...')}" class="input-xlarge search-query" id="filterInput" data-bind="visible: collections().length > 0 && !isLoading()">
       &nbsp;
       &nbsp;
-      <a class="btn" href="${ url('search:new_search') }" title="${ _('Create a new dashboard') }"><i class="fa fa-plus-circle"></i> ${ _('Dasboard') }</a>      
+      <a class="btn" href="${ url('search:new_search') }" title="${ _('Create a new dashboard') }"><i class="fa fa-plus-circle"></i> ${ _('Dashboard') }</a>      
     </%def>
 
     <%def name="creation()">    

+ 1 - 0
apps/search/static/js/search.ko.js

@@ -358,6 +358,7 @@ var Collection = function (vm, collection) {
   self.template.fieldsSelected.subscribe(function () {
     vm.search();
   });
+  self.template.extracode.extend({rateLimit: {timeout: 1000 * 60 * 60, method: "notifyWhenChangesStop"}}); // No live js/css update
   self.template.template.extend({rateLimit: {timeout: 3000, method: "notifyWhenChangesStop"}});
   self.template.template.subscribe(function () {
     vm.search();

+ 1 - 1
desktop/libs/indexer/src/indexer/settings.py

@@ -16,7 +16,7 @@
 # limitations under the License.
 
 DJANGO_APPS = [ "indexer" ]
-NICE_NAME = "Collection Manager"
+NICE_NAME = "Solr Indexer"
 REQUIRES_HADOOP = False
 MENU_INDEX = 43
 ICON = "/search/static/art/icon_search_24.png"

+ 9 - 3
desktop/libs/indexer/src/indexer/templates/collections.mako

@@ -306,7 +306,7 @@ ${ commonheader(_('Collection Manager'), "indexer", user, "29px") | n,unicode }
     <ul class="nav nav-list">
       <li class="nav-header">${_('Actions')}</li>
       <li><a data-bind="attr: { href: '/search/browse/' + collection().name() }"><i class="fa fa-search"></i> ${ _('Search') }</a></li>
-      <li><a data-bind="routie: 'edit/' + collection().name() + '/upload'" href="javascript:void(0)"><i class="fa fa-folder-open-o"></i> ${_('Index file')}</a></li>      
+      <li><a data-bind="routie: 'edit/' + collection().name() + '/upload'" href="javascript:void(0)"><i class="fa fa-arrow-circle-o-down"></i> ${_('Index file')}</a></li>      
       <li><a data-bind="click: removeCollection, clickBubble: false" href="javascript:void(0)"><i class="fa fa-times"></i> ${_('Delete')}</a></li>
     </ul>
   </div>
@@ -384,14 +384,17 @@ ${ commonheader(_('Collection Manager'), "indexer", user, "29px") | n,unicode }
 </script>
 
 <script type="text/html" id="upload-collection-data">
+  <div class="alert alert-info">
+    ${ _('CSV or TSV file to index') }
+  </div>
   <div class="control-group" data-bind="css: {'error': file.errors().length > 0}">
     <label for="name" class="control-label">${_("Files")}</label>
     <div class="controls">
-      <input data-bind="value: file" type="text" class="span7 fileChooser" placeholder="/user/hue/data.csv"/>
+      <input data-bind="value: file" type="text" class="input-xxlarge fileChooser" placeholder="/user/hue/data.csv"/>
     </div>
   </div>
 
-  <div class="control-group" data-bind="css: {'error': sourceType.errors().length > 0}">
+  <div class="control-group hide" data-bind="css: {'error': sourceType.errors().length > 0}">
     <label for="name" class="control-label">${_("Source type")}</label>
     <div class="controls">
       <select data-bind="options: sourceTypes, value: sourceType" name="type"></select>
@@ -400,6 +403,9 @@ ${ commonheader(_('Collection Manager'), "indexer", user, "29px") | n,unicode }
 </script>
 
 <script type="text/html" id="upload-collection-data-separated">
+  <div class="alert alert-info">
+    ${ _('Format of the selected file to index') }
+  </div>
   <div class="control-group" data-bind="css: {'error': fieldSeparator.errors().length > 0}">
     <label for="separator" class="control-label">${_("Separator")}</label>
     <div class="controls">

部分文件因为文件数量过多而无法显示