Skip to content

Commit 3da2d97

Browse files
committed
Refactor HTML structure and styles for index and CVE distribution pages
1 parent 876bbb4 commit 3da2d97

File tree

3 files changed

+146
-69
lines changed

3 files changed

+146
-69
lines changed
Lines changed: 146 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,159 @@
11
<!DOCTYPE HTML>
22
<html xmlns:th="http://www.thymeleaf.org">
3+
34
<head>
45
<title>GLVD</title>
56
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
7+
<style>
8+
body {
9+
font-family: Arial, sans-serif;
10+
color: #222;
11+
}
12+
13+
.container {
14+
max-width: 600px;
15+
margin: 60px auto;
16+
padding: 32px;
17+
border-radius: 12px;
18+
background: #f8fafc;
19+
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
20+
}
21+
22+
h1 {
23+
color: #1a73e8;
24+
margin-top: 0;
25+
}
26+
27+
form {
28+
display: flex;
29+
gap: 8px;
30+
align-items: center;
31+
}
32+
33+
form.cve {
34+
margin: 20px 0;
35+
}
36+
37+
form.distribution {
38+
margin: 12px 0 24px 0;
39+
}
40+
41+
form.triage {
42+
margin: 12px 0 24px 0;
43+
}
44+
45+
label {
46+
font-weight: 600;
47+
}
48+
49+
input[type="text"] {
50+
flex: 1;
51+
padding: 8px 10px;
52+
border: 1px solid #d1d5db;
53+
border-radius: 6px;
54+
}
55+
56+
button {
57+
border: none;
58+
padding: 8px 12px;
59+
border-radius: 6px;
60+
cursor: pointer;
61+
color: #fff;
62+
}
63+
64+
button.cve {
65+
background: #1a73e8;
66+
}
67+
68+
button.distribution {
69+
background: #0f9d58;
70+
}
71+
72+
button.triage {
73+
background: #ff7043;
74+
}
75+
76+
a {
77+
color: #1a73e8;
78+
}
79+
</style>
680
</head>
81+
782
<body>
83+
<script>
84+
function populateGardenlinuxVersions(selectId) {
85+
fetch("/v1/gardenlinuxVersions", {
86+
headers: { "Accept": "application/json" }
87+
})
88+
.then(response => response.json())
89+
.then(versions => {
90+
const select = document.getElementById(selectId);
91+
if (!select) return;
92+
select.innerHTML = "";
93+
versions.reverse().forEach(version => {
94+
const option = document.createElement("option");
95+
option.value = version;
96+
option.textContent = version;
97+
select.appendChild(option);
98+
});
99+
})
100+
.catch(() => {
101+
const select = document.getElementById(selectId);
102+
if (select) {
103+
select.innerHTML = "<option value=''>Error loading versions</option>";
104+
}
105+
});
106+
}
107+
108+
document.addEventListener("DOMContentLoaded", function () {
109+
populateGardenlinuxVersions("gardenlinuxVersion");
110+
populateGardenlinuxVersions("triageGardenlinuxVersion");
111+
});
112+
</script>
113+
8114

9-
<div style="max-width: 600px; margin: 60px auto; padding: 32px; border-radius: 12px; background: #f8fafc; box-shadow: 0 2px 12px rgba(0,0,0,0.07); font-family: Arial, sans-serif; color: #222;">
10-
<h1 style="color: #1a73e8; margin-top: 0;">Welcome to GLVD</h1>
11-
<p>GLVD (Garden Linux Vulnerability Database) is currently under active development.</p>
12-
<p>We're working hard to bring you new features and improvements. Some parts of the application may not be fully functional yet.</p>
13-
<ul>
14-
<li>Stay tuned for updates and new releases.</li>
15-
<li>If you have feedback or want to contribute, please visit our <a href="https://github.com/gardenlinux/glvd" target="_blank" style="color: #1a73e8;">GitHub repository</a>.</li>
16-
</ul>
17-
<p>Thank you for your interest in GLVD!</p>
115+
<div class="container">
116+
<h1>Welcome to GLVD</h1>
117+
<p>GLVD (Garden Linux Vulnerability Database) is an application for tracking security issues in Garden Linux.
118+
</p>
18119

19-
<p>
20-
Copyright 2025, <a href="https://www.sap.com/">SAP SE</a> and Garden Linux Contributors. <a href="https://www.sap.com/corporate/en/legal/privacy.html">Privacy Statement</a>, <a href="https://www.sap.com/corporate/en/legal/terms-of-use.html">Terms of Use</a>
21-
</p>
22-
</div>
120+
<form action="/getCveDetails" method="get" class="cve">
121+
<label for="cveId" style="min-width: 320px;">Lookup CVE:</label>
122+
<input id="cveId" name="cveId" type="text" placeholder="CVE-2025-22872" required />
123+
<button type="submit" class="cve">Go</button>
124+
</form>
23125

126+
<form action="/getCveForDistribution" method="get" class="distribution">
127+
<label for="gardenlinuxVersion" style="min-width: 320px;">Lookup Garden Linux version:</label>
128+
<select id="gardenlinuxVersion" name="gardenlinuxVersion" required>
129+
<option value="">Loading...</option>
130+
</select>
131+
<button type="submit" class="distribution">Go</button>
132+
</form>
133+
134+
<form action="/getTriage" method="get" class="triage">
135+
<label for="triageGardenlinuxVersion" style="min-width: 320px;">Lookup Triage for Garden Linux
136+
version:</label>
137+
<select id="triageGardenlinuxVersion" name="gardenlinuxVersion" required>
138+
<option value="">Loading...</option>
139+
</select>
140+
<button type="submit" class="triage">Go</button>
141+
</form>
142+
143+
<p>If you have feedback or want to contribute, please visit our <a href="https://github.com/gardenlinux/glvd"
144+
target="_blank">GitHub
145+
repository</a>.</p>
146+
147+
<p>Found a bug, or have questions on GLVD? <a href="https://github.com/gardenlinux/glvd/issues/new/choose"
148+
target="_blank">Open an issue</a>.</p>
149+
150+
<p>
151+
Copyright 2025, <a href="https://www.sap.com/">SAP SE</a> and Garden Linux Contributors. <a
152+
href="https://www.sap.com/corporate/en/legal/privacy.html">Privacy Statement</a>, <a
153+
href="https://www.sap.com/corporate/en/legal/terms-of-use.html">Terms of Use</a>
154+
</p>
155+
</div>
24156

25157
</body>
158+
26159
</html>

src/main/resources/templates/getCveForDistribution.html

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,6 @@
88
<body>
99
<h1 th:text="|Vulnerabilities list for Garden Linux ${gardenlinuxVersion} (ignoring resolved issues)|" />
1010

11-
<div>Switch Garden Linux Version: </div>
12-
13-
<a th:href="@{/getCveForDistribution(gardenlinuxVersion=today,onlyVulnerable=true)}">today</a>
14-
15-
<a th:href="@{/getCveForDistribution(gardenlinuxVersion=1592.13,onlyVulnerable=true)}">1592.13</a>
16-
17-
<a th:href="@{/getCveForDistribution(gardenlinuxVersion=1592.14,onlyVulnerable=true)}">1592.14</a>
18-
19-
<a th:href="@{/getCveForDistribution(gardenlinuxVersion=1877.3,onlyVulnerable=true)}">1877.3</a>
20-
21-
<a th:href="@{/getCveForDistribution(gardenlinuxVersion=1877.4,onlyVulnerable=true)}">1877.4</a>
22-
23-
<br>
24-
25-
<a th:href="@{/getTriage(gardenlinuxVersion=today)}">triages for today</a>
26-
27-
<a th:href="@{/getTriage(gardenlinuxVersion=1592.8)}">triages for 1592.8</a>
28-
29-
<a th:href="@{/getTriage(gardenlinuxVersion=1592.9)}">triages for 1592.9</a>
30-
31-
<a th:href="@{/getTriage(gardenlinuxVersion=1592.10)}">triages for 1592.10</a>
32-
33-
<a th:href="@{/getTriage(gardenlinuxVersion=1877.0)}">triages for 1877.0</a>
34-
35-
<div>
36-
<a th:href="@{/getNvdExclusiveCve}">NVD Exclusive CVEs (need to triage)</a>
37-
</div>
38-
3911
<p th:text="|Found ${#lists.size(sourcePackageCves)} potential security issues|"></p>
4012

4113
<a th:href="@{/getCveForDistributionAll(gardenlinuxVersion=${gardenlinuxVersion},onlyVulnerable=false)}">Show all potential issues</a>

src/main/resources/templates/getCveForDistributionAll.html

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,6 @@
88
<body>
99
<h1 th:text="|Vulnerabilities list for Garden Linux ${gardenlinuxVersion} (showing resolved issues)|" />
1010

11-
<div>Switch Garden Linux Version: </div>
12-
13-
<a th:href="@{/getCveForDistributionAll(gardenlinuxVersion=today,onlyVulnerable=false)}">today</a>
14-
15-
<a th:href="@{/getCveForDistributionAll(gardenlinuxVersion=1592.13,onlyVulnerable=false)}">1592.13</a>
16-
17-
<a th:href="@{/getCveForDistributionAll(gardenlinuxVersion=1592.14,onlyVulnerable=false)}">1592.14</a>
18-
19-
<a th:href="@{/getCveForDistributionAll(gardenlinuxVersion=1877.3,onlyVulnerable=false)}">1877.3</a>
20-
21-
<a th:href="@{/getCveForDistributionAll(gardenlinuxVersion=1877.4,onlyVulnerable=false)}">1877.4</a>
22-
23-
<br>
24-
25-
<a th:href="@{/getTriage(gardenlinuxVersion=today)}">triages for today</a>
26-
27-
<a th:href="@{/getTriage(gardenlinuxVersion=1592.8)}">triages for 1592.8</a>
28-
29-
<a th:href="@{/getTriage(gardenlinuxVersion=1592.9)}">triages for 1592.9</a>
30-
31-
<a th:href="@{/getTriage(gardenlinuxVersion=1592.10)}">triages for 1592.10</a>
32-
33-
<a th:href="@{/getTriage(gardenlinuxVersion=1877.0)}">triages for 1877.0</a>
34-
35-
<div>
36-
<a th:href="@{/getNvdExclusiveCve}">NVD Exclusive CVEs (need to triage)</a>
37-
</div>
38-
3911
<p th:text="|Found ${#lists.size(sourcePackageCves)} potential security issues|"></p>
4012

4113
<a th:href="@{/getCveForDistribution(gardenlinuxVersion=${gardenlinuxVersion},onlyVulnerable=true)}">Show only unresolved potential issues</a>

0 commit comments

Comments
 (0)