diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-11-07 15:39:45 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-11-07 16:25:52 +0000 |
| commit | 8f815ccc244597135fc5b9f74aeb0e5d96ce8eb5 (patch) | |
| tree | 00b15567487f1985109f3be15929049defc7fefa | |
| parent | 64907ecc42ea17acbd68ccdd4b32d560e0c673e0 (diff) | |
all: fix HTML file formatting
Fix inconsistent HTML file formatting with both tabs and spaces.
| -rw-r--r-- | dashboard/app/templates/backports.html | 8 | ||||
| -rw-r--r-- | dashboard/app/templates/custom_content.html | 8 | ||||
| -rw-r--r-- | dashboard/app/templates/graph_fuzzing.html | 2 | ||||
| -rw-r--r-- | dashboard/app/templates/main.html | 2 | ||||
| -rw-r--r-- | dashboard/app/templates/templates.html | 127 | ||||
| -rw-r--r-- | pkg/cover/templates/cover.html | 124 | ||||
| -rw-r--r-- | tools/syz-testbed/templates/table.html | 6 | ||||
| -rw-r--r-- | tools/syz-testbed/templates/testbed.html | 30 |
8 files changed, 150 insertions, 157 deletions
diff --git a/dashboard/app/templates/backports.html b/dashboard/app/templates/backports.html index a0e53adb2..523f74e8c 100644 --- a/dashboard/app/templates/backports.html +++ b/dashboard/app/templates/backports.html @@ -13,13 +13,13 @@ Use of this source code is governed by Apache 2 LICENSE that can be found in the {{template "header" .Header}} {{$getName := .DisplayNamespace}} {{range $group := .Groups}} - <b>{{$group.From.URL}} {{$group.From.Branch}} β {{$group.To.URL}} {{$group.To.Branch}}</b><br /> - + <b>{{$group.From.URL}} {{$group.From.Branch}} β {{$group.To.URL}} {{$group.To.Branch}}</b><br /> + <table class="list_table"> <tr> <th>Commit</th> {{range $ns := .Namespaces}} - <th>{{call $getName $ns}}</th> + <th>{{call $getName $ns}}</th> {{end}} </tr> {{range $backport := $group.List}} @@ -36,7 +36,7 @@ Use of this source code is governed by Apache 2 LICENSE that can be found in the {{link $info.Bug.Link $info.Bug.Title}} {{end}} </td> - {{end}} + {{end}} </tr> {{end}} </table> diff --git a/dashboard/app/templates/custom_content.html b/dashboard/app/templates/custom_content.html index 7e2c722c1..d5f8b2c2b 100644 --- a/dashboard/app/templates/custom_content.html +++ b/dashboard/app/templates/custom_content.html @@ -6,11 +6,11 @@ Use of this source code is governed by Apache 2 LICENSE that can be found in the <!doctype html> <html> <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {{template "head" .Header}} - <style> - {{ .Style }} - </style> + <style> + {{ .Style }} + </style> <title>syzbot</title> </head> <body> diff --git a/dashboard/app/templates/graph_fuzzing.html b/dashboard/app/templates/graph_fuzzing.html index d7a22e6a6..6482f950c 100644 --- a/dashboard/app/templates/graph_fuzzing.html +++ b/dashboard/app/templates/graph_fuzzing.html @@ -47,7 +47,7 @@ Manager statistics graphs. </head> <body> {{template "header" .Header}} - <div class="page"> + <div class="page"> <div id="graph_div" class="main-content"></div> <aside> <form> diff --git a/dashboard/app/templates/main.html b/dashboard/app/templates/main.html index e3cfce845..285070ba8 100644 --- a/dashboard/app/templates/main.html +++ b/dashboard/app/templates/main.html @@ -14,7 +14,7 @@ Main page. <body> {{template "header" .Header}} {{if $.Decommissioned}}<h1>This kernel is DECOMMISSIONED</h1>{{end}} - {{if or (not $.BugFilter.Filter.Any) ($.BugFilter.Filter.ManagerName)}} + {{if or (not $.BugFilter.Filter.Any) ($.BugFilter.Filter.ManagerName)}} {{template "manager_list" $.Managers}} {{end}} {{template "bug_filter" $.BugFilter}} diff --git a/dashboard/app/templates/templates.html b/dashboard/app/templates/templates.html index 2ef542174..7ead75f58 100644 --- a/dashboard/app/templates/templates.html +++ b/dashboard/app/templates/templates.html @@ -57,77 +57,70 @@ Use of this source code is governed by Apache 2 LICENSE that can be found in the </tr> </table> {{if not (eq .URLPath "/admin")}} - <div class="navigation"> - <div class="navigation_tab{{if eq .URLPath (printf "/%v" $.Namespace)}}_selected{{end}}"> - <a href='/{{$.Namespace}}'> - <span style="color:DeepPink;">π</span> Open [{{$.BugCounts.Open}}]</a> - </div> + <div class="navigation"> + <div class="navigation_tab{{if eq .URLPath (printf "/%v" $.Namespace)}}_selected{{end}}"> + <a href='/{{$.Namespace}}'><span style="color:DeepPink;">π</span> Open [{{$.BugCounts.Open}}]</a> + </div> - {{if .ShowSubsystems}} - <div class="navigation_tab{{if eq .URLPath (printf "/%v/subsystems" $.Namespace)}}_selected{{end}}"> - <a href='/{{$.Namespace}}/subsystems'> - <span style="color:DeepPink;">β‘</span> Subsystems</a> - </div> - {{end}} + {{if .ShowSubsystems}} + <div class="navigation_tab{{if eq .URLPath (printf "/%v/subsystems" $.Namespace)}}_selected{{end}}"> + <a href='/{{$.Namespace}}/subsystems'><span style="color:DeepPink;">β‘</span> Subsystems</a> + </div> + {{end}} - <div class="navigation_tab{{if eq .URLPath (printf "/%v/fixed" $.Namespace)}}_selected{{end}}"> - <a href='/{{$.Namespace}}/fixed'> - <span style="color:ForestGreen;">π</span> Fixed [{{$.BugCounts.Fixed}}]</a> - </div> + <div class="navigation_tab{{if eq .URLPath (printf "/%v/fixed" $.Namespace)}}_selected{{end}}"> + <a href='/{{$.Namespace}}/fixed'><span style="color:ForestGreen;">π</span> Fixed [{{$.BugCounts.Fixed}}]</a> + </div> - <div class="navigation_tab{{if eq .URLPath (printf "/%v/invalid" $.Namespace)}}_selected{{end}}" href='/{{$.Namespace}}/invalid'> - <a href='/{{$.Namespace}}/invalid'> - <span style="color:RoyalBlue;">π</span> Invalid [{{$.BugCounts.Invalid}}]</a> - </div> + <div class="navigation_tab{{if eq .URLPath (printf "/%v/invalid" $.Namespace)}}_selected{{end}}" href='/{{$.Namespace}}/invalid'> + <a href='/{{$.Namespace}}/invalid'><span style="color:RoyalBlue;">π</span> Invalid [{{$.BugCounts.Invalid}}]</a> + </div> - {{if gt .MissingBackports 0}} - <div class="navigation_tab{{if eq .URLPath (printf "/%v/backports" $.Namespace)}}_selected{{end}}"> - <a href='/{{$.Namespace}}/backports'> - <span style="color:ForestGreen;">β¬</span> Missing Backports [{{$.MissingBackports}}]</a> - </div> - {{end}} + {{if gt .MissingBackports 0}} + <div class="navigation_tab{{if eq .URLPath (printf "/%v/backports" $.Namespace)}}_selected{{end}}"> + <a href='/{{$.Namespace}}/backports'><span style="color:ForestGreen;">β¬</span> Missing Backports [{{$.MissingBackports}}]</a> + </div> + {{end}} - <div class="navigation_tab{{if eq .URLPath (printf "/%v/graph/crashes" $.Namespace)}}_selected{{end}}"> - <a href='/{{$.Namespace}}/graph/crashes'> - <span style="color:ForestGreen;">β‘</span> Crashes</a> - </div> + <div class="navigation_tab{{if eq .URLPath (printf "/%v/graph/crashes" $.Namespace)}}_selected{{end}}"> + <a href='/{{$.Namespace}}/graph/crashes'><span style="color:ForestGreen;">β‘</span> Crashes</a> + </div> - <div class="dropdown navigation_tab"> - <button class="dropbtn"><span style="color:DarkOrange;">π</span>Graphs</button> - <div class="dropdown-content"> - <a class="navigation_tab{{if eq .URLPath (printf "/%v/graph/bugs" $.Namespace)}}_selected{{end}}" - href='/{{$.Namespace}}/graph/bugs'>Kernel Health</a> - <a class="navigation_tab{{if eq .URLPath (printf "/%v/graph/found-bugs" $.Namespace)}}_selected{{end}}" - href='/{{$.Namespace}}/graph/found-bugs'>Bugs/Month</a> - <a class="navigation_tab{{if eq .URLPath (printf "/%v/graph/lifetimes" $.Namespace)}}_selected{{end}}" - href='/{{$.Namespace}}/graph/lifetimes'>Bug Lifetimes</a> - <a class="navigation_tab{{if eq .URLPath (printf "/%v/graph/fuzzing" $.Namespace)}}_selected{{end}}" - href='/{{$.Namespace}}/graph/fuzzing'>Fuzzing</a> - </div> - </div> + <div class="dropdown navigation_tab"> + <button class="dropbtn"><span style="color:DarkOrange;">π</span>Graphs</button> + <div class="dropdown-content"> + <a class="navigation_tab{{if eq .URLPath (printf "/%v/graph/bugs" $.Namespace)}}_selected{{end}}" + href='/{{$.Namespace}}/graph/bugs'>Kernel Health</a> + <a class="navigation_tab{{if eq .URLPath (printf "/%v/graph/found-bugs" $.Namespace)}}_selected{{end}}" + href='/{{$.Namespace}}/graph/found-bugs'>Bugs/Month</a> + <a class="navigation_tab{{if eq .URLPath (printf "/%v/graph/lifetimes" $.Namespace)}}_selected{{end}}" + href='/{{$.Namespace}}/graph/lifetimes'>Bug Lifetimes</a> + <a class="navigation_tab{{if eq .URLPath (printf "/%v/graph/fuzzing" $.Namespace)}}_selected{{end}}" + href='/{{$.Namespace}}/graph/fuzzing'>Fuzzing</a> + </div> + </div> - {{if .ShowCoverageMenu}} - <div class="dropdown navigation_tab"> - <button class="dropbtn"><span style="color:DarkOrange;">π</span>Coverage</button> - <div class="dropdown-content"> - <a class="navigation_tab{{if eq .URLPath (printf "/%v/graph/coverage" $.Namespace)}}_selected{{end}}" - href="/{{$.Namespace}}/graph/coverage?period=quarter">Total</a> - <a class="navigation_tab{{if eq .URLPath (printf "/%v/graph/coverage_heatmap" $.Namespace)}}_selected{{end}}" - href="/{{$.Namespace}}/graph/coverage_heatmap?period=month">Repo Heatmap</a> - {{ if .ShowSubsystems }} - <a class="navigation_tab{{if eq .URLPath (printf "/%v/graph/coverage_subsystems_heatmap" $.Namespace)}}_selected{{end}}" - href="/{{$.Namespace}}/graph/coverage_subsystems_heatmap?period=month">Subsystems Heatmap</a> - {{ end }} - </div> - </div> - {{end}} - {{if .ContactEmail}} - <div class="navigation_tab navigation_right"> - <a href='mailto:{{.ContactEmail}}'> - <span style="color:ForestGreen;">π¬</span> Send us feedback</a> - </div> - {{end}} - </div> + {{if .ShowCoverageMenu}} + <div class="dropdown navigation_tab"> + <button class="dropbtn"><span style="color:DarkOrange;">π</span>Coverage</button> + <div class="dropdown-content"> + <a class="navigation_tab{{if eq .URLPath (printf "/%v/graph/coverage" $.Namespace)}}_selected{{end}}" + href="/{{$.Namespace}}/graph/coverage?period=quarter">Total</a> + <a class="navigation_tab{{if eq .URLPath (printf "/%v/graph/coverage_heatmap" $.Namespace)}}_selected{{end}}" + href="/{{$.Namespace}}/graph/coverage_heatmap?period=month">Repo Heatmap</a> + {{if .ShowSubsystems}} + <a class="navigation_tab{{if eq .URLPath (printf "/%v/graph/coverage_subsystems_heatmap" $.Namespace)}}_selected{{end}}" + href="/{{$.Namespace}}/graph/coverage_subsystems_heatmap?period=month">Subsystems Heatmap</a> + {{end}} + </div> + </div> + {{end}} + {{if .ContactEmail}} + <div class="navigation_tab navigation_right"> + <a href='mailto:{{.ContactEmail}}'><span style="color:ForestGreen;">π¬</span> Send us feedback</a> + </div> + {{end}} + </div> {{end}} </header> <br> @@ -368,7 +361,7 @@ Use of this source code is governed by Apache 2 LICENSE that can be found in the {{if .FixCandidate}} <b>Fix candidate bisection: failed</b> {{else}} - <b>Fix bisection: failed</b> + <b>Fix bisection: failed</b> {{end}} {{end}} <b>({{link .ErrorLink "error log"}}{{if .LogLink}}, {{link .LogLink "bisect log"}}{{end}})</b><br> @@ -379,7 +372,7 @@ Use of this source code is governed by Apache 2 LICENSE that can be found in the {{if .FixCandidate}} <b>Fix commit to backport</b> {{else}} - <b>Fix bisection: fixed by</b> + <b>Fix bisection: fixed by</b> {{end}} {{end}} <b>({{link .LogLink "bisect log"}})</b> <span class="bad">{{print .Flags}}</span>:<br> @@ -649,7 +642,7 @@ Use of this source code is governed by Apache 2 LICENSE that can be found in the </td> {{else}} <td class="status-ok">Didn't crash</td> - {{end}} + {{end}} </tr> {{end}} </tbody> diff --git a/pkg/cover/templates/cover.html b/pkg/cover/templates/cover.html index d45a0f74b..0265ab1ed 100644 --- a/pkg/cover/templates/cover.html +++ b/pkg/cover/templates/cover.html @@ -141,69 +141,69 @@ </div> </body> <script> - (function() { - var toggler = document.getElementsByClassName("caret"); - for (var i = 0; i < toggler.length; i++) { - toggler[i].addEventListener("click", function() { - this.parentElement.querySelector(".nested").classList.toggle("active"); - this.classList.toggle("caret-down"); - }); - } - if (window.location.hash) { - var hash = decodeURIComponent(window.location.hash.substring(1)).split("/"); - var path = "path"; - for (var i = 0; i < hash.length; i++) { - path += "/" + hash[i]; - var elem = document.getElementById(path); - if (elem) - elem.click(); - } - } - })(); - var visible; - var contentIdx; - var currentPC; + (function() { + var toggler = document.getElementsByClassName("caret"); + for (var i = 0; i < toggler.length; i++) { + toggler[i].addEventListener("click", function() { + this.parentElement.querySelector(".nested").classList.toggle("active"); + this.classList.toggle("caret-down"); + }); + } + if (window.location.hash) { + var hash = decodeURIComponent(window.location.hash.substring(1)).split("/"); + var path = "path"; + for (var i = 0; i < hash.length; i++) { + path += "/" + hash[i]; + var elem = document.getElementById(path); + if (elem) + elem.click(); + } + } + })(); + var visible; + var contentIdx; + var currentPC; function onPercentClick(index) { - if (visible) - visible.style.display = 'none'; - visible = document.getElementById("function_" + index); - visible.style.display = 'block'; - document.getElementById("right_pane").scrollTo(0, 0); - toggleCloseBtn(); - } - function onFileClick(index) { - if (visible) - visible.style.display = 'none'; - visible = document.getElementById("contents_" + index); - visible.style.display = 'block'; - contentIdx = index; - document.getElementById("right_pane").scrollTo(0, 0); - toggleCloseBtn(); - } - function toggleCloseBtn(showBtn) { - let display = 'none'; - if (showBtn) - display = 'block'; - document.getElementById("close-btn").style.display = display; - } - function onProgClick(index, span) { - if (visible) - visible.style.display = 'none'; - visible = document.getElementById("prog_" + index); - visible.style.display = 'block'; - document.getElementById("right_pane").scrollTo(0, 0); - currentPC = span; - toggleCloseBtn(true); - } - function onCloseClick() { - if (visible) - visible.style.display = 'none'; - visible = document.getElementById("contents_" + contentIdx); - visible.style.display = 'block'; - toggleCloseBtn(); - currentPC.scrollIntoView(); - } - </script> + if (visible) + visible.style.display = 'none'; + visible = document.getElementById("function_" + index); + visible.style.display = 'block'; + document.getElementById("right_pane").scrollTo(0, 0); + toggleCloseBtn(); + } + function onFileClick(index) { + if (visible) + visible.style.display = 'none'; + visible = document.getElementById("contents_" + index); + visible.style.display = 'block'; + contentIdx = index; + document.getElementById("right_pane").scrollTo(0, 0); + toggleCloseBtn(); + } + function toggleCloseBtn(showBtn) { + let display = 'none'; + if (showBtn) + display = 'block'; + document.getElementById("close-btn").style.display = display; + } + function onProgClick(index, span) { + if (visible) + visible.style.display = 'none'; + visible = document.getElementById("prog_" + index); + visible.style.display = 'block'; + document.getElementById("right_pane").scrollTo(0, 0); + currentPC = span; + toggleCloseBtn(true); + } + function onCloseClick() { + if (visible) + visible.style.display = 'none'; + visible = document.getElementById("contents_" + contentIdx); + visible.style.display = 'block'; + toggleCloseBtn(); + currentPC.scrollIntoView(); + } + </script> </html> {{define "dir"}} diff --git a/tools/syz-testbed/templates/table.html b/tools/syz-testbed/templates/table.html index 3b7213f5a..d6ba98dc4 100644 --- a/tools/syz-testbed/templates/table.html +++ b/tools/syz-testbed/templates/table.html @@ -25,7 +25,7 @@ {{range $c := .Table.ColumnHeaders}} <th> {{$url := ""}} - {{if $uiTable.ColumnURL}}{{$url = (call $uiTable.ColumnURL $c)}}{{end}} + {{if $uiTable.ColumnURL}}{{$url = (call $uiTable.ColumnURL $c)}}{{end}} {{if $url}}<a href="{{$url}}">{{$c}}</a> {{else}} {{$c}} @@ -41,7 +41,7 @@ <tr> <td> {{$url := ""}} - {{if $uiTable.RowURL}}{{$url = (call $uiTable.RowURL $r)}}{{end}} + {{if $uiTable.RowURL}}{{$url = (call $uiTable.RowURL $r)}}{{end}} {{if $url}}<a href="{{$url}}">{{$r}}</a> {{else}} {{$r}} @@ -52,7 +52,7 @@ <td>{{if $cell}}{{$cell}}{{end}}</td> {{if $uiTable.Extra}} <td>{{if $cell}}{{template "PrintExtra" $cell}}{{end}}</td> - {{end}} + {{end}} {{end}} </tr> {{end}} diff --git a/tools/syz-testbed/templates/testbed.html b/tools/syz-testbed/templates/testbed.html index e91bee23d..677389a71 100644 --- a/tools/syz-testbed/templates/testbed.html +++ b/tools/syz-testbed/templates/testbed.html @@ -1,32 +1,32 @@ <!doctype html> <html> <head> - <title>{{.Name }} syzkaller</title> - {{template "syz-head"}} - <style> - .positive-delta { - color:darkgreen; - } - .negative-delta { - color:darkred; - } - </style> + <title>{{.Name }} syzkaller</title> + {{template "syz-head"}} + <style> + .positive-delta { + color:darkgreen; + } + .negative-delta { + color:darkred; + } + </style> </head> <body> <header id="topbar"> <table class="position_table"> <tbody> - <tr> + <tr> <td> - <h1> + <h1> <a href="/">syz-testbed "{{.Name }}"</a></h1> - </td> + </td> </tr> </tbody> </table> <table class="position_table"> <tbody> - <td class="navigation"> + <td class="navigation"> Views: {{with $main := .}} {{range $view := .Views}} @@ -40,7 +40,7 @@ href="?view={{$view.Name}}">β {{$view.Name}}</a> {{end}} {{end}} - </td> + </td> </tbody> </table> </header> |
