Dashboard metrics link to their report pages

This commit is contained in:
Neil Lalonde 2013-03-19 12:04:40 -04:00
parent 1c5613cdfa
commit dab49c70bb
3 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,8 @@
Discourse.Report = Discourse.Model.extend({});
Discourse.Report = Discourse.Model.extend({
reportUrl: function() {
return("/admin/reports/" + this.get('type'));
}.property('type')
});
Discourse.Report.reopenClass({
find: function(type) {

View File

@ -1,5 +1,5 @@
<tr>
<td class="title">{{title}}</td>
<td class="title"><a {{bindAttr href="reportUrl"}}>{{title}}</a></td>
<td class="value">{{valueAtDaysAgo data 0}}</td>
<td class="value">{{valueAtDaysAgo data 1}}</td>
<td class="value">{{valueAtDaysAgo data 7}}</td>

View File

@ -1,5 +1,5 @@
<tr>
<td class="title">{{title}}</td>
<td class="title"><a {{bindAttr href="reportUrl"}}>{{title}}</a></td>
<td class="value">{{valueAtDaysAgo data 0}}</td>
<td class="value">{{valueAtDaysAgo data 1}}</td>
<td class="value">{{sumLast data 7}}</td>