Data Format
Hub reads and parses incoming data and gets actions form every line of the data.
Action Lines
Action Lines is the simple plain text format that expects actions formatted using the following rule:
flow-id:acton [param=value] [data]
The line above consists of:
flow-id
- unique identifier of the flowaction
- action to perform on the flowparam
- name of the optional parametervalue
- value of the optional parameterdata
- additional data in the JSON format
value
can be surrounded by single '
or double "
quotes.
Basic actions
Every flow supports two basic actions to create or remove it.
Create
Creates the new flow with flow-id
provided in the line.
crate type=<type> [title="<title>"] [{options}]
The action expects parameters:
type
- the type of the flowtitle
- optional title of the panel on the dashboardoptions
- extra options if the flow support it
Remove
Removes the flow.
remove
Example
For example, you want to add a key-value board on the dashbaord.
At first you should create a new flow with the board
type. Let's
give it my-board
id:
my-board:create type=board title="My Board"
When Hub read that line it will immediately render a panel with
an empty board that has no any data. To add a key-value pair on the
board use the action set
:
my-board:set key="My Key" value="My Value"
It adds the corresponding pair on the board: