<commit_before>/*///////////////////////////////////////////////
///                                           ///
///     SWMP - Server Web Monitoring Page     ///
///       By Fuzzy - thefuzz.xyz - 2016       ///
///                                           ///
/////////////////////////////////////////////////
///                                           ///
///    Credits, downloads and usage info:     ///
///    https://github.com/fuzzymannerz/swmp   ///
///                                           ///
////////////////////////////////////////////////////////////
///                                                      ///
///    If you make use of SWMP please consider to        ///
///    show some love via PayPal, Flattr or BTC. <3      ///
///   (Details are on the GitHub page or my website.)    ///
///                                                      ///
//////////////////////////////////////////////////////////*/


// Get vars from system.php and set them for use
var jsonramdata = JSON.parse(ramdata);
var jsoncpudata = JSON.parse(cpudata);
var jsonbootupdata = JSON.parse(bootupdata);
var jsonswapdata = JSON.parse(swapdata);
var jsonnetworkdata = JSON.parse(networkdata);
var jsondiskdata = JSON.parse(diskdata);

// Set the RAM percentage used
var ramdef = jsonramdata.percent_used;
var usedram = jsonramdata.used;
var freeram = jsonramdata.free;
var totalram = jsonramdata.total;


// Set the CPU load precentages
var onemin = jsoncpudata[0];
var fivemin = jsoncpudata[1];
var fifteenmin = jsoncpudata[2];

// Set the last boot time
var bootup = jsonbootupdata.last_boot;

// Set the swap data
var swapdef = jsonswapdata.percent_used;
var usedswap = jsonswapdata.used;
var freeswap = jsonswapdata.free;
var totalswap = jsonswapdata.total;

// Set the network dara
var netint = jsonnetworkdata.interface;<commit_msg>Added error messages (and config.php) (#5)<commit_after>/*///////////////////////////////////////////////
///                                           ///
///     SWMP - Server Web Monitoring Page     ///
///       By Fuzzy - thefuzz.xyz - 2016       ///
///                                           ///
/////////////////////////////////////////////////
///                                           ///
///    Credits, downloads and usage info:     ///
///    https://github.com/fuzzymannerz/swmp   ///
///                                           ///
////////////////////////////////////////////////////////////
///                                                      ///
///    If you make use of SWMP please consider to        ///
///    show some love via PayPal, Flattr or BTC. <3      ///
///   (Details are on the GitHub page or my website.)    ///
///                                                      ///
//////////////////////////////////////////////////////////*/


// Get vars from system.php and set them for use
var jsonramdata = ramdata;
var jsoncpudata = cpudata;
var jsonbootupdata = bootupdata;
var jsonswapdata = swapdata;
var jsonnetworkdata = networkdata;
var jsondiskdata = diskdata;

// Set the RAM percentage used
var ramdef = jsonramdata.percent_used;
var usedram = jsonramdata.used;
var freeram = jsonramdata.free;
var totalram = jsonramdata.total;


// Set the CPU load precentages
var onemin = jsoncpudata[0];
var fivemin = jsoncpudata[1];
var fifteenmin = jsoncpudata[2];

// Set the last boot time
var bootup = jsonbootupdata.last_boot;

// Set the swap data
var swapdef = jsonswapdata.percent_used;
var usedswap = jsonswapdata.used;
var freeswap = jsonswapdata.free;
var totalswap = jsonswapdata.total;

// Set the network dara
var netint = jsonnetworkdata.interface;
{'fraction_non_alphanumeric': 0.21668946648426812, 'fraction_numerical': 0.004651162790697674, 'mean_word_length': 1.1268179173938335, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 26, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6143261', 'n_tokens_mistral': 917, 'n_tokens_neox': 885, 'n_words': 268}