Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dashboard/app: move graphs to submenu #5062

Merged
merged 2 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 19 additions & 25 deletions dashboard/app/templates/templates.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,36 +87,30 @@ <h1><a href="/{{$.Namespace}}">syzbot</a></h1>
</div>
{{end}}

<div class="navigation_tab{{if eq .URLPath (printf "/%v/graph/bugs" $.Namespace)}}_selected{{end}}">
<a href='/{{$.Namespace}}/graph/bugs'>
<span style="color:DarkOrange;">📈</span> Kernel Health</a>
</div>

<div class="navigation_tab{{if eq .URLPath (printf "/%v/graph/found-bugs" $.Namespace)}}_selected{{end}}">
<a href='/{{$.Namespace}}/graph/found-bugs'>
<span style="color:DarkOrange;">📈</span> Bugs/Month</a>
</div>

<div class="navigation_tab{{if eq .URLPath (printf "/%v/graph/lifetimes" $.Namespace)}}_selected{{end}}">
<a href='/{{$.Namespace}}/graph/lifetimes'>
<span style="color:DarkOrange;">📈</span> Bug Lifetimes</a>
</div>

<div class="navigation_tab{{if eq .URLPath (printf "/%v/graph/fuzzing" $.Namespace)}}_selected{{end}}">
<a href='/{{$.Namespace}}/graph/fuzzing'>
<span style="color:DarkOrange;">📈</span> Fuzzing</a>
<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&nbsp;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&nbsp;Lifetimes</a>
<a class="navigation_tab{{if eq .URLPath (printf "/%v/graph/fuzzing" $.Namespace)}}_selected{{end}}"
href='/{{$.Namespace}}/graph/fuzzing'>Fuzzing</a>
<a class="navigation_tab{{if eq .URLPath (printf "/%v/graph/crashes" $.Namespace)}}_selected{{end}}"
href='/{{$.Namespace}}/graph/crashes'>Crashes</a>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is technically not a graph

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. Some names polishing will be needed.

</div>
</div>

<div class="navigation_tab{{if eq .URLPath (printf "/%v/graph/crashes" $.Namespace)}}_selected{{end}}">
<a href='/{{$.Namespace}}/graph/crashes'>
<span style="color:DarkOrange;">📈</span> Crashes</a>
</div>
{{if .ShowCoverageMenu}}
<div class="dropdown navigation_tab">
<button class="dropbtn"><span style="color:DarkOrange;">📈</span>Coverage</button>
<div class="dropdown-content navigation_tab{{if eq .URLPath (printf "/%v/graph/coverage" $.Namespace)}}_selected{{end}}">
<a href="/{{$.Namespace}}/graph/coverage">Total</a>
<a href="/{{$.Namespace}}/graph/coverage_heatmap">Heatmap</a>
<div class="dropdown-content">
<a class="navigation_tab{{if eq .URLPath (printf "/%v/graph/coverage" $.Namespace)}}_selected{{end}}"
href="/{{$.Namespace}}/graph/coverage">Total</a>
<a class="navigation_tab{{if eq .URLPath (printf "/%v/graph/coverage_heatmap" $.Namespace)}}_selected{{end}}"
href="/{{$.Namespace}}/graph/coverage_heatmap">Heatmap</a>
</div>
</div>
{{end}}
Expand Down
5 changes: 3 additions & 2 deletions pkg/html/pages/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -450,13 +450,14 @@ aside {
/* Dropdown Content (Hidden by Default) */
.dropdown-content {
display: none;
flex-direction: column;
position: absolute;
background-color: #f1f1f1;
z-index: 1;
}

/* Links inside the dropdown */
.dropdown-content a {
.dropdown-content div a {
color: black;
text-decoration: none;
display: block;
Expand All @@ -466,7 +467,7 @@ aside {
.dropdown-content a:hover {background-color: #ddd;}

/* Show the dropdown menu on hover */
.dropdown:hover .dropdown-content {display: block;}
.dropdown:hover .dropdown-content {display: flex;}

/* Change the background color of the dropdown button when the dropdown content is shown */
.dropdown:hover .dropbtn {background-color: #ddd;}
Loading