{{#if isEnabled}} {{#conditional-loading-section isLoading=isLoading}} {{#if showHeader}}
{{#if showTitle}} {{/if}} {{#if shouldDisplayTrend}}
{{#if model.average}} {{number model.currentAverage}}{{#if model.percent}}%{{/if}} {{else}} {{number model.currentTotal noTitle="true"}}{{#if model.percent}}%{{/if}} {{/if}} {{#if model.trendIcon}} {{d-icon model.trendIcon class="icon"}} {{/if}}
{{/if}}
{{/if}}
{{#unless showError}} {{#if hasData}} {{#if currentMode}} {{component modeComponent model=model options=options}} {{#if model.relatedReport}} {{admin-report showFilteringUI=false dataSourceName=model.relatedReport.type}} {{/if}} {{/if}} {{else}} {{#if rateLimitationString}}
{{d-icon "thermometer-three-quarters"}} {{rateLimitationString}}
{{else}}
{{d-icon "chart-pie"}} {{#if model.reportUrl}} {{#if model.title}} {{model.title}} — {{/if}} {{i18n "admin.dashboard.reports.no_data"}} {{else}} {{i18n "admin.dashboard.reports.no_data"}} {{/if}}
{{/if}} {{/if}} {{else}} {{#if showTimeoutError}}
{{d-icon "exclamation-triangle"}} {{i18n "admin.dashboard.timeout_error"}}
{{/if}} {{#if showExceptionError}}
{{d-icon "exclamation-triangle"}} {{i18n "admin.dashboard.exception_error"}}
{{/if}} {{#if showNotFoundError}}
{{d-icon "exclamation-triangle"}} {{i18n "admin.dashboard.not_found_error"}}
{{/if}} {{/unless}}
{{#if showFilteringUI}}
{{#if showModes}}
{{#each displayedModes as |displayedMode|}} {{d-button action=(action "changeMode") actionParam=displayedMode.mode class=displayedMode.cssClass icon=displayedMode.icon}} {{/each}}
{{/if}} {{#if showDatesOptions}}
{{i18n 'admin.dashboard.reports.start_date'}}
{{date-input date=startDate onChange=(action "onChangeStartDate")}}
{{i18n 'admin.dashboard.reports.end_date'}}
{{date-input date=endDate onChange=(action "onChangeEndDate")}}
{{/if}} {{#each model.available_filters as |filter|}}
{{i18n (concat "admin.dashboard.reports.filters." filter.id ".label")}}
{{component (concat "report-filters/" filter.id) filter=filter applyFilter=(action "applyFilter")}}
{{/each}} {{#if model.isTable}}
{{d-button class="btn-default export-csv-btn" action=(action "exportCsv") label="admin.export_csv.button_text" icon="download"}}
{{/if}} {{#if showRefresh}}
{{d-button class="refresh-report-btn btn-primary" action=(action "refreshReport") label="admin.dashboard.reports.refresh_report" icon="sync"}}
{{/if}}
{{/if}}
{{/conditional-loading-section}} {{else}}
{{{disabledLabel}}}
{{/if}}