diff --git a/dDashboardServer/routes/APIRoutes.cpp b/dDashboardServer/routes/APIRoutes.cpp
index 65e858e12..f02cc3c28 100644
--- a/dDashboardServer/routes/APIRoutes.cpp
+++ b/dDashboardServer/routes/APIRoutes.cpp
@@ -471,6 +471,7 @@ namespace {
JsonReply(reply, eHTTPStatusCode::OK, {
{"pendingNames", snapshot.pendingNames},
{"pendingPetNames", snapshot.pendingPetNames},
+ {"pendingGuildNames", snapshot.pendingGuildNames},
{"pendingProperties", snapshot.pendingProperties},
{"unresolvedBugReports", snapshot.unresolvedBugReports},
{"openEconomyFlags", snapshot.openEconomyFlags}
diff --git a/dDashboardServer/routes/WSRoutes.cpp b/dDashboardServer/routes/WSRoutes.cpp
index d91c77d2e..1d34a6106 100644
--- a/dDashboardServer/routes/WSRoutes.cpp
+++ b/dDashboardServer/routes/WSRoutes.cpp
@@ -22,6 +22,7 @@ namespace {
return {
{"pendingNames", snapshot.pendingNames},
{"pendingPetNames", snapshot.pendingPetNames},
+ {"pendingGuildNames", snapshot.pendingGuildNames},
{"pendingProperties", snapshot.pendingProperties},
{"unresolvedBugReports", snapshot.unresolvedBugReports},
{"openEconomyFlags", snapshot.openEconomyFlags}
diff --git a/dDashboardServer/static/js/dashboard.js b/dDashboardServer/static/js/dashboard.js
index 2f85bb82e..f41d3929b 100644
--- a/dDashboardServer/static/js/dashboard.js
+++ b/dDashboardServer/static/js/dashboard.js
@@ -126,8 +126,9 @@
function updateBadges(counts) {
var map = {
- 'moderation': (counts.pendingNames || 0) + (DASH.can('moderate_pet_names') ? counts.pendingPetNames || 0 : 0) + (DASH.can('moderate_properties') ? counts.pendingProperties || 0 : 0),
+ 'moderation': (counts.pendingNames || 0) + (DASH.can('moderate_pet_names') ? counts.pendingPetNames || 0 : 0) + (DASH.can('guilds_manage') ? counts.pendingGuildNames || 0 : 0) + (DASH.can('moderate_properties') ? counts.pendingProperties || 0 : 0),
'pet_names': counts.pendingPetNames || 0,
+ 'guilds': counts.pendingGuildNames || 0,
'bug_reports': counts.unresolvedBugReports || 0,
'reports': counts.openEconomyFlags || 0
};
diff --git a/dDashboardServer/templates/header.jinja2 b/dDashboardServer/templates/header.jinja2
index b21eea79e..a85dc3b7d 100644
--- a/dDashboardServer/templates/header.jinja2
+++ b/dDashboardServer/templates/header.jinja2
@@ -44,7 +44,7 @@
{% if can.chat_view %}Chat Log{% endif %}
{% if can.chat_filter_manage %}Chat Filter{% endif %}
{% if can.moderate_pet_names %}Pet Names{% endif %}
- {% if can.guilds_manage %}Guilds{% endif %}
+ {% if can.guilds_manage %}Guilds {% endif %}
{% if can.characters_mail %}Mail{% endif %}
{% if can.mail_send %}Send Mail{% endif %}
diff --git a/dDatabase/GameDatabase/ITables/IDashboardStats.h b/dDatabase/GameDatabase/ITables/IDashboardStats.h
index 148cf42f8..38bb5c52e 100644
--- a/dDatabase/GameDatabase/ITables/IDashboardStats.h
+++ b/dDatabase/GameDatabase/ITables/IDashboardStats.h
@@ -19,6 +19,7 @@ public:
uint64_t unresolvedBugReports{};
uint64_t petNames{};
uint64_t pendingPetNames{};
+ uint64_t pendingGuildNames{}; // guilds whose name waits for moderation
uint64_t activityLogMaxId{};
uint64_t chatLogMaxId{};
uint64_t commandLogMaxId{};
diff --git a/dDatabase/GameDatabase/MySQL/Tables/Dashboard.cpp b/dDatabase/GameDatabase/MySQL/Tables/Dashboard.cpp
index 9ba3fec10..31792c0e9 100644
--- a/dDatabase/GameDatabase/MySQL/Tables/Dashboard.cpp
+++ b/dDatabase/GameDatabase/MySQL/Tables/Dashboard.cpp
@@ -19,6 +19,7 @@ namespace {
"(SELECT COUNT(*) FROM bug_reports WHERE resolved_time IS NULL) AS unresolved_bug_reports, "
"(SELECT COUNT(*) FROM pet_names) AS pet_names, "
"(SELECT COUNT(*) FROM pet_names WHERE approved = 1) AS pending_pet_names, "
+ "(SELECT COUNT(*) FROM guilds WHERE name_status = 1) AS pending_guild_names, "
"(SELECT COALESCE(MAX(id), 0) FROM activity_log) AS activity_log_max_id, "
"(SELECT COALESCE(MAX(id), 0) FROM chat_log) AS chat_log_max_id, "
"(SELECT COALESCE(MAX(id), 0) FROM command_log) AS command_log_max_id, "
@@ -255,6 +256,7 @@ IDashboardStats::Snapshot MySQLDatabase::GetDashboardSnapshot() {
snapshot.unresolvedBugReports = result->getUInt64("unresolved_bug_reports");
snapshot.petNames = result->getUInt64("pet_names");
snapshot.pendingPetNames = result->getUInt64("pending_pet_names");
+ snapshot.pendingGuildNames = result->getUInt64("pending_guild_names");
snapshot.activityLogMaxId = result->getUInt64("activity_log_max_id");
snapshot.chatLogMaxId = result->getUInt64("chat_log_max_id");
snapshot.commandLogMaxId = result->getUInt64("command_log_max_id");
diff --git a/dDatabase/GameDatabase/SQLite/Tables/Dashboard.cpp b/dDatabase/GameDatabase/SQLite/Tables/Dashboard.cpp
index 2e1a1fcce..841777d39 100644
--- a/dDatabase/GameDatabase/SQLite/Tables/Dashboard.cpp
+++ b/dDatabase/GameDatabase/SQLite/Tables/Dashboard.cpp
@@ -19,6 +19,7 @@ namespace {
"(SELECT COUNT(*) FROM bug_reports WHERE resolved_time IS NULL) AS unresolved_bug_reports, "
"(SELECT COUNT(*) FROM pet_names) AS pet_names, "
"(SELECT COUNT(*) FROM pet_names WHERE approved = 1) AS pending_pet_names, "
+ "(SELECT COUNT(*) FROM guilds WHERE name_status = 1) AS pending_guild_names, "
"(SELECT COALESCE(MAX(id), 0) FROM activity_log) AS activity_log_max_id, "
"(SELECT COALESCE(MAX(id), 0) FROM chat_log) AS chat_log_max_id, "
"(SELECT COALESCE(MAX(id), 0) FROM command_log) AS command_log_max_id, "
@@ -260,6 +261,7 @@ IDashboardStats::Snapshot SQLiteDatabase::GetDashboardSnapshot() {
snapshot.unresolvedBugReports = result.getInt64Field("unresolved_bug_reports");
snapshot.petNames = result.getInt64Field("pet_names");
snapshot.pendingPetNames = result.getInt64Field("pending_pet_names");
+ snapshot.pendingGuildNames = result.getInt64Field("pending_guild_names");
snapshot.activityLogMaxId = result.getInt64Field("activity_log_max_id");
snapshot.chatLogMaxId = result.getInt64Field("chat_log_max_id");
snapshot.commandLogMaxId = result.getInt64Field("command_log_max_id");