frontend: replace non-standard xhtml mix with html5

This commit is contained in:
Arnie97
2020-07-28 14:08:30 +08:00
committed by Lan Tian
parent 20b1233ec8
commit 6e4bbd6410
3 changed files with 10 additions and 9 deletions

View File

@@ -99,7 +99,10 @@ func webHandlerBGPMap(endpoint string, command string) func(w http.ResponseWrite
renderTemplate(
w, r,
"Bird-lg Go - "+html.EscapeString(endpoint+" "+backendCommand),
`<script>
`
<script src="https://cdn.jsdelivr.net/npm/viz.js@2.1.2/viz.min.js" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/viz.js@2.1.2/lite.render.js" crossorigin="anonymous"></script>
<script>
var viz = new Viz();
viz.renderSVGElement(`+"`"+birdRouteToGraphviz(servers, responses, urlCommands)+"`"+`)
.then(element => {