msticpy.config.compound_ctrls module
Compound control classes.
- class msticpy.config.compound_ctrls.ArgControl(setting_path: str | None, name: str, store_type: str = 'Text', item_value: Any | None = None)
Bases:
SettingsControl
,CompEditStatusMixin
Args setting element edit component.
Initialize and ArgControl object.
- Parameters:
setting_path (Optional[str], optional) – The full path to the setting (minus the name)
name (str) – The name of the setting
store_type (str, optional) – The storage type for the setting value, by default “Text” Other options are “EnvironmentVar” and “KeyVault”
item_value (Any, optional) – The value of the setting, by default None Note None is a legitimate value for store_type “KeyVault”
- clear_status()
Clear the status text.
- set_status(status, timeout: float = 3.0)
Set the status text.
- testing = False
- property value: str | Dict[str, str | None]
Return the value of the control.
- Returns:
Either a string value or a dict of: {“EnvironmentVar”: value} or {“KeyVault”: value or None}
- Return type:
Union[str, Dict[str, Optional[str]]]
- class msticpy.config.compound_ctrls.UserDefLoadComponent(mp_controls: MpConfigControls, comp_name: str, setting_path: str)
Bases:
SettingsControl
User Defaults Load component edit component.
Initialize the control.
- Parameters:
mp_controls (MpConfigControls) – Msticpy configu controls data store.
comp_name (str) – Component name
setting_path (str) – Path to setting (minus comp_name)
- property layout
Return the widget layout for the control.
- property value: str | Dict[str, str | None]
Return the current value of the control.
- Returns:
Control value dictionary.
- Return type:
Optional[Dict[str, Any]]
- class msticpy.config.compound_ctrls.UserDefQryProvCtrl(prov_name: str)
Bases:
SettingsControl
User Defaults Query Provider edit component.
Initialize the control.
- Parameters:
prov_name (str) – The query provider name
- property value: str | Dict[str, str | None]
Return the current value of the control.
- Returns:
The value dict. In cases where optional ‘alias’ and ‘connect’ settings are not used this will be an empty dictionary.
- Return type:
Union[str, Dict[str, Optional[str]]]
- msticpy.config.compound_ctrls.get_arg_ctrl(setting_path, var_name, mp_controls)
Create the ArgControl based on the current value of the setting.