conf.py 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/usr/bin/env python
  2. # Licensed to Cloudera, Inc. under one
  3. # or more contributor license agreements. See the NOTICE file
  4. # distributed with this work for additional information
  5. # regarding copyright ownership. Cloudera, Inc. licenses this file
  6. # to you under the Apache License, Version 2.0 (the
  7. # "License"); you may not use this file except in compliance
  8. # with the License. You may obtain a copy of the License at
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. # Unless required by applicable law or agreed to in writing, software
  13. # distributed under the License is distributed on an "AS IS" BASIS,
  14. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. # See the License for the specific language governing permissions and
  16. # limitations under the License.
  17. from django.utils.translation import ugettext_lazy as _
  18. from desktop.conf import is_hue4
  19. from desktop.lib.conf import Config, coerce_bool
  20. SOLR_URL = Config(
  21. key="solr_url",
  22. help=_("URL of the Solr Server."),
  23. default="http://localhost:8983/solr/")
  24. EMPTY_QUERY = Config(
  25. key="empty_query",
  26. help=_("Query sent when no term is entered."),
  27. default="*:*")
  28. SECURITY_ENABLED = Config(
  29. key="security_enabled",
  30. help=_("Whether Solr requires client to perform Kerberos authentication."),
  31. default=False,
  32. type=coerce_bool)
  33. LATEST = Config(
  34. key="latest",
  35. help=_("Use latest Solr 5.2+ features."),
  36. default=False,
  37. type=coerce_bool)
  38. ENABLE_SQL = Config(
  39. key="enable_sql",
  40. help=_("Offer to use SQL engines to compute the dashboards."),
  41. dynamic_default=is_hue4,
  42. private=True,
  43. type=coerce_bool)