8
0
mirror of https://github.com/key-networks/ztncui.git synced 2024-08-31 04:28:00 +00:00

Issue #5: Create a public network

This commit is contained in:
Steve Patrick
2018-05-20 20:45:58 +08:00
parent 4e2fb9c1eb
commit b49cd75b1d
3 changed files with 51 additions and 0 deletions

View File

@@ -350,6 +350,28 @@ exports.ipAssignmentPool_delete = async function (req, res) {
}
}
// private POST
exports.private = async function (req, res) {
const nav =
{
active: 'networks',
whence: ''
}
const private =
{
private: req.body.private
};
try {
const network = await zt.network_object(req.params.nwid, private);
nav.whence = '/controller/network/' + network.nwid;
res.render('private', {title: 'private', nav: nav, network: network});
} catch (err) {
res.render('private', {title: 'private', nav: nav, error: 'Error applying private for network ' + req.params.nwid + ': ' + err});
}
}
// v4AssignMode POST
exports.v4AssignMode = async function (req, res) {
const nav =