mirror of
https://github.com/discourse/discourse.git
synced 2025-02-17 09:22:44 +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 {
|
.col.term {
|
||||||
width: 30%;
|
width: 30%;
|
||||||
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.col.topic {
|
.col.topic {
|
||||||
width: 35%;
|
width: 35%;
|
||||||
|
text-align: left;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ class SearchLog < ActiveRecord::Base
|
||||||
COUNT(DISTINCT ip_address) AS unique")
|
COUNT(DISTINCT ip_address) AS unique")
|
||||||
.where('created_at > ?', start_of(period))
|
.where('created_at > ?', start_of(period))
|
||||||
.group(:term)
|
.group(:term)
|
||||||
.order('COUNT(*) DESC')
|
.order('COUNT(DISTINCT ip_address) DESC')
|
||||||
.limit(100).to_a
|
.limit(100).to_a
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user