sábado, 14 de junio de 2014

SCADA, a full mini example

We are going to see how to make a mini SCADA, with a flask app running and simulating a system. Let's see the templates:


Let's see the main app in the client:


And in the server:


Now, finally, the flask app:


In the next posts I am going to explain certain aspects. It's not perfect, just a mini SCADA.

jueves, 12 de junio de 2014

SCADA: basic percentage

Hi everyone, today we are going to create a widget for a project that I have in mind, a SCADA made with Meteor.

So we are going to see a widget that is a basic percentage, which color is green if it's minus 50%, and red in other case.

Let's see the code. how to use:


the template:

the helpers:

and the main.coffee


Now is suficient with update the element in the collection with a new value, and you will see the change. It's easy, is a super simple percentage bar.

domingo, 8 de junio de 2014

xwidgets: xboolean

We are going to see how to make a widget (a boolean) that plays nicely with AutoForm. In this case it's a circle of color red (false) or green (true). Let's see the code, in first place the template:


And now the coffee file:

And you can see how to use from AutoForm:


- o - O - o -

I've been making changes to the code, so take a look at github.