Managed instances: report usage counts each day by the instance's own date (tickets opened, resolved and by email, agent replies, invoices, payments, agents and client portal sign-ins, email sent and failed, API calls by key name), shown in a Usage part of the History card and a sortable Last 30 days column on the list, with Managed By saying only counts are sent, database 4.2.0

This commit is contained in:
johnnyq
2026-11-25 16:06:39 -05:00
parent 95c44f6c73
commit bfc91512c9
7 changed files with 330 additions and 11 deletions

13
db.sql
View File

@@ -2353,6 +2353,19 @@ CREATE TABLE `managed_instance_stats` (
`managed_stat_version` varchar(20) NOT NULL DEFAULT '',
`managed_stat_checkins` int(11) NOT NULL DEFAULT 0,
`managed_stat_outages` text DEFAULT NULL,
`managed_stat_tickets_opened` int(11) DEFAULT NULL,
`managed_stat_tickets_email` int(11) DEFAULT NULL,
`managed_stat_tickets_resolved` int(11) DEFAULT NULL,
`managed_stat_replies` int(11) DEFAULT NULL,
`managed_stat_invoices` int(11) DEFAULT NULL,
`managed_stat_payments` int(11) DEFAULT NULL,
`managed_stat_agent_signins` int(11) DEFAULT NULL,
`managed_stat_portal_signins` int(11) DEFAULT NULL,
`managed_stat_emails_sent` int(11) DEFAULT NULL,
`managed_stat_emails_failed` int(11) DEFAULT NULL,
`managed_stat_api_calls` int(11) DEFAULT NULL,
`managed_stat_api_keys` text DEFAULT NULL,
`managed_stat_agents_30d` int(11) DEFAULT NULL,
PRIMARY KEY (`managed_stat_id`),
UNIQUE KEY `managed_stat_day` (`managed_stat_instance_id`,`managed_stat_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;