Added resetClientStatusList button to Dashboard #129
This commit is contained in:
parent
f4bd7c1ca3
commit
3e57539e91
3 changed files with 42 additions and 0 deletions
|
@ -105,6 +105,8 @@ unsigned Service::handlePOST(const Options* options, const std::string& url, con
|
|||
resultCode = setClientConfig(options, clientId, data, resp);
|
||||
} else if (url.rfind("/admin/setClientCommand", 0) == 0) {
|
||||
resultCode = setClientCommand(clientId, data, resp);
|
||||
} else if (url.rfind("/admin/resetClientStatusList", 0) == 0) {
|
||||
resultCode = resetClientStatusList(data, resp);
|
||||
}
|
||||
|
||||
uv_mutex_unlock(&m_mutex);
|
||||
|
@ -280,6 +282,13 @@ unsigned Service::setClientCommand(const std::string& clientId, const std::strin
|
|||
}
|
||||
}
|
||||
|
||||
unsigned Service::resetClientStatusList(const std::string& data, std::string& resp)
|
||||
{
|
||||
m_clientStatus.clear();
|
||||
|
||||
return MHD_HTTP_OK;
|
||||
}
|
||||
|
||||
unsigned Service::getAdminPage(const Options* options, std::string& resp)
|
||||
{
|
||||
std::stringstream data;
|
||||
|
|
|
@ -54,6 +54,7 @@ private:
|
|||
static unsigned setClientStatus(const std::string& clientIp, const std::string& clientId, const std::string& data, std::string& resp);
|
||||
static unsigned setClientCommand(const std::string& clientId, const std::string& data, std::string& resp);
|
||||
static unsigned setClientConfig(const Options* options, const std::string &clientId, const std::string &data, std::string &resp);
|
||||
static unsigned resetClientStatusList(const std::string& data, std::string& resp);
|
||||
|
||||
static std::string getClientConfigFileName(const Options *options, const std::string &clientId);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue