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

Implement some kind of workspace recipe / macros #97

Open
Arkanosis opened this issue Dec 20, 2019 · 1 comment
Open

Implement some kind of workspace recipe / macros #97

Arkanosis opened this issue Dec 20, 2019 · 1 comment

Comments

@Arkanosis
Copy link
Member

It would be awesome to have a way to automatically create tabs and graphs based on a source and hand-written recipe.

The recipe could be some YAML dialect with tree pattern matching, eg.:

My tab name:
    My graph name:
        - /My host name/System/Load/CPU usage/*
    My other graph name@stacked:
        - /My host name/System/Processus/searchserver-*/Memory usage/Average size
        - /My host name/System/Processus/index6-*/Memory usage/Average size
    My other graph name:
        - ^/foo.*bar(hello|world)(/[^/]+)*$@regex

Keep in mind though that we'd probably want to expose all settings (such as line color, opacity…) through the recipe, so the actual YAML dialect might end up being much more complex than that.

@Arkanosis
Copy link
Member Author

Almost two years ago, @fthevenet and me had some IRL debates about a different approach, which would revolve around “scripts” or “macros” automating what a human user does manually.

I started implementing a PoC using directly the UI functions, which proved impossible to bring to feature-completeness. The main challenge was that binjr is built with the GUI in mind and does not provide an API to interact with it. We thought about building a workspace with the script and reloading it with binjr after every change, but even that would not be a quick win.

There's probably very little to keep from this PoC, but it has shown is how easily one could script in BinjrScript (actually, JavaScript) and interact with the Java code through GraalVM.

Scripting probably puts the bar too high for some users, so even though I personally still believe this is a good answer to tedious / repetitive workspaces construction, the approach itself is not a silver bullet.

@Arkanosis Arkanosis changed the title Implement some kind of workspace recipe Implement some kind of workspace recipe / macros Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant