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

Multiselect user filters #2090

Merged
merged 11 commits into from Jul 8, 2023
Merged

Multiselect user filters #2090

merged 11 commits into from Jul 8, 2023

Conversation

zdimension
Copy link
Contributor

@zdimension zdimension commented Jun 21, 2023

Description

Previously, user filtering was limited to seeing stats for either one user or all users. This was seen as an issue especially for the quite common case of one Plex user being a "power user" and using Plex a lot more than the others. Excluding an user, or, more generally, filtering for multiple users, appears as something useful.

This PR replaces the old, simple <select>-based filter by one using Bootstrap-select that allows multiple selection.

The changes in the frontend are limited to graphs.html, the main stylesheet, and the addition of the Bootstrap-select vendor files.

The changes in the backend are limited to graphs.py (the graph APIs) and webserve.py (the exposed API functions).

Screenshot

Before After
image image

Issues Fixed or Closed

Type of Change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the docstring for new or existing methods

(this PR should be squashed when merged)

Use standard concatenation

Fix select style

Move settings to JS constructor

Change text for no users checked

Don't call selectAll on page init

Add it back

Remove attributes

Fix emptiness check

Allow deselect all

Only refresh if user id changed
Copy link
Contributor

@JonnyWong16 JonnyWong16 left a comment

Choose a reason for hiding this comment

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

Looks good. Just a couple minor changes.

Could you also implement this on the history page? The backend already supports a comma-separated list of user IDs, so the new dropdown just needs to be added to the UI.

data/interfaces/default/graphs.html Outdated Show resolved Hide resolved
plexpy/graphs.py Outdated Show resolved Hide resolved
plexpy/graphs.py Outdated Show resolved Hide resolved
@zdimension
Copy link
Contributor Author

Looks good. Just a couple minor changes.

Could you also implement this on the history page? The backend already supports a comma-separated list of user IDs, so the new dropdown just needs to be added to the UI.

I pushed the minor changes, and added the picker to the history page (tested locally, works perfectly)

@JonnyWong16 JonnyWong16 merged commit 343a3e9 into Tautulli:nightly Jul 8, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants