Selaa lähdekoodia

[indexer] Install examples in admin wizard

Abraham Elmahrek 11 vuotta sitten
vanhempi
commit
b758d4a38a

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

@@ -114,6 +114,12 @@ ${ header.menubar() }
                   <i class="fa fa-download"></i> ${ apps['search'].nice_name }
                 </a>
               </li>
+              <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 'oozie' in app_names:
               <li>

+ 0 - 3
apps/search/src/search/views.py

@@ -35,8 +35,6 @@ from search.management.commands import search_setup
 from search.models import Collection, augment_solr_response, augment_solr_exception
 from search.search_controller import SearchController
 
-from indexer.management.commands import indexer_install_examples
-
 from django.utils.encoding import force_unicode
 from desktop.lib.rest.http_client import RestException
 
@@ -527,7 +525,6 @@ def install_examples(request):
   else:
     try:
       search_setup.Command().handle_noargs()
-      indexer_install_examples.Command().handle_noargs()
       result['status'] = 0
     except Exception, e:
       LOG.exception(e)