Skip to content

A platform for community discussion. Free, open, simple.

Replace the "posts" line with message count

Samc381d604714d
diff --git a/app/assets/javascripts/admin/models/report.js.es6 b/app/assets/javascripts/admin/models/report.js.es6
index 94e72eaac47..5441be004a3 100644
--- a/app/assets/javascripts/admin/models/report.js.es6
+++ b/app/assets/javascripts/admin/models/report.js.es6
@@ -159,6 +159,9 @@ const Report = Discourse.Model.extend({
@computed('type')
icon(type) {
+ if (type.indexOf("message") > -1) {
+ return "envelope";
+ }
switch (type) {
case "flags": return "flag";
case "likes": return "heart";
diff --git a/app/models/admin_dashboard_next_data.rb b/app/models/admin_dashboard_next_data.rb
index b588561440a..335087925f8 100644
--- a/app/models/admin_dashboard_next_data.rb
+++ b/app/models/admin_dashboard_next_data.rb
@@ -1,7 +1,14 @@
class AdminDashboardNextData
include StatsCacheable
- REPORTS = ["page_view_total_reqs", "visits", "posts", "time_to_first_response", "likes", "flags" ]
+ REPORTS = %w{
+ page_view_total_reqs
+ visits
+ time_to_first_response
+ likes
+ flags
+ user_to_user_private_messages_with_replies
+ }
def initialize(opts = {})
@opts = opts