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

Number of services left (Feature request/workaround) #119

Closed
eibol opened this issue Oct 4, 2024 · 4 comments
Closed

Number of services left (Feature request/workaround) #119

eibol opened this issue Oct 4, 2024 · 4 comments
Assignees

Comments

@eibol
Copy link

eibol commented Oct 4, 2024

Hi,thanks a lot for this awesome project.
I'd like to ask if it there is a way to display the number of remaining services in a given pool or meta-pool.

It is good to know, specially because when users try HTML5 transport, there is only a generic error message, unlike when
using RDP, which displays that no more services are available for users.

Thanks!

@dkmstr
Copy link
Collaborator

dkmstr commented Oct 4, 2024

Yes, in 4.0 (currently stabilizing it, maybe at end of this month, or next, it reaches the "beta" fase :)), it possible in pools and metapools (especifically in the name), using some "macros", but on 3.6 only on pools:

def macro_info(x: str) -> str:

Basically the

        def macro_info(x: str) -> str:
            return (
                x.replace('{use}', use_percent)
                .replace('{total}', max_srvs)
                .replace('{usec}', use_count)
                .replace('{left}', left_count)
            )

The "{}" "macros" are replaced on pools on the name and the visual name.

So, if you have a pool that reads "Sample Pool {usec} used, {left} available.", you have 32 used and 8 left, the web will show "Sample pool 32 used, 8 available"

The 3.6 does not supports this on Metapools. Hope this helps :)

@eibol
Copy link
Author

eibol commented Oct 4, 2024

Great thanks, I'll try it. If necessary, I could split metapool.

@dkmstr
Copy link
Collaborator

dkmstr commented Oct 4, 2024

In no time, you probably could use 4.0, that have all these features, and much better implemented :)

@eibol
Copy link
Author

eibol commented Oct 4, 2024

In no time, you probably could use 4.0, that have all these features, and much better implemented :)

I'm looking forward to it.

For some reason, only {use} and {usec} worked in visual_name, but that's more than enough. Thanks again

@eibol eibol closed this as completed Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants