Skip to content

feat(admin): add system logs tab and restrict platform tracking to logged-in users#192

Closed
Karu174 wants to merge 22 commits into
mainfrom
feat/system-logs-dashboard
Closed

feat(admin): add system logs tab and restrict platform tracking to logged-in users#192
Karu174 wants to merge 22 commits into
mainfrom
feat/system-logs-dashboard

Conversation

@Karu174

@Karu174 Karu174 commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

📄 Description

As a Staff Admin,
I want to view the background synchronization logs directly from my dashboard,
so that I can monitor the health of the API updates without needing to access the default Django admin panel.

As a platform user (Guest),
I want to be redirected to the login page if I try to access a platform link,
so that I don't receive misleading "Added to history" notifications when I don't have an active session.

✅ Changes Made (Fit Criteria)

  • Staff Admin Dashboard: Added a new "System Logs" tab displaying a paginated table of all SyncLog entries (Start Time, End Time, Status, and Summary).
  • Middleware Configuration: Exempted the system_logs route in AdminRedirectMiddleware to ensure Staff Admins can access it securely.
  • Global Pagination: Created a reusable paginator.html component that correctly handles URL parameters (like platform and date filters).
  • Guest UX (Frontend): Modified the JavaScript tracking script in details_base.html. Unauthenticated users are now redirected to the login view when clicking a platform button, preventing ghost API requests and false "success" toasts.

🛠️ Relevant Files Modified

  • users/middleware.py & users/urls.py (Routing and permissions)
  • web_app/views.py (Added system_logs view)
  • users/templates/users/parts/system_logs.html (New UI table)
  • Templates/paginator.html (New global component)
  • Templates/Details/details_base.html (JS authentication check)
  • Staff Admin Tab template (Added the new navigation link)

🔗 Related Issues

Closes: #191

📸 Testing Performed

  • Admin Test: Logged in as Staff Admin, navigated to the new tab, and verified the logs display correctly with pagination.
  • Guest Test: Opened an incognito window, navigated to a detail page, and clicked a platform button -> successfully redirected to the login page.
  • Consumer Test: Logged in as a standard user, clicked a platform button -> tracking toast appears correctly without redirecting.

NorbertAguilera and others added 22 commits June 3, 2026 21:22
…l-address-clickable-with-mailto-link

fix(footer): added mailto to the footer email
returned to the oldest version
… of github.com:Null-Pointers2-0/JoinProject into 177-refactorsidebar-remove-non-functional-search-input
…-chart-labels-to-reflect-view-counts

180 fixdashboard rename chart labels to reflect view counts
…ove-non-functional-search-input

177 refactorsidebar remove non functional search input
feat(history): add viewing history display  #182
feat(recommendations): fix duplicates and implement carousel in series details
@Bogdan2005-19
Bogdan2005-19 temporarily deployed to feat/system-logs-dashboard - JoinProject PR #192 June 10, 2026 20:51 — with Render Destroyed

@Bogdan2005-19 Bogdan2005-19 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good

@Bogdan2005-19
Bogdan2005-19 temporarily deployed to feat/system-logs-dashboard - JoinProject-dev PR #193 June 10, 2026 20:56 — with Render Destroyed
@Bogdan2005-19
Bogdan2005-19 deleted the feat/system-logs-dashboard branch June 10, 2026 20:57
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.

4 participants