Loading CMakeLists.txt +1 −1 Changes for CMakeLists.txt: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.18) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(DATAPATH "${CMAKE_INSTALL_PREFIX}/share/authdb/data" CACHE FILEPATH "path where stored admin db") set(DATAPATH "/usr/local/share/authdb/data" CACHE FILEPATH "path where stored admin db") add_definitions(-D${CMAKE_HOST_SYSTEM_NAME} -DDATAPATH="${DATAPATH}") Loading data/config.yaml +1 −1 Changes for data/config.yaml: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -3,4 +3,4 @@ AUTHDB: BIND: "0.0.0.0" MAXCONN: 1024 ADMINDB: PATH: "./admin.db" PATH: "/tmp/admin.db" data/index.html +2 −2 Changes for data/index.html: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -2,8 +2,8 @@ <html lang="en"> <head> <title>AuthDB</title> <link rel="stylesheet" href="/style.css"></link> <script type="text/javascript" src="/authdb.js"></script> <link rel="stylesheet" href="/style.css"> <script src="/authdb.js"></script> </head> <body> <div id="header"> Loading src/admin.cpp +10 −1 Changes for src/admin.cpp: 10 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ #include <algorithm> #include <iostream> #include <htmlpp/exception.h> #include <htmlpp/html.h> #include <uuidp.h> Loading Loading @@ -144,7 +145,11 @@ namespace authdb { userlist << "</table></div><div><ul class=\"usertoolbar\" ><li><a class=\"button\" href=\"/settings/"<< cdid << "/createuser\">CreateUser</a></li></ul></div>"; try{ content->appendChild(userlist.parse()); }catch(libhtmlpp::HTMLException &e){ std::cerr << e.what() << std::endl; } libhtmlpp::print(root,out,true); Loading Loading @@ -1299,14 +1304,18 @@ namespace authdb { } } *form << "<tr><td></td><td><input type=\"submit\"></td></tr>" *form << "</tr><td></td><td><input type=\"submit\"></td></tr>" << "</table>" << "</form>"; std::shared_ptr<libhtmlpp::HtmlElement> root=std::make_shared<libhtmlpp::HtmlElement>(*_IndexElement); libhtmlpp::HtmlElement *content=root->getElementbyID("content"); try{ content->insertChild(form->parse()); }catch(libhtmlpp::HTMLException &e){ std::cerr << e.what() << std::endl; } libhtmlpp::print(*root,*out,true); Loading src/authdb.cpp +3 −3 Changes for src/authdb.cpp: 3 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -417,7 +417,7 @@ VALUEFOUND: }; int main(int argc,char *argv[]){ cmdplus::CmdController &cmd=cmdplus::CmdController::getInstance(); cmdplus::CmdController cmd(cmdplus::CmdController::getInstance()); cmd.registerCmd("config",'c',true,"","Config Path"); Loading @@ -440,8 +440,8 @@ int main(int argc,char *argv[]){ config.getValue(config.getKey("/AUTHDB/BIND"),0), config.getIntValue(config.getKey("/AUTHDB/PORT"),0), config.getIntValue(config.getKey("/AUTHDB/MAXCONN"),0), "", "" nullptr, nullptr ); authdb::AuthDB authdb(backend,httpd.getServerSocket()); Loading Loading
CMakeLists.txt +1 −1 Changes for CMakeLists.txt: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.18) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(DATAPATH "${CMAKE_INSTALL_PREFIX}/share/authdb/data" CACHE FILEPATH "path where stored admin db") set(DATAPATH "/usr/local/share/authdb/data" CACHE FILEPATH "path where stored admin db") add_definitions(-D${CMAKE_HOST_SYSTEM_NAME} -DDATAPATH="${DATAPATH}") Loading
data/config.yaml +1 −1 Changes for data/config.yaml: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -3,4 +3,4 @@ AUTHDB: BIND: "0.0.0.0" MAXCONN: 1024 ADMINDB: PATH: "./admin.db" PATH: "/tmp/admin.db"
data/index.html +2 −2 Changes for data/index.html: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -2,8 +2,8 @@ <html lang="en"> <head> <title>AuthDB</title> <link rel="stylesheet" href="/style.css"></link> <script type="text/javascript" src="/authdb.js"></script> <link rel="stylesheet" href="/style.css"> <script src="/authdb.js"></script> </head> <body> <div id="header"> Loading
src/admin.cpp +10 −1 Changes for src/admin.cpp: 10 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ #include <algorithm> #include <iostream> #include <htmlpp/exception.h> #include <htmlpp/html.h> #include <uuidp.h> Loading Loading @@ -144,7 +145,11 @@ namespace authdb { userlist << "</table></div><div><ul class=\"usertoolbar\" ><li><a class=\"button\" href=\"/settings/"<< cdid << "/createuser\">CreateUser</a></li></ul></div>"; try{ content->appendChild(userlist.parse()); }catch(libhtmlpp::HTMLException &e){ std::cerr << e.what() << std::endl; } libhtmlpp::print(root,out,true); Loading Loading @@ -1299,14 +1304,18 @@ namespace authdb { } } *form << "<tr><td></td><td><input type=\"submit\"></td></tr>" *form << "</tr><td></td><td><input type=\"submit\"></td></tr>" << "</table>" << "</form>"; std::shared_ptr<libhtmlpp::HtmlElement> root=std::make_shared<libhtmlpp::HtmlElement>(*_IndexElement); libhtmlpp::HtmlElement *content=root->getElementbyID("content"); try{ content->insertChild(form->parse()); }catch(libhtmlpp::HTMLException &e){ std::cerr << e.what() << std::endl; } libhtmlpp::print(*root,*out,true); Loading
src/authdb.cpp +3 −3 Changes for src/authdb.cpp: 3 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -417,7 +417,7 @@ VALUEFOUND: }; int main(int argc,char *argv[]){ cmdplus::CmdController &cmd=cmdplus::CmdController::getInstance(); cmdplus::CmdController cmd(cmdplus::CmdController::getInstance()); cmd.registerCmd("config",'c',true,"","Config Path"); Loading @@ -440,8 +440,8 @@ int main(int argc,char *argv[]){ config.getValue(config.getKey("/AUTHDB/BIND"),0), config.getIntValue(config.getKey("/AUTHDB/PORT"),0), config.getIntValue(config.getKey("/AUTHDB/MAXCONN"),0), "", "" nullptr, nullptr ); authdb::AuthDB authdb(backend,httpd.getServerSocket()); Loading