mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:42:04 +08:00
UX: sort search logs results by unique searches
This commit is contained in:
parent
db68434db1
commit
ee1f68438e
|
@ -1362,10 +1362,12 @@ table.api-keys {
|
|||
|
||||
.col.term {
|
||||
width: 30%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.col.topic {
|
||||
width: 35%;
|
||||
text-align: left;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ class SearchLog < ActiveRecord::Base
|
|||
COUNT(DISTINCT ip_address) AS unique")
|
||||
.where('created_at > ?', start_of(period))
|
||||
.group(:term)
|
||||
.order('COUNT(*) DESC')
|
||||
.order('COUNT(DISTINCT ip_address) DESC')
|
||||
.limit(100).to_a
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user