mirror of
https://github.com/MatMoul/dokytree.git
synced 2024-12-23 16:16:12 +00:00
48 lines
846 B
Plaintext
48 lines
846 B
Plaintext
div#HEADFILES
|
|
-
|
|
const backups = []
|
|
const readNode = (curNode) => {
|
|
if(curNode?.backups?.length > 0) {
|
|
const nodeItem = {
|
|
name: curNode.title,
|
|
url: curNode.url,
|
|
backups: curNode.backups,
|
|
}
|
|
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
|
|
th Object
|
|
th Type
|
|
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
|