Compare commits

...

3 Commits

Author SHA1 Message Date
lideming 426ad0fbb6
Merge d0f9a45e8d into 1b2284864d 2023-09-01 23:49:16 -07:00
key-networks 1b2284864d 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>
2023-08-31 20:38:16 +08:00
lideming d0f9a45e8d fix "relay" status not showing 2022-01-08 00:20:13 +08:00
4 changed files with 19 additions and 7 deletions

View File

@ -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.

View File

@ -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;
}))

View File

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

View File

@ -121,7 +121,7 @@ block net_content
a(href=nwurl + '/member/' + member.id + '/ipAssignments')
| IP assignment
td
if (peer && peer.latency != -1 && peer.versionMajor != -1)
if (peer && (peer.latency != -1 || peer.versionMajor != -1))
if (peer.latency != -1)
span(style='color: green;')
| ONLINE (v#{peer.version})