Class ControlPanelController

java.lang.Object
io.micronaut.controlpanel.ui.ControlPanelController
All Implemented Interfaces:
ControlPanelApi

@Controller("${micronaut.control-panel.path:/control-panel}") @ExecuteOn("blocking") public class ControlPanelController extends Object implements ControlPanelApi
Control panel web controller to render the UI.
Since:
1.0.0
Author:
Álvaro Sánchez-Mariscal
  • Constructor Details

    • ControlPanelController

      @Inject public ControlPanelController(ControlPanelRepository repository, io.micronaut.context.BeanContext beanContext, @Nullable io.micronaut.management.endpoint.refresh.RefreshEndpoint refreshEndpoint, @Nullable io.micronaut.management.endpoint.stop.ServerStopEndpoint stopEndpoint, ControlPanelModuleConfiguration configuration, ControlPanelWriteAccessEvaluator writeAccessEvaluator, ControlPanelRenderer renderer)
      Parameters:
      repository - Control Panel Repository
      beanContext - Bean Context
      refreshEndpoint - Refresh endpoint
      stopEndpoint - Stop Endpoint
      configuration - Control Panel Module Configuration
      writeAccessEvaluator - WriteAccess Evaluator
      renderer - Control Panel Renderer
  • Method Details

    • index

      public io.micronaut.http.HttpResponse<String> index(io.micronaut.http.HttpRequest<?> request)
      Description copied from interface: ControlPanelApi
      Renders the index view.
      Specified by:
      index in interface ControlPanelApi
      Parameters:
      request - the current HTTP request
      Returns:
      the model
    • byCategory

      public io.micronaut.http.HttpResponse<String> byCategory(String categoryId, io.micronaut.http.HttpRequest<?> request)
      Description copied from interface: ControlPanelApi
      Renders the category view.
      Specified by:
      byCategory in interface ControlPanelApi
      Parameters:
      categoryId - the category id.
      request - the current HTTP request
      Returns:
      the model
    • detail

      public io.micronaut.http.HttpResponse<String> detail(String controlPanelName, io.micronaut.http.HttpRequest<?> request)
      Description copied from interface: ControlPanelApi
      Renders the control panel detailed view.
      Specified by:
      detail in interface ControlPanelApi
      Parameters:
      controlPanelName - the control panel name.
      request - the current HTTP request
      Returns:
      the model
    • refresh

      public io.micronaut.http.HttpResponse<Object> refresh(@Nullable ControlPanelApi.RefreshRequest request)
      Description copied from interface: ControlPanelApi
      Refreshes the host application through a control-panel-owned write route.
      Specified by:
      refresh in interface ControlPanelApi
      Parameters:
      request - the optional refresh request
      Returns:
      the refresh result
    • stop

      public io.micronaut.http.HttpResponse<Object> stop()
      Description copied from interface: ControlPanelApi
      Stops the host application through a control-panel-owned write route.
      Specified by:
      stop in interface ControlPanelApi
      Returns:
      the stop result