SamWheating commented on a change in pull request #20733:
URL: https://github.com/apache/airflow/pull/20733#discussion_r781657258
##########
File path: airflow/www/templates/airflow/dag_audit_log.html
##########
@@ -0,0 +1,92 @@
+{#
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+#}
+
+{% extends "airflow/dag.html" %}
+{% block title %}Dag Audit Log{% endblock %}
+
+{% block head_css %}
+{{ super() }}
+<link href="{{ url_for_asset('dataTables.bootstrap.min.css') }}"
rel="stylesheet" type="text/css" >
+<link href="{{ url_for_asset('bootstrap-toggle.min.css') }}" rel="stylesheet"
type="text/css">
+{% endblock %}
+
+{% block content %}
+ {{ super() }}
+ <h2>Dag Audit Log</h2>
+ <h4 style="display: block; padding-top: 10px; padding-bottom: 4px">
+ <p>
+ Selected events and operations in the last {{ max_query_days }} days.
+ For full list of events click
+ <a href="{{ url_for('LogModelView.list', _flt_3_dag_id=dag_id)
}}">here</a>.
+ </p>
+ <p>User operations with comments are <span style="color:
#158CBA">highlighted.</span></p>
+ </h4>
+ <table id="dag_audit_log_table" class="table table-striped table-bordered
table-hover">
+ <thead>
+ <tr>
+ <th style="min-width: 140px">Time</th>
+ <th style="min-width: 80px">Task Id</th>
+ <th>Event</th>
+ <th style="min-width: 220px">Execution Date</th>
+ <th>By User</th>
+ <th>Details</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for log in dag_logs %}
+ <tr>
+ <!-- Time -->
+ <td>{{ log.dttm.strftime('%Y-%m-%d %H:%M:%S %Z') if log.dttm
else None }}</td>
+ <!-- Task Id: task id is None for Dag level events -->
+ <td>{{ log.task_id if log.task_id else None }}</td>
+ <!-- Event -->
+ <td>{{ log.event if log.event else None }}</td>
+ <!-- Execution Date -->
+ <td>{{ log.execution_date if log.execution_date else None }}</td>
+ <!-- By User -->
+ <td>{{ log.owner if log.owner else None }}</td>
+ <!-- Details -->
+ <td>{{ log.extra if log.extra else None }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+{% endblock %}
+
+{% block tail %}
+ {{ super() }}
+ <script src="{{ url_for_asset('jquery.dataTables.min.js') }}"></script>
+ <script src="{{ url_for_asset('dataTables.bootstrap.min.js') }}"></script>
+ <script>
+ $(document).ready(function() {
+ $('#dag_audit_log_table').DataTable( {
+ "order": [[ 0, "desc" ]],
+ "pageLength": 25,
Review comment:
Thoughts on using the global `page_size` config here?
https://github.com/apache/airflow/blob/8cf3d120ff44c6604e330cc9c4e7945b3f1edc6c/airflow/config_templates/config.yml#L1161-L1167
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]