$filter_tool, 'status' => $filter_status, 'api_key_id' => $filter_key_id ?: null, 'remote_ip' => $filter_ip, 'date_from' => $filter_from, 'date_to' => $filter_to, ] ); $result = AICOM_Audit_Logger::query( $filters, $per_page, $page_num ); $logs = $result['items']; $total = $result['total']; $num_pages = (int) ceil( $total / $per_page ); $api_keys = $wpdb->get_results( "SELECT id, label, key_prefix FROM {$wpdb->prefix}aicom_api_keys ORDER BY label", ARRAY_A ); $status_options = [ '', 'success', 'error', 'blocked_soft_lock', 'blocked_hard_lock', 'denied_scope', 'denied_allowlist', 'validation_failed', 'auth_failed', 'dependency_missing' ]; $period_options = [ 'today' => __( 'Today', 'aicom' ), '7days' => __( 'Last 7 Days', 'aicom' ), '30days' => __( 'Last 30 Days', 'aicom' ), 'year' => __( 'This Year', 'aicom' ), 'custom' => __( 'Custom Range', 'aicom' ), 'all' => __( 'All Time', 'aicom' ), ]; $base_url = admin_url( 'admin.php?page=aicom-audit-logs' ); ?>
|
|