Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
QMLBench Regression Finder
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Daniel Smith
QMLBench Regression Finder
Commits
102bf889
Commit
102bf889
authored
Oct 01, 2019
by
Daniel Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add favicon and make pages look 1 percent prettier
parent
8f709720
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
2 deletions
+38
-2
assets/favicon.ico
assets/favicon.ico
+0
-0
server.js
server.js
+38
-2
No files found.
assets/favicon.ico
0 → 100644
View file @
102bf889
1.08 KB
server.js
View file @
102bf889
...
...
@@ -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
}
`
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment