Template the Datatables JS

Add Links to user screen
Add Public IP list to user screen
Add Watch history to user screen
This commit is contained in:
Tim 2015-06-20 22:27:12 +02:00
parent c4504d8be0
commit 6a026d510d
12 changed files with 536 additions and 335 deletions

View file

@ -207,4 +207,14 @@ function getPlatformImagePath(platformName) {
} else {
return 'interfaces/default/images/platforms/default.png';
}
}
function isPrivateIP(ip_address) {
var parts = ip_address.split('.');
if (parts[0] === '10' ||
(parts[0] === '172' && (parseInt(parts[1], 10) >= 16 && parseInt(parts[1], 10) <= 31)) ||
(parts[0] === '192' && parts[1] === '168')) {
return true;
}
return false;
}