diff --git a/agents/meshcore.js b/agents/meshcore.js index c6f00853..d8e62c6c 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -1262,6 +1262,9 @@ function handleServerCommand(data) { // Requestion details information about a process if (data.pid) { var info = {}; // TODO: Replace with real data. Feel free not to give all values if not available. + try { + info = processManager.getProcessInfo(data.pid); + }catch(e){ } /* info.processUser = "User"; // String info.processDomain = "Domain"; // String diff --git a/public/scripts/common-0.0.1.js b/public/scripts/common-0.0.1.js index f25c3bb5..8adba78c 100644 --- a/public/scripts/common-0.0.1.js +++ b/public/scripts/common-0.0.1.js @@ -150,4 +150,30 @@ function check_webp_feature(feature, callback) { callback(feature, false); }; img.src = 'data:image/webp;base64,' + kTestImages[feature]; -} \ No newline at end of file +} + +// camelCase converter for JSON +function jsonToCamel(o) { + var newO, origKey, newKey, value + if (o instanceof Array) { + return o.map(function(value) { + if (typeof value === "object") { + value = jsonToCamel(value) + } + return value + }) + } else { + newO = {} + for (origKey in o) { + if (o.hasOwnProperty(origKey)) { + newKey = (origKey.charAt(0).toLowerCase() + origKey.slice(1) || origKey).toString() + value = o[origKey] + if (value instanceof Array || (value !== null && value.constructor === Object)) { + value = jsonToCamel(value) + } + newO[newKey] = value + } + } + } + return newO + } \ No newline at end of file diff --git a/views/default.handlebars b/views/default.handlebars index 04386b8b..dc5edaf3 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -2627,6 +2627,11 @@ var x = '