Exemple #1
0
def indexer(request):
    if not request.user.has_hue_permission(action="access", app='search'):
        raise PopupException(_('Missing permission.'), error_code=403)

    searcher = IndexController(request.user)
    indexes = searcher.get_indexes()

    for index in indexes:
        index['isSelected'] = False

    return render(
        'indexer.mako', request, {
            'is_embeddable':
            request.GET.get('is_embeddable', False),
            'indexes_json':
            json.dumps(indexes),
            'fields_json':
            json.dumps([field.name for field in FIELD_TYPES]),
            'operators_json':
            json.dumps([operator.to_dict() for operator in OPERATORS]),
            'file_types_json':
            json.dumps([
                format_.format_info()
                for format_ in get_file_indexable_format_types()
            ]),
            'default_field_type':
            json.dumps(Field().to_dict())
        })
Exemple #2
0
def indexes(request):
    searcher = IndexController(request.user)
    indexes = searcher.get_indexes()

    for index in indexes:
        index['isSelected'] = False

    return render('indexes.mako', request,
                  {'indexes_json': json.dumps(indexes)})
Exemple #3
0
def indexes(request):
  searcher = IndexController(request.user)
  indexes = searcher.get_indexes()

  for index in indexes:
    index['isSelected'] = False

  return render('indexes.mako', request, {
      'indexes_json': json.dumps(indexes)
  })
Exemple #4
0
def indexes(request):
    if not request.user.has_hue_permission(action="access", app='search'):
        raise PopupException(_('Missing permission.'), error_code=403)

    searcher = IndexController(request.user)
    indexes = searcher.get_indexes()

    for index in indexes:
        index['isSelected'] = False

    return render('indexes.mako', request,
                  {'indexes_json': json.dumps(indexes)})
Exemple #5
0
def indexer(request):
  searcher = IndexController(request.user)
  indexes = searcher.get_indexes()

  for index in indexes:
    index['isSelected'] = False

  return render('indexer.mako', request, {
      'indexes_json': json.dumps(indexes),
      'fields_json' : json.dumps([field.name for field in Field.TYPES]),
      'operators_json' : json.dumps([operator.to_dict() for operator in Field.OPERATORS])
  })
Exemple #6
0
def indexer(request):
  searcher = IndexController(request.user)
  indexes = searcher.get_indexes()

  for index in indexes:
    index['isSelected'] = False

  return render('indexer.mako', request, {
      'indexes_json': json.dumps(indexes),
      'fields_json' : json.dumps([field.name for field in FIELD_TYPES]),
      'operators_json' : json.dumps([operator.to_dict() for operator in OPERATORS]),
      'file_types_json' : json.dumps([format_.format_info() for format_ in get_format_types()]),
      'default_field_type' : json.dumps(Field().to_dict())
  })
Exemple #7
0
def indexer(request):
    searcher = IndexController(request.user)
    indexes = searcher.get_indexes()

    for index in indexes:
        index['isSelected'] = False

    return render(
        'indexer.mako', request, {
            'indexes_json':
            json.dumps(indexes),
            'fields_json':
            json.dumps([field.name for field in FIELD_TYPES]),
            'operators_json':
            json.dumps([operator.to_dict() for operator in OPERATORS]),
            'file_types_json':
            json.dumps(
                [format_.format_info() for format_ in get_format_types()]),
            'default_field_type':
            json.dumps(Field().to_dict())
        })