{{#unless isHidden}} {{#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}}
{{#if showError}} {{#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}} {{else}} {{#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}} {{/if}}
{{#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 isChartMode}}
{{#each chartGroupings as |chartGrouping|}} {{d-button label=chartGrouping.label action=(action "changeGrouping" chartGrouping.id) class=chartGrouping.class }} {{/each}}
{{/if}} {{#if showDatesOptions}}
{{i18n "admin.dashboard.reports.dates"}}
{{date-time-input-range from=startDate to=endDate onChange=(action "onChangeDateRange") showFromTime=false showToTime=false }}
{{/if}} {{#each model.available_filters as |filter|}}
{{i18n (concat "admin.dashboard.reports.filters." filter.id ".label")}}
{{component (concat "report-filters/" filter.type) model=model filter=filter applyFilter=(action "applyFilter")}}
{{/each}}
{{d-button class="btn-default export-csv-btn" action=(action "exportCsv") label="admin.export_csv.button_text" icon="download"}}
{{#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}}
{{html-safe disabledLabel}}
{{/if}} {{/unless}}