Update schemas and templates

This commit is contained in:
MatMoul 2024-04-27 23:27:29 +02:00
parent 1db2eed430
commit 30519a4d24
21 changed files with 131 additions and 11 deletions

View File

@ -38,6 +38,14 @@
]} ]}
] ]
}, },
"maintainer": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"type": { "type": {
"type": "string", "type": "string",
"anyOf": [ "anyOf": [

View File

@ -38,6 +38,14 @@
]} ]}
] ]
}, },
"maintainer": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"type": { "type": {
"type": "string", "type": "string",
"anyOf": [ "anyOf": [

View File

@ -38,6 +38,14 @@
]} ]}
] ]
}, },
"maintainer": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"type": { "type": {
"type": "string", "type": "string",
"anyOf": [ "anyOf": [

View File

@ -38,6 +38,14 @@
]} ]}
] ]
}, },
"maintainer": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"type": { "type": {
"type": "string", "type": "string",
"anyOf": [ "anyOf": [

View File

@ -38,6 +38,14 @@
]} ]}
] ]
}, },
"maintainer": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"publisher": { "publisher": {
"oneOf": [ "oneOf": [
{"type": "string"}, {"type": "string"},

View File

@ -38,6 +38,14 @@
]} ]}
] ]
}, },
"maintainer": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
},
"type": { "type": {
"type": "string", "type": "string",
"anyOf": [ "anyOf": [

View File

@ -1,5 +1,6 @@
todo todo
name name
maintainer
computer_type computer_type
# computer_roles # computer_roles
model model

View File

@ -1,5 +1,6 @@
todo todo
name name
maintainer
netdev_type netdev_type
netdev_roles netdev_roles
model model

View File

@ -1,5 +1,6 @@
todo todo
name name
maintainer
printer_type printer_type
model model
location location

View File

@ -1,5 +1,6 @@
todo todo
name name
maintainer
server_type server_type
server_roles server_roles
model model

View File

@ -1,5 +1,6 @@
todo todo
name name
maintainer
software software
urls urls
files files

View File

@ -1,5 +1,6 @@
todo todo
name name
maintainer
voipdev_type voipdev_type
model model
location location

View File

@ -0,0 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"maintainer": {
"oneOf": [
{"type": "string"},
{"enum": [
"''"
]}
]
}
}
}

View File

@ -0,0 +1,13 @@
div#HEADFILES
table
thead
th Account
th Notes
each itm in node.items
tr
td=itm.data.name
td=itm.data.notes
div#FILES
div#FOOTFILES

View File

@ -13,7 +13,7 @@ div#HEADFILES
if(itm?.data?.backups?.length > 0) { if(itm?.data?.backups?.length > 0) {
const nodeItem = { const nodeItem = {
name: itm.data.name, name: itm.data.name,
url: curNode.url + '?itm=' + itm.data.name, url: curNode.url + '?itm=' + itm.name,
backups: itm.data.backups, backups: itm.data.backups,
} }
backups.push(nodeItem) backups.push(nodeItem)

View File

@ -0,0 +1,13 @@
div#HEADFILES
table
thead
th Account
th Notes
each itm in node.items
tr
td=itm.data.name
td=itm.data.notes
div#FILES
div#FOOTFILES

View File

@ -42,7 +42,7 @@ if dhcpRanges.length > 0
td=rng.from td=rng.from
td=rng.to td=rng.to
if ipNodes.length > 0 if ipNodes.length > 0
h3 Fixed IPs h3 Static IPs
table table
thead thead
th IP th IP

View File

@ -3,9 +3,11 @@ div#HEADFILES
table table
thead thead
th Account th Account
th Notes
each itm in node.items each itm in node.items
tr tr
td=itm.data.name td=itm.data.name
td=itm.data.notes
div#FILES div#FILES
div#FOOTFILES div#FOOTFILES

View File

@ -17,7 +17,7 @@ div#HEADFILES
itm.data.todo.forEach((todo) => { itm.data.todo.forEach((todo) => {
const nodeItem = { const nodeItem = {
name: itm.data.name, name: itm.data.name,
url: curNode.url + '?itm=' + itm.data.name, url: curNode.url + '?itm=' + itm.name,
todo: todo, todo: todo,
} }
todos.push(nodeItem) todos.push(nodeItem)
@ -41,7 +41,7 @@ div#HEADFILES
if(itm?.data?.todo?.length > 0) { if(itm?.data?.todo?.length > 0) {
const nodeItem = { const nodeItem = {
name: itm.data.name, name: itm.data.name,
url: curNode.url + '?itm=' + itm.data.name, url: curNode.url + '?itm=' + itm.name,
todos: itm.data.todo, todos: itm.data.todo,
} }
todos.push(nodeItem) todos.push(nodeItem)
@ -54,7 +54,7 @@ div#HEADFILES
readNode(doc) readNode(doc)
todos = todos.sort((x, y) => { todos = todos.sort((x, y) => {
return (x.todo.priority - y.todo.priority) return (y.todo.priority - x.todo.priority)
}) })
table table
@ -63,11 +63,18 @@ table
th Object th Object
th Message th Message
each itm in todos each itm in todos
tr if itm.todo.priority >= 10
td=itm.todo.priority tr.alert
td td=itm.todo.priority
a(href=itm.url)=itm.name td
td=itm.todo.msg a.alert(href=itm.url)=itm.name
td=itm.todo.msg
else
tr
td=itm.todo.priority
td
a(href=itm.url)=itm.name
td=itm.todo.msg
div#FILES div#FILES
div#FOOTFILES div#FOOTFILES

View File

@ -13,7 +13,7 @@ div#HEADFILES
if(itm?.data?.updates?.length > 0) { if(itm?.data?.updates?.length > 0) {
const nodeItem = { const nodeItem = {
name: itm.data.name, name: itm.data.name,
url: curNode.url + '?itm=' + itm.data.name, url: curNode.url + '?itm=' + itm.name,
updates: itm.data.updates, updates: itm.data.updates,
} }
updates.push(nodeItem) updates.push(nodeItem)

View File

@ -0,0 +1,18 @@
div#HEADFILES
table
thead
th Name
th Notes
each itm in node.items
tr
td=itm.data.name
td=itm.data.notes
if itm.data.aliases
each alias in itm.data.aliases
tr
td=alias.name
td=alias.notes
div#FILES
div#FOOTFILES