fix: re-order graph values

This commit is contained in:
Benjamin Bellamy 2020-10-08 18:42:00 +02:00 committed by Yassine Doghri
parent e53f819264
commit 35f633b4c7
5 changed files with 9 additions and 6 deletions

View File

@ -40,7 +40,7 @@ class AnalyticsPodcastByCountryModel extends Model
'`podcast_id`' => $podcastId,
'`date` >' => date('Y-m-d', strtotime('-1 week')),
])
->orderBy('`labels`', 'ASC')
->orderBy('`values`', 'DESC')
->findAll();
cache()->save(

View File

@ -44,7 +44,7 @@ class AnalyticsPodcastByRegionModel extends Model
'`podcast_id`' => $podcastId,
'`date` >' => date('Y-m-d', strtotime('-1 week')),
])
->orderBy('`country_code`, `region_code`', 'ASC')
->orderBy('`values`', 'DESC')
->findAll();
cache()->save(

View File

@ -40,7 +40,7 @@ class AnalyticsWebsiteByBrowserModel extends Model
'`podcast_id`' => $podcastId,
'`date` >' => date('Y-m-d', strtotime('-1 week')),
])
->orderBy('`browser`', 'ASC')
->orderBy('`values`', 'DESC')
->findAll();
cache()->save(

View File

@ -40,7 +40,8 @@ class AnalyticsWebsiteByEntryPageModel extends Model
'`podcast_id`' => $podcastId,
'`date` >' => date('Y-m-d', strtotime('-1 week')),
])
->orderBy('`entry_page`', 'ASC')
->orderBy('`values`', 'DESC')
->limit(10)
->findAll();
cache()->save(

View File

@ -40,7 +40,8 @@ class AnalyticsWebsiteByRefererModel extends Model
'`podcast_id`' => $podcastId,
'`date` >' => date('Y-m-d', strtotime('-1 week')),
])
->orderBy('`referer`', 'ASC')
->orderBy('`values`', 'DESC')
->limit(10)
->findAll();
cache()->save(
@ -69,7 +70,8 @@ class AnalyticsWebsiteByRefererModel extends Model
'`podcast_id`' => $podcastId,
'`date` >' => date('Y-m-d', strtotime('-1 week')),
])
->orderBy('`domain`', 'ASC')
->orderBy('`values`', 'DESC')
->limit(10)
->findAll();
cache()->save(