{% set non_important_text = "color: lightgrey;" %} {% set important_text = "color: white !important;" %} {% set main_text = "color: #F6F5F5 !important;" %} {% set button_color = "#60CA9A !important" %} {% macro kpi_name_link(kpi_link_prefix, point) -%} {{point.kpi_name}} {%- endmacro %} {% macro subdim_name_link(point, value_only=false) -%} {% if value_only -%} {{ point.subdim_formatted_value_only() }}{% else -%} {{ point.subdim_formatted() }} {%- endif %} {%- endmacro %} {% macro button_with_link(text, link) -%} {{ text }} {%- endmacro %} {% macro anomaly_point_formatting(point, kpi_link_prefix=none) -%} {% set include_kpi_name = kpi_link_prefix is not none %} {% if point.previous_value is none or point.y == point.previous_value -%} ∿ Anomalous behavior {% if include_kpi_name -%} in {{ kpi_name_link(kpi_link_prefix, point) }} {% if point.is_subdim %} {{ subdim_name_link(point) }} {% endif %} {% else -%} detected {% if point.is_subdim -%} in {{ subdim_name_link(point) }} {%- endif %} {%- endif %} - {% if point.previous_value is none -%} changed to {{point.y_readable}} {% if point.is_hourly -%} at {{ point.anomaly_time_only }} {%- endif %} {% else -%} {% if point.is_hourly %} with constant value {{point.y_readable}} from {{ point.previous_point_time_only }} to {{ point.anomaly_time_only }} {% else %} with same value {{point.y_readable}} as previous day {% endif %} {%- endif %} {% else -%} {% if point.y > point.previous_value %} ↑ {{ point.formatted_change_percent }} Spike {% elif point.y < point.previous_value %} ↓ {{ point.formatted_change_percent }} Drop {% endif %} {% if include_kpi_name %} in {{ kpi_name_link(kpi_link_prefix, point) }} {% if point.is_subdim %} {{ subdim_name_link(point) }} {% endif %} {% else %} detected {% if point.is_subdim %} in {{ subdim_name_link(point) }} {% endif %} {% endif %} - changed to {{point.y_readable}} {% if point.previous_value_readable is not none -%} from {{point.previous_value_readable}} {%- endif %} {% if point.is_hourly -%} from {{ point.previous_point_time_only }} to {{ point.anomaly_time_only }} {%- endif %} {%- endif %}{% if point.relevant_subdims -%} {%- endif %} {%- endmacro %}