Commit 102bf889 authored by Daniel Smith's avatar Daniel Smith

Add favicon and make pages look 1 percent prettier

parent 8f709720
......@@ -494,14 +494,32 @@ function clearErrors(req, res){
}
}
function clearFinishedJobs(req, res){
// Clear the list of completed jobs
completedJobs = [];
if (res){
res.redirect('/');
}
}
function errorsPage(req, res){
// Display stored system errors.
var pageHTML = `
<head>
<title>Benchmark System Errors</title>
<link rel="shortcut icon" href="assets/favicon.ico"/>
</head>
<style>
body{
font: 13px "Helvetica Neue", "Lucida Grande", "Arial";
background: #ECE9E9 -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#ECE9E9));
background-repeat: no-repeat;
color: #555;
-webkit-font-smoothing: antialiased;
}
</style>
<button onclick="window.location.href='/'">Back</button>
<button onclick="window.location.href='/clearRecentErrors'">Clear all errors</button>
<br>
......@@ -883,9 +901,17 @@ function schedulerPage(req, res) {
<head>
<title>Schedule a new job</title>
<link rel="stylesheet" href="awesomeplete/awesomplete.css" />
<link rel="shortcut icon" href="assets/favicon.ico"/>
</head>
<style>
body{
font: 13px "Helvetica Neue", "Lucida Grande", "Arial";
background: #ECE9E9 -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#ECE9E9));
background-repeat: no-repeat;
color: #555;
-webkit-font-smoothing: antialiased;
}
.tooltip{display:inline;position:relative}
.tooltip:hover{text-decoration:none}
......@@ -1480,15 +1506,23 @@ function homePage(req, res){
`;
}
completedJobsHTML += '</ul>';
completedJobsHTML = `<div style="padding-left:25px"><button onclick="window.location.href='/clearFinishedJobs'">Clean up old jobs</button></div>` + completedJobsHTML;
}
var basePageHTML = `
<head>
<title>QMLBench Regression finder: ${myname}</title>
<meta http-equiv="Refresh" content="90">
<link rel="shortcut icon" href="assets/favicon.ico"/>
</head>
<style>
body{
font: 13px "Helvetica Neue", "Lucida Grande", "Arial";
background: #ECE9E9 -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#ECE9E9));
background-repeat: no-repeat;
color: #555;
-webkit-font-smoothing: antialiased;
}
table {
border: 1px solid black;
}
......@@ -1812,6 +1846,7 @@ function runServer(){
server.use('/logs/', serveIndex(`${__dirname}/logs/`, {view: 'details'}));
server.use('/awesomeplete', express.static('node_modules/awesomplete'));
server.use('/benchmarks/', express.static(`${__dirname}/QtBuild/qmlbench/benchmarks/`));
server.use('/assets/', express.static(`${__dirname}/assets/`));
server.use('/benchmarks/', serveIndex(`${__dirname}/QtBuild/qmlbench/benchmarks/`, {view: 'details'}));
......@@ -1823,6 +1858,7 @@ function runServer(){
server.all('/cancelJob', (req, res) => cancelJob(req, res));
server.all('/recentErrors', (req, res) => errorsPage(req, res));
server.all('/clearRecentErrors', (req, res) => clearErrors(req, res));
server.all('/clearFinishedJobs', (req, res) => clearFinishedJobs(req, res));
server.all('/', (req, res) => homePage(req, res));
console.log(`Starting server... Listening on port ${webPort}`);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment