Skip to content

Commit

Permalink
UX Fix: Prevent undesired text selection with DAG title selection in …
Browse files Browse the repository at this point in the history
…Chrome (apache#8912)

Negate user-select in Firefox where behavior is already as desired

(cherry-picked from ce7fdea)
  • Loading branch information
ryanahamilton authored and Chris Fei committed Mar 5, 2021
1 parent 62be56b commit 37e2735
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions airflow/www_rbac/templates/airflow/dag.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@
{% endblock %}

{% block content %}
<div>
<div>
<h3 class="pull-left">
{% if dag.parent_dag is defined and dag.parent_dag %}
<span style='color:#AAA;'>SUBDAG: </span> <span> {{ dag.dag_id }}</span>
<span style="color:#aaa;">SUBDAG:</span> <span>{{ dag.dag_id }}</span>
{% else %}
<input id="pause_resume" dag_id="{{ dag.dag_id }}" type="checkbox" {{ "checked" if not dag.is_paused else "" }} data-toggle="toggle" data-size="mini" method="post">
<span style='color:#AAA;'>DAG: </span> <span> {{ dag.dag_id }}</span>
<span style="color:#aaa;">DAG:</span> <span>{{ dag.dag_id }}</span>
<small class="text-muted"> {{ dag.description[0:150] + '...' if dag.description and dag.description|length > 150 else dag.description|default('', true) }} </small>
{% endif %}
{% if root %}
<span style='color:#AAA;'>ROOT: </span> <span> {{ root }}</span>
<span style="color:#aaa;">ROOT:</span> <span>{{ root }}</span>
{% endif %}
</h3>
<h4 class="pull-right">
<a class="label label-default" href="{{ url_for('DagRunModelView.list') }}?_flt_3_dag_id={{ dag.dag_id }}">
<a class="label label-default" href="{{ url_for('DagRunModelView.list') }}?_flt_3_dag_id={{ dag.dag_id }}" style="user-select: none;-moz-user-select: auto;">
schedule: {{ dag.schedule_interval }}
</a>
</h4>
Expand All @@ -50,9 +50,9 @@ <h4 class="pull-right">
{% set base_date_arg = request.args.get('base_date') %}
{% set num_runs_arg = request.args.get('num_runs') %}
{% if execution_date is defined %}
{% set execution_date_arg = execution_date %}
{% set execution_date_arg = execution_date %}
{% else %}
{% set execution_date_arg = request.args.get('execution_date') %}
{% set execution_date_arg = request.args.get('execution_date') %}
{% endif %}
<ul class="nav nav-pills">
{% if dag.parent_dag is defined and dag.parent_dag %}
Expand Down

0 comments on commit 37e2735

Please sign in to comment.