-
-
+ {{#if activityMetrics.length}}
+
+
+
+
+
- {{#each activityMetrics as |metric|}}
- {{admin-report
- showHeader=false
- filters=activityMetricsFilters
- forcedModes="counters"
- dataSourceName=metric}}
- {{/each}}
+ {{#each activityMetrics as |metric|}}
+ {{admin-report
+ showHeader=false
+ filters=activityMetricsFilters
+ forcedModes="counters"
+ dataSourceName=metric}}
+ {{/each}}
+
-
+ {{/if}}
{{#conditional-loading-section isLoading=isLoading}}
diff --git a/app/models/report.rb b/app/models/report.rb
index bf7da8ee8a..d552a602d9 100644
--- a/app/models/report.rb
+++ b/app/models/report.rb
@@ -246,6 +246,8 @@ class Report
def self.report_signups(report)
report.group_filtering = true
+ report.icon = 'user-plus'
+
if report.group_id
basic_report_about report, User.real, :count_by_signup_date, report.start_date, report.end_date, report.group_id
add_counts report, User.real, 'users.created_at'
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index 423b032aa7..4a2e0e04f7 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -3993,6 +3993,7 @@ en:
tags: "Tags"
search: "Search"
groups: "Groups"
+ dashboard: "Dashboard"
secret_list:
invalid_input: "Input fields cannot be empty or contain vertical bar character."
diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml
index 74b319ddbc..d0fc02ebb4 100644
--- a/config/locales/server.en.yml
+++ b/config/locales/server.en.yml
@@ -1903,6 +1903,8 @@ en:
short_title: "The short title will be used on the user's home screen, launcher, or other places where space may be limited. A maximum of 12 characters is recommended."
+ dashboard_general_tab_activity_metrics: "Choose reports to be displayed as activity metrics on the general tab."
+
errors:
invalid_email: "Invalid email address."
invalid_username: "There's no user with that username."
diff --git a/config/site_settings.yml b/config/site_settings.yml
index 7be81be577..ebfd493e87 100644
--- a/config/site_settings.yml
+++ b/config/site_settings.yml
@@ -1898,3 +1898,19 @@ tags:
force_lowercase_tags:
default: true
client: true
+
+dashboard:
+ dashboard_general_tab_activity_metrics:
+ client: true
+ type: list
+ list_type: compact
+ default: "page_view_total_reqs|visits|time_to_first_response|likes|flags|user_to_user_private_messages_with_replies"
+ allow_any: false
+ choices:
+ - page_view_total_reqs
+ - visits
+ - time_to_first_response
+ - likes
+ - flags
+ - user_to_user_private_messages_with_replies
+ - signups
diff --git a/test/javascripts/acceptance/dashboard-next-test.js.es6 b/test/javascripts/acceptance/dashboard-next-test.js.es6
index 0f550953a8..6ceb52bc83 100644
--- a/test/javascripts/acceptance/dashboard-next-test.js.es6
+++ b/test/javascripts/acceptance/dashboard-next-test.js.es6
@@ -1,7 +1,10 @@
import { acceptance } from "helpers/qunit-helpers";
acceptance("Dashboard Next", {
- loggedIn: true
+ loggedIn: true,
+ settings: {
+ dashboard_general_tab_activity_metrics: "page_view_total_reqs"
+ }
});
QUnit.test("Dashboard", async assert => {
@@ -26,7 +29,6 @@ QUnit.test("tabs", async assert => {
QUnit.test("general tab", async assert => {
await visit("/admin");
-
assert.ok(exists(".admin-report.signups"), "signups report");
assert.ok(exists(".admin-report.posts"), "posts report");
assert.ok(exists(".admin-report.dau-by-mau"), "dau-by-mau report");
@@ -46,6 +48,10 @@ QUnit.test("general tab", async assert => {
"Houston...",
"displays problems"
);
+});
+
+QUnit.test("general tab - activity metrics", async assert => {
+ await visit("/admin");
assert.equal(
$(".admin-report.page-view-total-reqs .today-count")