Dionera / laravel-beanstalkd-admin-ui

An Admin UI for Beanstalkd and Laravel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple Beanstalk Hosts

opened this issue · comments

Hello, and thanks for the nice package!

We're running a slightly bigger project with a centralised admin system and 3 different Beanstalk hosts. Is there a way to use the admin ui for all 3 of these within the admin system we have, ie for it to talk to 3 hosts simultaneously?

Also, is there (going to be) a way to view/delete the contents of an entire tube?

Thanks!

Right now the project only supports a single host (https://github.com/Dionera/laravel-beanstalkd-admin-ui/blob/master/src/BeanstalkdUIServiceProvider.php#L21). Talking to all three hosts simultaneously could be a bit difficult to achieve (as in, having the stats for all hosts on a single dashboard). However, I think that adding another menu item to select from the configured hosts and only displaying the stats for that host shouldn't be too hard. I don't know when I will be able to get to it, so pull requests are always welcome :)

Here's roughly what would have to change:

  • Instead of passing in the host and port into the Pheanstalkd instance in the Service Provider , it would have to get built dynamically depending on which host is selected.
  • So maybe instead of having just a host and port option in the config, add an array hosts that consists of the connection data for all existing hosts.
  • Add some mechanism to tell the Repository which host to query. Either by creating some sort of factory and building it in the controller, or by providing an extra host parameter that references one of the configured hosts in the config.