mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-03-21 16:45:02 +00:00
Add a new API call for sysadm/lifepserver which returns the system-wide
settings of the utility
REST Request:
-------------------------------
PUT /sysadm/lifepreserver
{
"action" : "settings"
}
REST Response:
-------------------------------
{
"args": {
"settings": {
"diskwarn": "85%",
"email": "WARN",
"emailaddress": "krismoore134@gmail.com",
"recursive": "ON"
}
}
}
WebSocket Request:
-------------------------------
{
"id" : "fooid",
"args" : {
"action" : "settings"
},
"namespace" : "sysadm",
"name" : "lifepreserver"
}
WebSocket Response:
-------------------------------
{
"args": {
"settings": {
"diskwarn": "85%",
"email": "WARN",
"emailaddress": "krismoore134@gmail.com",
"recursive": "ON"
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}
This commit is contained in:
@@ -149,6 +149,10 @@ RestOutputStruct::ExitCode WebSocket::EvaluateSysadmLifePreserverRequest(const Q
|
||||
ok = true;
|
||||
out->insert("listsnap", sysadm::LifePreserver::listSnap(in_args.toObject()));
|
||||
}
|
||||
if(act=="settings"){
|
||||
ok = true;
|
||||
out->insert("settings", sysadm::LifePreserver::settings());
|
||||
}
|
||||
|
||||
} //end of "action" key usage
|
||||
|
||||
|
||||
Reference in New Issue
Block a user