From 8a165fd44ddae7c67e0d34eee39174b081c642af Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Wed, 10 Aug 2022 20:40:58 +0100 Subject: [PATCH] Update config --- app/local_settings.example.py | 45 ++++++++++++++++------------------- core/views/ui/tables.py | 4 ++-- 2 files changed, 22 insertions(+), 27 deletions(-) diff --git a/app/local_settings.example.py b/app/local_settings.example.py index 2b33a93..cc32498 100644 --- a/app/local_settings.example.py +++ b/app/local_settings.example.py @@ -1,27 +1,22 @@ -# Secret key -SECRET_KEY = "" - -# SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True - # OpenSearch settings OPENSEARCH_URL = "127.0.0.1" OPENSEARCH_PORT = 9200 OPENSEARCH_TLS = True -OPENSEARCH_USERNAME = "opensearch_user1" -OPENSEARCH_PASSWORD = "hunter2" +OPENSEARCH_USERNAME = "admin" +OPENSEARCH_PASSWORD = "" OPENSEARCH_INDEX_MAIN = "main" OPENSEARCH_INDEX_META = "meta" +OPENSEARCH_INDEX_INT = "int" -OPENSEARCH_MAIN_SEARCH_FIELDS = ["msg", "nick", "host", "ident"] -OPENSEARCH_MAIN_SIZES = ["5", "10", "15", "20", "50", "100", "200"] -OPENSEARCH_MAIN_TIMESCALES = ["minute", "hour", "day", "week", "month", "6months"] +OPENSEARCH_MAIN_SIZES = ["20", "50", "100", "200", "400", "800"] +OPENSEARCH_MAIN_SIZES_ANON = ["20", "50", "100"] +OPENSEARCH_MAIN_WILDCARD = True +OPENSEARCH_MAIN_WILDCARD_ANON = False +OPENSEARCH_MAIN_SOURCES = ["irc", "dis", "all"] +DRILLDOWN_RESULTS_PER_PAGE = 15 -OPENSEARCH_BLACKLISTED = { - "msg": ["example.com"], - "nick": ["me"], -} +OPENSEARCH_BLACKLISTED = {} # URLs DOMAIN = "example.com" @@ -35,23 +30,23 @@ CSRF_TRUSTED_ORIGINS = [URL] # Stripe STRIPE_TEST = True -STRIPE_API_KEY_TEST = "sk_test_xxx" -STRIPE_PUBLIC_API_KEY_TEST = "pk_test_xxx" +STRIPE_API_KEY_TEST = "" +STRIPE_PUBLIC_API_KEY_TEST = "" -STRIPE_API_KEY_PROD = "sk_prod_xxx" -STRIPE_PUBLIC_API_KEY_PROD = "pk_prod_xxx" +STRIPE_API_KEY_PROD = "" +STRIPE_PUBLIC_API_KEY_PROD = "" STRIPE_ENDPOINT_SECRET = "" STATIC_ROOT = "" SECRET_KEY = "a" -STRIPE_ADMIN_COUPON = "promo" +STRIPE_ADMIN_COUPON = "" # Threshold -THRESHOLD_ENDPOINT = "http://127.0.0.1:13869" -THRESHOLD_API_KEY = "name" -THRESHOLD_API_TOKEN = "token" -THRESHOLD_API_COUNTER = "counter" +THRESHOLD_ENDPOINT = "" +THRESHOLD_API_KEY = "api_1" +THRESHOLD_API_TOKEN = "" +THRESHOLD_API_COUNTER = "" # NickTrace NICKTRACE_MAX_ITERATIONS = 4 @@ -64,4 +59,4 @@ META_MAX_CHUNK_SIZE = 500 META_QUERY_SIZE = 10000 DEBUG = True -PROFILER = True +PROFILER = False \ No newline at end of file diff --git a/core/views/ui/tables.py b/core/views/ui/tables.py index ca93a12..e9a2861 100644 --- a/core/views/ui/tables.py +++ b/core/views/ui/tables.py @@ -1,5 +1,5 @@ from django_tables2 import Column, Table - +from django.conf import settings class DrilldownTable(Table): id = Column() @@ -38,5 +38,5 @@ class DrilldownTable(Table): num_chans = Column() num_users = Column() template_name = "ui/drilldown/table_results.html" - paginate_by = 5 + paginate_by = settings.DRILLDOWN_RESULTS_PER_PAGE row_attrs = "is-primary"