From d9f8497bf44867e0cc25adfaa1d3b01e16a617c8 Mon Sep 17 00:00:00 2001 From: BenDr0id Date: Mon, 15 May 2023 18:24:44 +0200 Subject: [PATCH] Dashboard changes -Changed sorting of column workerId to natural sorting -Fixed group by algo sorting, fixed offline notification banner -Added confirm dialog to "Reset ClientStatusList" #397 -Added button to remove selected miner from list #396 --- index.html | 4467 +++++++++-------- src/backend/opencl/runners/OclCnGpuRunner.cpp | 1 + src/cc/Service.cpp | 11 + src/cc/Service.h | 1 + 4 files changed, 2325 insertions(+), 2155 deletions(-) diff --git a/index.html b/index.html index 6fc0fc6c94..7f4268a2fa 100644 --- a/index.html +++ b/index.html @@ -14,900 +14,1009 @@ - - - - + + + +
+
+
+ + + +
@@ -985,7 +1094,8 @@
- +
@@ -1213,7 +1323,8 @@ + + - - - - - - - - - - + + + + + + + + + + + @@ -1310,7 +1437,7 @@ diff --git a/src/backend/opencl/runners/OclCnGpuRunner.cpp b/src/backend/opencl/runners/OclCnGpuRunner.cpp index aaf14351ad..995019dc79 100644 --- a/src/backend/opencl/runners/OclCnGpuRunner.cpp +++ b/src/backend/opencl/runners/OclCnGpuRunner.cpp @@ -22,6 +22,7 @@ * along with this program. If not, see . */ +#include #include "backend/opencl/runners/OclCnGpuRunner.h" #include "backend/opencl/kernels/Cn00GpuKernel.h" diff --git a/src/cc/Service.cpp b/src/cc/Service.cpp index ff119b3dec..3a733bf4d3 100644 --- a/src/cc/Service.cpp +++ b/src/cc/Service.cpp @@ -210,6 +210,10 @@ int Service::handlePOST(const httplib::Request& req, httplib::Response& res) { resultCode = deleteClientConfig(clientId); } + else if (req.path.rfind("/admin/removeClientStatus", 0) == 0) + { + resultCode = removeClientStatus(clientId); + } else { resultCode = HTTP_BAD_REQUEST; @@ -659,6 +663,13 @@ int Service::deleteClientConfig(const std::string& clientId) return resultCode; } +int Service::removeClientStatus(const std::string clientId) +{ + m_clientStatus.erase(clientId); + + return HTTP_OK; +} + int Service::resetClientStatusList() { m_clientStatus.clear(); diff --git a/src/cc/Service.h b/src/cc/Service.h index 84d34e5381..eaf51d60da 100644 --- a/src/cc/Service.h +++ b/src/cc/Service.h @@ -76,6 +76,7 @@ class Service int setClientCommand(const httplib::Request& req, const std::string& clientId, httplib::Response& res); int setClientConfig(const httplib::Request& req, const std::string& clientId, httplib::Response& res); int deleteClientConfig(const std::string& clientId); + int removeClientStatus(const std::string clientId); int resetClientStatusList(); std::string getClientConfigFileName(const std::string& clientId);