|
| 1 | +{ |
| 2 | + "code_name": "maintenance", |
| 3 | + "unique_prefix": "MAINT", |
| 4 | + "plugin_type": "system", |
| 5 | + "enabled": true, |
| 6 | + "data_source": "script", |
| 7 | + "show_ui": false, |
| 8 | + "localized": ["display_name", "description", "icon"], |
| 9 | + "display_name": [ |
| 10 | + { |
| 11 | + "language_code": "en_us", |
| 12 | + "string": "Maintenance" |
| 13 | + } |
| 14 | + ], |
| 15 | + "icon": [ |
| 16 | + { |
| 17 | + "language_code": "en_us", |
| 18 | + "string": "<i class=\"fa-solid fa-wrench\"></i>" |
| 19 | + } |
| 20 | + ], |
| 21 | + "description": [ |
| 22 | + { |
| 23 | + "language_code": "en_us", |
| 24 | + "string": "A plugin for maintenance tasks." |
| 25 | + } |
| 26 | + ], |
| 27 | + "params" : [ |
| 28 | + ], |
| 29 | + "settings": [ |
| 30 | + { |
| 31 | + "function": "RUN", |
| 32 | + "events": ["run"], |
| 33 | + "type": "text.select", |
| 34 | + "default_value":"schedule", |
| 35 | + "options": ["disabled", "once", "schedule", "always_after_scan", "on_new_device"], |
| 36 | + "localized": ["name", "description"], |
| 37 | + "name" :[{ |
| 38 | + "language_code":"en_us", |
| 39 | + "string" : "When to run" |
| 40 | + }, |
| 41 | + { |
| 42 | + "language_code":"es_es", |
| 43 | + "string" : "Cuándo ejecutar" |
| 44 | + }, |
| 45 | + { |
| 46 | + "language_code":"de_de", |
| 47 | + "string" : "Wann laufen" |
| 48 | + }], |
| 49 | + "description": [{ |
| 50 | + "language_code":"en_us", |
| 51 | + "string" : "When the maintenance tasks should run. A daily or weekly <code>SCHEDULE</code> is a good option." |
| 52 | + }] |
| 53 | + }, |
| 54 | + { |
| 55 | + "function": "CMD", |
| 56 | + "type": "readonly", |
| 57 | + "default_value": "python3 /home/pi/pialert/front/plugins/maintenance/maintenance.py", |
| 58 | + "options": [], |
| 59 | + "localized": ["name", "description"], |
| 60 | + "name": [ |
| 61 | + { |
| 62 | + "language_code": "en_us", |
| 63 | + "string": "Command" |
| 64 | + }, |
| 65 | + { |
| 66 | + "language_code": "es_es", |
| 67 | + "string": "Comando" |
| 68 | + }, |
| 69 | + { |
| 70 | + "language_code": "de_de", |
| 71 | + "string": "Befehl" |
| 72 | + } |
| 73 | + ], |
| 74 | + "description": [ |
| 75 | + { |
| 76 | + "language_code": "en_us", |
| 77 | + "string": "Command to run. This can not be changed" |
| 78 | + }, |
| 79 | + { |
| 80 | + "language_code": "es_es", |
| 81 | + "string": "Comando a ejecutar. Esto no se puede cambiar" |
| 82 | + }, |
| 83 | + { |
| 84 | + "language_code": "de_de", |
| 85 | + "string": "Befehl zum Ausführen. Dies kann nicht geändert werden" |
| 86 | + } |
| 87 | + ] |
| 88 | + }, |
| 89 | + { |
| 90 | + "function": "RUN_SCHD", |
| 91 | + "type": "text", |
| 92 | + "default_value":"0 2 * * 3", |
| 93 | + "options": [], |
| 94 | + "localized": ["name", "description"], |
| 95 | + "name" : [{ |
| 96 | + "language_code":"en_us", |
| 97 | + "string" : "Schedule" |
| 98 | + }, |
| 99 | + { |
| 100 | + "language_code":"es_es", |
| 101 | + "string" : "Schedule" |
| 102 | + }, |
| 103 | + { |
| 104 | + "language_code":"de_de", |
| 105 | + "string" : "Schedule" |
| 106 | + }], |
| 107 | + "description": [{ |
| 108 | + "language_code":"en_us", |
| 109 | + "string" : "Only enabled if you select <code>schedule</code> in the <a href=\"#MAINT_RUN\"><code>MAINT_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." |
| 110 | + }, |
| 111 | + { |
| 112 | + "language_code":"es_es", |
| 113 | + "string" : "Solo está habilitado si selecciona <code>schedule</code> en la configuración <a href=\"#MAINT_RUN\"><code>MAINT_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." |
| 114 | + }, |
| 115 | + { |
| 116 | + "language_code":"de_de", |
| 117 | + "string" : "Nur aktiviert, wenn Sie <code>schedule</code> in der <a href=\"#CSVBCKP_RUN\"><code>CSVBCKP_RUN</code>-Einstellung</a> auswählen. Stellen Sie sicher, dass Sie den Zeitplan im richtigen Cron-ähnlichen Format eingeben (z. B. validieren unter <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). Wenn Sie beispielsweise <code>0 4 * * *</code> eingeben, wird der Scan nach 4 Uhr morgens in der <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</ ausgeführt. Code> den Sie oben festgelegt haben</a>. Wird das NÄCHSTE Mal ausgeführt, wenn die Zeit vergeht." |
| 118 | + }] |
| 119 | + }, |
| 120 | + { |
| 121 | + "function": "RUN_TIMEOUT", |
| 122 | + "type": "integer", |
| 123 | + "default_value": 30, |
| 124 | + "options": [], |
| 125 | + "localized": ["name", "description"], |
| 126 | + "name": [ |
| 127 | + { |
| 128 | + "language_code": "en_us", |
| 129 | + "string": "Run timeout" |
| 130 | + }, |
| 131 | + { |
| 132 | + "language_code": "es_es", |
| 133 | + "string": "Tiempo límite de ejecución" |
| 134 | + }, |
| 135 | + { |
| 136 | + "language_code": "de_de", |
| 137 | + "string": "Zeitüberschreitung" |
| 138 | + } |
| 139 | + ], |
| 140 | + "description": [ |
| 141 | + { |
| 142 | + "language_code": "en_us", |
| 143 | + "string": "Maximum time in seconds to wait for the script to finish. If this time is exceeded the script is aborted." |
| 144 | + }, |
| 145 | + { |
| 146 | + "language_code": "es_es", |
| 147 | + "string": "Tiempo máximo en segundos para esperar a que finalice el script. Si se supera este tiempo, el script se cancela." |
| 148 | + }, |
| 149 | + { |
| 150 | + "language_code": "de_de", |
| 151 | + "string": "Maximale Zeit in Sekunden, die auf den Abschluss des Skripts gewartet werden soll. Bei Überschreitung dieser Zeit wird das Skript abgebrochen." |
| 152 | + } |
| 153 | + ] |
| 154 | + }, |
| 155 | + { |
| 156 | + "function": "LOG_LENGTH", |
| 157 | + "type": "integer", |
| 158 | + "default_value": 250000, |
| 159 | + "options": [], |
| 160 | + "localized": ["name", "description"], |
| 161 | + "name" : [{ |
| 162 | + "language_code":"en_us", |
| 163 | + "string" : "Log length" |
| 164 | + }], |
| 165 | + "description": [{ |
| 166 | + "language_code":"en_us", |
| 167 | + "string" : "How many last <code>pialert.log</code> lines to keep. If <code>LOG_LEVEL</code> is set to <code>debug</code> the app generates about 10000 lines per hour, so when debugging an issue the recommended setting should cover the bug occurence timeframe. For example for a bug with a 3 day periodical appearence the value <code>1000000</code> should be sufficient. Setting this value to <code>1000000</code> generates approximatelly a 50MB <code>pialert.log</code> file. Set to <code>0</code> disables log cleaning." |
| 168 | + }] |
| 169 | + } |
| 170 | + ], |
| 171 | + |
| 172 | + "database_column_definitions": |
| 173 | + [ |
| 174 | + |
| 175 | + ] |
| 176 | +} |
0 commit comments