-
-
Notifications
You must be signed in to change notification settings - Fork 281
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
[iOS] Admin Dashboard #1230
[iOS] Admin Dashboard #1230
Conversation
@LePips Absolutely no rush on this but I wanted to get your thought on this PR and make sure I was going in the right direction for what the Admin Dashboard would include. |
…eady-ish for review.
…change the image will stay the same. Use a random image found for Portrait/Landscape.
When it's transcoding, does it also show the reason/format ? That generally the most useful thing I sometimes check on the go. I don't think we should fully duplicate all functionality of the web interface, even vue is struggling with that. |
I have the type broken out like Jellyfin-Web:
I could look at adding this in but I originally skipped it since phone screen real estate is a lot smaller and I was worried it was starting to get cluttered. |
Correct, it seems those activity tiles already can already be expanded based on the little V arrow. At least the transcode reason would be nice to have as an extra item there. Target audio and video code would be useful too, but IMHO not as important. Although both are definitely things that can be added as a follow up at a later time. Also will this get a tvOS variant? It seems less useful there. |
That looks fine to me, but I'll link Erik to this PR to see if he wants to chime in. |
Since these can be very detailed views, I think a better design would be to have the list of sessions with bare details and we push to a session with more details instead of expanding. |
I can do that. What should be included in the high level view? My thought is:
Then I can add everything else to the details page. Also, for the progress bar, do we want the color to indicate Play/Pause or should it use the accent color? |
I think maybe we can use play and pause icon instead of the text? That should save some space
2 Colored progress bar like in web? It shows playback and transcoding progress in 1 bar. Edit: like it's on the first one in the screenshot here #1230 (comment)
I think accent color, using color to indicate playback is going to be less obvious than using just a string or icon. |
Swiftfin/Views/UserDashboardView/ActiveSessionsView/ActiveSessionRowView.swift
Outdated
Show resolved
Hide resolved
I'm going to call it for now. I've pushed my latest changes so anyone who wants to look it over / recommend anything this should be the latest version. There is still a TON of reorganization that I need to do. I've also overloaded the Details Page with just about every detail I could find. If there is anything else needed, I can add it but I think I've hit the point where it's more likely that we start removing things from it. Screenshots can be found below: Video In ActionSimulator.Screen.Recording.-.iPhone.15.Pro.-.2024-09-07.at.01.32.59.mp4I have some outstanding issues I want to cleanup but it may be a bit:
|
The video shows it without the poster/thumbnail, I think that looks much cleaner! Also what happens when there is only a poster (Primary) available? |
I think I'm calling images a wrong way? I need to look at that. I get images from my server but demo.jellyfin.org doesn't seem to pull images. I'm leaning towards no images on the main screen with posters on the details? I'm only able to get 4 sessions on a single screen with these posters. Right now, I am looking at the Library Customization for Poster Type to determine with poster is used for this. I think I need to look at where I get images from since there should be some sort of placeholder if the image isn't there. I had one prior but I moved to use the ImageView and I haven't taken the time to dig into it. |
No images on the main screen would be good to fit more, and also no need to download a bunch of extra images. 👍
I think the image type you want is |
Why are there two sections (STREAMS & ONLINE)? What's the difference? |
Streams are those clients actively streaming something. Online is clients marked online in jellyfin, IIRC recent activity in the last X minutes. Also welcome 😃 |
I split this into people are are connected to Jellyfin and people who are connected and streaming something. Personally, on Jellyfin-Web, I'm always more interested in what's being streamed opposed to whose only online. So splitting these out is partially a preference from me. See an example below. In this case, the iPhone is ONLINE and the Android TV would be STREAMING. I'm not sold on that verbiage so if there is a better way to name that I'm all ears! |
I've had time to take a look at this and have started on my changes. Some main changes: 1 - I have split the "server connection" and "Dashboard" settings views as they serve different purposes. The former being how the client is connected to the server. I have really only taken a look at the tasks and haven't gotten to the active devices yet. |
I'm doing a bit of travel for work but I'd love to assist when I'm back. Is there anything you'd like me to work on for this or is this mostly cleanup/design to make sure it mirrors the rest of Swiftfin?
Since this view only has one function (Switch URL) would it make sense to just make the existing Chevron button for this view into the Menu to select the URL instead? Flatten out the hierarchy a little? Then again, I know that view is re-used so the benefit might not be there. |
No, as that view is also used for the deletion and could gain more functionality with stuff like #508. You've made a great foundation and I'm almost done with my changes. After I am done I'll make comments on the major things I changed as well as some things I may have misguided on. |
Sounds great! Thank you (once again) for helping me get this over the finish line! Feel free to let me know if there's anything that I can do to help out. If you'd like, I'd be more than happy to go through and localize all of the strings when you're done with it. I was looking through your commit, and I saw that you TODO'd localizing the transcoding reasons. I'd be more than happy to do that part before we have our final merge. |
Still have some work to do but most visual things should be done or has relevant TODOs. Major changes:
For many of the changes I would recommend learning from in future work:
When testing on the iPad, I realized using the dashboard can be rather small. The user is performing administrative work and we are restricting their viewport. This is a side effect iOS and iPadOS having the same presentations but we may need to change that once we take a look at replacing our navigation stack. Meaning, iPadOS would have some entirely different views to allow them to be full screen. However, that is something I will reevaluate after we drop iOS 15. |
… Migration of localization to extensions
I am still traveling but I had some time today at the airport to pick this back up. All I did was fix the CodeFactor issue and localize all of the Strings. I can take a look at the Edit Tasks screens this weekend. Just to confirm, is our goal there to allow updating the crons for scheduled tasks? Other than that, I will follow the TODOs! I'm loving the changes you made for this! It looks great! Edit: Changing the PR Name back to just Admin Dashboard. In a previous version of this, the User could see their own active sessions but this is no longer the case. Hence, back to just admin. |
@LePips Do we want to mirror Jellyfin-Web like this (see below) or should an editView? The TaskTriggers don't have an ID so you can't really edit them. I assume that's why you can't do that on Jellyfin-Web. That being said, I am able to find and remove a trigger then replace it with a new one from the array as a psuedo edit. Do we want to have edit functionality or do we just want to mirror what's available on web? |
Thank you for doing that work. I have completed the work that I feel needs to be done except for a few things I am willing to kick down the road:
However, I ran into issues of testing the tasks since I wasn't able to run a task for a long amount of time. I'm somewhat confident in the observation of the tasks so I think it's okay. For updating a However, this PR has laid the groundwork for the dashboard view and think is done. |
Sounds good. I'll hold onto what I'm doing for editing the task trigger and throw that into a new PR. I agree what exists now exceeds a lot of the original issue request so I'm happy. I'll work on the Edit Task Triggers and look at some of the TODOs to see if I can wrap those up over the coming weeks. |
Issue
Resolves: #608
Summary
This PR Creates a User/Admin Dashboard. This view replaces the current EditServerView that is accessible from the SettingsView. For now, this feature will only exist on iOS and iPadOS. If there is an appetite for adding this to tvOS I can look into it but, on a personal level, I don't see a lot of value in adding this to tvOS.
When clicking into this view, the user will always be provided with name of the server and the ability to switch to another URL for the same server. For Non-Admin Users, this PR adds an additional section that shows all Active Devices.
Active Devices are handled by the Server. With this, the Server only returns Sessions that the user is allowed to see. For Non-Admins, this means they can only see their own Sessions. For Admins, they are able to see all Sessions. All filtering/security for this section is handled by the Server API.
Clicking an Active Device will show the user Active Device Details which includes:
Both the Active Devices List and Active Device Details update every second with the status and progress of the Active Device. If the device is active but not streaming, both view will show the last time that the device interacted with the Jellyfin Server.
If the User accessing the Dashboard is an Admin they will see 2 additional Administration buttons. These buttons are:
Scan All Libraries is the same function as Jellyfin-Web. When triggered, it returns the current progress of the process. There is a Red X on the left side while this task is running which can be selected to cancel the Libraries Scan. The progress percentage pings every second, even if not triggered from the Server, so this shows Library scans that are triggered from other devices as well with the ability to cancel them too.
Scheduled Tasks takes the Admin User to another View that contains all of the available Tasks on the Server. If selected, this runs these tasks. The same as the Scan All Libraries, these tasks can be cancelled and progress is showed. In addition to the Scheduled Tasks, the Shutdown/Restart Server tasks are included on this page at the top. These prompt the user with a confirmation prior to running.
The only difference between iOS and iPadOS is the Active Devices section contains 1 column on iOS and 2 columns on iPadOS.
Please find all Screenshots in the Screenshots Section below.
Difficult to Recreate Issues
Screenshots
User Dashboard
User Dashboard - URL Switching
Admin Dashboard
Admin Dashboard - URL Switching
Admin Dashboard - Scan in Progress
Admin Dashboard - Scan Cancelling
Admin Dashboard - iPad
Shutdown/Restart Warnings
Active Device Details - DirectPlay
Active Device Details - Transcode
Active Device Details - Idle Sessions
This ticks up every second. If the user starts playback, the view populates with the new session details.Active Device Details - Offline Session
This will only happen when you are viewing a User Session Detail and the user goes offline while you are looking at it.Scheduled Tasks
Scheduled Tasks - Many Running