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": {
"type": "array",
"items": {

View File

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

View File

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

View File

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

View File

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

View File

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