User Tools

Site Tools


recipes

This is an old revision of the document!


Recipes

The recipe allows you to initialize a set of registers with pre-defined values. There are several options for using recipes:

  • Recipes can be applied either by selecting an entry in the recipe drop-down list or by calling a script
  • Recipes can be edited right on the dashboard with a quick edit method (not going back to the main recipe menu)
  • Recipes can be visible or not for different users. Some recipes can be 'locked' (i.e. viewed w/o possibility to change recipe data for users except the admin) to protect important, or base recipes from changing.
  • Recipe list can be used as a handy tool for analysing user choice from different options. In this case recipe names in the list or category serve as a placeholders for the selection listbox. The selected id is returned to the lua script which then can process the selection.

Recipe setup page

The recipe management menu resides in a 'logic' section of the Setup menu:

The main spots of the recipe management page are:

  1. Import/Export buttons. The recipe can be exported to a JSON file. After importing such recipe file, it will create a new entry in the list with a new id.
  2. Add recipe button
  3. Recipe category. use them to divide the list, then the dropdown lists on dashboard can show only specific category you set for them
  4. 'Locked' recipe colored light gray. This recipe can only be edited by admin, but still viewed by the users with respective rights
  5. Checkbox for selecting export candidates
  6. Common (non-locked) recipe list.
  7. Edit/Delete/Clone buttons

Recipe setup

The Basic tab:

  • Title - this title will be seen in the selection lists and setup page
  • Description - user comments for the recipe
  • Disable checkbox - hides this recipe from the list
  • Lock - prevent the recipe from editing by non-admin users
  • Registers 1..4 / Value / Description - this set of the registers will be initialized with the respective values upon invoking recipe. The description given here will be used to show the comments in the quick edit window (right on the dashboard)
  • Delete button deletes the register n from the list
  • Add register to recipe button expands the list with a new entry

Recipes can have sub-categories, i.e. the list of recipes on a dashboard can be displayed completely, or only from a certain category.

category

And also be available to specific users.

users

When placing a list of recipes on a dashboard, you must specify:

  • Category of recipes, or a complete list of all categories
  • Drop-down or multiline list
  • Number of the register where the recipe number will change. (changing this register can be monitored in scripts when you need to perform some actions associated with this recipe)
  • Whether to apply the recipe immediately or not (in the second case, only the register number will change where the current recipe number is stored)

dashboard

To apply recipes within scripts, the ApplyRecipe (recipeId, userId) function is used. See here. After it is executed, if a list is displayed on one of the dashboards, the contents of the recipe from the ApplyRecipe function, you must also write the recipe number in the register tied to the list - to synchronize the display of the list.

recipes.1591018821.txt.gz ยท Last modified: 2020/06/01 13:40 by emozolyak

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki