Skip to content

Commit f15cdea

Browse files
dmitshurgopherbot
authored andcommitted
cmd/coordinator, perf/app: prepare a placeholder banner
We initially intended for a banner to show up to notify users about a migration affecting the old dashboard. A banner turned out not to be needed at this time. Since it was already prepared and might end up being useful later on, add an invisible placeholder for now. Unfortunately, it would take more refactoring than I was willing to take on at this stage to make it possible for the unified banner to be implemented in one place, so it is instead implemented inline in multiple places. For golang/go#65913. Change-Id: I86fbf17b56711f0855e206e803eff8271019b6a8 Reviewed-on: https://go-review.googlesource.com/c/build/+/567498 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Michael Knyszek <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]>
1 parent bf23401 commit f15cdea

File tree

9 files changed

+39
-4
lines changed

9 files changed

+39
-4
lines changed

cmd/coordinator/internal/dashboard/dashboard.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@
4545
</head>
4646

4747
<body class="Dashboard">
48+
{{if false}}<header class="Dashboard-topbar" style="background: antiquewhite;">
49+
<div>
50+
A banner isn't actively displayed at this time. This serves as a placeholder
51+
that can be used if a banner does need to be displayed.
52+
</div>
53+
</header>{{end}}
4854
<header class="Dashboard-topbar">
4955
<h1>
5056
<a href="/">Go Build Coordinator</a>

cmd/coordinator/internal/legacydash/static/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ dd { margin: 2px 20px; }
7070

7171
/* navigation bar */
7272

73-
#topbar {
73+
.Dashboard-topbar, #topbar {
7474
padding: 10px 10px;
7575
background: #E0EBF5;
7676
}

cmd/coordinator/internal/legacydash/ui.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@
3737
</head>
3838

3939
<body>
40+
{{if false}}<header class="Dashboard-topbar" style="background: antiquewhite;">
41+
<div>
42+
A banner isn't actively displayed at this time. This serves as a placeholder
43+
that can be used if a banner does need to be displayed.
44+
</div>
45+
</header>{{end}}
4046
<header id="topbar">
4147
<h1>
4248
<a href="https://farmer.golang.org/">Go Build Coordinator</a>

cmd/coordinator/style.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ body {
1010
color: #222;
1111
font-family: sans-serif;
1212
margin: 0;
13-
padding: 10px;
1413
}
1514
h1,
1615
h2,
@@ -45,7 +44,6 @@ pre {
4544
}
4645
header {
4746
background: #e0ebf5;
48-
margin: -10px -10px 0;
4947
padding: 10px;
5048
}
5149
header h1 {
@@ -80,6 +78,9 @@ header nav a {
8078
padding: 10px;
8179
text-decoration: none;
8280
}
81+
div.page {
82+
padding: 10px;
83+
}
8384
table {
8485
border-collapse: collapse;
8586
font-size: 9pt;

cmd/coordinator/templates/base.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@
44
license that can be found in the LICENSE file.
55
-->
66

7-
{{define "build-header"}}<header>
7+
{{define "build-header"}}
8+
{{if false}}<header class="Dashboard-topbar" style="background: antiquewhite;">
9+
<div>
10+
A banner isn't actively displayed at this time. This serves as a placeholder
11+
that can be used if a banner does need to be displayed.
12+
</div>
13+
</header>{{end}}
14+
<header>
815
<h1>
916
<a href="/">Go Build Coordinator</a>
1017
</h1>

cmd/coordinator/templates/builders.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
<body>
1111
{{template "build-header"}}
1212

13+
<div class="page">
14+
1315
<h2 id='builders'>Defined Builders</h2>
1416

1517
<table>
@@ -40,6 +42,7 @@ <h2 id='hosts'>Defined Host Types (pools)</h2>
4042
{{end}}
4143
</table>
4244

45+
</div>
4346

4447
</body>
4548
</html>

cmd/coordinator/templates/queues.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
</head>
1313
<body class="QueueStats-body">
1414
{{template "build-header"}}
15+
<div class="page">
1516
<h2>Queues</h2>
1617
<div class="QueueStats">
1718
{{range $name, $stats := .Queues}}
@@ -87,5 +88,6 @@ <h2>Queues</h2>
8788
</div>
8889
{{end}}
8990
</div>
91+
</div>
9092
</body>
9193
</html>

cmd/coordinator/templates/status.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
<body>
1111
{{template "build-header"}}
1212

13+
<div class="page">
14+
1315
<h2>Running</h2>
1416
<p>{{printf "%d" .Total}} total builds; {{printf "%d" .ActiveBuilds}} active ({{.ActiveReverse}} reverse). Uptime {{printf "%s" .Uptime}}. Version {{.Version}}.
1517

@@ -81,5 +83,7 @@ <h2 id=disk>Disk Space <a href='#disk'>¶</a></h2>
8183
<h2 id=fd>File Descriptors <a href='#fd'></a></h2>
8284
<p>{{.NumFD}}</p>
8385

86+
</div>
87+
8488
</body>
8589
</html>

perf/app/dashboard/index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
</head>
1717

1818
<body class="Dashboard">
19+
<!-- header class="Dashboard-topbar" style="background: antiquewhite;">
20+
<div>
21+
A banner isn't actively displayed at this time. This serves as a placeholder
22+
that can be used if a banner does need to be displayed.
23+
</div>
24+
</header -->
1925
<header class="Dashboard-topbar">
2026
<h1>
2127
<a href="https://farmer.golang.org/">Go Build Coordinator</a>

0 commit comments

Comments
 (0)