{% set infotext = { 'green': "The last entry is a passing balance check.", 'red': "The last entry is a failing balance check.", 'yellow': "The last entry is not a balance check.", 'gray': "This account has not been updated in a while.", } %} {% macro indicator(account_name) %} {% if account_name and account_name|uptodate_eligible %} {% set status=api.is_account_uptodate(account_name, look_back_days=config['uptodate-indicator-grey-lookback-days']) %} {% if status %} {% endif %} {% endif %} {% endmacro %} {% macro last_account_activity(account_name) %} {% if account_name and account_name|uptodate_eligible %} {% set last_account_activity_in_days=api.last_account_activity_in_days(account_name) %} {% if last_account_activity_in_days > config['uptodate-indicator-grey-lookback-days'] %} {% endif %} {% endif %} {% endmacro %} {% macro account_name(account_name, last_segment=False) %} {{ account_name|last_segment if last_segment else account_name }} {% if config['uptodate-indicator-show-everywhere'] %} {{ last_account_activity(account_name) }} {{ indicator(account_name) }} {% endif %} {% endmacro %} {% macro account_name_header(account_name) %}