orangeqs.juice.dashboard.dashboard_handlers#

Module defining the URL handlers for OrangeQS Juice dashboard applications.

Module Contents#

Classes#

MainHandler

Main handler for the dashboard application.

API#

class orangeqs.juice.dashboard.dashboard_handlers.MainHandler(application: tornado.web.Application, request: tornado.httputil.HTTPServerRequest, **kwargs: Any)#

Bases: tornado.web.RequestHandler

Main handler for the dashboard application.

This handler serves as the base for all dashboard pages and provides common functionality such as rendering templates and handling requests.

initialize(template_variables: dict[str, Any], *args, **kwargs) None#

Initialize the main handler with template variables.

get_content() str#

Return the content for the main dashboard page.

This method should be overridden by subclasses to provide specific content. This handler redirects to default page specified by url_default_page.

get() None#

Handle GET requests to the main dashboard page.

write_error(status_code: int, **kwargs: Any) None#

Handle errors by populating the HTML content with the error message.