Fix tree view if config contains " (#9250)
If you run DAG with `{"\"": ""}` configuration tree view will be broken: ``` tree:1 Uncaught SyntaxError: Unexpected string in JSON at position 806 at JSON.parse (<anonymous>) at tree?dag_id=hightlight_test&num_runs=25:1190 ``` JSON.parse is given incorrectly escaped json string.
This commit is contained in:
Родитель
e5ce87ac25
Коммит
a8cd23c8f0
|
@ -136,7 +136,7 @@ function populate_taskinstance_properties(node) {
|
|||
|
||||
var devicePixelRatio = window.devicePixelRatio || 1;
|
||||
// JSON.parse is faster for large payloads than an object literal (because the JSON grammer is simpler!)
|
||||
var data = JSON.parse('{{ data }}');
|
||||
var data = JSON.parse({{ data|tojson }});
|
||||
var barHeight = 20;
|
||||
var axisHeight = 40;
|
||||
var square_x = parseInt(500 * devicePixelRatio);
|
||||
|
|
Загрузка…
Ссылка в новой задаче