-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Welcome to the Wiki of the FBR library, a powerful library to enhance your ScadaBR. Here you can find the FBR documentation, information about the library, and usage tips.
I created the FBR library in the beginning of 2021. Initially my intention was to correct some small bugs that existed in ScadaBR 1.0, and add a alignment feature in the Graphic Views (because aligning elements manually was an extremely difficult task). Previously, this library was called FUScaBR, but I changed the original name to a more simplified one.
Throughout 2021 I started wrapping myself closer to the ScadaBR project. With this, I participated in the development of ScadaBR 1.2. As a form of complementing what was still lacking in ScadaBR 1.2, I created FBR 2.0, which was a complete reformulation of the FBR library, moving from a single file to a more modular structure, adding support to internationalization and other useful resources. FBR 2.0 is now included by default in ScadaBR 1.2.
An important issue pointing out is that although FBR is an add-on for ScadaBR, both are independent projects. The ScadaBR is a more complex project and conducted by a team of people, while FBR is just a Javascript library that adds features ScadaBR, and is currently developed only by me (Celso). If you are having difficulties with ScadaBR, the best place to look for support is the ScadaBR Forum.
-
Since version 2.0, FBR is based on modules. Each module adds specific functionality to ScadaBR. The modules present in the latest version are:
- Align module (align.js): adds alignment capabilities to Graphical View.
- Calendar module (calendar.js): allows you to use an interactive calendar to select dates in the "Chart Comparator" component of the Graphic View.
- Chart module (chart.js): allows you to integrate the Chart.js library with ScadaBR's "server-side scripts". The server-side script templates required for this are included in the Code Snippet module.
- Code Editor module (ceditor.js): integrates the powerful CodeMirror code editor to ScadaBR, improving the user experience when using resources involving script creation.
- Code Snippet module (csnippet.js): it allows the use of several ready-made code templates with the "HTML" and "server-side script" components in the Graphic View. In addition, you can create your own templates and add them to the module.
- Fixes module (fixes.js): corrects some bugs present in specific versions of ScadaBR. Check the module settings to enable or disable fixes individually.
-
All FBR modules are located in the
resources/fuscabr/modules/
folder. By default, FBR uses the minified version of the Javascript files of each module. The minified files are located inresources/fuscabr/modules/minified/
. -
The main Javascript file for the library is located at
resources/fuscabr/fuscabr.js
. This file is responsible for loading all other modules from the library, getting global settings and storing Javascript functions common to all modules. -
FBR settings are stored in JSON files. The configuration files are in
resources/fuscabr/conf/common.js
(global settings) andresources/fuscabr/conf/modules/
(configuration files for each module). -
The FBR translation is also based on JSON files. Each language must have a file containing all translation keys inside the
resources/fuscabr/conf/i18n/
folder. To change the language used, change thelanguage
andlanguageFile
settings in theresources/fuscabr/conf/common.js
file. Currently there are translations into Portuguese, English and Spanish. If a translation file is not found, the language used by default will be English. -
The
resources/fuscabr/lib/
folder includes third-party Javascript libraries that are dependencies of some FBR modules. Theresources/fuscabr/templates/
folder includes templates used by the Code Snippet module (html/
andserverside/
subfolders) or by the other modules of the library (internal/
subfolder)