class documentation

Console Manager class. This class provides the main console functionality for the CSE. It is either this plugin or the minimal console plugin that is used to run the main loop of the CSE.

Method about Print QR-code for keyboard commands.
Method childResourceTree Render the CSE's resource tree, beginning with a child resource.
Method clearScreen Clear the console screen.
Method configUpdate Handle configuration updates.
Method configuration Print the configuration.
Method continuesPlotGraph Continuous plot a graph from the instance data of a container.
Method continuousInspectResource Render a resource continuously.
Method continuousStatistics Render a continous statistics view.
Method continuousTree Render a continuous CSE resource tree view.
Method deleteRequests Delete all requests.
Method deleteResource Delete a resource from the CSE.
Method exportInstances Export instances of a container resource to a CSV file in the tmp directory.
Method exportResources Export resources to the tmp directory. The result is a shell script that can be used to re-build a previous resource tree.
Method getConfigurationRich Generate a rich table for the configuration settings.
Method help Print help for keyboard commands.
Method inspectResource Show a resource.
Method inspectResourceChildren Show a resource and its children.
Method katalogScripts List a catalog of the loaded scripts.
Method openWebUI Open the web UI in the default web browser.
Method plotGraph Plot a graph from the instance data of a container.
Method printLine Print a separator Line to the log.
Method registrations Render CSE registrations.
Method resourceTree Render the CSE's resource tree.
Method restart Restart the Console service.
Method run Run the console.
Method runScript Run a script from one of the script directories.
Method showAllRequests Show all the requests.
Method showRequests Show the requests for a resource.
Method startConsole Initialize the console plugin. Set the console instance in the CSE.
Method statistics Render various statistics & counts.
Method toggleLogging Toggle through the log levels.
Method toggleScreenLogging Toggle screen logging.
Class Variable __slots__ The slots for the Console to optimize memory usage.
Class Variable cseSetConsole Injected function to set the console instance in the CSE.
Class Variable cseShutdown Injected function to shutdown the CSE.
Class Variable dispatcher Injected IDispatcher instance.
Class Variable managementSupport Injected ManagementSupport instance.
Class Variable scriptManager Injected ScriptManager instance.
Class Variable storage Injected Storage instance.
Instance Variable interruptContinous Indication whether any continuous display function
Instance Variable previosInspectChildrenRi Resource ID of the previous resource + child resource inspection. This is used as the default value for the next resource + child resource inspection.
Instance Variable previousArgument Previous script arguments. This is used as the default value for the next script to run.
Instance Variable previousExportRi Resource ID of the previous export. This is used as the default value for the next export.
Instance Variable previousGraphRi Resource ID of the previous graph display. This is used as the default value for the next graph display.
Instance Variable previousInspectRi Resource ID of the previous resource inspection. This is used as the default value for the next resource inspection.
Instance Variable previousInstanceExportRi Resource ID of the previous instance export. This is used as the default value for the next instance export.
Instance Variable previousRequestRi Resource ID of the previous request display. This is used as the default value for the next request display.
Instance Variable previousScript Name of the previous script run. This is used as the default value for the next script to run.
Instance Variable previousTreeRi Resource ID of the previous sub-tree display. This is used as the default value for the next sub-tree display.
Instance Variable treeMode Current tree mode for the resource tree display. This is used to determine how the resource tree is displayed.
Method _about Print a headline for a command.
Method _assignConfig Assign configuration settings.
Method _plotGraph Plot a single graph from the child-resources of a container-like resource.

Inherited from ConsoleBase:

Method doStartWithTextUI Check if the console should start with the text UI.
Method runTUI Open the text UI.
Method shutdown Shutdown the Console instance.
Method shutdownCSE Shutdown the CSE. Confirm shutdown before actually doing that.
Method stop Stop the console loop.
Class Variable textUI Injected TextUI instance.
def about(self, key: str):

Print QR-code for keyboard commands.

Parameters
key:strInput key. Ignored.
def childResourceTree(self, key: str):

Render the CSE's resource tree, beginning with a child resource.

Parameters
key:strInput key. Ignored.
def clearScreen(self, key: str):

Clear the console screen.

Parameters
key:strInput key. Ignored.
@onEvent(eventManager.configUpdate)
def configUpdate(self, eventData: EventData):

Handle configuration updates.

Parameters
eventData:EventDataThe event data, containing the name of the updated configuration setting and its new value.
def configuration(self, key: str):

Print the configuration.

Parameters
key:strInput key. Ignored.
def continuesPlotGraph(self, key: str):

Continuous plot a graph from the instance data of a container.

See Also

Parameters
key:strInput key. Ignored.
def continuousInspectResource(self, key: str):

Render a resource continuously.

Parameters
key:strInput key. Ignored.
def continuousStatistics(self, key: str):

Render a continous statistics view.

Parameters
key:strInput key. Ignored.
def continuousTree(self, key: str):

Render a continuous CSE resource tree view.

Parameters
key:strInput key. Ignored.
def deleteRequests(self, key: str):

Delete all requests.

Parameters
key:strInput key. Ignored.
def deleteResource(self, key: str):

Delete a resource from the CSE.

Parameters
key:strInput key. Ignored.
def exportInstances(self, key: str):

Export instances of a container resource to a CSV file in the tmp directory.

Parameters
key:strInput key. Ignored.
def exportResources(self, key: str):

Export resources to the tmp directory. The result is a shell script that can be used to re-build a previous resource tree.

Parameters
key:strInput key. Ignored.
def getConfigurationRich(self, style: Style | None = Style()) -> Table:

Generate a rich table for the configuration settings.

Parameters
style:Style | NoneOptional style for the table.
Returns
TableA rich Table object representing the configuration settings.
def help(self, key: str):

Print help for keyboard commands.

Parameters
key:strInput key. Ignored.
def inspectResource(self, key: str):

Show a resource.

Parameters
key:strInput key. Ignored.
def inspectResourceChildren(self, key: str):

Show a resource and its children.

Parameters
key:strInput key. Ignored.
def katalogScripts(self, key: str):

List a catalog of the loaded scripts.

Parameters
key:strInput key. Ignored.
def openWebUI(self, key: str):

Open the web UI in the default web browser.

Parameters
key:strInput key. Ignored.
def plotGraph(self, key: str):

Plot a graph from the instance data of a container.

Attention

Only CNT.CNT and CIN.CIN resources are currently supported.

Parameters
key:strInput key. Ignored.
def printLine(self, key: str):

Print a separator Line to the log.

Parameters
key:strInput key. Ignored.
def registrations(self, key: str):

Render CSE registrations.

Parameters
key:strInput key. Ignored.
def resourceTree(self, key: str):

Render the CSE's resource tree.

Parameters
key:strInput key. Ignored.
def restart(self):

Restart the Console service.

def run(self):

Run the console.

def runScript(self, key: str):

Run a script from one of the script directories.

Parameters
key:strInput key. Ignored.
def showAllRequests(self, key: str):

Show all the requests.

Parameters
key:strInput key. Ignored.
def showRequests(self, key: str):

Show the requests for a resource.

Parameters
key:strInput key. Ignored.
def startConsole(self):

Initialize the console plugin. Set the console instance in the CSE.

def statistics(self, key: str):

Render various statistics & counts.

Parameters
key:strInput key. Ignored.
def toggleLogging(self, key: str):

Toggle through the log levels.

Parameters
key:strInput key. Ignored.
def toggleScreenLogging(self, key: str):

Toggle screen logging.

Parameters
key:strInput key. Ignored.
__slots__: tuple[str, ...] =

The slots for the Console to optimize memory usage.

cseSetConsole: Callable[[ConsoleBase], None] =

Injected function to set the console instance in the CSE.

cseShutdown: Callable[[], None] =

Injected function to shutdown the CSE.

dispatcher: Dispatcher =

Injected IDispatcher instance.

managementSupport: ManagementSupport =

Injected ManagementSupport instance.

scriptManager: ScriptManager =

Injected ScriptManager instance.

storage: Storage =

Injected Storage instance.

interruptContinous: bool =

Indication whether any continuous display function

previosInspectChildrenRi =

Resource ID of the previous resource + child resource inspection. This is used as the default value for the next resource + child resource inspection.

previousArgument =

Previous script arguments. This is used as the default value for the next script to run.

previousExportRi =

Resource ID of the previous export. This is used as the default value for the next export.

previousGraphRi =

Resource ID of the previous graph display. This is used as the default value for the next graph display.

previousInspectRi =

Resource ID of the previous resource inspection. This is used as the default value for the next resource inspection.

previousInstanceExportRi =

Resource ID of the previous instance export. This is used as the default value for the next instance export.

previousRequestRi =

Resource ID of the previous request display. This is used as the default value for the next request display.

previousScript =

Name of the previous script run. This is used as the default value for the next script to run.

previousTreeRi =

Resource ID of the previous sub-tree display. This is used as the default value for the next sub-tree display.

treeMode: TreeMode =

Current tree mode for the resource tree display. This is used to determine how the resource tree is displayed.

def _about(self, header: str = None):

Print a headline for a command.

Parameters
header:strOptional header to print.
def _assignConfig(self):

Assign configuration settings.

def _plotGraph(self, resource: Resource):

Plot a single graph from the child-resources of a container-like resource.

Parameters
resource:ResourceThe parent resource for the data instance resources.