diff --git a/panoramix/forms.py b/panoramix/forms.py index b0181ee3a3c35..3a607ef05748f 100644 --- a/panoramix/forms.py +++ b/panoramix/forms.py @@ -124,13 +124,14 @@ def __init__(self, viz): default='None', choices=[(s, s) for s in ['None', 'mean', 'sum', 'std', 'cumsum']], description=( - "Defines a rolling window function to apply")), + "Defines a rolling window function to apply, works along " + "with the [Periods] text box")), 'rolling_periods': IntegerField( 'Periods', validators=[validators.optional()], description=( "Defines the size of the rolling window function, " - "relative to the 'granularity' field")), + "relative to the time granularity selected")), 'series': SelectField( 'Series', choices=group_by_choices, default=default_groupby, @@ -152,8 +153,19 @@ def __init__(self, viz): 'Bubble Size', default=default_metric, choices=datasource.metrics_combo), - 'where': TextField('Custom WHERE clause', default=''), - 'having': TextField('Custom HAVING clause', default=''), + 'where': TextField( + 'Custom WHERE clause', default='', + description=( + "The text in this box gets included in your query's WHERE " + "clause, as an AND to other criteria. You can include " + "complex expression, parenthesis and anything else " + "supported by the backend it is directed towards.")), + 'having': TextField('Custom HAVING clause', default='', + description=( + "The text in this box gets included in your query's HAVING" + " clause, as an AND to other criteria. You can include " + "complex expression, parenthesis and anything else " + "supported by the backend it is directed towards.")), 'compare_lag': TextField('Comparison Period Lag', description="Based on granularity, number of time periods to compare against"), 'compare_suffix': TextField('Comparison suffix', @@ -305,8 +317,13 @@ class QueryForm(OmgWtForm): # datasource type specific form elements if datasource.__class__.__name__ == 'SqlaTable': - QueryForm.fieldsets += ( - {'label': 'SQL', 'fields': ['where', 'having']},) + QueryForm.fieldsets += ({ + 'label': 'SQL', + 'fields': ['where', 'having'], + 'description': ( + "This section exposes ways to include snippets of " + "SQL in your query"), + },) setattr(QueryForm, 'where', px_form_fields['where']) setattr(QueryForm, 'having', px_form_fields['having']) diff --git a/panoramix/templates/panoramix/explore.html b/panoramix/templates/panoramix/explore.html index 379038c6b279b..e3dd9589b152e 100644 --- a/panoramix/templates/panoramix/explore.html +++ b/panoramix/templates/panoramix/explore.html @@ -27,6 +27,11 @@

{% if fieldset.label %} {{ fieldset.label }} + {% if fieldset.description %} + + {% endif %} [-] {% endif %} @@ -70,6 +75,9 @@

Filters + [-]
diff --git a/panoramix/viz.py b/panoramix/viz.py index 06facd5984eea..fd0379a42ff15 100644 --- a/panoramix/viz.py +++ b/panoramix/viz.py @@ -541,6 +541,10 @@ class NVD3TimeSeriesViz(NVD3Viz): ), }, { 'label': 'Advanced Analytics', + 'description': ( + "This section contains options " + "that allow for advanced analytical post processing " + "of query reults"), 'fields': ( ('rolling_type', 'rolling_periods'), 'time_compare',