Link
This class defines a protocol for creating dynamic links within the system. It specifies a contract for generating task log links based on various contextual parameters, allowing for templated URLs that are resolved by the backend.
Attributes
| Attribute | Type | Description |
|---|---|---|
| name | str | The name of the link, used as a display label. |
| icon_uri | Optional[str] = "" | An optional URI for an icon associated with the link, which can be displayed alongside the link name. |
Methods
get_link()
@classmethod
def get_link(
run_name: str,
project: str,
domain: str,
context: Dict[str, str],
parent_action_name: str,
action_name: str,
pod_name: str,
kwargs: Any
) - > str
Returns a task log link given the action. Link can have template variables that are replaced by the backend.
Parameters
| Name | Type | Description |
|---|---|---|
| run_name | str | The name of the run. |
| project | str | The project name. |
| domain | str | The domain name. |
| context | Dict[str, str] | Additional context for generating the link. |
| parent_action_name | str | The name of the parent action. |
| action_name | str | The name of the action. |
| pod_name | str | The name of the pod. |
| kwargs | Any | Additional keyword arguments. |
Returns
| Type | Description |
|---|---|
str | The generated link. |