github.com/whiteboxio/flow@v0.0.3-0.20190918184116-508d75d68a2c/web/template/page/config.tmpl (about) 1 {{ define "config" }} 2 <link rel="stylesheet" href="/static/css/jsonTree.css"> 3 <div class="row" id="config-holder"></div> 4 <script src="/static/js/jsonTree.js"></script> 5 <script type="text/javascript"> 6 document.addEventListener("DOMContentLoaded", function(event) { 7 var holder = document.getElementById("config-holder") 8 var json = {{ .Config }} 9 var data 10 try { 11 data = JSON.parse(json) 12 var tree = jsonTree.create(data, holder) 13 tree.expand(function(n) { return true }) 14 } catch (e) { 15 console.Error(e) 16 } 17 }) 18 </script> 19 {{ end }}