Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add page to view log list and several fixes #68

Closed
wants to merge 29 commits into from
Closed

Add page to view log list and several fixes #68

wants to merge 29 commits into from

Conversation

raidensakura
Copy link
Member

@raidensakura raidensakura commented Dec 16, 2022

Description of the changes

This PR adds a new interface with pagination support to view list of recent logs plus a few other fixes.

To customize the amount of logs displayed per page (default is 25), add PAGINATION variable in your env with the amount of logs you want. (I recommend nothing more than 50)

View Demo (Viewable after logging in)

The demo is based on the patreon version of logviewer, some fields are replaced with placeholders on the normal logviewer

image

To access new log list page, click on the "Logviewer" header on main page. Log list page can be viewed on url set by your LOG_URL_PREFIX env (Default /logs)

Have the changes in this PR been tested?

Yes

Personal to-do

  • Add pagination (look into find() skip= kwarg)
  • Add search feature
  • Add open and closed log filter

lorenzo132 and others added 10 commits November 21, 2021 15:03
fixes internal server error, Merge whenever dev gets merged into master for modmail
* Dont use deprecated abort()

* Bump version to v1.1.1

* Bump reqs

* Escape some additional html templates

* Bump sanic -> 21.12.0

* Bump sanic -> 22.6.0
BREAKING fix dpy2, add support old time format
* Added load_dontenv, changed mongo_uri load logic

* Updated pipfile.lock
- Fix CORS errors for fonts
- Update CSS for new log list page
- Use 4 spaces for indent on CSS to match python
- Fix broken system avatar

To access new log list page, click on the "Logviewer" header on main page. Log list page can be viewed on url set by your LOG_URL_PREFIX env (Default "/logs")
- Fix #60
- Indent CSS with 4 spaces
- Add some new CSS classes for new texts
- Properly indent logbase.html
- Fix messed up auto-formatting caused by Jinja (thanks [Better Jinja](https://marketplace.visualstudio.com/items?itemName=samuelcolvin.jinjahtml)
- Replace credit with something _random_
@raidensakura raidensakura changed the title Add page to view logs list and several fixes Add page to view log list a Dec 18, 2022
@raidensakura raidensakura changed the title Add page to view log list a Add page to view log list and several fixes Dec 18, 2022
raidensakura and others added 15 commits December 19, 2022 00:57
- Remove id from projection and unnecessary messages
- Add pagination buttons to top of page
- Remove prints that I forgot lol
- Add search and open/closed log filter
- Add a count for all logs
- Display a message when no log is found within a search query
- Move pagination to its own template
- Replace default avatar icon with updated Discord logo
- Refactor/reformat some lines
- Closed and open log filter are now toggle-able
- Query strings will now properly append to each other on each filter
- Move pagination functions to client-side (javascript)
@raidensakura raidensakura closed this by deleting the head repository Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants