Some improvement for IT doc

This commit is contained in:
MatMoul 2024-10-31 21:24:37 +01:00
parent 3346b3b8fc
commit 364d160f24
6 changed files with 95 additions and 12 deletions

View File

@ -62,6 +62,87 @@
} }
} }
}, },
"backups": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'none'",
"'hypervisor'",
"'windowsbackup'"
]}
]
},
"method": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'auto'",
"'manual'"
]}
]
},
"frequency": {
"anyOf": [
{ "type": "string" },
{ "enum": [
"''",
"'daily'",
"'weekly'",
"'monthly'",
"'quarterly'",
"'halfyearly'",
"'yearly'",
"'monday'",
"'tuesday'",
"'wednesday'",
"'thursday'",
"'friday'",
"'saturday'",
"'sonday'"
]}
]
},
"target": {
"anyOf": [
{"type": "string"},
{"enum": [
"''",
"'usb'",
"'pbs'",
"'share'",
"'iscsi'",
"'cloud'"
]}
]
},
"time": {
"anyOf": [
{"type": "string"},
{"enum": [
"''",
"'auto'"
]}
]
},
"duration": {
"anyOf": [
{ "type": "string" },
{ "type": "integer" },
{"enum": [
"''"
]}
]
}
}
}
},
"headfiles": { "headfiles": {
"type": "array", "type": "array",
"items": { "items": {

View File

@ -4,4 +4,5 @@ title
book book
toc toc
templates templates
maintenance_backups
files files

View File

@ -2,10 +2,11 @@ div#HEADFILES
- -
const backups = [] const backups = []
const readNode = (curNode) => { const readNode = (curNode) => {
if(curNode?.data?.backups?.length > 0) { if(curNode?.backups?.length > 0) {
const nodeItem = { const nodeItem = {
name: curNode.data.name, name: curNode.title,
backups: curNode.data.backups, url: curNode.url,
backups: curNode.backups,
} }
backups.push(nodeItem) backups.push(nodeItem)
} }
@ -27,8 +28,8 @@ div#HEADFILES
table table
thead thead
th Devices th Object
th Types th Type
th Content th Content
th Frequency th Frequency
th Time th Time

View File

@ -1,11 +1,8 @@
div#HEADFILES div#HEADFILES
each itm in node.items each itm in node.items
table div.bold=itm.data.name
tr a(href=itm.data.url, target="_blank")=itm.data.url
td.bold=itm.data.name
tr
td=itm.data.url
div#FILES div#FILES
div#FOOTFILES div#FOOTFILES

View File

@ -27,8 +27,8 @@ div#HEADFILES
table table
thead thead
th Devices th Object
th Types th Type
th Method th Method
th Frequency th Frequency
th Time th Time

View File

@ -27,6 +27,7 @@ const load = (yamlFile) => {
node: '@node', node: '@node',
items: '@item', items: '@item',
}, },
bakups: [],
parent: null, parent: null,
nodes: [], nodes: [],
items: [], items: [],
@ -67,6 +68,7 @@ const load = (yamlFile) => {
node: '@node', node: '@node',
items: '@item', items: '@item',
}, },
bakups: [],
parent: parentNode, parent: parentNode,
nodes: [], nodes: [],
items: [], items: [],
@ -87,6 +89,7 @@ const load = (yamlFile) => {
if(yamlNode.book == false) node.book = yamlNode.book if(yamlNode.book == false) node.book = yamlNode.book
if(yamlNode?.templates?.node) node.templates.node = yamlNode.templates.node if(yamlNode?.templates?.node) node.templates.node = yamlNode.templates.node
if(yamlNode?.templates?.items) node.templates.items = yamlNode.templates.items if(yamlNode?.templates?.items) node.templates.items = yamlNode.templates.items
if(yamlNode.backups) node.backups = yamlNode.backups
if(yamlNode.headfiles) node.headfiles = yamlNode.headfiles if(yamlNode.headfiles) node.headfiles = yamlNode.headfiles
if(yamlNode.files) node.files = yamlNode.files if(yamlNode.files) node.files = yamlNode.files
if(yamlNode.footfiles) node.footfiles = yamlNode.footfiles if(yamlNode.footfiles) node.footfiles = yamlNode.footfiles