pterodactyl / panel

Pterodactyl® is a free, open-source game server management panel built with PHP, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.
https://pterodactyl.io
Other
6.71k stars 1.71k forks source link

support for third-party (custom) modules #217

Closed feardevilz closed 7 years ago

feardevilz commented 7 years ago

Originally requested in https://github.com/Pterodactyl/Panel/issues/141: After reviewing some changes I wanted pushed for this feature request I was wondering if you could consider adding a modules or library section into Panel@6 (similar to modules/library from Boxbilling) that would add on to the app/Http/Controllers/API on any event call. That means end users could add in custom modules to perform events on actions such as node or server creation. Modules could then be enabled or disabled by admins in the Panel. example: Panel/modules/Event/ServerUpdate.php could have an OnServerCreate call API (Panel/app/Http/Controllers/API/ServerController.php) that would perform apt-get update && apt-get upgrade at the time of server creation request inside the panel.

Modules could also go a bit further and allow third party reports, graphs or pages to be added into a tab of the Panel including different views - just like Boxbilling. Example: Panel/modules/Panel/Overviewer.php could add a tab inside the panel which server owners could click on to display Minecraft-Overviewer of their server.

At some point it would be good to also see Daemon become a module under that but from the looks it appears its a bit too involved.

DaneEveritt commented 7 years ago

I like this idea, and using Laravel's internal event system this could become extremely flexible and allow for a lot of different abilities outside the scope of the base panel.

I don't see the daemon becoming a module, but I do plan to implement an events system in Panel@4/Daemon@4 which would allow for hooking into daemon events within the panel to do things like email a user if their server crashes, or other such things.

DaneEveritt commented 7 years ago

It looks like this has been somewhat implemented, and will only improve in time. I've been trying to add more events for specific aspects of the panel itself.

Do you have any specific examples of places where you'd like to see an event thrown that you could hook into?