pywebui.alerts

Module Contents

Classes

Alert

Alert object.

Bookmark

Bookmark object.

AlertType

Available alert types.

AlertsMethods

Encapsulates methods for manage alerts.

class pywebui.alerts.Alert

Alert object.

bookmark

the message added to bookmarks or not (boolean value)

Type

bool

id

the ID of message

Type

int

message

the text of message

Type

str

node

the node name where alert occurred

Type

str

timestamp

the time when alert occurred

Type

int

class pywebui.alerts.Bookmark

Bookmark object.

id

the ID of message

Type

int

message

the text of message

Type

str

node

the node name where alert occurred

Type

str

timestamp

the time when alert occurred

Type

int

type

the type of message.

Type

str

username

the username who added message to bookmarks

Type

str

class pywebui.alerts.AlertType

Available alert types.

OPCOM = opcom
INTRUSIONS = intrusions
DEVICES = devices
class pywebui.alerts.AlertsMethods

Encapsulates methods for manage alerts.

get_alerts(self, alert_type: AlertType, limit: int = 30, after_id: int = - 1, before_id: int = - 1) List[Alert]

Returns list of messages from operator console, list of intrusions and list of errors for disks.

get_bookmarks(self) List[Bookmark]

Returns messages which saved as bookmarks.

add_bookmark(self, alert_id: int, alert_type: AlertType) bool

Adds message to bookmarks.

delete_bookmark(self, alert_id: int, alert_type: AlertType) bool

Deletes message which saved as bookmark.