TODO and emoji things

master
bel 2020-03-15 18:45:27 +00:00
parent 99e33214b9
commit b7bfee96a3
4 changed files with 61 additions and 26 deletions

View File

@ -3,12 +3,12 @@
1. UI to view
1. running job
x jobs
1. job definition
x job definition
1. next runtime
x last runtime
x last output
x add titles to jobs
1. job title includes last pass/fail icon
x job title includes last pass/fail icon
1. button to modify (copies to upsert form)
1. button to delete
1. UI to mutate
@ -16,6 +16,7 @@
1. delete job
1. pause jobs
1. interrupt job
1. force run
1. JS
x ajax for json calls
@ -35,6 +36,7 @@ x load from file
1. pause/disable job
1. running job
1. interrupt job
1. force run
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

File diff suppressed because one or more lines are too long

View File

@ -38,27 +38,48 @@ function init() {
})
}
function format(job) {
var smiley = "128522"
var pause = "&#9208"
var passing = "9711"
if (job.last.status != 0) {
smiley = "129324"
passing = "129314"
passing = "129324"
}
smiley = `&#${smiley};`
passing = `&#${passing};`
var buttons = ""
var btns = [
{"name":"disable", "icon":"11035"},
{"name":"enable", "icon":"9654"},
{"name":"modify", "icon":"9999"},
{"name":"delete", "icon":"10006"}
]
btns.forEach(function(e) {
buttons += `
<span>
<input type="button" onclick="${e.name}(this);" value="&#${e.icon};" alt="${e.name}" title="${e.name}"/>
</span>
`
})
return `<tr><td><details>
<summary name="${job.id}"}">
<span>${job.title}</span>
<span>${job.last.status} ${smiley}</span>
<span>${passing}</span>
${buttons}
</summary>
<table>
<tr>
<td><code>${job.cron}</code></td>
<td><code>${job.language}</code></td>
<td><code>${job.script}</code></td>
</tr>
<tr>
<td><code>${job.last.run}</code></td>
<td><code>${job.last.runtime}</code></td>
<td><code>${job.last.output}</code></td>
</tr>
<tr><td>
<code>${job.cron}</code>
<code>${job.language}</code>
</td></tr>
<tr><td>
<code>${job.last.run}</code>
<code>${job.last.runtime}</code>
</td></tr>
<tr><td>
<code>${job.script}</code>
</td></tr>
<tr><td>
<code>${job.last.output}</code>
</td></tr>
</table>
</details></td></tr>`
}

View File

@ -0,0 +1,2 @@
* * * * * * hostname #hostname per sec
* * * * * * false #always fail