Issue#123: compatibility issue with zerotier 1.12.1 (#125)

* issue#123: version bump

* Fix incompatibility with ZeroTier 1.12 (#124)

Co-authored-by: Niels Martignène <niels.martignene@protonmail.com>

* issue#123: Credit to @Koromix for fix

---------

Co-authored-by: Niels Martignène <niels.martignene@protonmail.com>
pull/115/merge
key-networks 1 year ago committed by Key Networks
parent 42248c1359
commit 1b2284864d

@ -305,4 +305,5 @@ Problems with ztncui can be reported using the GitHub issue tracking system. Pl
The ztncui code is open source code, licensed under the GNU GPLv3, and is free to use on those terms. If you are interested in commercial licensing, please contact us via the contact form at [key-networks.com](https://key-networks.com) .
## Thanks
@lideming for a rework and improvement of the network details page, adding DNS support, peer status/address/latency and other improvements.
- @lideming for a rework and improvement of the network details page, adding DNS support, peer status/address/latency and other improvements.
- @Koromix for a fix for incompatibility with ZeroTier 1.12.

@ -17,15 +17,26 @@ async function get_network_with_members(nwid) {
zt.network_detail(nwid),
zt.peers(),
zt.members(nwid)
.then(member_ids =>
Promise.all(
.then(member_ids => {
// Fix weird data returned by ZeroTier 1.12
if (Array.isArray(member_ids)) {
let obj = {};
for (let id of member_ids) {
let key = Object.keys(id)[0];
let value = Object.values(id)[0];
obj[key] = value;
}
member_ids = obj;
}
return Promise.all(
Object.keys(member_ids)
.map(id => Promise.all([
zt.member_detail(nwid, id),
storage.getItem(id)
]))
)
).then(results => results.map(([member, name]) => {
);
}).then(results => results.map(([member, name]) => {
member.name = name || '';
return member;
}))

@ -1,6 +1,6 @@
{
"name": "ztncui",
"version": "0.8.13",
"version": "0.8.14",
"private": true,
"scripts": {
"start": "node ./bin/www",

Loading…
Cancel
Save