mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-19 06:04:21 +01:00
Added banlimit and dirsfirst options (#200)
This commit is contained in:
committed by
Pascal Vizeli
parent
cd9c8e4e0a
commit
fcb9a37c78
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Configurator",
|
"name": "Configurator",
|
||||||
"version": "0.2.0-p3",
|
"version": "0.2.3",
|
||||||
"slug": "configurator",
|
"slug": "configurator",
|
||||||
"description": "Browser-based configuration file editor for Home Assistant.",
|
"description": "Browser-based configuration file editor for Home Assistant.",
|
||||||
"url": "https://home-assistant.io/addons/configurator",
|
"url": "https://home-assistant.io/addons/configurator",
|
||||||
@@ -20,7 +20,9 @@
|
|||||||
"ssl": false,
|
"ssl": false,
|
||||||
"allowed_networks": ["192.168.0.0/16"],
|
"allowed_networks": ["192.168.0.0/16"],
|
||||||
"banned_ips": ["8.8.8.8"],
|
"banned_ips": ["8.8.8.8"],
|
||||||
"ignore_pattern": ["__pycache__"]
|
"banlimit": 0,
|
||||||
|
"ignore_pattern": ["__pycache__"],
|
||||||
|
"dirsfirst": false
|
||||||
},
|
},
|
||||||
"schema": {
|
"schema": {
|
||||||
"username": "str",
|
"username": "str",
|
||||||
@@ -30,7 +32,9 @@
|
|||||||
"ssl": "bool",
|
"ssl": "bool",
|
||||||
"allowed_networks": ["str"],
|
"allowed_networks": ["str"],
|
||||||
"banned_ips": ["str"],
|
"banned_ips": ["str"],
|
||||||
"ignore_pattern": ["str"]
|
"banlimit": "int",
|
||||||
|
"ignore_pattern": ["str"],
|
||||||
|
"dirsfirst": "bool"
|
||||||
},
|
},
|
||||||
"image": "homeassistant/{arch}-addon-configurator"
|
"image": "homeassistant/{arch}-addon-configurator"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ configurator = {
|
|||||||
'ALLOWED_NETWORKS': options['allowed_networks'],
|
'ALLOWED_NETWORKS': options['allowed_networks'],
|
||||||
'BANNED_IPS': options['banned_ips'],
|
'BANNED_IPS': options['banned_ips'],
|
||||||
'IGNORE_PATTERN': options['ignore_pattern'],
|
'IGNORE_PATTERN': options['ignore_pattern'],
|
||||||
|
'BANLIMIT': options['banlimit'],
|
||||||
|
'DIRSFIRST': options['dirsfirst'],
|
||||||
}
|
}
|
||||||
|
|
||||||
with Path(sys.argv[1]).open('w') as json_file:
|
with Path(sys.argv[1]).open('w') as json_file:
|
||||||
|
|||||||
Reference in New Issue
Block a user