Added member name on member detail page

This commit is contained in:
Key Networks 2018-01-31 11:36:18 +08:00
parent c901d27ab1
commit 06caa458d8
2 changed files with 4 additions and 2 deletions

View File

@ -410,6 +410,9 @@ exports.member_detail = async function(req, res) {
try {
const network = await zt.network_detail(req.params.nwid);
const member = await zt.member_detail(req.params.nwid, req.params.id);
const name = await storage.getItem(member.id);
if (!name) name = '';
member.name = name;
nav.whence = '/controller/network/' + network.nwid + '/members';
res.render('member_detail', {title: 'Network member detail', nav: nav, network: network, member: member});
} catch (err) {

View File

@ -6,8 +6,7 @@
extends network_layout
block net_content
h4 for member
a(href= member.address) #{member.address}
h4 for member #{member.name} (#{member.address})
each value, key in member
.row