You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/03/01 17:54:27 UTC

[GitHub] mik-laj commented on a change in pull request #4796: [AIRFLOW-3970] Pull out the action buttons from the tabs

mik-laj commented on a change in pull request #4796: [AIRFLOW-3970] Pull out the action buttons from the tabs
URL: https://github.com/apache/airflow/pull/4796#discussion_r261698848
 
 

 ##########
 File path: airflow/www/templates/airflow/dag.html
 ##########
 @@ -26,24 +26,52 @@
 
 {% block content %}
 <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>
-      {% 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> <small class="text-muted"> {{ dag.description }} </small>
-      {% endif %}
-      {% if root %}
-        <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 }}">
-        schedule: {{ dag.schedule_interval }}
-      </a>
-    </h4>
+  <div class="clearfix">
+    <div class="pull-right">
+      <div class="btn-group">
+        <a href="{{ url_for('Airflow.trigger', dag_id=dag.dag_id, origin=request.base_url ) }}"
+           onclick="return confirmTriggerDag('{{ dag.safe_dag_id }}')"
+           class="btn btn-primary"
+        >
+          <span class="glyphicon glyphicon-play-circle" aria-hidden="true"></span>
+          Trigger DAG
+        </a>
+        <a href="{{ url_for('Airflow.refresh', dag_id=dag.dag_id) }}"
+           class="btn btn-primary"
+        >
+          <span class="glyphicon glyphicon-refresh" aria-hidden="true"></span>
+          Refresh
+        </a>
+        <a href="{{ url_for('Airflow.delete', dag_id=dag.dag_id) }}"
+           onclick="return confirmDeleteDag('{{ dag.safe_dag_id }}')"
+           class="btn btn-danger"
+        >
+          <span class="glyphicon glyphicon-remove-circle" aria-hidden="true"></span>
+          Delete
+        </a>
+      </div>
+    </div>
+    <div style="display: flex; align-items: center;">
+      <h2>
+        {% if dag.parent_dag is defined and dag.parent_dag %}
+          <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> <small class="text-muted"> {{ dag.description }} </small>
+        {% endif %}
+        {% if root %}
+          <span style='color:#AAA;'>ROOT: </span> <span> {{ root }}</span>
+        {% endif %}
+      </h2>
+      <h4 style="padding-left: 16px">
 
 Review comment:
   I would like to soon update Bootstrap to a newer version. Then i will use a bootstrap spacing classes.
   
   See: 
   https://getbootstrap.com/docs/4.2/utilities/spacing/

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services