Repository: incubator-airflow Updated Branches: refs/heads/v1-9-test 8a4ad3010 -> 974b493fc
[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 (cherry picked from commit 3d4feb60906a4e4edbd1dba4b397db1a0b5be8ed) Signed-off-by: Bolke de Bruin <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/974b493f Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/974b493f Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/974b493f Branch: refs/heads/v1-9-test Commit: 974b493fc929e46a67c1b68f2e7ef9581f2cde0d Parents: 8a4ad30 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:28 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/974b493f/airflow/www/views.py ---------------------------------------------------------------------- diff --git a/airflow/www/views.py b/airflow/www/views.py index ad27238..eb858f1 100644 --- a/airflow/www/views.py +++ b/airflow/www/views.py @@ -1459,7 +1459,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(
