{% extends "base.html" %} {% block title %}{{ code }} · {{ t('design.bi_page_title') }}{% endblock %} {% block header %}
{{ t('design.title') }}

{{ code }} · {{ report.report_name }} · {{ t('design.bi_page_title') }}

{% endblock %} {% block header_actions %}
{{ t('design.open_report') }} {{ t('design.back_to_list') }}
{% endblock %} {% block content %} {% if msg %} {% set refused = msg.startswith(('link_', 'params_')) and msg != 'params_saved' or msg in ('bi_unavailable', 'dataset_needs_params', 'dataset_failed') %} {% endif %} {% if sync_outcome %} {% endif %} {% if superset_error %} {% endif %} {% if not self_service_on %} {% else %} {% set catalog = bi_info.catalog if bi_info and bi_info.catalog else None %} {#- Dashboards, charts and datasets: only those on data the user may design (an administrator: all), and of these the user's own unless "All" is chosen. -#}
{{ t('design.superset_show') }}
{{ t('design.superset_mine') }} {{ t('design.superset_all') }}
{{ t('design.superset_scope_admin') if auth.is_admin else t('design.superset_scope') }} {% if catalog and catalog.me is not none %} {{ t('design.superset_account', account=catalog.account) }} {% endif %}
{% if catalog and not catalog.error and catalog.me is none %} {% endif %}

{{ t('design.dataset_table') }}

{% if can_publish and bi_dataset_ready %}
{% endif %}
{{ t('design.dataset_table') }}
{% if report.bi_dataset_table %} {{ report.bi_dataset_table }} {% else %} — {% endif %}
{{ t('design.dashboard_status') }}
{% if bi_dataset_ready and bi_info and bi_info.dataset_id %} {{ t('design.dataset_ready') }} {{ t('design.open_in_superset') }} {% else %} {{ t('design.dataset_not_made') if report.bi_dataset_table else t('design.dataset_no_table') }} {% if can_publish %}
{% elif not report.bi_dataset_table %}
{{ t('design.dataset_no_table_ask') }}
{% endif %} {% if report.bi_dataset_table %} {{ t('design.run_report_once') }} {% endif %} {% endif %}
{{ t('design.required_role') }}
{% if bi_info and bi_info.role %} {{ bi_info.role }} {% else %} — {% endif %}

{{ t('design.dashboard_title') }}

{{ t('design.dashboard_status') }}
{% if bi_info and bi_info.linked_uuid %}
{{ bi_info.linked_uuid }} {{ t('design.open_in_superset') }} {% if can_publish %}
{% endif %}
{% else %} {{ t('design.no_dashboard_linked') }} {% endif %}
{% set dashboards = bi_info.dashboards if bi_info else [] %} {% set shown = dashboards if show_all else dashboards | selectattr('mine', 'ne', false) | list %} {% if shown %}
{% for d in shown %} {% endfor %}
{{ t('design.dashboard_title') }} {{ t('design.dashboard_status') }} {{ t('design.actions') }}
{{ d.title }} {% if show_all and d.mine %}{{ t('design.superset_mine_badge') }}{% endif %} {% if d.usable %} {{ t('design.dashboard_usable') }} {% if d.members %} {{ t('design.dashboard_also_reads') }} {% for m in d.members %}{{ m }}{% if not loop.last %}, {% endif %}{% endfor %} {% endif %} {% else %} {{ t('design.dashboard_unusable') }} {{ d.reason }} {% endif %} {% if d.usable and can_publish %}
{% else %} — {% endif %}
{% else %}
{{ t('design.no_dashboards_found') }}
{% endif %} {% if dashboards | length > shown | length %}
{{ t('design.superset_hidden', n=dashboards | length - shown | length) }}
{% endif %}
{% if catalog %} {#- What the designer may build on in Superset: the datasets of the reports they may design and the charts on them. -#}

{{ t('design.catalog_title') }}

{% if catalog.error %} {% else %} {% set datasets = catalog.datasets if show_all else catalog.datasets | selectattr('mine') | list %} {% set charts = catalog.charts if show_all else catalog.charts | selectattr('mine') | list %}

{{ t('design.catalog_datasets') }}

{% if datasets %}
{% for d in datasets %} {% endfor %}
{{ t('design.catalog_report') }} {{ t('design.dataset_table') }}
{{ d.report }} {{ d.name }} {% if d.this %}{{ t('design.catalog_this_report') }}{% endif %} {% if show_all and d.mine %}{{ t('design.superset_mine_badge') }}{% endif %} {{ d.table }} {{ t('design.open_in_superset') }}
{% else %}
{{ t('design.catalog_no_datasets') }}
{% endif %} {% if catalog.datasets | length > datasets | length %}
{{ t('design.superset_hidden', n=catalog.datasets | length - datasets | length) }}
{% endif %}

{{ t('design.catalog_charts') }}

{% if charts %}
{% for c in charts %} {% endfor %}
{{ t('design.catalog_chart') }} {{ t('design.catalog_chart_type') }} {{ t('design.catalog_dataset') }}
{{ c.title }} {% if show_all and c.mine %}{{ t('design.superset_mine_badge') }}{% endif %} {{ c.viz_type or '' }} {% if c.report %}{{ c.report }}{% else %}{{ c.dataset or '—' }}{% endif %} {% if c.this %}{{ t('design.catalog_this_report') }}{% endif %}
{% else %}
{{ t('design.catalog_no_charts') }}
{% endif %} {% if catalog.charts | length > charts | length %}
{{ t('design.superset_hidden', n=catalog.charts | length - charts | length) }}
{% endif %}
{% endif %}
{% endif %} {% if dashboard_form %} {#- The dashboard reads the datasets of other reports too. Their parameters are dragged onto the report's form (or added with +): one with the same name, label and type as an input already there shares it; a parameter left out runs with its default value. -#} {% macro param_text(p) -%} {{ p.label }} {{ p.name }} {{ p.data_type }}{% if p.multi %} []{% endif %} {%- endmacro %}

{{ t('design.dashboard_params_title') }}

{{ t('design.dashboard_params_help') }}

{% if dashboard_form.missing %} {% endif %}

{{ t('design.dashboard_params_available') }}

{% for m in dashboard_form.members %}
{{ m.code }} · {{ m.name }}
{% for p in m.params %}
{{ param_text(p) }}
{% if p.without_default %}{{ t('design.dashboard_params_required') }} {% elif p.default %}{{ t('design.dashboard_params_default') }}: {{ p.default }} {% else %}{{ t('design.dashboard_params_no_default') }}{% endif %}
{% endfor %}
{% endfor %}

{{ t('design.dashboard_params_on_form') }}

{% for o in dashboard_form.own %}
{{ o.label }} {{ o.name }}
{{ t('design.dashboard_params_own') }}
{% endfor %}
{% macro picked_item(pick, key, member, member_name, text) -%}
{{ text }}
{{ member }} · {{ member_name }}
{%- endmacro %}
{% for p in dashboard_form.picked %}{{ picked_item(p.pick, p.key, p.member, p.member_name, param_text(p)) }}{% endfor %}
{{ t('design.dashboard_params_drop') }}
{% if can_publish %} {% endif %}
{% endif %}
{% endif %} {% endblock %} {% block scripts %} {% if dashboard_form %}{% endif %} {% endblock %}