Merge branch 'ent-4020-cambiar-mensaje-de-bienvenida-tnews' into 'develop'
Add new message to News board See merge request artica/pandorafms!2415 Former-commit-id: b0adfc73ac247cda59dea01e83429e06ba5747ee
This commit is contained in:
commit
3548070ec1
|
@ -9,5 +9,8 @@ ALTER TABLE `talert_commands` ADD COLUMN `fields_hidden` text;
|
|||
ALTER TABLE `talert_templates` MODIFY COLUMN `type` ENUM('regex','max_min','max','min','equal','not_equal','warning','critical','onchange','unknown','always','not_normal');
|
||||
|
||||
DELETE FROM `tevent_response` WHERE `name` LIKE 'Create Integria IMS incident from event';
|
||||
INSERT INTO `tnews` (`id_news`, `author`, `subject`, `text`, `timestamp`) VALUES (1,'admin','Welcome to Pandora FMS Console', '<p style="text-align: center; font-size: 13px;">Hello, congratulations, if you've arrived here you already have an operational monitoring console. Remember that our forums and online documentation are available 24x7 to get you out of any trouble. You can replace this message with a personalized one at Admin tools -> Site news.</p> ',NOW());
|
||||
|
||||
|
||||
|
||||
COMMIT;
|
|
@ -761,6 +761,23 @@ CREATE TABLE IF NOT EXISTS `treport_content_template` (
|
|||
PRIMARY KEY(`id_rc`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
-- Table `tnews`
|
||||
-- ----------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tnews` (
|
||||
`id_news` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`author` varchar(255) NOT NULL DEFAULT '',
|
||||
`subject` varchar(255) NOT NULL DEFAULT '',
|
||||
`text` TEXT NOT NULL,
|
||||
`timestamp` DATETIME NOT NULL DEFAULT 0,
|
||||
`id_group` int(10) NOT NULL default 0,
|
||||
`modal` tinyint(1) DEFAULT 0,
|
||||
`expire` tinyint(1) DEFAULT 0,
|
||||
`expire_timestamp` DATETIME NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY(`id_news`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
ALTER TABLE treport_content_template ADD COLUMN `historical_db` tinyint(1) NOT NULL DEFAULT '0';
|
||||
ALTER TABLE treport_content_template ADD COLUMN `lapse_calc` tinyint(1) default '0';
|
||||
ALTER TABLE treport_content_template ADD COLUMN `lapse` int(11) default '300';
|
||||
|
@ -2106,8 +2123,15 @@ ALTER TABLE `tnetflow_filter` DROP COLUMN `output`;
|
|||
-- ----------------------------------------------------------------------
|
||||
UPDATE tuser_task set parameters = 'a:5:{i:0;a:6:{s:11:\"description\";s:28:\"Report pending to be created\";s:5:\"table\";s:7:\"treport\";s:8:\"field_id\";s:9:\"id_report\";s:10:\"field_name\";s:4:\"name\";s:4:\"type\";s:3:\"int\";s:9:\"acl_group\";s:8:\"id_group\";}i:1;a:2:{s:11:\"description\";s:46:\"Send to email addresses (separated by a comma)\";s:4:\"type\";s:4:\"text\";}i:2;a:2:{s:11:\"description\";s:7:\"Subject\";s:8:\"optional\";i:1;}i:3;a:3:{s:11:\"description\";s:7:\"Message\";s:4:\"type\";s:4:\"text\";s:8:\"optional\";i:1;}i:4;a:2:{s:11:\"description\";s:11:\"Report Type\";s:4:\"type\";s:11:\"report_type\";}}' where function_name = "cron_task_generate_report";
|
||||
|
||||
------------------------------------------------------------------------
|
||||
------ ADD message in table 'tnews'
|
||||
------------------------------------------------------------------------
|
||||
|
||||
INSERT INTO `tnews` (`id_news`, `author`, `subject`, `text`, `timestamp`) VALUES (1,'admin','Welcome to Pandora FMS Console', '<p style="text-align: center; font-size: 13px;">Hello, congratulations, if you've arrived here you already have an operational monitoring console. Remember that our forums and online documentation are available 24x7 to get you out of any trouble. You can replace this message with a personalized one at Admin tools -> Site news.</p> ',NOW());
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
-- Alter table `talert_templates`
|
||||
-- ----------------------------------------------------------------------
|
||||
|
||||
ALTER TABLE `talert_templates` MODIFY COLUMN `type` ENUM('regex','max_min','max','min','equal','not_equal','warning','critical','onchange','unknown','always','not_normal');
|
||||
|
||||
|
|
|
@ -197,12 +197,15 @@ if (!empty($all_data)) {
|
|||
}
|
||||
|
||||
foreach ($news as $article) {
|
||||
$text = io_safe_output($article['text']);
|
||||
|
||||
|
||||
$text_bbdd = io_safe_output($article['text']);
|
||||
$text = html_entity_decode($text_bbdd);
|
||||
echo '<tr><th class="green_title">'.$article['subject'].'</th></tr>';
|
||||
echo '<tr><td>'.__('by').' <b>'.$article['author'].'</b> <i>'.ui_print_timestamp($article['timestamp'], true).'</i> '.$comparation_suffix.'</td></tr>';
|
||||
echo '<tr><td class="datos">';
|
||||
if ($article['id_news'] == 1) {
|
||||
echo '<center><img src="./images/welcome_image.png" alt="img colabora con nosotros - Support" width="191" height="207"></center>';
|
||||
}
|
||||
|
||||
echo nl2br($text);
|
||||
echo '</td></tr>';
|
||||
}
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 7.1 KiB |
|
@ -2675,7 +2675,7 @@ function get_news($arguments)
|
|||
case 'mysql':
|
||||
case 'postgresql':
|
||||
$sql = sprintf(
|
||||
"SELECT subject,timestamp,text,author
|
||||
"SELECT id_news,subject,timestamp,text,author
|
||||
FROM tnews WHERE id_group IN (%s) AND
|
||||
modal = %s AND
|
||||
(expire = 0 OR (expire = 1 AND expire_timestamp > '%s'))
|
||||
|
|
|
@ -345,8 +345,7 @@ INSERT INTO `tperfil` VALUES (1,'Operator (Read)',0,1,0,1,0,0,0,0,0
|
|||
-- Dumping data for table `tnews`
|
||||
--
|
||||
|
||||
INSERT INTO `tnews` (`id_news`, `author`, `subject`, `text`, `timestamp`) VALUES (1,'admin','Welcome to Pandora FMS!','This is the Pandora FMS Console. A lot of new features have been added since last version. Please read the documentation about it, and feel free to test any option.\r\n\r\nThe Pandora FMS Team.',NOW());
|
||||
INSERT INTO `tnews` (`id_news`, `author`, `subject`, `text`, `timestamp`) VALUES (2,'admin','New Pandora FMS Agent Features','Feel free to test our new features for both Windows and Linux agents: Proxy and Broker modes.',NOW());
|
||||
INSERT INTO `tnews` (`id_news`, `author`, `subject`, `text`, `timestamp`) VALUES (1,'admin','Welcome to Pandora FMS Console', '&lt;p style="text-align: center; font-size: 13px;"&gt;Hello, congratulations, if you've arrived here you already have an operational monitoring console. Remember that our forums and online documentation are available 24x7 to get you out of any trouble. You can replace this message with a personalized one at Admin tools -&amp;gt; Site news.&lt;/p&gt; ',NOW());
|
||||
|
||||
INSERT INTO tmodule VALUES (1,'Agent module');
|
||||
INSERT INTO tmodule VALUES (2,'Network module');
|
||||
|
|
Loading…
Reference in New Issue