Skip to content

Commit

Permalink
Merge pull request #96 from velrest/fix-dashboard-route
Browse files Browse the repository at this point in the history
statistcs is now by default enabled and this param is no more needed
  • Loading branch information
anehx authored Aug 6, 2018
2 parents c6b822e + d89584a commit 5f8ddb6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
1 change: 0 additions & 1 deletion frontend/app/dashboard/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export default Route.extend({
return hash({
projects: this.store.findAll('timed-subscription-project'),
tickets: this.store.query('rt-ticket', {
statistics: true,
page_size: 3,
page: 1
})
Expand Down
24 changes: 11 additions & 13 deletions frontend/mirage/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export default function() {
'/proxy/rt/tickets',
(
{ rtTickets },
{ queryParams: { page_size: pageSize, page, status, search, statistics } }
{ queryParams: { page_size: pageSize, page, status, search } }
) => {
let tickets = rtTickets.all()

Expand All @@ -228,18 +228,16 @@ export default function() {

let json = _pagination(tickets, page, pageSize)

if (statistics) {
json.meta.statistics = {
in_progress: 132,
all: 393,
states: {
new: 21,
open: 89,
stalled: 92,
resolved: 21,
rejected: 2,
deleted: 83
}
json.meta.statistics = {
in_progress: 132,
all: 393,
states: {
new: 21,
open: 89,
stalled: 92,
resolved: 21,
rejected: 2,
deleted: 83
}
}

Expand Down

0 comments on commit 5f8ddb6

Please sign in to comment.