Total.js Flow v3.0
Today I'm very happy to announce that I have published a new release of Total.js Flow. This version brings a lot of new features, improvements and new components. Total.js Flow is a really great tool for everyone.
The big change in this version is the support of multiple inputs. The inputs can be changed dynamically in any component.
component.on('<input-number>', function(message) {
// message as specified above in 'data' event
// input 0 to event '0' and so on
});
// Example for e.g. input 1
component.on('0', function(message) {
// processing
});
// Example for ![multipleinputs.jpg](/download/B20190831T000000129.jpg)e.g. input 3
component.on('2', function(message) {
// processing
});
// Example for all inputs
component.on('data', function(message) {
// this event processes data from any input
});
Message identificator
Each received data are wrapped into messages and each message has its own identificator stored in message.id
variable. ID is generated by Flow message counter, the counter is incremented if new instance of FlowMessage
is created and not sent.
Added global variables
Variables can contain different values. The syntax is same as Total.js configuration/resource file.
Reading:
// Reads a value from variables
console.log(instance.variable('secret'));
// or
console.log(FLOW.variable('secret'));
// or
console.log(FLOW.variables.secret);
Event:
instance.on('variables', function(variables) {
// variables have been modified
// variables is key/value object
});
Improved designer
I have improved designer by adding new features like:
- copy & paste component with all outputs
- improved export/import designer
- re-order tabs
- duplicate tabs
- added drag & drop components in database form
- faster moving components with
shift
key
New components
- Consumption measures CPU and Memory consumption of the current Flow instance (only for Linux servers)
- Monitor: CPU (only for Linux servers)
- Monitor: Memory (only for Linux servers)
- Monitor: Disk (only for Linux servers)
- Monitor: Network (only for Linux servers)
- Monitor: Process (only for Linux servers)
- Monitor: SuperAdmin applications
- Dashboard Analytics for new Dashboard
- Merge to Object
Modified components
- Merge supports merging by
message.id
and supports timeout
- MQTT components
- All Flowboard components
What awaits us in Flow?
I want to add a support for Node Cluster in the next version, so we will see.
Jude Sackville - thank you for sponsoring this version.
New Flow video tutorial: Monitor your Linux server
https://blog.totaljs.com/blogs/tutorials/20170705-flow-video-tutorial-monitor-your-linux-server/