示例#1
0
    def setUp(self):
        self.c = make_logged_in_client(is_superuser=False)
        grant_access("test", "test", "indexer")
        add_to_group("test")
        self.user = User.objects.get(username='******')
        self.solr_client = SolrClient(self.user, api=MockSolrCdhCloudHdfsApi())

        self.finish = ENABLE_NEW_INDEXER.set_for_testing(True)
示例#2
0
def get_format_types():
    formats = [CSVFormat]

    if ENABLE_NEW_INDEXER.get():
        formats.extend([
            HueLogFormat, ApacheCombinedFormat, RubyLogFormat, SyslogFormat,
            ParquetFormat
        ])

    return formats
示例#3
0
  from django.urls import re_path
else:
  from django.conf.urls import url as re_path

urlpatterns = [
  re_path(r'^install_examples$', indexer_views.install_examples, name='install_examples'),

  re_path(r'^importer/?$', indexer_views.importer, name='importer'),
  re_path(
    r'^importer/prefill/(?P<source_type>[^/]+)/(?P<target_type>[^/]+)/(?P<target_path>[^/]+)?$',
    indexer_views.importer_prefill,
    name='importer_prefill'
  ),
]

if ENABLE_NEW_INDEXER.get():
  urlpatterns += [
    re_path(r'^$', indexer_views.indexes, name='indexes'),
    re_path(r'^indexes/?$', indexer_views.indexes, name='indexes'),
    re_path(r'^indexes/(?P<index>[^/]+)/?$', indexer_views.indexes, name='indexes'),
    re_path(r'^collections$', indexer_views.collections, name='collections'), # Old page
  ]
else:
  urlpatterns += [
    re_path(r'^$', indexer_views.collections, name='collections'),
    re_path(r'^indexes/?$', indexer_views.indexes, name='indexes'),
  ]

urlpatterns += [
    re_path(r'^topics/?$', indexer_views.topics, name='topics'),
    re_path(r'^topics/(?P<index>[^/]+)/?$', indexer_views.topics, name='topics'),
示例#4
0
    def setUp(self):
        self.c = make_logged_in_client(is_superuser=False)
        grant_access("test", "test", "indexer")
        add_to_group("test")

        self.finish = ENABLE_NEW_INDEXER.set_for_testing(True)