mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
2010-09-20 Ramon Novoa <rnovoa@artica.es>
* unix/pandora_agent, win32/modules/pandora_module.cc: Added module_interval information to the data XML. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3260 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
3b0ab1e3d2
commit
49f8c027de
@ -1,3 +1,8 @@
|
|||||||
|
2010-09-20 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* unix/pandora_agent, win32/modules/pandora_module.cc: Added
|
||||||
|
module_interval information to the data XML.
|
||||||
|
|
||||||
2010-09-17 Junichi Satoh <junichi@rworks.jp>
|
2010-09-17 Junichi Satoh <junichi@rworks.jp>
|
||||||
|
|
||||||
* unix/SunOS/make_solaris_package/README,
|
* unix/SunOS/make_solaris_package/README,
|
||||||
|
@ -1171,6 +1171,10 @@ sub write_module_xml ($@) {
|
|||||||
" <description><![CDATA[" . $module->{'description'} . "]]></description>\n" .
|
" <description><![CDATA[" . $module->{'description'} . "]]></description>\n" .
|
||||||
" <type>" . $module->{'type'} . "</type>\n";
|
" <type>" . $module->{'type'} . "</type>\n";
|
||||||
|
|
||||||
|
if ($module->{'interval'} > 1) {
|
||||||
|
$Xml .= " <module_interval>" . $module->{'interval'} . "</module_interval>\n";
|
||||||
|
}
|
||||||
|
|
||||||
# Data list
|
# Data list
|
||||||
if ($#data > 0) {
|
if ($#data > 0) {
|
||||||
$Xml .= " <datalist>\n";
|
$Xml .= " <datalist>\n";
|
||||||
|
@ -22,6 +22,9 @@
|
|||||||
#include "../pandora_strutils.h"
|
#include "../pandora_strutils.h"
|
||||||
#include "../pandora.h"
|
#include "../pandora.h"
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
using namespace Pandora;
|
using namespace Pandora;
|
||||||
using namespace Pandora_Modules;
|
using namespace Pandora_Modules;
|
||||||
using namespace Pandora_Strutils;
|
using namespace Pandora_Strutils;
|
||||||
@ -415,7 +418,8 @@ Pandora_Module::run () {
|
|||||||
*/
|
*/
|
||||||
string
|
string
|
||||||
Pandora_Module::getXml () {
|
Pandora_Module::getXml () {
|
||||||
string module_xml, data_clean;
|
ostringstream module_interval;
|
||||||
|
string module_xml, data_clean, interval_str;
|
||||||
Pandora_Data *data;
|
Pandora_Data *data;
|
||||||
|
|
||||||
pandoraDebug ("%s getXML begin", module_name.c_str ());
|
pandoraDebug ("%s getXML begin", module_name.c_str ());
|
||||||
@ -436,6 +440,12 @@ Pandora_Module::getXml () {
|
|||||||
module_xml += this->module_description;
|
module_xml += this->module_description;
|
||||||
module_xml += "]]></description>\n";
|
module_xml += "]]></description>\n";
|
||||||
}
|
}
|
||||||
|
if (this->module_interval > 1) {
|
||||||
|
module_interval << this->module_interval;
|
||||||
|
module_xml += "\t<module_interval><![CDATA[";
|
||||||
|
module_xml += module_interval.str ();
|
||||||
|
module_xml += "]]></module_interval>\n";
|
||||||
|
}
|
||||||
|
|
||||||
/* Write module data */
|
/* Write module data */
|
||||||
if (this->data_list && this->data_list->size () > 1) {
|
if (this->data_list && this->data_list->size () > 1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user