Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImprovements to Admin pages for the API Section #289
Conversation
|
I'm in the middle of thoroughly testing this branch as I populate my local database, and I've run into an odd bug. Please tell me if you can reproduce it. Steps to reproduce:
Expected behavior:
What I got instead:
|
|
@scragly any idea when you'll be able to address the reviews here? |
|
Tonight maybe. I only just got the local copy going again today. |
|
excellent. thanks for the quick reply. |
|
@scragly This pull request is very stale. It looks like it's like 98% done, so it'd be a shame to have to close it. I really wish you'd find some time to finish it, but otherwise I'm considering whether we should just merge it even with the reviews unaddressed. I mean, having this feature with a few bugs is probably better than never having it. |
|
I should have a bit of time today to address the reviews and to bring the changes up to date with master. I'll try jump on after breakfast too get it sorted. |

scragly commentedOct 19, 2019
•
edited
I've added some QOL adjustments to the admin pages by defining
ModelAdminobjects for most of the API section's models:Message Deletion
Deleted Messages can now be searched by:
Fields have been made read-only, as they're logs, not a setting to be changed. This also speeds up load time as there's no user dropboxes to populate.
The log view on the
staffsubdomain is linked now in both the context page and the individual message page.Embed data is now more cleanly formatted for readability.
Deleted message page screenshot:

Context page screenshot:

Infractions
Infractions list now shows details in each listing; type, user, actor, inserted_at, expires_at, reason and active.
You can search infractions by:
The list can be filtered now by:
The following fields have been made read-only on the page:
You can still edit on the page:
The reason for doing this is to avoid accidents, improve loading by not having to populate two member dropdowns and to improve appearance a bit.
Infractions list screenshot:

Infractions item page screenshot:

Nominations
Nominations now show additional info on the list view: user, active, reason, actor, inserted_at and ended_at.
You can search the list by:
You can now filter the list by active status.
On the item page, the ordering of items has been tweaked, and the following items have been made read-only:
Both reason and end_reason are still editable on the page.
Nomination list screenshot:

Nomination item page screenshot:

Off-Topic Names
Off topic names can now be searched by name.
Roles
Roles are now sorted by position, same as in discord.
They can now be searched by role name or role id.
All the role fields are set to read-only to avoid mistakes as it's only meant to be changed by the bot on sync or edit.
I've adjusted the order of fields in the item page a bit for presentation.
The permissions value link to the Discord API Permissions Calc page to show all the permissions (example: https://discordapi.com/permissions.html#104308297).
The colour field now shows both int and #hex, while also being styled as the set colour.
Role item page screenshot:

Tags
Tags can now be searched by tag name and tag content.
The tag item page now shows a preview of the tag with rendered markdown.
Tag item page screenshot:

API User
Users are now able to be searched by:
The user list can be filtered by "in guild" status, or by certain staff roles; owners, admins, moderators, core developers, helpers.
All fields in the user item page are now read-only, as they should be changed only by bot on sync or edit.
Roles are now viewed as a comma separated list, ordered by highest position to lowest.
User list screenshot:

User item page screenshot:
