Ylianst / MeshCentral

A complete web-based remote monitoring and management web site. Once setup you can install agents and perform remote desktop session to devices on the local network or over the Internet.
https://meshcentral.com
Apache License 2.0
3.67k stars 511 forks source link

Sorting active rdp sessions upon connection #6170

Closed SMART-ALEX-T closed 2 weeks ago

SMART-ALEX-T commented 3 weeks ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Need to sort active RDP sessions alphabetically when clicking the button to connect to the terminal server. It is not convenient to scroll through the list if there are a large number of sessions.

Describe the solution you'd like A clear and concise description of what you want to happen.

When I click connect, the list of sessions should be sorted by username - alphabetically. Or there should be a button that allows you to sort this list.

si458 commented 3 weeks ago

im assuming your list looks like below and you only want to sort it by the username and not including the hostname? (can you share example screenshot?) BEFORE:

Connected, Console
Active, RDP-Tcp#0 - ACFTP2022/Administrator
Active, RDP-Tcp#1 - ACFTP2022/User1
Active, RDP-Tcp#2 - ACFTP2022/Fred
Active, RDP-Tcp#3 - ACFTP2022/User2
Active, RDP-Tcp#4 - ACFTP2022/Jones

AFTER:

Connected, Console
Active, RDP-Tcp#0 - ACFTP2022/Administrator
Active, RDP-Tcp#2 - ACFTP2022/Fred
Active, RDP-Tcp#4 - ACFTP2022/Jones
Active, RDP-Tcp#1 - ACFTP2022/User1
Active, RDP-Tcp#3 - ACFTP2022/User2
SMART-ALEX-T commented 3 weeks ago

Yes, that's exactly right

image
si458 commented 3 weeks ago

Ok! So I'll do a value u can set inside if your domains section in config.json So u can say sort by terminal id OR sort my username or none! As ur screenshot shows both the username and the terminal id as not sorted haha

I'm guessing its listing them by most recent activity first

SMART-ALEX-T commented 3 weeks ago

Thank you, this will be what we need

si458 commented 3 weeks ago

ok ive added an option called userSessionsSort under the domains section of config.json so this will apply to all users in per domain basis!

Arange the Connect sessions offered when multiple Terminal Sessions are present by 'SessionId', 'StationName' or 'Username' with 'SessionId' as the default sorting criteria.

SMART-ALEX-T commented 2 weeks ago

Unfortunately, the sessions are not sorted. image image

si458 commented 2 weeks ago

i have only just merged it! so you have to wait for a new release, OR stop meshcentral, npm install Ylianst/MeshCentral, start meshcentral - NPM OR image: ghcr.io/ylianst/meshcentral:master DOCKER

p.s. anything with an _ in front of it is ignored! so you should be using "userSessionsSort": "Username"

SMART-ALEX-T commented 2 weeks ago

Thank you very much! Now everything works. :)

si458 commented 2 weeks ago

@SMART-ALEX-T just be aware, using those install methods above, basically latch onto the LATEST code in the master repo, so the could be bugs/issues! but if you spot things, do open new issues and report them :)

p.s. can u share screenshots of it working hehe, would be nice to see its all ok

SMART-ALEX-T commented 2 weeks ago

Certainly) image