{
    "code_name": "luci_import",
    "show_ui": true,
    "unique_prefix": "LUCIRPC",
    "plugin_type": "device_scanner",
    "execution_order" : "Layer_1",
    "enabled": true,
    "data_source": "script",
    "mapped_to_table": "CurrentScan",
    "data_filters": [
      {
        "compare_column": "Object_PrimaryID",
        "compare_operator": "==",
        "compare_field_id": "txtMacFilter",
        "compare_js_template": "'{value}'.toString()",
        "compare_use_quotes": true
      }
    ],
    "localized": ["display_name", "description", "icon"],
    "display_name": [
      {
        "language_code": "en_us",
        "string": "Luci rpc import (Device import)"
      },
      {
        "language_code": "ru_ru",
        "string": "Luci rpc импорт (Device import)"
      }
    ],
    "description": [
      {
        "language_code": "en_us",
        "string": "The plugin is used to import connected devices from OpenWRT"
      },
      {
        "language_code": "ru_ru",
        "string": "Плагин используется для импорта подключённых устройств из OpenWRT"
      }
    ],
    "icon": [
      {
        "language_code": "en_us",
        "string": "<i class=\"fa fa-search\"></i>"
      },
      {
        "language_code": "ru_ru",
        "string": "<i class=\"fa fa-search\"></i>"
      }
    ],
    "params": [
    ],
    "settings": [
      {
        "function": "RUN",
        "events": ["run"],
        "type": {
          "dataType": "string",
          "elements": [
            { "elementType": "select", "elementOptions": [], "transformers": [] }
          ]
        },
        "default_value": "disabled",
        "options": [
          "disabled",
          "once",
          "schedule"
        ],
        "localized": ["name", "description"],
        "name": [
          {
            "language_code": "en_us",
            "string": "When to run"
          }
        ],
        "description": [
          {
            "language_code": "en_us",
            "string": "When the plugin should run. Good options are <code>schedule</code>"
          },
          {
            "language_code": "ru_ru",
            "string": "Когда должен запуститься плагин. Хорошими вариантами являются <code>schedule</code>"
          }
        ]
      },
      {
        "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": "ru_ru",
            "string": "Schedule"
          }
        ],
        "description": [
          {
            "language_code": "en_us",
            "string": "Only enabled if you select <code>schedule</code> in the <a href=\"#SYNC_RUN\"><code>SYNC_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": "ru_ru",
            "string": "Доступно только в том случае, если вы выбрали <code>schedule</code> в <a href=\"#SYNC_RUN\"><code>SYNC_RUN</code> setting</a>. Убедитесь, что вы вводите расписание в правильном формате, похожем на cron (например, проверьте на <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). Например, если вы введете <code>0 4 * * *</code>, то сканирование будет запускаться после 4 часов утра в <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</code> который вы установили выше</a>. Сканирование будет запускаться СЛЕДУЮЩИЙ РАЗ, когда пройдет это время."
          }
        ]
      },
      {
        "function": "CMD",
        "type": {
          "dataType": "string",
          "elements": [
            {
              "elementType": "input",
              "elementOptions": [{ "readonly": "true" }],
              "transformers": []
            }
          ]
        },
        "default_value": "python3 /app/front/plugins/luci_import/script.py",
        "options": [],
        "localized": ["name", "description"],
        "name": [
          {
            "language_code": "en_us",
            "string": "Command"
          }
        ],
        "description": [
          {
            "language_code": "en_us",
            "string": "Command to run. This can not be changed"
          }
          ,
          {
            "language_code": "ru_ru",
            "string": "Команда для запуска. Это невозможно изменить"
          }
        ]
      },
      {
        "function": "RUN_TIMEOUT",
        "type": {
          "dataType": "integer",
          "elements": [
            {
              "elementType": "input",
              "elementOptions": [{ "type": "number" }],
              "transformers": []
            }
          ]
        },
        "default_value": 30,
        "options": [],
        "localized": ["name", "description"],
        "name": [
          {
            "language_code": "en_us",
            "string": "Run timeout"
          },
          {
            "language_code": "ru_ru",
            "string": "Время ожидания выполнения"
          }
        ],
        "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": "ru_ru",
            "string": "Максимальное время в секундах, в течение которого нужно ждать завершения работы скрипта. Если это время превышено, скрипт прерывается."
          }
        ]
      },
      {
        "function": "host",
        "type": {
          "dataType": "string",
          "elements": [
            { "elementType": "input", "elementOptions": [], "transformers": [] }
          ]
        },
        "default_value": "192.168.1.1",
        "options": [],
        "localized": ["name", "description"],
        "name": [
          {
            "language_code": "en_us",
            "string": "Router ip"
          },
          {
            "language_code": "ru_ru",
            "string": "Ip адрес роутера"
          }
        ],
        "description": [
          {
            "language_code": "en_us",
            "string": "Router ip(do not include <code>http://</code> or <code>https://</code>)."
          },
          {
            "language_code": "ru_ru",
            "string": "Ip адрес роутера(без <code>http://</code> и <code>https://</code>)."
          }
        ]
      },
      {
        "function": "user",
        "type": {
          "dataType": "string",
          "elements": [
            { "elementType": "input", "elementOptions": [], "transformers": [] }
          ]
        },
        "default_value": "root",
        "options": [],
        "localized": ["name", "description"],
        "name": [
          {
            "language_code": "en_us",
            "string": "Router user"
          },
          {
            "language_code": "ru_ru",
            "string": "Имя пользователя для подлючения к роутеру"
          }
        ],
        "description": [
          {
            "language_code": "en_us",
            "string": "User name used to login into your router."
          },
          {
            "language_code": "ru_ru",
            "string": "Имя пользователя для подлючения к роутеру."
          }
        ]
      },
      {
        "function": "password",
        "type": {
          "dataType": "string",
          "elements": [
            {
              "elementType": "input",
              "elementOptions": [{ "type": "password" }],
              "transformers": []
            }
          ]
        },
        "default_value": "",
        "options": [],
        "localized": ["name", "description"],
        "name": [
          {
            "language_code": "en_us",
            "string": "Router password"
          },
          {
            "language_code": "ru_ru",
            "string": "Пароль роутера"
          }
        ],
        "description": [
          {
            "language_code": "en_us",
            "string": "Password used to login into your router."
          },
          {
            "language_code": "ru_ru",
            "string": "Пароль для подлючения к роутеру."
          }
        ]
      },
      {
        "function": "ssl",
        "type": {
          "dataType": "boolean",
          "elements": [
            {
              "elementType": "input",
              "elementOptions": [{ "type": "checkbox" }],
              "transformers": []
            }
          ]
        },
        "default_value": false,
        "options": [],
        "localized": ["name", "description"],
        "name": [
          {
            "language_code": "en_us",
            "string": "Router SSL"
          },
          {
            "language_code": "ru_ru",
            "string": "Роутер SSL."
          }
        ],
        "description": [
          {
            "language_code": "en_us",
            "string": "If your router enforces SSL connections."
          },
          {
            "language_code": "ru_ru",
            "string": "Если роутер поддерживает SSL подключение."
          }
        ]
      },
      {
        "function": "verify_ssl",
        "type": {
          "dataType": "boolean",
          "elements": [
            {
              "elementType": "input",
              "elementOptions": [{ "type": "checkbox" }],
              "transformers": []
            }
          ]
        },
        "default_value": true,
        "options": [],
        "localized": ["name", "description"],
        "name": [
          {
            "language_code": "en_us",
            "string": "Verify SSL"
          },
          {
            "language_code": "ru_ru",
            "string": "Проверка SSL"
          }
        ],
        "description": [
          {
            "language_code": "en_us",
            "string": "If SSL/TLS verification for HTTPS resources needs to be turned off (for self-signed certs, etc.)"
          },
          {
            "language_code": "ru_ru",
            "string": "Если необходимо отключить проверку SSL/TLS для ресурсов HTTPS (для самоподписанных сертификатов и т. д.)"
          }
        ]
      },
      {
        "function": "only_reachable",
        "type": {
          "dataType": "boolean",
          "elements": [
            {
              "elementType": "input",
              "elementOptions": [{ "type": "checkbox" }],
              "transformers": []
            }
          ]
        },
        "default_value": true,
        "options": [],
        "localized": ["name", "description"],
        "name": [
          {
            "language_code": "en_us",
            "string": "Only reachable"
          }
        ],
        "description": [
          {
            "language_code": "en_us",
            "string": "Retrieve only devices that are reachable."
          }
        ]
      }
    ],
    "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"
        },
        {
          "language_code": "ru_ru",
          "string": "Индекс"
        }
      ]
    },
    {
      "column": "Object_PrimaryID",
      "mapped_to_column": "cur_MAC",
      "css_classes": "col-sm-3",
      "show": true,
      "type": "device_name_mac",
      "default_value": "",
      "options": [],
      "localized": ["name"],
      "name": [
        {
          "language_code": "en_us",
          "string": "MAC (name)"
        },
        {
          "language_code": "ru_ru",
          "string": "MAC"
        }
      ]
    },
    {
      "column": "Object_SecondaryID",
      "mapped_to_column": "cur_IP",
      "css_classes": "col-sm-2",
      "show": true,
      "type": "label",
      "default_value": "",
      "options": [],
      "localized": ["name"],
      "name": [
        {
          "language_code": "en_us",
          "string": "IP"
        },
        {
          "language_code": "ru_ru",
          "string": "IP"
        }
      ]
    },
    {
      "column": "Watched_Value1",
      "css_classes": "col-sm-2",
      "show": true,
      "type": "label",
      "default_value": "",
      "options": [],
      "localized": ["name"],
      "name": [
        {
          "language_code": "en_us",
          "string": "Ip host"
        },
        {
          "language_code": "ru_ru",
          "string": "Ip хоста"
        }
      ]
    },
    {
      "column": "Watched_Value2",
      "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": "Name"
        },
        {
          "language_code": "ru_ru",
          "string": "Имя"
        }
      ]
    },
    {
      "column": "Dummy",
      "mapped_to_column": "cur_ScanMethod",
      "mapped_to_column_data": {
        "value": "LUCIRPC"
      },
      "css_classes": "col-sm-2",
      "show": true,
      "type": "label",
      "default_value": "",
      "options": [],
      "localized": ["name"],
      "name": [
        {
          "language_code": "en_us",
          "string": "Scan method"
        },
        {
          "language_code": "ru_ru",
          "string": "Метод сканирования"
        }
      ]
    },
    {
      "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": "ru_ru",
          "string": "Создано"
        }
      ]
    },
    {
      "column": "DateTimeChanged",
      "css_classes": "col-sm-2",
      "show": true,
      "type": "label",
      "default_value": "",
      "options": [],
      "localized": ["name"],
      "name": [
        {
          "language_code": "en_us",
          "string": "Changed"
        },
        {
          "language_code": "ru_ru",
          "string": "Изменено"
        }
      ]
    },
    {
      "column": "Status",
      "css_classes": "col-sm-1",
      "show": true,
      "type": "replace",
      "default_value": "",
      "options": [
        {
          "equals": "watched-not-changed",
          "replacement": "<div style='text-align:center'><i class='fa-solid fa-square-check'></i><div></div>"
        }
      ],
      "localized": ["name"],
      "name": [
        {
          "language_code": "en_us",
          "string": "Status"
        },
        {
          "language_code": "ru_ru",
          "string": "Статус"
        }
      ]
    }
  ]
  }