1 #ifndef _ots_LogbookSupervisor_h
2 #define _ots_LogbookSupervisor_h
4 #include "otsdaq-core/CoreSupervisors/CoreSupervisorBase.h"
23 virtual void defaultPage (xgi::Input* in, xgi::Output* out)
override;
24 virtual void request (
const std::string& requestType, cgicc::Cgicc& cgiIn, HttpXmlDocument& xmlOut,
const WebUsers::RequestUserInfo& userInfo)
override;
25 virtual void nonXmlRequest (
const std::string& requestType, cgicc::Cgicc& cgiIn, std::ostream& out,
const WebUsers::RequestUserInfo& userInfo)
override;
27 virtual void setSupervisorPropertyDefaults (
void)
override;
28 virtual void forceSupervisorPropertyValues (
void)
override;
31 xoap::MessageReference MakeSystemLogbookEntry (xoap::MessageReference msg);
35 bool validateExperimentName (std::string &experiment);
36 std::string getActiveExperiment (
void);
37 void setActiveExperiment (std::string experiment =
"");
38 void createExperiment (std::string experiment, std::string creator, HttpXmlDocument* xmldoc = 0);
39 void removeExperiment (std::string experiment, std::string remover, HttpXmlDocument* xmldoc = 0);
40 void getExperiments (HttpXmlDocument* xmldoc = 0, std::ostringstream *out = 0);
41 void webUserSetActiveExperiment (std::string experiment, HttpXmlDocument* xmldoc = 0);
42 void refreshLogbook (time_t date,
unsigned char duration, HttpXmlDocument* xmldoc = 0, std::ostringstream *out = 0, std::string experiment =
"");
43 void cleanUpPreviews (
void);
44 void savePostPreview (std::string &subject, std::string &text,
const std::vector<cgicc::FormFile> &files, std::string creator, HttpXmlDocument* xmldoc = 0);
45 void escapeLogbookEntry (std::string &entry);
46 std::string validateUploadFileType (
const std::string fileType);
47 void movePreviewEntry (std::string previewNumber,
bool approve, HttpXmlDocument* xmldoc = 0);
48 void hideLogbookEntry (
const std::string &entryId,
bool hide,
const std::string &hider);
49 static void MFReceiverWorkLoop (
void);
53 ADMIN_PERMISSIONS_THRESHOLD = 255,
54 EXPERIMENT_NAME_MIN_LENTH = 3,
55 EXPERIMENT_NAME_MAX_LENTH = 25,
56 LOGBOOK_PREVIEW_EXPIRATION_TIME = 60*20,
58 std::vector<std::string> allowedFileUploadTypes_, matchingFileUploadTypes_;
60 std::string activeExperiment_;
61 unsigned int mostRecentDayIndex_;