Reverse the order of rows in a report so today is first
This commit is contained in:
parent
4f90869618
commit
b031327a46
2 changed files with 5 additions and 1 deletions
app/assets/javascripts/admin
|
@ -131,6 +131,10 @@ Discourse.Report = Discourse.Model.extend({
|
||||||
|
|
||||||
thirtyDayCountTitle: function() {
|
thirtyDayCountTitle: function() {
|
||||||
return this.changeTitle( this.sumDays(1,30), this.get('prev30Days'), 'in the previous 30 day period');
|
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')
|
}.property('data')
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<th>{{yaxis}}</th>
|
<th>{{yaxis}}</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
{{#each row in data}}
|
{{#each row in dataReversed}}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{row.x}}</td>
|
<td>{{row.x}}</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
Reference in a new issue