Перейти к содержанию

Навигация

Движок правил wb-rules/en: различия между версиями

Новая страница: «*The list of files with rules is on the ''Scripts'' page of the web interface. *Click the file name to open it for editing. **To create a new file, click ''New...…»
(Новая страница: «== How to create and edit rules ==»)
(Новая страница: «*The list of files with rules is on the ''Scripts'' page of the web interface. *Click the file name to open it for editing. **To create a new file, click ''New...…»)
Строка 9: Строка 9:
== How to create and edit rules ==
== How to create and edit rules ==


*Список файлов с правилами находится на странице ''Scripts'' веб-интерфейса.
*The list of files with rules is on the ''Scripts'' page of the web interface.
*Нажмите на название файла, чтобы открыть его для редактирования.
*Click the file name to open it for editing.
**Чтобы создать новый файл, нажмите на пункт ''New...'', вверху введите название скрипта (используйте для названия только латинские буквы и цифры, в качестве расширения укажите ''.js''), в основное поле введите текст скрипта, затем нажмите кнопку ''Save'' вверху.
**To create a new file, click ''New...'' at the top, enter the name of the script (use only Latin letters and numbers for the name, specify as an extension ''.js''), in the main field, enter the text of the script, then click the ''Save button'' at the top.
*Правило начинает работать автоматически после нажатия кнопки ''Save'', если в нём нет ошибок (смотрите ниже).
The rule starts automatically after you click ''Save'' if there are no errors (see below).
Примечания:
Notes:
#Файлы с правилами хранятся на контроллере в виде обычных текстовых файлов в папке <code>/etc/wb-rules/</code>, поэтому [[Special:MyLanguage/Просмотр файлов контроллера с компьютера|их можно редактировать и загружать напрямую с компьютера]].
#The rules files are stored on the controller as plain text files in the <code>/etc/wb-rules/</code> folder, so they [[Просмотр файлов контроллера с компьютера/en|can be edited and downloaded]] directly from your computer.
#Правила исполняются сервисом ''wb-rules'', документацию по нему смотрите [https://github.com/contactless/wb-rules странице сервиса в Github].
#The rules are executed by the ''wb-rules'' service, see the service's [https://github.com/contactless/wb-rules documentation on Github].




12 063

правки