dokytree/samples/it_v2/templates/backups.pug

48 lines
846 B
Plaintext
Raw Permalink Normal View History

2024-10-31 17:34:57 +00:00
div#HEADFILES
-
const backups = []
const readNode = (curNode) => {
2024-10-31 20:24:37 +00:00
if(curNode?.backups?.length > 0) {
2024-10-31 17:34:57 +00:00
const nodeItem = {
2024-10-31 20:24:37 +00:00
name: curNode.title,
url: curNode.url,
backups: curNode.backups,
2024-10-31 17:34:57 +00:00
}
backups.push(nodeItem)
}
curNode.items.forEach((itm) => {
if(itm?.data?.backups?.length > 0) {
const nodeItem = {
name: itm.data.name,
url: curNode.url + '?itm=' + itm.name,
backups: itm.data.backups,
}
backups.push(nodeItem)
}
})
curNode.nodes.forEach((childNode) => {
readNode(childNode)
})
}
readNode(doc)
table
thead
2024-10-31 20:24:37 +00:00
th Object
th Type
2024-10-31 17:34:57 +00:00
th Content
th Frequency
th Time
th Duration
th Target
each itm in backups
each backup in itm.backups
tr
td
a(href=itm.url)=itm.name
each key in Object.keys(backup)
td=backup[key]
div#FILES
div#FOOTFILES