akkudoktoreos.server.dash.components.ConfigCard
- akkudoktoreos.server.dash.components.ConfigCard(config_name: str, config_type: str, read_only: str, value: str, default: str, description: str, deprecated: str | bool | None, update_error: str | None, update_value: str | None, update_open: bool | None) Card
Creates a styled configuration card for displaying configuration details.
This function generates a configuration card that is displayed in the UI with various sections such as configuration name, type, description, default value, current value, and error details. It supports both read-only and editable modes.
- Parameters:
config_name (str) – The name of the configuration.
config_type (str) – The type of the configuration.
read_only (str) – Indicates if the configuration is read-only (“rw” for read-write, any other value indicates read-only).
value (str) – The current value of the configuration.
default (str) – The default value of the configuration.
description (str) – A description of the configuration.
deprecated (Optional[Union[str, bool]]) – The deprecated marker of the configuration.
update_error (Optional[str]) – The error message, if any, during the update process.
update_value (Optional[str]) – The value to be updated, if different from the current value.
update_open (Optional[bool]) – A flag indicating whether the update section of the card should be initially expanded.
- Returns:
A styled Card component containing the configuration details.
- Return type:
Card