FIX: fix/removes broken elements of old dashboard

This commit is contained in:
Joffrey JAFFEUX 2018-11-09 17:18:19 +01:00 committed by GitHub
parent 3e68539ef5
commit f8838ac9cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 22 deletions

View File

@ -117,27 +117,6 @@
</table> </table>
</div> </div>
<div class="dashboard-stats">
<table class="table table-condensed table-hover">
<thead>
<tr>
<th>&nbsp;</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>{{i18n 'admin.dashboard.uploads'}}</td>
<td>{{disk_space.uploads_used}} ({{i18n 'admin.dashboard.space_free' size=disk_space.uploads_free}})</td>
<td>{{#if currentUser.admin}}<a href="{{get-url '/admin/backups'}}">{{i18n 'admin.dashboard.backups'}}</a>{{/if}}</td>
<td>{{disk_space.backups_used}} ({{i18n 'admin.dashboard.space_free' size=disk_space.backups_free}})</td>
</tr>
</tbody>
</table>
</div>
{{#if showTrafficReport}} {{#if showTrafficReport}}
<div class="dashboard-stats"> <div class="dashboard-stats">
<table class="table table-condensed table-hover"> <table class="table table-condensed table-hover">

View File

@ -105,7 +105,7 @@ class IncomingLinksReport
end end
def self.report_top_referred_topics(report) def self.report_top_referred_topics(report)
report.y_titles[:num_clicks] = I18n.t("reports.#{report.type}.num_clicks") report.y_titles[:num_clicks] = I18n.t("reports.#{report.type}.labels.num_clicks")
num_clicks = link_count_per_topic(start_date: report.start_date, end_date: report.end_date, category_id: report.category_id) num_clicks = link_count_per_topic(start_date: report.start_date, end_date: report.end_date, category_id: report.category_id)
num_clicks = num_clicks.to_a.sort_by { |x| x[1] }.last(report.limit || 10).reverse num_clicks = num_clicks.to_a.sort_by { |x| x[1] }.last(report.limit || 10).reverse
report.data = [] report.data = []