mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralfms.git
synced 2026-03-20 03:40:59 +00:00
Finishing FMS dash board
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "StorageService.h"
|
||||
#include "RESTAPI_FMSObjects.h"
|
||||
#include "Poco/JSON/Object.h"
|
||||
#include "Daemon.h"
|
||||
|
||||
namespace uCentral {
|
||||
void RESTAPI_deviceReportHandler::handleRequest(Poco::Net::HTTPServerRequest &Request,
|
||||
@@ -23,16 +24,10 @@ namespace uCentral {
|
||||
void RESTAPI_deviceReportHandler::DoGet(Poco::Net::HTTPServerRequest &Request,
|
||||
Poco::Net::HTTPServerResponse &Response) {
|
||||
try {
|
||||
FMSObjects::DeviceReport R;
|
||||
|
||||
if(Storage()->GenerateDeviceReport(R)) {
|
||||
Poco::JSON::Object O;
|
||||
R.to_json(O);
|
||||
ReturnObject(Request, O, Response);
|
||||
return;
|
||||
} else {
|
||||
NotFound(Request, Response);
|
||||
}
|
||||
Storage()->GenerateDeviceReport(Daemon()->GetDashboard());
|
||||
Poco::JSON::Object O;
|
||||
Daemon()->GetDashboard().to_json(O);
|
||||
ReturnObject(Request, O, Response);
|
||||
return;
|
||||
} catch ( const Poco::Exception &E) {
|
||||
Logger_.log(E);
|
||||
|
||||
Reference in New Issue
Block a user