Skip to content

Comments

Add client-side search and pagination to logs view#79

Merged
thehack904 merged 3 commits intomainfrom
copilot/add-filtering-pagination-logs
Feb 15, 2026
Merged

Add client-side search and pagination to logs view#79
thehack904 merged 3 commits intomainfrom
copilot/add-filtering-pagination-logs

Conversation

Copy link
Contributor

Copilot AI commented Feb 15, 2026

Logs page had no navigation or search capabilities, making large log files difficult to manage.

Changes

Search

  • Text input filters logs across all columns (user, action, timestamp)
  • Real-time filtering on keyup

Pagination

  • Configurable page size: 10, 25, 50, 100 entries
  • Previous/Next navigation with boundary handling
  • Entry count display: "Page 2 of 5 (120 entries)"

Implementation

  • Client-side JavaScript - no backend changes required
  • Works with existing type filters (All/Activity/Security)
  • Filters compose: search + type filter + pagination apply simultaneously
  • Accessibility: ARIA labels added to form controls
// Filters stack - search narrows results, then pagination applies
function applyPaginationAndFilters() {
    const allRows = Array.from(document.querySelectorAll("#logsTable tbody tr"));
    const filteredRows = getFilteredRows(allRows);  // Apply search + type filter
    const totalPages = Math.ceil(filteredRows.length / pageSize) || 1;
    
    // Show only current page slice
    const startIdx = (currentPage - 1) * pageSize;
    filteredRows.forEach((row, idx) => {
        row.style.display = (idx >= startIdx && idx < startIdx + pageSize) ? '' : 'none';
    });
}

Screenshots

Initial view with pagination:
Logs page with pagination

Security filter applied (22 matching entries):
Security filter active

Page 2 navigation:
Page 2 of results

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • iptv.lan
    • Triggering command: /usr/bin/python3 python3 app.py (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Add filtering and pagination to logs view</issue_title>
<issue_description>Enhance logs.html by providing filtering and pagination:

  • Add a search/filter input for log entries
  • Implement basic pagination controls for easier navigation
  • Client-side implementation with JS for immediate improvement
  • Optionally expand to backend querying later
    This will make log management much more efficient for admins.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@thehack904 thehack904 marked this pull request as ready for review February 15, 2026 02:04
Copilot AI and others added 2 commits February 15, 2026 02:09
- Added search input field to filter logs by text
- Implemented pagination controls (Previous/Next, page selector)
- Added page size dropdown (10, 25, 50, 100 entries per page)
- Enhanced JavaScript to handle both filtering and pagination
- Updated CSS with responsive styles for new UI elements
- Maintains existing filter functionality (All, Activity, Security)
- All features work together seamlessly (search + filter + pagination)

Co-authored-by: thehack904 <35552907+thehack904@users.noreply.github.com>
- Add aria-label to search input for accessibility
- Add guard against division by zero in pagination
- Disable pagination buttons when no results
- Explicitly set page-info color for dark theme

Co-authored-by: thehack904 <35552907+thehack904@users.noreply.github.com>
Copilot AI changed the title [WIP] Add filtering and pagination to logs view Add client-side search and pagination to logs view Feb 15, 2026
Copilot AI requested a review from thehack904 February 15, 2026 02:12
@thehack904 thehack904 merged commit 24dffc4 into main Feb 15, 2026
1 check passed
@thehack904 thehack904 deleted the copilot/add-filtering-pagination-logs branch February 15, 2026 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add filtering and pagination to logs view

2 participants