Replace fixed DSL fields with parameterized metric expressions

This commit is contained in:
Peter Stockings
2026-10-04 10:24:12 +11:00
parent 418e03583a
commit d660b86bb0
18 changed files with 402 additions and 137 deletions
+2
View File
@@ -35,6 +35,7 @@ from .services import activity_data, import_cache, import_upload, route_data
from .stats import DEFAULT, METRICS, explore, parse_query, period_bounds, query_text
from .stats_analysis import EXTRA_UNITS, FUNCTIONS, GROUPS
from .stats_dsl import UNITS
from .stats_expressions import FUNCTIONS as METRIC_FUNCTIONS
web = Blueprint("web", __name__)
DUMMY_HASH = generate_password_hash("not-a-real-account-password")
@@ -241,6 +242,7 @@ def stats():
presets=PRESETS,
language={
"functions": sorted(FUNCTIONS),
"metric_functions": METRIC_FUNCTIONS,
"groups": sorted(GROUPS),
"fields": {
key: {