Skip to content

FBR settings

Celso edited this page Jul 27, 2024 · 1 revision

FBR settings are stored in JSON files. The common.json file (inside the conf/ folder) stores the global library settings. Each module can have its own configuration file, which must be located inside the conf/modules folder.

You can change FBR settings simply by editing these JSON files. Caution: Always check that after an edit the JSON file remains valid. A good tool for validating JSON files is the website https://jsonlint.com/.

Below is a reference of all configuration entries (global and module-specific) for the latest version of FBR:

Global settings (conf/common.json)

Option Type Default value Description
language String en (*) Language to be used by FBR (insert language code in ISO 639-1 format [2 letters]).
languageFile String resources/fuscabr/conf/i18n/en.json (*) The path to the JSON file containing the translation of FBR in the language to be used.
modulesPath String resources/fuscabr/modules/minified/ The folder containing the FBR modules Javascript files. By default, FBR uses the minified version of the files to speed up loading
modules Array of objects (omitted) Each object in this array registers a FBR module. The name property sets the name of the module, file sets the name of its main Javascript file, the pages array specifies which ScadaBR pages FBR will load this module into, and the enabled property lets you disable a module without having to unregister it.

(*) Some FBR installation methods may allow installation in other languages, changing the default value of this property.

Align module (conf/modules/align.json)

Option Type Default value Description
moveAnchorOffset Integer 10 The number of pixels the anchor element will move (when using keyboard arrow shortcuts) .
anchorBorderColor String #008000 The CSS color of the border that will be drawn around the anchor element.
elementBorderColor String #FF7A00 The CSS color of the border that will be drawn around an element when it is selected (does not apply to the anchor element).
hoverBorderColor String #F1F116 The CSS color of the border that will be drawn around an unselected element when the mouse cursor is over it.

Code Editor module

Option Type Default value Description
baseFolder String resources/fuscabr/lib/codemirror/ The path to the main folder containing the CodeMirror library.
theme String codemirror.css The theme to be used in all editors. It must be the name of a file in the themesFolder folder or use the default value codemirror.css.
themesFolder String resources/fuscabr/lib/codemirror/theme/ The path to the folder containing CodeMirror CSS themes.
modesFolder String resources/fuscabr/lib/codemirror/mode/ The path to the folder containing the CodeMirror language modes
addonsFolder String resources/fuscabr/lib/codemirror/addon/ The path to the folder containing the CodeMirror addons
editorSize Object (ommited) The properties of this object (which are other objects) define the dimensions, in pixels, of the editors to be displayed on each of the ScadaBR pages. This can be configured by the height and width properties.
editorBorderColor String #BFBFBF The border color of the editors. By default a light gray tone is used.
editorFontSize String 11px The font size of the editors. You need to specify the CSS unit (e.g., "px" or "pt").
watchdogInterval String 50 Interval, in milliseconds, used by the Code Editor module on pages where the updating of editors depends on a "watchdog" mechanism.

Calendar module (conf/modules/calendar.json)

Option Type Default value Description
flatpickrFile String resources/fuscabr/lib/flatpickr/flatpickr.min.js The path to the main Flatpickr library Javascript file.
flatpickrCSSFile String resources/fuscabr/lib/flatpickr/flatpickr.min.css The path to the main Flatpickr library CSS file.
flatpickrLocaleFile String resources/fuscabr/lib/flatpickr/l10ns/allLocales.min.js The path to the Javascript file containing one (or more) translations for Flatpickr.
detectBrowserLocale Boolean true If true, the module will try to detect the current browser language. If false, the module will use the same globally configured language for FBR. In both cases, if the specified language is not found, the calendar will be displayed in English.
rules Array of objects (omitted) This array contains objects that define the rules for creating Flatpickr calendars. Currently there is only one rule, which generates the calendars for the "Graphics Comparator" component of the Graphical Views. We do not recommend changing this entry.

Code Snippet module (conf/modules/csnippet.json)

Option Type Default value Description
htmlTemplatesFolder String resources/fuscabr/templates/html/ The path to the folder containing the HTML code templates.
serverScriptTemplatesFolder String resources/fuscabr/templates/serverside/ The path to the folder containing the serverside script templates.
templatesLoadTimeout Integer 15000 The timeout (in milliseconds) to attempt to load an HTML or serverside script template.
htmlTemplates Array of objects See the HTML Templates table This entry is used to register files that will be used as HTML code templates.
serverScriptTemplates Array of objects See the Serverside Script Templates table This entry is used to register files that will be used as serverside script templates.

HTML Templates

In FBR, HTML code templates are .html files stored in the folder defined by the htmlTemplatesFolder setting. These templates are registered in the Code Snippet module settings through objects. These objects contain the following properties:

  1. file - define the html filename (without the full path)
  2. i18n - defines a translation key (which must also be in the FBR translation files)
  3. desc - defines a short description of the template, which will be used if the translation for the i18n key is not found.

The table below registers all the templates registered in the htmlTemplates array, from the latest FBR version:

file i18n desc
acnowledgeAlarms.html acknowledge_alarms Acknowledge alarms button
buttonChangePage.html button_change_page Button (change page)
clock.html clock Digital clock
fullScreen.html full_screen Toggle Full Screen
HTMLImage.html html_image HTML image
logout.html button_logout Logout button
runMultipleScripts.html run_multiple_scripts Run multiple ScadaBR scripts
silenceAlarms.html silence_alarms Silence alarms button
simpleText.html simple_text Simple text example

Serverside Script Templates

In FBR, server-side scripts templates are .js files stored in the folder defined by the serverScriptTemplatesFolder setting. These templates are registered in the Code Snippet module settings through objects. These objects contain the following properties:

  1. file - define the script filename (without the full path)
  2. i18n - defines a translation key (which must also be in the FBR translation files)
  3. desc - defines a short description of the template, which will be used if the translation for the i18n key is not found.

The table below registers all the templates registered in the serverScriptTemplates array, from the latest FBR version:

file i18n desc
activeUsersTable.js active_users_table Active users table
binaryText.js binary_text Binary text
changePassword.js change_password Change user password (experimental)
checkbox.js checkbox Checkbox
customizableDataPoint.js customizable_data_point Customizable data point
demoFunctions.js demo_functions Demo functions
dropDownSelector.js drop_down_selector Drop-down selector
fuscabrChartTime.js fuscabr_chart_time FBR Chart (time based)
fuscabrChartLatest.js fuscabr_chart_latest FBR Chart (latest values)
gauge.js gauge Gauge
historyCSV.js history_csv Point values history download (CSV)
horizontalBar.js horizontal_bar Bar (horizontal)
verticalBar.js vertical_bar Bar (vertical)
imageButton.js image_button Button (image)
imageSequence.js image_sequence Image sequence
numericSelector.js numeric_selector Numeric selector
pulseButton.js pulse_button Button (pulse)
showUsername.js show_username Show username
slider.js slider Slider selector

Chart module (conf/modules/chart.json)

Option Type Default value Description
chartJSFile String resources/fuscabr/lib/Chart.bundle.min.js The path to the main Chart.js library Javascript file.
fallbackBackgroundColor String #2583E8B8 This color is used to fill series in a chart, if no color is specified.
fallbackBorderColor String #2583E8B8 This color is used in the series outline of a chart, if no color is specified.
enableDatapointWarnings Boolean true This is a backwards compatibility setting, if true it will display a warning if you try to associate an incompatible point type to the graph (e.g., an image data point). Note that even with this setting turned off such warnings may still appear.
refreshTime Integer 250 The time (in milliseconds) for one cycle to update the created chart values.
timeOptions Object (omitted) This object stores parameters for the timescale of charts created with Chart.js. To learn more about changing these values, check the Chart.js documentation.

Fixes module (conf/modules/fixes.json)

Option Type Default value Description
enablePreventViewDeleting Boolean false When true, clicking the Delete button when editing a graphical view will display a message asking for further confirmation. It is only recommended to enable this fix on ScadaBR 1.0CE or earlier
enableChangePositionEditor Boolean true When true, FBR will change the positioning of the "floating windows" that are displayed when editing a graphical view, placing them closer to the mouse cursor.