shyft.dashboard.widgets.message_viewer

Classes

MessageViewer([title, rows, width, height, ...])

Simple Message Viewer using a Div in the browser

class shyft.dashboard.widgets.message_viewer.MessageViewer(title='Notification:', rows=10, width=300, height=200, title_hight=20, sizing_mode=None, show_time=True, time_zone='Europe/Oslo', logger=None)[source]

Bases: object

Simple Message Viewer using a Div in the browser

Parameters:
  • title (str) – Title of the MSG box default er Notification:

  • rows – number of msg rows which should be shown

  • width – width of the msg div

  • height – height of the msg div, this will be influenced by rows.

  • title_hight – heigth of the title div default is 20

  • sizing_mode (str | None) – sizing mode of the divs

  • show_time (bool)

  • time_zone (str)

  • logger (LoggerBox | None)

__init__(title='Notification:', rows=10, width=300, height=200, title_hight=20, sizing_mode=None, show_time=True, time_zone='Europe/Oslo', logger=None)[source]

Simple Message Viewer using a Div in the browser

Parameters:
  • title (str) – Title of the MSG box default er Notification:

  • rows – number of msg rows which should be shown

  • width – width of the msg div

  • height – height of the msg div, this will be influenced by rows.

  • title_hight – heigth of the title div default is 20

  • sizing_mode (str | None) – sizing mode of the divs

  • show_time (bool)

  • time_zone (str)

  • logger (LoggerBox | None)

receive_info_message(text)[source]
Parameters:

text (str)

Return type:

None

receive_warning_message(text)[source]
Parameters:

text (str)

Return type:

None

add_message(text, style)[source]

Receiver function for messages