This is an automated email from the ASF dual-hosted git repository.
bbovenzi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 0d80cc9144 Simplify DAG trigger UI (#34567)
0d80cc9144 is described below
commit 0d80cc9144553fa3502fcf4fa111026be55f9b5e
Author: Jed Cunningham <[email protected]>
AuthorDate: Fri Sep 22 16:43:00 2023 -0600
Simplify DAG trigger UI (#34567)
We don't need to show details on how to access dagrun conf on the
trigger page every time - DAG authors can find it in the docs.
Also, don't show the "unpause dag" toggle if the DAG is already unpaused -
no matter your choice it'll unpaused.
---
airflow/www/templates/airflow/trigger.html | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/airflow/www/templates/airflow/trigger.html
b/airflow/www/templates/airflow/trigger.html
index 72a0f28736..67ca7060b3 100644
--- a/airflow/www/templates/airflow/trigger.html
+++ b/airflow/www/templates/airflow/trigger.html
@@ -259,16 +259,7 @@
<label for="conf">Configuration JSON (Optional, must be a dict
object)</label>
<textarea class="form-control" name="conf" id="json">{{ conf }}</textarea>
{%- endif %}
- <p>
- To access configuration in your DAG use <code>{{ '{{ dag_run.conf }}'
}}</code>.
- {% if is_dag_run_conf_overrides_params %}
- As <code>core.dag_run_conf_overrides_params</code> is set to
<code>True</code>, so passing any configuration
- here will override task params which can be accessed via <code>{{ '{{
params }}' }}</code>.
- {% else %}
- As <code>core.dag_run_conf_overrides_params</code> is set to
<code>False</code>, so passing any configuration
- here won't override task params.
- {% endif %}
- </p>
+ {% if dag.get_is_paused() %}
<div class="form-group">
<label class="switch-label">
<input class="switch-input" name="unpause" id="unpause"
type="checkbox" checked>
@@ -276,6 +267,7 @@
Unpause DAG when triggered
</label>
</div>
+ {% endif %}
<button type="submit" class="btn btn-primary">Trigger</button>
<a class="btn" href="{{ origin }}">Cancel</a>
</form>