TODO and emoji things

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

View File

@ -3,12 +3,12 @@
1. UI to view 1. UI to view
1. running job 1. running job
x jobs x jobs
1. job definition x job definition
1. next runtime 1. next runtime
x last runtime x last runtime
x last output x last output
x add titles to jobs 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 modify (copies to upsert form)
1. button to delete 1. button to delete
1. UI to mutate 1. UI to mutate
@ -16,6 +16,7 @@
1. delete job 1. delete job
1. pause jobs 1. pause jobs
1. interrupt job 1. interrupt job
1. force run
1. JS 1. JS
x ajax for json calls x ajax for json calls
@ -35,6 +36,7 @@ x load from file
1. pause/disable job 1. pause/disable job
1. running job 1. running job
1. interrupt 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 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 x add optional second for test main
1. 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) { function format(job) {
var smiley = "128522" var pause = "&#9208"
var passing = "9711"
if (job.last.status != 0) { 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> return `<tr><td><details>
<summary name="${job.id}"}"> <summary name="${job.id}"}">
<span>${job.title}</span> <span>${job.title}</span>
<span>${job.last.status} ${smiley}</span> <span>${passing}</span>
${buttons}
</summary> </summary>
<table> <table>
<tr> <tr><td>
<td><code>${job.cron}</code></td> <code>${job.cron}</code>
<td><code>${job.language}</code></td> <code>${job.language}</code>
<td><code>${job.script}</code></td> </td></tr>
</tr> <tr><td>
<tr> <code>${job.last.run}</code>
<td><code>${job.last.run}</code></td> <code>${job.last.runtime}</code>
<td><code>${job.last.runtime}</code></td> </td></tr>
<td><code>${job.last.output}</code></td> <tr><td>
</tr> <code>${job.script}</code>
</td></tr>
<tr><td>
<code>${job.last.output}</code>
</td></tr>
</table> </table>
</details></td></tr>` </details></td></tr>`
} }

View File

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