mirror of
https://github.com/hanzoai/datastore.git
synced 2026-09-26 13:55:07 +00:00
Binary (symbols) viewer
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#include "WebUIRequestHandler.h"
|
||||
#include "IServer.h"
|
||||
|
||||
#include <Poco/Net/HTTPServerRequest.h>
|
||||
#include <Poco/Net/HTTPServerResponse.h>
|
||||
#include <Poco/Util/LayeredConfiguration.h>
|
||||
|
||||
@@ -25,6 +24,7 @@
|
||||
INCBIN(resource_play_html, SOURCE_DIR "/programs/server/play.html");
|
||||
INCBIN(resource_dashboard_html, SOURCE_DIR "/programs/server/dashboard.html");
|
||||
INCBIN(resource_uplot_js, SOURCE_DIR "/programs/server/js/uplot.js");
|
||||
INCBIN(resource_binary_html, SOURCE_DIR "/programs/server/binary.html");
|
||||
|
||||
|
||||
namespace DB
|
||||
@@ -68,6 +68,11 @@ void WebUIRequestHandler::handleRequest(HTTPServerRequest & request, HTTPServerR
|
||||
|
||||
*response.send() << html;
|
||||
}
|
||||
else if (request.getURI().starts_with("/binary"))
|
||||
{
|
||||
response.setStatusAndReason(Poco::Net::HTTPResponse::HTTP_OK);
|
||||
*response.send() << std::string_view(reinterpret_cast<const char *>(gresource_binary_htmlData), gresource_binary_htmlSize);
|
||||
}
|
||||
else if (request.getURI() == "/js/uplot.js")
|
||||
{
|
||||
response.setStatusAndReason(Poco::Net::HTTPResponse::HTTP_OK);
|
||||
|
||||
Reference in New Issue
Block a user