Scada-LTS icon indicating copy to clipboard operation
Scada-LTS copied to clipboard

Add alignment and template feature for html and js

Open fabiodurao opened this issue 1 year ago • 2 comments

Is your feature request related to an issue? Please describe. It is still a lot of work to develop synoptic screens, especially when we want to perform alignments. The heart of the most interesting features are in the html and server side script components, however, for the average user, it lacks knowledge to develop a javascript and html to build a slider for example.

Describe the solution you would like There is a library called FuscaBR that was developed by Celso and later added in the ScadaBR 1.2 version that solves these problems.

  • 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.

Describe the alternatives you considered I already read something about an alignment tool that was being developed in Scada-LTS, but I believe that fuscaBR can be a faster alternative to bring the resource.

Additional context Initially it was made to work on ScadaBR and later it was added as official in the ScadaBR 1.2 installer. There is even an installer to add it to a pre-existing ScadaBR installation. I tried installing it with the installer and manually, but clearly there are differences that prevent direct integration, my suggestion is that it be adapted, I imagine it is not too complicated, follow the link to the library and images of what it does. https://github.com/celsou/fuscabr

alinhamento1

alinhamento2

html e js

fabiodurao avatar Apr 05 '23 20:04 fabiodurao

This library also brings some more features, like a date picker and a better graph than, but I believe amcharts is superior. There was an update in the fuscabr library that happened after the packaging of ScadaBR 1.2 that brings an html editor with colors identifying the codes, but I saw something along those lines being done in scada-lts as well.

things

fabiodurao avatar Apr 05 '23 20:04 fabiodurao

Hi @fabiodurao, This library was prepared for changed views etc. ScadaBR, so it probably doesn't work. Adapting this library or Scada-LTS js/styles would firstly spoil the old views, or rather we don't want that, secondly it would be a breakneck and time-consuming task, thirdly, we have prepared vue components that perform, for example, the function of charts. However, there is a lot of value in templates, a system for defining your own templates could be added. This could be done by combining existing components with defined components. Implementing such functionality should not take much time, but adding templates will be a challenge, maybe some of them could be transferred from ScadaBR, but it would be configuration work, not programming.

Regards, Kamil Jarmusik

Limraj avatar Apr 05 '23 22:04 Limraj