Reverse the order of rows in a report so today is first

This commit is contained in:
Neil Lalonde 2014-06-06 17:08:35 -04:00
parent 4f90869618
commit b031327a46
2 changed files with 5 additions and 1 deletions

View File

@ -131,6 +131,10 @@ Discourse.Report = Discourse.Model.extend({
thirtyDayCountTitle: function() {
return this.changeTitle( this.sumDays(1,30), this.get('prev30Days'), 'in the previous 30 day period');
}.property('data'),
dataReversed: function() {
return this.get('data').toArray().reverse();
}.property('data')
});

View File

@ -15,7 +15,7 @@
<th>{{yaxis}}</th>
</tr>
{{#each row in data}}
{{#each row in dataReversed}}
<tr>
<td>{{row.x}}</td>
<td>