You can create your own output format in ISPmanager using the C++ programming language as follows:
yum install coremanager-devel
Debian, Ubuntu: apt-get install coremanager-devel
OutputFormat
class.Write
method.out=MyCustomFormat
.Code example:
#include <api/output.h>
#include <mgr/mgrlog.h>
#include <api/module.h>
#include <api/connection.h>
MODULE("output");
namespace {
using namespace isp_api;
using namespace mgr_xml;
class OutputMyCustomFormat : public OutputFormat {
public:
OutputMyCustomFormat() : OutputFormat("MyCustomFormat") {}
virtual ~OutputMyCustomFormat() {}
virtual bool IsHtml() const { return true; }
virtual bool WantMessages() const { return true; }
virtual void Write(Connection &conn, Xml &xml)
const string output = "output" // here, using the xml received as input, you need to form the server response
conn.Output() << "\n" << output << std::endl;
}
};
MODULE_INIT(OutputMyCustomFormat, "") {
new OutputMyCustomFormat();
}
}