class documentation
class WebUI(object):
Constructor: WebUI(app, defaultRI, defaultOriginator, root, ...)
The web user interface for the ACME CSE.
| Method | __init__ |
Initialize the web user interface. |
| Method | add |
Add an endpoint to the web UI. |
| Method | get |
Get the version of the web UI. |
| Method | handle |
Handle a GET request for the web GUI. |
| Method | proxy |
Proxy a request to another server. |
| Method | redirect |
Redirect request to / to webui. |
| Instance Variable | default |
The default originator. |
| Instance Variable | default |
The default CSE RI. |
| Instance Variable | flask |
The flask app. |
| Instance Variable | http |
The non-local root for the HTTP server. |
| Instance Variable | http |
The root for the HTTP server. |
| Instance Variable | oauth |
The oauth token. |
| Instance Variable | redirect |
The URL to redirect to. |
| Instance Variable | version |
The version of the web UI. |
| Instance Variable | webui |
The directory for the web UI. |
| Instance Variable | webui |
The root for the web UI. |
def __init__(self, app:
Flask, defaultRI: str, defaultOriginator: str, root: str | None = '/webui', webuiDirectory: str | None = '.', redirectURL: str | None = None, version: str | None = '', httpRoot: str | None = '', externalRoot: str | None = ''):
¶
Initialize the web user interface.
| Parameters | |
app:Flask | The flask app. |
defaultstr | The default CSE RI. |
defaultstr | The default originator. |
root:str | None | The root for the web UI. |
webuistr | None | The directory for the web UI. |
redirectstr | None | The URL to redirect to. |
version:str | None | The version of the web UI. |
httpstr | None | The root for the HTTP server. |
externalstr | None | The external root for the HTTP server. |
def addEndpoint(self, endpoint:
str | None = None, endpoint_name: str | None = None, handler: FlaskHandler | None = None, methods: list[ str] | None = None, strictSlashes: bool | None = True):
¶
Add an endpoint to the web UI.
| Parameters | |
endpoint:str | None | The endpoint. |
endpointstr | None | The name of the endpoint. |
handler:FlaskHandler | None | The handler for the endpoint. |
methods:list[ | The methods for the endpoint. |
strictbool | None | Whether to use strict slashes. |
Proxy a request to another server.
| Parameters | |
| *args | The arguments. |
| **kwargs | The keyword arguments. |
| Returns | |
Response | The response. |