MCPcopy
hub / github.com/apache/airflow / task_instance_link

Function task_instance_link

airflow/www/utils.py:205–224  ·  view source on GitHub ↗

Generates a URL to the Graph View for a TaskInstance.

(attr)

Source from the content-addressed store, hash-verified

203
204
205def task_instance_link(attr):
206 """Generates a URL to the Graph View for a TaskInstance."""
207 dag_id = attr.get('dag_id')
208 task_id = attr.get('task_id')
209 execution_date = attr.get('execution_date')
210 url = url_for('Airflow.task', dag_id=dag_id, task_id=task_id, execution_date=execution_date.isoformat())
211 url_root = url_for(
212 'Airflow.graph', dag_id=dag_id, root=task_id, execution_date=execution_date.isoformat()
213 )
214 return Markup( # noqa
215 """
216 <span style="white-space: nowrap;">
217 <a href="{url}">{task_id}</a>
218 <a href="{url_root}" title="Filter on this task and upstream">
219 <span class="material-icons" style="margin-left:0;"
220 aria-hidden="true">filter_alt</span>
221 </a>
222 </span>
223 """
224 ).format(url=url, task_id=task_id, url_root=url_root)
225
226
227def state_token(state):

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected