mirror of
https://github.com/MatMoul/dokytree.git
synced 2024-12-24 08:36:11 +00:00
47 lines
841 B
Plaintext
47 lines
841 B
Plaintext
|
div#HEADFILES
|
||
|
-
|
||
|
const backups = []
|
||
|
const readNode = (curNode) => {
|
||
|
if(curNode?.data?.backups?.length > 0) {
|
||
|
const nodeItem = {
|
||
|
name: curNode.data.name,
|
||
|
backups: curNode.data.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 Devices
|
||
|
th Types
|
||
|
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
|