Details
Description
- Update plugins to support retrieving admin and client tabs
- Plugin::allowsServiceTabs() - this retrieves whether or not the plugin supports service tabs in general
- Plugin::getAdminServiceTabs($service) - this retrieves all tabs related to this service for the admin UI
- Plugin::getClientServiceTabs($service) - this retrieves all tabs related to this service for the client UI
- Add new methods to the documentation
- Add support in the admin and client UI for plugin tabs, similar to the module tabs
- Call the plugin method and pass in GET, POST, FILES, as well as the service
- Handle messages similar to modules (
CORE-1269)
- Update the plugin system to support an optional new feature for service integration by module
- This must be backward compatible
- This may or may not need to support white-listing specific modules it can work with (perhaps configurable in the UI at a later time?)
- This must support differentiating between admin/client UI similar to modules
- Add core support for plugins that implement the new service integration to have tabs added to the Manage Service pages of both interfaces that link to the plugin pages
- The plugin pages will likely need to know the client ID and the service ID, although the client ID may be derived from the service. The plugin can query the service for whatever it needs
- Update packages on add/edit to have an option to select plugin integrations
- The only available plugins should be those that have registered their support for service integration
- Update plugin documentation to describe this new service integration
Allow plugins to register management options to specific Packages
- This could be selectable on the "Module" tab when creating/modifying Packages (Requires
CORE-1550). - Select one or more "Plugin Integrations" for the package
- Plugins need the ability to "register" management options, as the type client or staff, only plugins that register management options should be selectable as a "Plugin Integration"
- Plugins should have access to service meta and module data
Use cases:
A CSF firewall plugin could be created to add another management tab for shared hosting packages for cPanel, Plesk, DirectAdmin, Interworx to allow a customer to "unban" themselves from those servers.
A bandwidth graph plugin could be created to show bandwidth data for dedicated servers using for example, the Universal Module. Staff would set the graph ID data, and Clients would be able to see the graph under the service management.
A PDU plugin could be created to allow customers to cycle the power on outlets for their dedicated servers. Staff would set the port ID data, and Clients would be able to perform the reboot.
How is this determined? Are all plugin integrations always selectable for any package? Even if they use a module that the plugin integration will not function with?
Plugins can run queries themselves so I'm not sure if they actually need anything besides the service ID.