mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
add agent psinfo (#5476)
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
parent
2173921f07
commit
e0d73b2fcd
3 changed files with 35 additions and 1 deletions
|
@ -150,4 +150,30 @@ function check_webp_feature(feature, callback) {
|
|||
callback(feature, false);
|
||||
};
|
||||
img.src = 'data:image/webp;base64,' + kTestImages[feature];
|
||||
}
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue