awsc.dashboard.DashboardBlock
- class awsc.dashboard.DashboardBlock(*args, **kwargs)
Parent class for individual dashboard blocks. The intent of dashboard blocks is to display condensed information about a particular AWS service.
- Attributes:
- refresh_frequencyint
How often (in seconds) to refresh the data displayed on the dashboard block automatically.
Methods
Autohotkey(key[, tooltip, is_validated, ...])Decorator that automatically assigns a hotkey to a function upon instantiation.
add_block(block)Adds a new child block to this block.
add_hotkey(hotkey, action[, tooltip, ...])Adds a new hotkey to the control.
async_refresh()Async flow for refresh_data.
auto_refresh_data([force])Called by Dashboard to facilitate auto-refreshing.
autohotkey_condition(hotkey)Autohotkey condition callback.
before_paint()Hook function for acting on the block before any blocks are painted for the current frame.
bottomright()Returns the coordinates of the bottom right corner of the block.
clear_blocks([tag])Removes all blocks with the matching tag from the child blocks of this block.
input(key)Input handler hook function.
paint()Hook function for painting the block.
refresh_data()Called automatically to refresh the data on the dashboard block.
register()Classmethod to register this class and all of its subclasses with the commander control.
remove_block(block)Removes a specific block from this block.
reparent()Shorthand function for removing a Block from its parent and re-adding it.
topleft()Returns the coordinates of the top left corner of the block.
validate_hotkey(key)Validates whether a hotkey can be used based on the state of the control.
on_become_frame
- __init__(*args, **kwargs)
Initializes a HotkeyControl object.
Methods
__init__(*args, **kwargs)Initializes a HotkeyControl object.
add_block(block)Adds a new child block to this block.
add_hotkey(hotkey, action[, tooltip, ...])Adds a new hotkey to the control.
async_refresh()Async flow for refresh_data.
auto_refresh_data([force])Called by Dashboard to facilitate auto-refreshing.
autohotkey_condition(hotkey)Autohotkey condition callback.
before_paint()Hook function for acting on the block before any blocks are painted for the current frame.
bottomright()Returns the coordinates of the bottom right corner of the block.
clear_blocks([tag])Removes all blocks with the matching tag from the child blocks of this block.
input(key)Input handler hook function.
on_become_frame()paint()Hook function for painting the block.
refresh_data()Called automatically to refresh the data on the dashboard block.
register()Classmethod to register this class and all of its subclasses with the commander control.
remove_block(block)Removes a specific block from this block.
reparent()Shorthand function for removing a Block from its parent and re-adding it.
topleft()Returns the coordinates of the top left corner of the block.
validate_hotkey(key)Validates whether a hotkey can be used based on the state of the control.
Attributes
borderReturns the border of the control.
cornersRead-only property for calculating the four corners of the block.
descriptionheightRead-only property for the height of the block.
innerRead-only property for calculating the four inner corners of the block.
refresh_frequencyw_inRead-only property for the inner width of the block.
widthRead-only property for the width of the block.