{{#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-picker-past value=startDate defaultDate=startDate}}
{{i18n 'admin.dashboard.reports.end_date'}}
{{date-picker-past value=endDate defaultDate=endDate}}
{{/if}} {{#if showCategoryOptions}}
{{search-advanced-category-chooser filterable=true value=category castInteger=true}}
{{/if}} {{#if showGroupOptions}}
{{combo-box castInteger=true filterable=true valueAttribute="value" content=groupOptions value=groupId}}
{{/if}} {{#if showExport}}
{{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}}