X-Git-Url: https://git.pterodactylus.net/?p=fms.git;a=blobdiff_plain;f=src%2Fhttp%2Fpages%2Fhomepage.cpp;h=1a65cf46a0d59b716def95bacc3046e7639fc046;hp=f305f30ebfd8c9a417dfece2fdb6a764bbd567c5;hb=14fff12d9df0ee30e2df4bf9d22c2e83065816df;hpb=44f964d9b2b2d55a5b5672e9297717bd25fa8ee2
diff --git a/src/http/pages/homepage.cpp b/src/http/pages/homepage.cpp
index f305f30..1a65cf4 100644
--- a/src/http/pages/homepage.cpp
+++ b/src/http/pages/homepage.cpp
@@ -9,6 +9,9 @@
const std::string HomePage::GeneratePage(const std::string &method, const std::map &queryvars)
{
+ std::string messagecountstr="";
+ std::string filecountstr="";
+
if(queryvars.find("formaction")!=queryvars.end() && (*queryvars.find("formaction")).second=="shutdown")
{
wantshutdown=true;
@@ -21,12 +24,29 @@ const std::string HomePage::GeneratePage(const std::string &method, const std::m
content+="
";
content+="Use these pages to administer your FMS installation.";
content+="
";
+
+ SQLite3DB::Statement st=m_db->Prepare("SELECT COUNT(*) FROM tblMessageInserts WHERE Inserted='false';");
+ st.Step();
+ if(st.RowReturned())
+ {
+ st.ResultText(0,messagecountstr);
+ }
+ content+="Messages waiting to be inserted:"+messagecountstr+"
";
+ st=m_db->Prepare("SELECT COUNT(*) FROM tblFileInserts WHERE Key IS NULL;");
+ st.Step();
+ if(st.RowReturned())
+ {
+ st.ResultText(0,filecountstr);
+ }
+ content+="Files waiting to be inserted:"+filecountstr+"
";
+
content+="";
content+="
";
content+="";
+
return "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n"+StringFunctions::Replace(m_template,"[CONTENT]",content);
}