Repository: incubator-airflow Updated Branches: refs/heads/master f8e9c688e -> 8873a8df8
[AIRFLOW-2477] Improve time units for task duration and landing times charts for RBAC UI Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/3b04f946 Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/3b04f946 Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/3b04f946 Branch: refs/heads/master Commit: 3b04f946a9133bdfdddc10719279fade7c72f8b0 Parents: 4ce2502 Author: Tao feng <[email protected]> Authored: Thu May 17 00:02:27 2018 -0700 Committer: Tao feng <[email protected]> Committed: Thu May 17 08:04:14 2018 -0700 ---------------------------------------------------------------------- airflow/www_rbac/views.py | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/3b04f946/airflow/www_rbac/views.py ---------------------------------------------------------------------- diff --git a/airflow/www_rbac/views.py b/airflow/www_rbac/views.py index e774462..f508720 100644 --- a/airflow/www_rbac/views.py +++ b/airflow/www_rbac/views.py @@ -1167,8 +1167,11 @@ class Airflow(AirflowBaseView): # update the y Axis on both charts to have the correct time units chart.create_y_axis('yAxis', format='.02f', custom_format=False, label='Duration ({})'.format(y_unit)) + chart.axislist['yAxis']['axisLabelDistance'] = '40' cum_chart.create_y_axis('yAxis', format='.02f', custom_format=False, label='Duration ({})'.format(cum_y_unit)) + cum_chart.axislist['yAxis']['axisLabelDistance'] = '40' + for task in dag.tasks: if x[task.task_id]: chart.add_serie(name=task.task_id, x=x[task.task_id], @@ -1317,6 +1320,7 @@ class Airflow(AirflowBaseView): # update the y Axis to have the correct time units chart.create_y_axis('yAxis', format='.02f', custom_format=False, label='Landing Time ({})'.format(y_unit)) + chart.axislist['yAxis']['axisLabelDistance'] = '40' for task in dag.tasks: if x[task.task_id]: chart.add_serie(name=task.task_id, x=x[task.task_id],
