From 8f815ccc244597135fc5b9f74aeb0e5d96ce8eb5 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 7 Nov 2024 15:39:45 +0100 Subject: all: fix HTML file formatting Fix inconsistent HTML file formatting with both tabs and spaces. --- dashboard/app/templates/backports.html | 8 +- dashboard/app/templates/custom_content.html | 8 +- dashboard/app/templates/graph_fuzzing.html | 2 +- dashboard/app/templates/main.html | 2 +- dashboard/app/templates/templates.html | 127 +++++++++++++--------------- pkg/cover/templates/cover.html | 124 +++++++++++++-------------- tools/syz-testbed/templates/table.html | 6 +- 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}} - {{$group.From.URL}} {{$group.From.Branch}} → {{$group.To.URL}} {{$group.To.Branch}}
- + {{$group.From.URL}} {{$group.From.Branch}} → {{$group.To.URL}} {{$group.To.Branch}}
+ {{range $ns := .Namespaces}} - + {{end}} {{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}} - {{end}} + {{end}} {{end}}
Commit{{call $getName $ns}}{{call $getName $ns}}
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 - + {{template "head" .Header}} - + syzbot 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. {{template "header" .Header}} -
+
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. {{template "header" .Header}} {{if $.Decommissioned}}

This kernel is DECOMMISSIONED

{{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 {{if not (eq .URLPath "/admin")}} -
-
- - 🐞 Open [{{$.BugCounts.Open}}] -
+
+
+ 🐞 Open [{{$.BugCounts.Open}}] +
- {{if .ShowSubsystems}} -
- - ≡ Subsystems -
- {{end}} + {{if .ShowSubsystems}} +
+ ≡ Subsystems +
+ {{end}} -
- - 🐞 Fixed [{{$.BugCounts.Fixed}}] -
+
+ 🐞 Fixed [{{$.BugCounts.Fixed}}] +
-
- - 🐞 Invalid [{{$.BugCounts.Invalid}}] -
+
+ 🐞 Invalid [{{$.BugCounts.Invalid}}] +
- {{if gt .MissingBackports 0}} -
- - ⬇ Missing Backports [{{$.MissingBackports}}] -
- {{end}} + {{if gt .MissingBackports 0}} +
+ ⬇ Missing Backports [{{$.MissingBackports}}] +
+ {{end}} -
- - ≡ Crashes -
+
+ ≡ Crashes +
-
- -
- Kernel Health - Bugs/Month - Bug Lifetimes - Fuzzing -
-
+
+ +
+ Kernel Health + Bugs/Month + Bug Lifetimes + Fuzzing +
+
- {{if .ShowCoverageMenu}} -
- -
- Total - Repo Heatmap - {{ if .ShowSubsystems }} - Subsystems Heatmap - {{ end }} -
-
- {{end}} - {{if .ContactEmail}} -
- - 💬 Send us feedback -
- {{end}} -
+ {{if .ShowCoverageMenu}} +
+ +
+ Total + Repo Heatmap + {{if .ShowSubsystems}} + Subsystems Heatmap + {{end}} +
+
+ {{end}} + {{if .ContactEmail}} +
+ 💬 Send us feedback +
+ {{end}} +
{{end}}
@@ -368,7 +361,7 @@ Use of this source code is governed by Apache 2 LICENSE that can be found in the {{if .FixCandidate}} Fix candidate bisection: failed {{else}} - Fix bisection: failed + Fix bisection: failed {{end}} {{end}} ({{link .ErrorLink "error log"}}{{if .LogLink}}, {{link .LogLink "bisect log"}}{{end}})
@@ -379,7 +372,7 @@ Use of this source code is governed by Apache 2 LICENSE that can be found in the {{if .FixCandidate}} Fix commit to backport {{else}} - Fix bisection: fixed by + Fix bisection: fixed by {{end}} {{end}} ({{link .LogLink "bisect log"}}) {{print .Flags}}:
@@ -649,7 +642,7 @@ Use of this source code is governed by Apache 2 LICENSE that can be found in the {{else}} Didn't crash - {{end}} + {{end}} {{end}} 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 @@
+ 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(); + } + {{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}} {{$url := ""}} - {{if $uiTable.ColumnURL}}{{$url = (call $uiTable.ColumnURL $c)}}{{end}} + {{if $uiTable.ColumnURL}}{{$url = (call $uiTable.ColumnURL $c)}}{{end}} {{if $url}}{{$c}} {{else}} {{$c}} @@ -41,7 +41,7 @@ {{$url := ""}} - {{if $uiTable.RowURL}}{{$url = (call $uiTable.RowURL $r)}}{{end}} + {{if $uiTable.RowURL}}{{$url = (call $uiTable.RowURL $r)}}{{end}} {{if $url}}{{$r}} {{else}} {{$r}} @@ -52,7 +52,7 @@ {{if $cell}}{{$cell}}{{end}} {{if $uiTable.Extra}} {{if $cell}}{{template "PrintExtra" $cell}}{{end}} - {{end}} + {{end}} {{end}} {{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 @@ - {{.Name }} syzkaller - {{template "syz-head"}} - + {{.Name }} syzkaller + {{template "syz-head"}} +
- + +
-

+

syz-testbed "{{.Name }}"

-
- +
+ Views: {{with $main := .}} {{range $view := .Views}} @@ -40,7 +40,7 @@ href="?view={{$view.Name}}">█ {{$view.Name}}   {{end}} {{end}} -
-- cgit mrf-deployment