Make status and relevant smiley emote float right

master
bel 2020-03-15 17:20:44 +00:00
parent 0ccdee8bd1
commit 99e33214b9
3 changed files with 21 additions and 5 deletions

View File

@ -5,9 +5,9 @@
x jobs
1. job definition
1. next runtime
1. last runtime
1. last output
1. add titles to jobs
x last runtime
x last output
x add titles to jobs
1. job title includes last pass/fail icon
1. button to modify (copies to upsert form)
1. button to delete
@ -38,5 +38,5 @@ x load from file
1. change cron to load the full job from storage so not holding big queued jobs in ram
x add optional second for test main
1. test main
1. add titles to jobs
x add titles to jobs
1. namespace for jobs, output, lastrun, laststatus

View File

@ -31,3 +31,11 @@ body{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxyg
#jobs > tbody > tr:nth-child(2n+1) > td > details {
background-color: #161f27;
}
#jobs > tbody > tr > td > details > summary > span:not(:first-child) {
float: right;
}
#jobs > tbody > tr > td > details > table > tbody > tr > td {
font-family: monospace;
}

View File

@ -38,8 +38,16 @@ function init() {
})
}
function format(job) {
var smiley = "128522"
if (job.last.status != 0) {
smiley = "129324"
}
smiley = `&#${smiley};`
return `<tr><td><details>
<summary name="${job.id}">(${job.last.status}) ${job.title}</summary>
<summary name="${job.id}"}">
<span>${job.title}</span>
<span>${job.last.status} ${smiley}</span>
</summary>
<table>
<tr>
<td><code>${job.cron}</code></td>