Changeset 3484639
- Timestamp:
- 03/17/2026 10:07:31 AM (2 weeks ago)
- Location:
- satollo-monitor
- Files:
-
- 46 added
- 14 edited
-
assets/screenshot-1.png (added)
-
assets/screenshot-2.png (added)
-
assets/screenshot-3.png (added)
-
assets/screenshot-4.png (added)
-
tags/1.0.1 (added)
-
tags/1.0.1/admin (added)
-
tags/1.0.1/admin/abilities (added)
-
tags/1.0.1/admin/abilities/index.php (added)
-
tags/1.0.1/admin/abilities/logs.php (added)
-
tags/1.0.1/admin/abilities/nav.php (added)
-
tags/1.0.1/admin/activate.php (added)
-
tags/1.0.1/admin/admin-ajax.php (added)
-
tags/1.0.1/admin/admin.php (added)
-
tags/1.0.1/admin/assets (added)
-
tags/1.0.1/admin/assets/admin.css (added)
-
tags/1.0.1/admin/assets/plotly-3.3.0.min.js (added)
-
tags/1.0.1/admin/emails (added)
-
tags/1.0.1/admin/emails/index.php (added)
-
tags/1.0.1/admin/emails/logs.php (added)
-
tags/1.0.1/admin/emails/nav.php (added)
-
tags/1.0.1/admin/http (added)
-
tags/1.0.1/admin/http/index.php (added)
-
tags/1.0.1/admin/http/logs.php (added)
-
tags/1.0.1/admin/http/nav.php (added)
-
tags/1.0.1/admin/index.php (added)
-
tags/1.0.1/admin/menu.php (added)
-
tags/1.0.1/admin/rest (added)
-
tags/1.0.1/admin/rest/index.php (added)
-
tags/1.0.1/admin/rest/logs.php (added)
-
tags/1.0.1/admin/rest/nav.php (added)
-
tags/1.0.1/admin/scheduler (added)
-
tags/1.0.1/admin/scheduler/filters.php (added)
-
tags/1.0.1/admin/scheduler/index.php (added)
-
tags/1.0.1/admin/scheduler/jobs.php (added)
-
tags/1.0.1/admin/scheduler/logs.php (added)
-
tags/1.0.1/admin/scheduler/nav.php (added)
-
tags/1.0.1/admin/scheduler/schedules.php (added)
-
tags/1.0.1/admin/settings.php (added)
-
tags/1.0.1/admin/users (added)
-
tags/1.0.1/admin/users/index.php (added)
-
tags/1.0.1/admin/users/logs.php (added)
-
tags/1.0.1/admin/users/nav.php (added)
-
tags/1.0.1/admin/users/roles.php (added)
-
tags/1.0.1/readme.txt (added)
-
tags/1.0.1/satollo-monitor.php (added)
-
tags/1.0.1/uninstall.php (added)
-
trunk/admin/abilities/index.php (modified) (2 diffs)
-
trunk/admin/abilities/logs.php (modified) (2 diffs)
-
trunk/admin/admin.php (modified) (4 diffs)
-
trunk/admin/assets/admin.css (modified) (1 diff)
-
trunk/admin/emails/index.php (modified) (2 diffs)
-
trunk/admin/emails/logs.php (modified) (1 diff)
-
trunk/admin/http/index.php (modified) (2 diffs)
-
trunk/admin/rest/index.php (modified) (1 diff)
-
trunk/admin/rest/logs.php (modified) (1 diff)
-
trunk/admin/scheduler/index.php (modified) (3 diffs)
-
trunk/admin/scheduler/logs.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (6 diffs)
-
trunk/satollo-monitor.php (modified) (5 diffs)
-
trunk/uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
satollo-monitor/trunk/admin/abilities/index.php
r3481978 r3484639 2 2 3 3 defined('ABSPATH') || exit; 4 5 // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- not relevant6 $subpage = sanitize_key($_GET['subpage'] ?? '');7 8 switch ($subpage) {9 case 'logs':10 include __DIR__ . '/logs.php';11 return;12 }13 4 14 5 class Monitor_List_Table extends WP_List_Table { … … 82 73 ?> 83 74 <?php include __DIR__ . '/../menu.php'; ?> 84 <div class="wrap" id="monitor-emails">75 <div class="wrap"> 85 76 <?php include __DIR__ . '/nav.php'; ?> 86 77 -
satollo-monitor/trunk/admin/abilities/logs.php
r3481978 r3484639 1 1 <?php 2 3 2 defined('ABSPATH') || exit; 4 3 5 4 // phpcs:disable WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching -- not relevant 6 5 7 class aMonitor_List_Table extends WP_List_Table { 6 global $wpdb; 7 8 // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- not necessary 9 if (($_SERVER['REQUEST_METHOD'] ?? '') === 'POST') { 10 check_admin_referer('monitor-action'); 11 if (isset($_POST['clear'])) { 12 $wpdb->query("truncate {$wpdb->prefix}monitor_abilities"); 13 } 14 } 15 16 class Monitor_List_Table extends WP_List_Table { 8 17 9 18 public function __construct() { … … 68 77 } 69 78 70 $table = new aMonitor_List_Table();79 $table = new Monitor_List_Table(); 71 80 $table->prepare_items(); 72 81 add_thickbox(); 73 82 ?> 74 83 <?php include __DIR__ . '/../menu.php'; ?> 75 <div class="wrap" id="monitor-emails">84 <div class="wrap"> 76 85 <?php include __DIR__ . '/nav.php'; ?> 86 87 <form method="post"> 88 <?php wp_nonce_field('monitor-action'); ?> 89 <button name="clear" class="button button-secondary"><?php esc_html_e('Clear', 'satollo-monitor'); ?></button> 90 </form> 77 91 78 92 <?php $table->display(); ?> -
satollo-monitor/trunk/admin/admin.php
r3481978 r3484639 47 47 add_management_page('Monitor', 'Monitor', 'administrator', 'monitor', function () { 48 48 $section = $_GET['section'] ?? ''; 49 $subpage = $_GET['subpage'] ?? ''; 49 50 switch ($section) { 50 51 case 'settings': … … 52 53 break; 53 54 case 'abilities': 54 include __DIR__ . '/abilities/index.php'; 55 switch ($subpage) { 56 case 'logs': 57 include __DIR__ . '/abilities/logs.php'; 58 break; 59 default: 60 include __DIR__ . '/abilities/index.php'; 61 } 55 62 break; 56 63 case 'rest': 57 include __DIR__ . '/rest/index.php'; 64 switch ($subpage) { 65 case 'logs': 66 include __DIR__ . '/rest/logs.php'; 67 break; 68 default: 69 include __DIR__ . '/rest/index.php'; 70 } 58 71 break; 59 72 case 'http': 60 include __DIR__ . '/http/index.php'; 73 switch ($subpage) { 74 case 'logs': 75 include __DIR__ . '/http/logs.php'; 76 break; 77 default: 78 include __DIR__ . '/http/index.php'; 79 } 61 80 break; 62 81 case 'scheduler': … … 64 83 break; 65 84 case 'emails': 66 include __DIR__ . '/emails/index.php'; 85 switch ($subpage) { 86 case 'logs': 87 include __DIR__ . '/emails/logs.php'; 88 break; 89 default: 90 include __DIR__ . '/emails/index.php'; 91 } 67 92 break; 68 93 case 'users': … … 78 103 require_once __DIR__ . '/admin-ajax.php'; 79 104 } 80 81 105 }); -
satollo-monitor/trunk/admin/assets/admin.css
r3481978 r3484639 99 99 color: green; 100 100 } 101 102 /* GRAPHS */ 103 104 .monitor-nodata { 105 margin: 1.5rem 0; 106 padding-top: 3rem; 107 background-color: #eee; 108 color: #ccc; 109 border: 1px solid #ccc; 110 height: 250px; 111 font-size: 2rem; 112 text-align: center; 113 } -
satollo-monitor/trunk/admin/emails/index.php
r3481978 r3484639 6 6 7 7 global $wpdb; 8 9 // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- not relevant10 $subpage = sanitize_key($_GET['subpage'] ?? '');11 12 switch ($subpage) {13 case 'logs':14 include __DIR__ . '/logs.php';15 return;16 case 'filters':17 include __DIR__ . '/filters.php';18 return;19 }20 8 21 9 function hook_functions($tag) { … … 59 47 <?php include __DIR__ . '/nav.php'; ?> 60 48 61 <p>For email logging with actions (resend, ...) conside the WP Mail Logging plugin.</p>49 <p>For email logging with actions (resend, ...) consider the WP Mail Logging plugin.</p> 62 50 63 51 <div class="monitor-dashboard"> -
satollo-monitor/trunk/admin/emails/logs.php
r3481978 r3484639 123 123 </style> 124 124 <?php include __DIR__ . '/../menu.php'; ?> 125 <div class="wrap" id="monitor-emails">125 <div class="wrap"> 126 126 <?php include __DIR__ . '/nav.php'; ?> 127 127 -
satollo-monitor/trunk/admin/http/index.php
r3481978 r3484639 5 5 6 6 global $wpdb; 7 8 // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- not relevant9 $subpage = sanitize_key($_GET['subpage'] ?? '');10 11 switch ($subpage) {12 case 'logs':13 include __DIR__ . '/logs.php';14 return;15 }16 7 17 8 $per_day = $wpdb->get_results("select date(created) as date, count(*) as total from {$wpdb->prefix}monitor_http where created > DATE_SUB(NOW(), INTERVAL 30 DAY) group by date(created) order by date(created) asc"); … … 29 20 <?php include __DIR__ . '/nav.php'; ?> 30 21 31 <div id="graph" style="margin: 2rem 0"></div> 22 <?php if (!$per_day) { ?> 23 <div class="monitor-nodata"> 24 No recent data to show diagrams. 25 </div> 26 <?php } else { ?> 27 <div id="graph" style="margin: 2rem 0"></div> 28 <?php } ?> 32 29 33 30 <script> -
satollo-monitor/trunk/admin/rest/index.php
r3481978 r3484639 6 6 7 7 global $wpdb; 8 9 // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- not relevant10 $subpage = sanitize_key($_GET['subpage'] ?? '');11 12 switch ($subpage) {13 case 'logs':14 include __DIR__ . '/logs.php';15 return;16 }17 8 18 9 $per_day = $wpdb->get_results("select date(created) as date, count(*) as total from {$wpdb->prefix}monitor_rest where created > DATE_SUB(NOW(), INTERVAL 30 DAY) group by date(created) order by date(created) asc"); -
satollo-monitor/trunk/admin/rest/logs.php
r3481978 r3484639 92 92 ?> 93 93 <?php include __DIR__ . '/../menu.php'; ?> 94 <div class="wrap" id="monitor-emails">94 <div class="wrap"> 95 95 <?php include __DIR__ . '/nav.php'; ?> 96 96 -
satollo-monitor/trunk/admin/scheduler/index.php
r3481978 r3484639 98 98 <?php } ?> 99 99 100 101 102 100 <p> 103 101 For detailed information on job scheduling install the WP Crontrol plugin. … … 212 210 213 211 <?php if (!$deltas) { ?> 214 <div style="margin: 1.5rem 0; padding-top: 3rem; background-color: #eee; color: #ccc; border: 1px solid #ccc; height: 250px; font-size: 2rem; text-align: center;">212 <div class="monitor-nodata"> 215 213 No recent data to show diagrams. 216 214 </div> … … 236 234 // var data2 = [{ 237 235 // //x: [1, 2, 3, 4, 5], 238 // y: <?php //echo json_encode($deltas_moving); ?>236 // y: <?php //echo json_encode($deltas_moving); ?> 239 237 // }]; 240 238 // -
satollo-monitor/trunk/admin/scheduler/logs.php
r3481978 r3484639 115 115 <?php if (wp_using_ext_object_cache()) { ?> 116 116 <div class="monitor-notice monitor-notice-warning"> 117 An object cache is active. If you see on each sch duler run that only one job is executed even if there are117 An object cache is active. If you see on each scheduler run that only one job is executed even if there are 118 118 more than one queued, try to disable the object cache. 119 119 </div> … … 128 128 <?php $table->display(); ?> 129 129 130 131 130 </div> -
satollo-monitor/trunk/readme.txt
r3481978 r3484639 1 === Monitor ===1 === Monitor: Scheduler, Emails, API, HTTP and more === 2 2 Contributors: satollo 3 3 Tags: debug,logging … … 5 5 Tested up to: 6.9 6 6 Requires PHP: 8.1 7 Stable tag: 1.0. 07 Stable tag: 1.0.1 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html 10 10 11 Track and store internal siteevents for analysis and debugging: abilities calls, http calls, emails, scheduled jobs, ...11 Track and store internal WP events for analysis and debugging: abilities calls, http calls, emails, scheduled jobs, ... 12 12 13 13 == Description == … … 24 24 25 25 Please, [read the official page for more details](htps://www.satollo.net/plugins/monitor). 26 27 = What's monitored = 28 29 * Emails 30 * HTTP calls (using the wp_remote_* functions) 31 * REST API calls 32 * Scheduler runs with detailed jobs data 33 * Abilities invocation 34 35 Please, [read the official page for more details](htps://www.satollo.net/plugins/monitor) for more detail, examples of problems and solutions. 26 36 27 37 = Contacts, Requests, Bugs = … … 43 53 * Activate monitors only for what you really need on Monitor/Settings 44 54 45 = Does exist san extended version of Monitor? =55 = Does exist an extended version of Monitor? = 46 56 47 57 No, but if you have specific needs, let's discuss them. … … 49 59 = Is collected data shared with someone? = 50 60 51 No, all the data is stored into your WP database. 61 No, all the data is stored into your WP database. No log files are created. 52 62 53 63 = Can I give access to Monitor to non administrator users? = … … 59 69 Not right now. 60 70 71 == Screenshots == 72 73 1. WordPress scheduler overview with statistical values and graphs 74 2. Detailed scheduler runs with jobs 75 3. HTTP monitoring with calls per day 76 4. Overview of the email monitoring 77 61 78 62 79 == Changelog == 80 81 = 1.0.1 = 82 83 * Fixed some typos 84 * Fixed log clean for the REST API monitoring 85 * Added the logs clean button on Abilities monitor page 86 * Fixed abilities tracking (WP 6.9 has a different hook than the original library...) 63 87 64 88 = 1.0.0 = -
satollo-monitor/trunk/satollo-monitor.php
r3481978 r3484639 6 6 * Plugin Name: Monitor: Scheduler, Emails, API, HTTP and more 7 7 * Description: Records and displays WP events: abilities calls, scheduler job executions, http calls, emails, and so on 8 * Version: 1.0. 08 * Version: 1.0.1 9 9 * Author: Stefano Lissa 10 10 * Author URI: https://www.satollo.net … … 16 16 * Plugin URI: https://www.satollo.net/plugins/monitor 17 17 */ 18 19 18 defined('ABSPATH') || exit; 20 19 21 define('SATOLLO_MONITOR_VERSION', '1.0. 0');20 define('SATOLLO_MONITOR_VERSION', '1.0.1'); 22 21 23 22 /** @var wpdb $wpdb */ … … 25 24 delete_option('monitor_emails_hooks'); 26 25 delete_option('monitor_scheduler_hooks'); 27 delete_option('monitor_update_data');28 26 wp_unschedule_hook('monitor'); 29 27 }); … … 143 141 }, 0, 3); 144 142 145 add_action(' after_execute_ability', function ($name, $input, $result) {143 add_action('wp_after_execute_ability', function ($name, $input, $result) { 146 144 global $wpdb, $monitor_ability_method; 147 145 … … 360 358 $wpdb->query($wpdb->prepare("delete from `{$wpdb->prefix}monitor_scheduler` where created < date_sub(now(), interval %d day)", $days)); 361 359 $wpdb->query($wpdb->prepare("delete from `{$wpdb->prefix}monitor_http` where created < date_sub(now(), interval %d day)", $days)); 362 } 360 $wpdb->query($wpdb->prepare("delete from `{$wpdb->prefix}monitor_rest` where created < date_sub(now(), interval %d day)", $days)); 361 } -
satollo-monitor/trunk/uninstall.php
r3481978 r3484639 14 14 delete_option('monitor_emails_hooks'); 15 15 delete_option('monitor_scheduler_hooks'); 16 delete_option('monitor_update_data');17 16 delete_option('monitor_emails_failed_count'); 18 17 delete_option('monitor_emails_sent_count');
Note: See TracChangeset
for help on using the changeset viewer.