{
  "code_name": "undiscoverables",
  "unique_prefix": "UNDIS",
  "plugin_type": "device_scanner",
  "enabled": true,
  "data_source": "script",
  "mapped_to_table": "CurrentScan",
  "show_ui": true,
  "localized": ["display_name", "description", "icon"],
  "display_name": [
    {
      "language_code": "en_us",
      "string": "Un-Discoverable Devices"
    },
    {
      "language_code": "es_es",
      "string": "Dispositivos no detectables"
    },
    {
      "language_code": "de_de",
      "string": "Nicht erkennbare Geräte"
    }
  ],
  "icon": [
    {
      "language_code": "en_us",
      "string": "<i class=\"fa-solid fa-binoculars\"></i>"
    }
  ],
  "description": [
    {
      "language_code": "en_us",
      "string": "This plugin is to import undiscoverable devices from a file. Only ASCII characters are supported."
    }
  ],
  "params": [
    {
      "name": "devices",
      "type": "setting",
      "value": "UNDIS_devices_to_import"
    }
  ],
  "settings": [
    {
      "function": "RUN",
      "events": ["run"],
      "type": {
        "dataType": "string",
        "elements": [
          { "elementType": "select", "elementOptions": [], "transformers": [] }
        ]
      },
      "default_value": "disabled",
      "options": ["disabled", "once", "schedule", "always_after_scan"],
      "localized": ["name", "description"],
      "name": [
        {
          "language_code": "en_us",
          "string": "When to run"
        },
        {
          "language_code": "es_es",
          "string": "Cuándo ejecuta"
        },
        {
          "language_code": "de_de",
          "string": "Wann ausführen"
        }
      ],
      "description": [
        {
          "language_code": "en_us",
          "string": "When enabled, <code>once</code> is the preferred option, or set to <code>schedule</code> and align the <code>UNDIS_RUN_SCHD</code> setting with the other scanners if you want the devices to show up as ONLINE. It runs at startup and after every save of the config here.<br> Changes will only show in the devices <b> after the next scan!</b>"
        },
        {
          "language_code": "es_es",
          "string": "Cuando está habilitado, <code>once</code> es la opción preferida. Se ejecuta al inicio y después de cada guardado de la configuración aquí.<br> ¡Los cambios solo se mostrarán en los dispositivos <b> después del próximo escaneo!</b>"
        },
        {
          "language_code": "de_de",
          "string": "Wenn dieses Plugin aktiviert ist, ist <code>once</code> die bevorzugte Methode. Das Plugin wird dann bei jedem Start und nach jedem Speichern der Einstellungen ausgeführt.</br>Änderungen scheinen in den Geräten erst <b>nach dem nächsten Scan</b> auf!"
        }
      ]
    },
    {
      "function": "CMD",
      "type": {
        "dataType": "string",
        "elements": [
          { "elementType": "input", "elementOptions": [], "transformers": [] }
        ]
      },
      "default_value": "python3 /app/front/plugins/undiscoverables/script.py devices={devices}",
      "options": [],
      "localized": ["name", "description"],
      "name": [
        {
          "language_code": "en_us",
          "string": "Command"
        },
        {
          "language_code": "es_es",
          "string": "Comando"
        },
        {
          "language_code": "de_de",
          "string": "Befehl"
        }
      ],
      "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"
        },
        {
          "language_code": "de_de",
          "string": "Befehl zum Ausführen. Dies kann nicht geändert werden"
        }
      ]
    },
    {
      "function": "RUN_TIMEOUT",
      "type": {
        "dataType": "integer",
        "elements": [
          {
            "elementType": "input",
            "elementOptions": [{ "type": "number" }],
            "transformers": []
          }
        ]
      },
      "default_value": 10,
      "options": [],
      "localized": ["name", "description"],
      "name": [
        {
          "language_code": "en_us",
          "string": "Run timeout"
        },
        {
          "language_code": "es_es",
          "string": "Tiempo límite de ejecución"
        },
        {
          "language_code": "de_de",
          "string": "Zeitlimit"
        }
      ],
      "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."
        },
        {
          "language_code": "de_de",
          "string": "Maximale Zeit in Sekunden, die auf den Abschluss des Skripts gewartet werden soll. Bei Überschreitung dieser Zeit wird das Skript abgebrochen."
        }
      ]
    },
    {
      "function": "WATCH",
      "type": {
        "dataType": "string",
        "elements": [
          {
            "elementType": "input",
            "elementOptions": [{ "readonly": "true" }],
            "transformers": []
          }
        ]
      },
      "default_value": [],
      "options": [],
      "localized": ["name", "description"],
      "name": [
        {
          "language_code": "en_us",
          "string": "Watched"
        },
        {
          "language_code": "es_es",
          "string": "Visto"
        },
        {
          "language_code": "de_de",
          "string": "Überwacht"
        }
      ],
      "description": [
        {
          "language_code": "en_us",
          "string": "Undiscoverable Devices can not change their status, no watch is enabled."
        },
        {
          "language_code": "es_es",
          "string": "Los dispositivos no detectables no pueden cambiar su estado, ningún reloj está habilitado."
        },
        {
          "language_code": "de_de",
          "string": "Status von nicht erkennbaren Geräten können sich nicht ändern, keine Überwachung aktiviert."
        }
      ]
    },
    {
      "function": "REPORT_ON",
      "type": {
        "dataType": "string",
        "elements": [
          {
            "elementType": "input",
            "elementOptions": [{ "readonly": "true" }],
            "transformers": []
          }
        ]
      },
      "default_value": [],
      "options": [
        "new",
        "watched-changed",
        "watched-not-changed",
        "missing-in-last-scan"
      ],
      "localized": ["name", "description"],
      "name": [
        {
          "language_code": "en_us",
          "string": "Report on"
        },
        {
          "language_code": "es_es",
          "string": "Informar sobre"
        },
        {
          "language_code": "de_de",
          "string": "Benachrichtige wenn"
        }
      ],
      "description": [
        {
          "language_code": "en_us",
          "string": "No notifications will be sent."
        },
        {
          "language_code": "es_es",
          "string": "No se enviarán notificaciones."
        },
        {
          "language_code": "de_de",
          "string": "Keine Benachrichtigungen werden versendet."
        }
      ]
    },
    {
      "function": "devices_to_import",
      "type": {
        "dataType": "array",
        "elements": [
          {
            "elementType": "input",
            "elementOptions": [
              { "placeholder": "Enter value" },
              { "suffix": "_in" },
              { "cssClasses": "col-sm-10" },
              { "prefillValue": "null" }
            ],
            "transformers": []
          },
          {
            "elementType": "button",
            "elementOptions": [
              { "sourceSuffixes": ["_in"] },
              { "separator": "" },
              { "cssClasses": "col-xs-12" },
              { "onClick": "addList(this, false)" },
              { "getStringKey": "Gen_Add" }
            ],
            "transformers": []
          },
          {
            "elementType": "select",
            "elementHasInputValue": 1,
            "elementOptions": [
              { "multiple": "true" },
              { "readonly": "true" },
              { "editable": "true" }
            ],
            "transformers": []
          },
          {
            "elementType": "button",
            "elementOptions": [
              { "sourceSuffixes": [] },
              { "separator": "" },
              { "cssClasses": "col-xs-6" },
              { "onClick": "removeAllOptions(this)" },
              { "getStringKey": "Gen_Remove_All" }
            ],
            "transformers": []
          },
          {
            "elementType": "button",
            "elementOptions": [
              { "sourceSuffixes": [] },
              { "separator": "" },
              { "cssClasses": "col-xs-6" },
              { "onClick": "removeFromList(this)" },
              { "getStringKey": "Gen_Remove_Last" }
            ],
            "transformers": []
          }
        ]
      },
      "default_value": ["dummy_router"],
      "options": [],
      "localized": ["name", "description"],
      "name": [
        {
          "language_code": "en_us",
          "string": "UnDiscoverable Devices"
        },
        {
          "language_code": "es_es",
          "string": "Dispositivo no detectable"
        },
        {
          "language_code": "de_de",
          "string": "Nicht erkennbare Geräte"
        }
      ],
      "description": [
        {
          "language_code": "en_us",
          "string": "Devices to be added to the devices list."
        },
        {
          "language_code": "es_es",
          "string": "Dispositivos que se añadirán a la lista de dispositivos."
        },
        {
          "language_code": "de_de",
          "string": "Geräte, welche der Geräteliste hinzugefügt werden."
        }
      ]
    },
    {
      "function": "RUN_SCHD",
      "type": {
        "dataType": "string",
        "elements": [
          { "elementType": "input", "elementOptions": [], "transformers": [] }
        ]
      },
      "default_value": "*/5 * * * *",
      "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=\"#UNDIS_RUN\"><code>UNDIS_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. <br/> It's recommended to use the same schedule interval for all plugins responsible for discovering new devices. "
        },
        {
          "language_code": "es_es",
          "string": "Solo está habilitado si selecciona <code>schedule</code> en la configuración <a href=\"#UNDIS_RUN\"><code>UNDIS_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."
        }
      ]
    }
  ],
  "database_column_definitions": [
    {
      "column": "Index",
      "css_classes": "col-sm-2",
      "show": true,
      "type": "none",
      "default_value": "",
      "options": [],
      "localized": ["name"],
      "name": [
        {
          "language_code": "en_us",
          "string": "Index"
        }
      ]
    },
    {
      "column": "Watched_Value1",
      "mapped_to_column": "cur_Name",
      "css_classes": "col-sm-2",
      "show": true,
      "type": "label",
      "default_value": "",
      "options": [],
      "localized": ["name"],
      "name": [
        {
          "language_code": "en_us",
          "string": "Device Name"
        },
        {
          "language_code": "es_es",
          "string": "Nombre del dispositivo"
        },
        {
          "language_code": "de_de",
          "string": "Gerätename"
        }
      ]
    },
    {
      "column": "Object_PrimaryID",
      "mapped_to_column": "cur_MAC",
      "css_classes": "col-sm-2",
      "show": true,
      "type": "label",
      "default_value": "",
      "options": [],
      "localized": ["name"],
      "name": [
        {
          "language_code": "en_us",
          "string": "MAC address"
        },
        {
          "language_code": "es_es",
          "string": "Dirección MAC"
        },
        {
          "language_code": "de_de",
          "string": "MAC-Adresse"
        }
      ]
    },
    {
      "column": "Object_SecondaryID",
      "mapped_to_column": "cur_IP",
      "css_classes": "col-sm-2",
      "show": true,
      "type": "device_ip",
      "default_value": "",
      "options": [],
      "localized": ["name"],
      "name": [
        {
          "language_code": "en_us",
          "string": "IP"
        },
        {
          "language_code": "es_es",
          "string": "IP"
        },
        {
          "language_code": "de_de",
          "string": "IP"
        }
      ]
    },
    {
      "column": "DateTimeCreated",
      "css_classes": "col-sm-2",
      "show": true,
      "type": "label",
      "default_value": "",
      "options": [],
      "localized": ["name"],
      "name": [
        {
          "language_code": "en_us",
          "string": "Created"
        },
        {
          "language_code": "es_es",
          "string": "Creado"
        },
        {
          "language_code": "de_de",
          "string": "Erstellt"
        }
      ]
    },
    {
      "column": "DateTimeChanged",
      "mapped_to_column": "cur_DateTime",
      "css_classes": "col-sm-2",
      "show": true,
      "type": "label",
      "default_value": "",
      "options": [],
      "localized": ["name"],
      "name": [
        {
          "language_code": "en_us",
          "string": "Changed"
        },
        {
          "language_code": "es_es",
          "string": "Cambiado"
        },
        {
          "language_code": "de_de",
          "string": "Geändert"
        }
      ]
    },
    {
      "column": "Dummy",
      "mapped_to_column": "cur_ScanMethod",
      "mapped_to_column_data": {
        "value": "UNDIS"
      },
      "css_classes": "col-sm-2",
      "show": true,
      "type": "label",
      "default_value": "",
      "options": [],
      "localized": ["name"],
      "name": [
        {
          "language_code": "en_us",
          "string": "Scan method"
        },
        {
          "language_code": "es_es",
          "string": "Método de escaneo"
        },
        {
          "language_code": "de_de",
          "string": "Scanmethode"
        }
      ]
    },
    {
      "column": "ForeignKey",
      "css_classes": "col-sm-2",
      "show": false,
      "type": "device_mac",
      "default_value": "",
      "options": [],
      "localized": ["name"],
      "name": [
        {
          "language_code": "en_us",
          "string": "MAC"
        },
        {
          "language_code": "es_es",
          "string": "MAC"
        },
        {
          "language_code": "de_de",
          "string": "MAC"
        }
      ]
    }
  ]
}
