1 #ifndef _ots_LogbookSupervisor_h
2 #define _ots_LogbookSupervisor_h
4 #include "otsdaq/CoreSupervisors/CoreSupervisorBase.h"
22 virtual void defaultPage (xgi::Input* in, xgi::Output* out)
override;
23 virtual void request (
const std::string& requestType,
25 HttpXmlDocument& xmlOut,
26 const WebUsers::RequestUserInfo& userInfo)
override;
30 const WebUsers::RequestUserInfo& userInfo)
override;
39 bool validateCategoryName (std::string& category);
40 std::string getActiveCategory (
void);
41 void setActiveCategory (std::string category =
"");
42 void createCategory (std::string category,
44 HttpXmlDocument* xmldoc = 0);
45 void removeCategory (std::string category,
47 HttpXmlDocument* xmldoc = 0);
48 void getCategories (HttpXmlDocument* xmldoc = 0, std::ostringstream* out = 0);
49 void webUserSetActiveCategory (std::string category, HttpXmlDocument* xmldoc = 0);
50 void refreshLogbook (time_t date,
52 HttpXmlDocument* xmldoc = 0,
53 std::ostringstream* out = 0,
54 std::string category =
"");
55 void cleanUpPreviews (
void);
56 void savePostPreview (std::string& subject,
58 const std::vector<cgicc::FormFile>& files,
60 HttpXmlDocument* xmldoc = 0);
61 void escapeLogbookEntry (std::string& entry);
62 std::string validateUploadFileType (
const std::string fileType);
63 void movePreviewEntry (std::string previewNumber,
65 HttpXmlDocument* xmldoc = 0);
66 void hideLogbookEntry (
const std::string& entryId,
68 const std::string& hider);
72 CATEGORY_NAME_MIN_LENTH = 3,
73 CATEGORY_NAME_MAX_LENTH = 300,
74 LOGBOOK_PREVIEW_EXPIRATION_TIME = 60 * 20,
76 std::vector<std::string> allowedFileUploadTypes_, matchingFileUploadTypes_;
78 std::string activeCategory_;
79 unsigned int mostRecentDayIndex_;
xoap::MessageReference MakeSystemLogEntry(xoap::MessageReference msg)
External Supervisor XOAP handlers.
virtual void request(const std::string &requestType, cgicc::Cgicc &cgiIn, HttpXmlDocument &xmlOut, const WebUsers::RequestUserInfo &userInfo) override
virtual void forceSupervisorPropertyValues(void) override
override to force supervisor property values (and ignore user settings)
virtual void setSupervisorPropertyDefaults(void) override
override to control supervisor specific defaults
virtual void nonXmlRequest(const std::string &requestType, cgicc::Cgicc &cgiIn, std::ostream &out, const WebUsers::RequestUserInfo &userInfo) override