Requested by D. Denson.
Now that the UISP network tree is built as a spanning tree, with 10
cost per hop we can reliably flip the tree from A->B->C to C->B->A
depending upon root positioning.
This addition allows you to specify additional routes (that MUST
exist!) e.g. A->C and specify a cost to use instead of the default
10. This allows for topologies in which A-B-C is actually faster
than a direct A-C route (for example, becuase of short 60ghz
hops).
Rather than obeying the "parent" field, which leads to wrong-way up
graphs when building from a non-root site - instead build a complete
cost-based spanning tree from the specified root node. Then use
the generated tree - falling back on parent if nothing is found -
to populate the tree in order.
Tested on Herbert's network, correctly generates topology from several
different locations.
Still to come: adding a mechanism for providing parenting overloads
to allow for cases where a long path is actually optimal, but we
have no way of knowing that.
Restore the automatic generation of a node_id if one isn't present,
based on a hash of /etc/machine_id. Switch from the "toml" crate
to the "toml_edit" crate, and use its Document type to preserve
the user's comments and formatting when editing the configuration
file for saving.
A value was transposed in the IPStats to IPStats transit
conversion. The UI now displays (max download/max upload)
correctly.
Fix an accidental inclusion of a console.log statement
logging needlessly.
A server-side ringbuffer retains just the last 5 minutes of throughput.
When the dashboard first loads, it collects all 5 minutes of data,
so nothing appears skipped. Subsequent updates query the latest
value in the buffer.
FIXES#317