mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 01:26:11 -08:00
181 lines
5.5 KiB
JSON
Executable File
181 lines
5.5 KiB
JSON
Executable File
{
|
|
"code_name": "csv_backup",
|
|
"unique_prefix": "CSVBCKP",
|
|
"enabled": true,
|
|
"data_source": "script",
|
|
"show_ui": false,
|
|
"localized": ["display_name", "description", "icon"],
|
|
|
|
"display_name": [
|
|
{
|
|
"language_code": "en_us",
|
|
"string": "CSV backup"
|
|
},
|
|
{
|
|
"language_code": "es_es",
|
|
"string": "N/A"
|
|
}
|
|
],
|
|
"icon": [
|
|
{
|
|
"language_code": "en_us",
|
|
"string": "<i class=\"fa-solid fa-save\"></i>"
|
|
}
|
|
],
|
|
"description": [
|
|
{
|
|
"language_code": "en_us",
|
|
"string": "A plugin to auto-generate devices.csv backups."
|
|
},
|
|
{
|
|
"language_code": "es_es",
|
|
"string": "N/A"
|
|
}
|
|
],
|
|
"params" : [{
|
|
"name" : "overwrite",
|
|
"type" : "setting",
|
|
"value" : "CSVBCKP_overwrite"
|
|
},
|
|
{
|
|
"name" : "location",
|
|
"type" : "setting",
|
|
"value" : "CSVBCKP_location"
|
|
}
|
|
],
|
|
|
|
"settings": [
|
|
{
|
|
"function": "RUN",
|
|
"type": "text.select",
|
|
"default_value":"disabled",
|
|
"options": ["disabled", "once", "schedule", "always_after_scan", "on_new_device"],
|
|
"localized": ["name", "description"],
|
|
"name" :[{
|
|
"language_code":"en_us",
|
|
"string" : "When to run"
|
|
},
|
|
{
|
|
"language_code":"es_es",
|
|
"string" : "Cuándo ejecuta"
|
|
}],
|
|
"description": [{
|
|
"language_code":"en_us",
|
|
"string" : "When the backup should be created. A daily or weekly <code>SCHEDULE</code> is a good option."
|
|
}]
|
|
},
|
|
{
|
|
"function": "CMD",
|
|
"type": "readonly",
|
|
"default_value": "python3 /home/pi/pialert/front/plugins/csv_backup/script.py overwrite={overwrite} location={location}",
|
|
"options": [],
|
|
"localized": ["name", "description"],
|
|
"name": [
|
|
{
|
|
"language_code": "en_us",
|
|
"string": "Command"
|
|
},
|
|
{
|
|
"language_code": "es_es",
|
|
"string": "Comando"
|
|
}
|
|
],
|
|
"description": [
|
|
{
|
|
"language_code": "en_us",
|
|
"string": "Command to run. This can not be changed"
|
|
},
|
|
{
|
|
"language_code": "es_es",
|
|
"string": "Comando a ejecutar. Esto no se puede cambiar"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"function": "RUN_SCHD",
|
|
"type": "text",
|
|
"default_value":"0 2 * * 3",
|
|
"options": [],
|
|
"localized": ["name", "description"],
|
|
"name" : [{
|
|
"language_code":"en_us",
|
|
"string" : "Schedule"
|
|
},
|
|
{
|
|
"language_code":"es_es",
|
|
"string" : "Schedule"
|
|
}],
|
|
"description": [{
|
|
"language_code":"en_us",
|
|
"string" : "Only enabled if you select <code>schedule</code> in the <a href=\"#CSVBCKP_RUN\"><code>CSVBCKP_RUN</code> setting</a>. Make sure you enter the schedule in the correct cron-like format (e.g. validate at <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). For example entering <code>0 4 * * *</code> will run the scan after 4 am in the <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</code> you set above</a>. Will be run NEXT time the time passes."
|
|
},
|
|
{
|
|
"language_code":"es_es",
|
|
"string" : "Solo está habilitado si selecciona <code>schedule</code> en la configuración <a href=\"#CSVBCKP_RUN\"><code>CSVBCKP_RUN</code></a>. Asegúrese de ingresar la programación en el formato similar a cron correcto (por ejemplo, valide en <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). Por ejemplo, ingresar <code>0 4 * * *</code> ejecutará el escaneo después de las 4 a.m. en el <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</ código> que configuró arriba</a>. Se ejecutará la PRÓXIMA vez que pase el tiempo."
|
|
}]
|
|
},
|
|
{
|
|
"function": "RUN_TIMEOUT",
|
|
"type": "integer",
|
|
"default_value": 30,
|
|
"options": [],
|
|
"localized": ["name", "description"],
|
|
"name": [
|
|
{
|
|
"language_code": "en_us",
|
|
"string": "Run timeout"
|
|
},
|
|
{
|
|
"language_code": "es_es",
|
|
"string": "Tiempo límite de ejecución"
|
|
}
|
|
],
|
|
"description": [
|
|
{
|
|
"language_code": "en_us",
|
|
"string": "Maximum time in seconds to wait for the script to finish. If this time is exceeded the script is aborted."
|
|
},
|
|
{
|
|
"language_code": "es_es",
|
|
"string": "Tiempo máximo en segundos para esperar a que finalice el script. Si se supera este tiempo, el script se cancela."
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"function": "overwrite",
|
|
"type": "boolean",
|
|
"default_value":false,
|
|
"options": [],
|
|
"localized": ["name", "description"],
|
|
"name" : [{
|
|
"language_code":"en_us",
|
|
"string" : "Overwrite file"
|
|
}],
|
|
"description": [{
|
|
"language_code":"en_us",
|
|
"string" : "If the <code>devices.csv</code> file should be always overwritten. If disabled, the date and time is added to the name."
|
|
}]
|
|
},
|
|
{
|
|
"function": "location",
|
|
"type": "text",
|
|
"default_value":"/home/pi/pialert/config",
|
|
"options": [],
|
|
"localized": ["name", "description"],
|
|
"name" : [{
|
|
"language_code":"en_us",
|
|
"string" : "File location"
|
|
}],
|
|
"description": [{
|
|
"language_code":"en_us",
|
|
"string" : "Where the <code>devices.csv</code> file should be saved. For example <code>/home/pi/pialert/config</code>."
|
|
}]
|
|
}
|
|
],
|
|
|
|
"database_column_definitions":
|
|
[
|
|
|
|
]
|
|
}
|