Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
e6766b8448 | ||
|
66889f4885 |
@ -305,5 +305,4 @@ 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.
|
||||
- @Koromix for a fix for incompatibility with ZeroTier 1.12.
|
||||
@lideming for a rework and improvement of the network details page, adding DNS support, peer status/address/latency and other improvements.
|
||||
|
@ -4,7 +4,7 @@
|
||||
],
|
||||
"cflags+": ["-Wno-cast-function-type"],
|
||||
"include_dirs+": ["<!(node -e \"require('nan')\")"],
|
||||
+ "libraries": ["/usr/lib/gcc/x86_64-redhat-linux/8/libstdc++fs.a"],
|
||||
+ "libraries": ["/usr/lib/gcc/x86_64-redhat-linux/4.8.2/libstdc++.a"],
|
||||
"dependencies": ["libargon2"],
|
||||
"configurations": {
|
||||
"Debug": {
|
||||
|
@ -26,7 +26,7 @@ BINDINGGYP='node_modules/argon2/binding.gyp'
|
||||
|
||||
NODE_VER='v16'
|
||||
|
||||
if [ ! -f /usr/lib/gcc/x86_64-redhat-linux/8/libstdc++fs.a ]; then
|
||||
if [ ! -f /usr/lib/gcc/x86_64-redhat-linux/4.8.2/libstdc++.a ]; then
|
||||
echo "You must install libstdc++-static"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -17,26 +17,15 @@ async function get_network_with_members(nwid) {
|
||||
zt.network_detail(nwid),
|
||||
zt.peers(),
|
||||
zt.members(nwid)
|
||||
.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(
|
||||
.then(member_ids =>
|
||||
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;
|
||||
}))
|
||||
|
@ -21,7 +21,7 @@ function guest_only(req, res, next) {
|
||||
|
||||
/* GET home page. */
|
||||
router.get('/', guest_only, function(req, res, next) {
|
||||
res.render('front_door', {title: '经纬飞行网络'});
|
||||
res.render('front_door', {title: 'ztncui'});
|
||||
});
|
||||
|
||||
router.get('/logout', function(req, res) {
|
||||
@ -33,13 +33,13 @@ router.get('/logout', function(req, res) {
|
||||
router.get('/login', guest_only, function(req, res) {
|
||||
let message = null;
|
||||
if (req.session.error) {
|
||||
if (req.session.error !== '无权限!') {
|
||||
if (req.session.error !== 'Access denied!') {
|
||||
message = req.session.error;
|
||||
}
|
||||
} else {
|
||||
message = req.session.success;
|
||||
}
|
||||
res.render('login', { title: '登录', message: message });
|
||||
res.render('login', { title: 'Login', message: message });
|
||||
});
|
||||
|
||||
router.post('/login', async function(req, res) {
|
||||
@ -55,7 +55,7 @@ router.post('/login', async function(req, res) {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
req.session.error = '登录失败,请检查用户名和密码.'
|
||||
req.session.error = 'Authentication failed, please check your username and password.'
|
||||
res.redirect('/login');
|
||||
}
|
||||
});
|
||||
|
@ -9,5 +9,5 @@ block login_content
|
||||
h1!= title
|
||||
|
||||
h2
|
||||
a(href='https://www.jingweiht.com/zerotier' target='_blank') ZeroTier
|
||||
| 网络控制器
|
||||
a(href='https://zerotier.com' target='_blank') ZeroTier
|
||||
| network controller UI
|
||||
|
@ -31,9 +31,9 @@ html(lang='en')
|
||||
span.icon-bar
|
||||
span.icon-bar
|
||||
span.icon-bar
|
||||
a.navbar-brand(href='https://www.jingweiht.com' target='_blank')
|
||||
a.navbar-brand(href='https://key-networks.com' target='_blank')
|
||||
img(src='/images/key-logo.svg' alt='Key Networks logo' height='25px' width='25px' style='display: inline')
|
||||
| 飞行网络
|
||||
| Key Networks
|
||||
.collapse.navbar-collapse(id='BarNav')
|
||||
ul.nav.navbar-nav
|
||||
block nav_items
|
||||
@ -42,5 +42,5 @@ html(lang='en')
|
||||
block nav_login
|
||||
a(href='/logout')
|
||||
span.glyphicon.glyphicon-log-out
|
||||
| 退出
|
||||
| Logout
|
||||
block body_content
|
||||
|
@ -9,14 +9,14 @@ block content
|
||||
h1!= title
|
||||
|
||||
h2
|
||||
a(href='https://www.jingweiht.com/zerotier' target='_blank') ZeroTier
|
||||
| 飞行网络控制器
|
||||
a(href='https://www.jingweiht.com/key-networks' target='_blank') Key Networks
|
||||
a(href='https://zerotier.com' target='_blank') ZeroTier
|
||||
| network controller UI by
|
||||
a(href='https://key-networks.com' target='_blank') Key Networks
|
||||
|
||||
if error
|
||||
b #{error}
|
||||
else
|
||||
h4 ZeroTier 网络地址 <b>#{zt_status.address}</b>
|
||||
h4 ZeroTier 版本 <b>#{zt_status.version}</b>
|
||||
h4 This network controller has a ZeroTier address of <b>#{zt_status.address}</b>
|
||||
h4 ZeroTier version <b>#{zt_status.version}</b>
|
||||
h4
|
||||
a(href='/controller/networks') 列表当前控制器下的所有网络
|
||||
a(href='/controller/networks') List all networks on this network controller
|
||||
|
@ -21,7 +21,7 @@ block login_content
|
||||
form.form-horizontal(method='POST' action='')
|
||||
.form-group.row
|
||||
.col-sm-2
|
||||
label.control-label(for='username') 用户名:
|
||||
label.control-label(for='username') Username:
|
||||
.col-sm-10
|
||||
.input-group
|
||||
span.input-group-addon
|
||||
@ -30,7 +30,7 @@ block login_content
|
||||
|
||||
.form-group.row
|
||||
.col-sm-2
|
||||
label.control-label(for='password') 密码:
|
||||
label.control-label(for='password') Password:
|
||||
.col-sm-10
|
||||
.input-group
|
||||
span.input-group-addon
|
||||
@ -40,6 +40,6 @@ block login_content
|
||||
.form-group.row
|
||||
.col-sm-2
|
||||
.col-sm-10
|
||||
button.btn.btn-primary(type='submit') 登录
|
||||
button.btn.btn-primary(type='submit') Login
|
||||
= ' '
|
||||
a.btn.btn-default(href='/' name='cancel' role='button') 取消
|
||||
a.btn.btn-default(href='/' name='cancel' role='button') Cancel
|
||||
|
Loading…
Reference in New Issue
Block a user