frontend: replace non-standard xhtml mix with html5
This commit is contained in:
parent
20b1233ec8
commit
6e4bbd6410
@ -148,7 +148,7 @@ func summaryTable(isIPv6 bool, data string, serverName string) string {
|
||||
result += "</tr>"
|
||||
}
|
||||
result += "</tbody></table>"
|
||||
result += "<!==" + data + "-->"
|
||||
result += "<!--" + data + "-->"
|
||||
}
|
||||
|
||||
return result
|
||||
|
@ -29,16 +29,14 @@ type tmplArguments struct {
|
||||
|
||||
var tmpl = template.Must(template.New("tmpl").Parse(`
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US" class="no-js">
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/>
|
||||
<meta name="renderer" content="webkit"/>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
|
||||
<meta name="renderer" content="webkit">
|
||||
<title>{{ .Title }}</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<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>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
@ -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 => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user