Repository: incubator-airflow Updated Branches: refs/heads/master eb012a3c8 -> 3d4feb609
[AIRFLOW-1741] Correctly hide second chart on task duration page A timing/load order bug meant that this ".trigger" call was happening too early, resulting in a trigger being sent before the hook callback had been registered, meaning we didn't hide the second chart correctly on page load. Closes #2711 from ashb/AIRFLOW-1741-task-duration- charts-load Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/3d4feb60 Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/3d4feb60 Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/3d4feb60 Branch: refs/heads/master Commit: 3d4feb60906a4e4edbd1dba4b397db1a0b5be8ed Parents: eb012a3 Author: Ash Berlin-Taylor <[email protected]> Authored: Fri Oct 20 20:44:14 2017 +0200 Committer: Bolke de Bruin <[email protected]> Committed: Fri Oct 20 20:44:14 2017 +0200 ---------------------------------------------------------------------- airflow/www/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/3d4feb60/airflow/www/views.py ---------------------------------------------------------------------- diff --git a/airflow/www/views.py b/airflow/www/views.py index 9ae93f6..f3c2b9c 100644 --- a/airflow/www/views.py +++ b/airflow/www/views.py @@ -1466,7 +1466,7 @@ class Airflow(BaseView): cum_chart.buildcontent() s_index = cum_chart.htmlcontent.rfind('});') cum_chart.htmlcontent = (cum_chart.htmlcontent[:s_index] + - "$( document ).trigger('chartload')" + + "$(function() {$( document ).trigger('chartload') })" + cum_chart.htmlcontent[s_index:]) return self.render(
