bugy / script-server

Web UI for your scripts with execution management
Other
1.55k stars 246 forks source link

Allow all users to see the same script instances and history #597

Open muxout opened 1 year ago

muxout commented 1 year ago

Hi,

Would it be OK to add an option to the script configuration where all users share the same script instances? This would be helpful in a case where we don't want an user to start a new script instance when another is already running the script. This also allows multiple users to monitor the script process for long running scripts.

Cheers

bugy commented 1 year ago

Hi @muxout, just to double check:

But I also have to say, that I don't have too much time to work on new features now, so I won't be able to implement this in the nearest future.

muxout commented 1 year ago

Thanks for the fast response.

Maybe I can have a go at this and submit a PR

bugy commented 1 year ago

Hi @muxout for sure, you can go with a PR. But it might be not an easy one. How I see it: we would need to have a new script configuration section:

"access": {
  "shared_access": {
    "type": "ALL_USERS"
  }
}

In the future, we could extend this configuration, to allow only shared access for the users within the same group, or for predefined list of users, or anything else.

muxout commented 1 year ago

Makes sense. I'll have a go. By the way, is there any instructions or tips on running the unit tests locally?

bugy commented 1 year ago

Hi @muxout, I run those on CI using the following command: python3 -m unittest discover -s tests -p "*.py" -t .

On my local machine I just run them via pycharm

muxout commented 1 year ago

Cheers @bugy. Can you give me permissions to create a new branch so I can submit a PR?

bugy commented 1 year ago

Hi @muxout sorry for delay. I added you to collaborators, could you retry?