mirror of
https://github.com/strongdm/comply
synced 2024-11-21 15:14:54 +00:00
switch cron to 6-figure expressions. introduce hashes by tab.
This commit is contained in:
parent
65c0a598ad
commit
e04e5d7d89
@ -13,11 +13,24 @@ html lang=en
|
||||
= javascript
|
||||
document.addEventListener("DOMContentLoaded", function(event) {
|
||||
document.querySelectorAll('.cron').forEach(function(el) {
|
||||
el.innerHTML = prettyCron.toString(el.innerHTML)
|
||||
el.innerHTML = prettyCron.toString((""+el.innerHTML).trim(),true) // 6-field expressions
|
||||
})
|
||||
if (window.location.hash != "") {
|
||||
var hashComponents = window.location.hash.split('#')
|
||||
if (hashComponents.length>1) {
|
||||
var destination = hashComponents[1]
|
||||
if (["overview","narratives","policies","procedures","standards"].indexOf(destination) >= 0) {
|
||||
show(destination)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
function show(name) {
|
||||
if(history.replaceState) {
|
||||
history.replaceState(null, null, '#'+name);
|
||||
}
|
||||
|
||||
var items = document.getElementsByClassName('top-nav')
|
||||
for (var i=0; i<items.length; i++) {
|
||||
var item = items[i]
|
||||
@ -221,4 +234,6 @@ html lang=en
|
||||
p {{.Project.OrganizationName}} Confidential 2018
|
||||
= javascript
|
||||
// commented for development
|
||||
show('overview')
|
||||
if (window.location.hash=="") {
|
||||
show('overview')
|
||||
}
|
@ -22,7 +22,7 @@ const websocketReloader = `<script>
|
||||
ws.onclose = function(e) {
|
||||
// reload!
|
||||
if (connected) {
|
||||
window.location=window.location
|
||||
window.location.reload(true)
|
||||
}
|
||||
}
|
||||
})()
|
||||
|
@ -98,6 +98,8 @@ func TriggerScheduled() error {
|
||||
}
|
||||
|
||||
func trigger(procedure *model.Procedure) {
|
||||
fmt.Printf("triggering procedure %s (cron expression: %s)\n", procedure.Name, procedure.Cron)
|
||||
|
||||
// TODO: don't hardcode GH
|
||||
tp := model.GetPlugin(model.GitHub)
|
||||
tp.Create(&model.Ticket{
|
||||
|
@ -13,7 +13,7 @@ html lang=en
|
||||
= javascript
|
||||
document.addEventListener("DOMContentLoaded", function(event) {
|
||||
document.querySelectorAll('.cron').forEach(function(el) {
|
||||
el.innerHTML = prettyCron.toString(el.innerHTML)
|
||||
el.innerHTML = prettyCron.toString(el.innerHTML,true) // 6-field expressions
|
||||
})
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user