From 29bcd379f7cb2a7c72adbf861db0acb15f8f302a Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Thu, 24 Oct 2019 11:53:35 +0200 Subject: [PATCH] Added changes for liking with visual consoles --- pandora_console/extensions/sample_agent.php | 73 +++++++++++++++++++++ pandora_console/pandoradb_data.sql | 59 +++++++++-------- pandora_server/bin/pandora_server | 5 +- 3 files changed, 108 insertions(+), 29 deletions(-) create mode 100644 pandora_console/extensions/sample_agent.php diff --git a/pandora_console/extensions/sample_agent.php b/pandora_console/extensions/sample_agent.php new file mode 100644 index 0000000000..3da4a61090 --- /dev/null +++ b/pandora_console/extensions/sample_agent.php @@ -0,0 +1,73 @@ + '$id_agente'], 'id_agente_modulo'); + $count_modules = count($modules); + + // Update of layout 1 (Rack sample). + $images_rack_server = [ + 'rack_server_rack', + 'rack_server', + 'rack_switch', + 'rack_firewall', + 'rack_double_server', + 'rack_frame', + 'rack_pdu', + ]; + $query = 'UPDATE `tlayout_data` SET `id_agent` = '.$id_agente.', `id_agente_modulo` = CASE `image` '; + for ($i = 0; $i < $count_modules; $i++) { + $query .= 'WHEN "'.$images_rack_server[$i].'" THEN '.$modules[$i].' '; + } + + $query .= 'END '; + $query .= 'WHERE `id_layout` = 1 AND `image` IN ("'.implode('","', $images_rack_server).'");'; + db_process_sql($query); + // Update of layout 2 (Dashboard). + $query = 'UPDATE `tlayout_data` SET `id_agent`= '.$id_agente.', CASE '; + $query .= 'WHEN `id` = 99 THEN '.$modules[0].' '; + $query .= 'WHEN `id` = 100 THEN '.$modules[1].' '; + $query .= 'WHEN `id` = 101 THEN '.$modules[2].' '; + $query .= 'WHEN `id` = 102 THEN '.$modules[3].' '; + $query .= 'WHEN `id` = 103 THEN '.$modules[4].' '; + $query .= 'WHEN `id` = 112 THEN '.$modules[5].' '; + $query .= 'WHEN `id` = 113 THEN '.$modules[6].' '; + $query .= 'WHEN `id` = 114 THEN '.$modules[7].' '; + $query .= 'END '; + $query .= 'WHERE `id_layout` = 2 AND `id` IN (99,100,101,102,103,112,113,114);'; + db_process_sql($query); + + // This setting will avoid regenerate all the times the visual consoles. + $values = [ + 'token' => 'sample_agent_deployed', + 'value' => '1', + ]; + db_process_sql_insert('tconfig', $values); + } +} + + +extensions_add_main_function('sample_agent_deployment'); diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 686f4aa487..b6cf713563 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -138,7 +138,8 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('cr_incident_type', ''), ('cr_incident_status', ''), ('cr_incident_title', ''), -('cr_incident_content', ''); +('cr_incident_content', ''), +('sample_agent', '0'); UNLOCK TABLES; -- @@ -1402,41 +1403,41 @@ VALUES (53,1,1413,243,205,426,'','rack_frame',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), (54,1,962,381,73,408,'','rack_firewall',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), (55,1,962,454,73,408,'','rack_pdu',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), - (56,1,530,732,74,413,'','rack_server',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), - (57,1,962,233,74,413,'','rack_server',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), - (58,1,962,307,74,413,'','rack_server',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), - (59,1,530,658,74,413,'','rack_server',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), - (60,1,530,350,74,413,'','rack_server',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), - (61,1,530,204,73,408,'','rack_psa',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), - (62,1,530,277,73,408,'','rack_pdu',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), - (63,1,530,585,73,408,'','rack_firewall',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), - (64,1,530,424,161,411,'','rack_double_server',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), + (56,1,530,732,74,413,'','rack_server',0,3600,51,4,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0,0,0,0,'analogic_1','time','Europe/Madrid',0,0), + (57,1,962,233,74,413,'','rack_server',0,3600,54,4,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0,0,0,0,'analogic_1','time','Europe/Madrid',0,0), + (58,1,962,307,74,413,'','rack_server',0,3600,55,4,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0,0,0,0,'analogic_1','time','Europe/Madrid',0,0), + (59,1,530,658,74,413,'','rack_server',0,3600,50,4,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0,0,0,0,'analogic_1','time','Europe/Madrid',0,0), + (60,1,530,350,74,413,'','rack_server',0,3600,51,4,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0,0,0,0,'analogic_1','time','Europe/Madrid',0,0), + (61,1,530,204,73,408,'','rack_psa',0,3600,52,4,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0,0,0,0,'analogic_1','time','Europe/Madrid',0,0), + (62,1,530,277,73,408,'','rack_pdu',0,3600,51,4,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0,0,0,0,'analogic_1','time','Europe/Madrid',0,0), + (63,1,530,585,73,408,'','rack_firewall',0,3600,52,4,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0,0,0,0,'analogic_1','time','Europe/Madrid',0,0), + (64,1,530,424,161,411,'','rack_double_server',0,3600,51,4,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0,0,0,0,'analogic_1','time','Europe/Madrid',0,0), (65,1,1426,448,74,413,'','rack_server',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), (66,1,1495,540,174,29,'','rack_server_rack',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), (67,1,1423,260,174,29,'','rack_server_rack',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), (68,1,1463,540,174,29,'','rack_server_rack',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), (69,1,1433,540,174,29,'','rack_server_rack',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), - (70,1,74,733,73,408,'','rack_pdu',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), + (70,1,74,733,73,408,'','rack_pdu',0,3600,52,4,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0,0,0,0,'analogic_1','time','Europe/Madrid',0,0), (71,1,1098,701,80,18,'','rack_hard_disk',0,3600,9,2,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), (72,1,1148,701,80,18,'','rack_hard_disk',0,3600,9,2,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), (73,1,1340,699,80,18,'','rack_hard_disk_2',0,3600,9,2,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), (74,1,1358,783,80,18,'','rack_hard_disk_2',0,3600,9,2,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), (75,1,1358,699,80,18,'','rack_hard_disk_2',0,3600,9,2,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), (76,1,1143,783,80,18,'','rack_hard_disk',0,3600,9,2,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), - (77,1,962,682,205,426,'','rack_frame',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), + (77,1,962,682,205,426,'','rack_frame',0,3600,50,4,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0,0,0,0,'analogic_1','time','Europe/Madrid',0,0), (78,1,1522,540,174,29,'','rack_server_rack',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), - (79,1,1419,521,205,426,'','rack_frame',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), - (80,1,74,278,74,413,'','rack_server',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), - (81,1,74,572,161,411,'','rack_double_server',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), + (79,1,1420,521,205,426,'','rack_frame',0,3600,53,4,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0,0,0,0,'analogic_1','time','Europe/Madrid',0,0), + (80,1,74,278,74,413,'','rack_server',0,3600,51,4,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0,0,0,0,'analogic_1','time','Europe/Madrid',0,0), + (81,1,74,572,161,411,'','rack_double_server',0,3600,51,4,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0,0,0,0,'analogic_1','time','Europe/Madrid',0,0), (82,1,1418,729,74,413,'','rack_server',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), (83,1,962,527,73,408,'','rack_switch',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), (84,1,74,352,73,408,'','rack_router',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), (85,1,962,600,74,413,'','rack_server',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), - (86,1,530,806,73,408,'','rack_firewall',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), - (87,1,74,425,74,413,'','rack_server',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), + (86,1,530,806,73,408,'','rack_firewall',0,3600,52,4,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0,0,0,0,'analogic_1','time','Europe/Madrid',0,0), + (87,1,74,425,74,413,'','rack_server',0,3600,51,4,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0,0,0,0,'analogic_1','time','Europe/Madrid',0,0), (88,1,74,499,73,408,'','rack_switch',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), - (89,1,74,806,73,408,'','rack_psa',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), - (90,1,74,204,74,413,'','rack_server',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), + (89,1,74,806,73,408,'','rack_psa',0,3600,52,4,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0,0,0,0,'analogic_1','time','Europe/Madrid',0,0), + (90,1,74,204,74,413,'','rack_server',0,3600,51,4,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0,0,0,0,'analogic_1','time','Europe/Madrid',0,0), (91,1,1424,806,73,408,'','rack_firewall',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), (92,1,1486,907,0,0,'<p style="text-align: center; overflow: hidden;"><span class="visual_font_size_28pt" style="color: #ffffff; font-family: opensans;"><strong><span class="visual_font_size_28pt" style="color: #ffffff; font-family: opensans;">Office 8 -&nbsp;</span></strong></span><span class="visual_font_size_28pt" style="color: #ffffff; font-family: opensans;">Rack 2</span></p>','white',4,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,0), (93,1,1048,889,58,281,'<p style="text-align: center; overflow: hidden;"><span class="visual_font_size_28pt" style="color: #ffffff; font-family: opensans;"><strong><span class="visual_font_size_28pt" style="color: #ffffff; font-family: opensans;">Office 8 -&nbsp;</span></strong></span><span class="visual_font_size_28pt" style="color: #ffffff; font-family: opensans;">Rack 1</span></p>','white',4,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,0), @@ -1445,18 +1446,20 @@ VALUES (96,1,733,20,0,0,'<p style="overflow: hidden;"><span class="visual_font_size_48pt"><strong><span style="color: #ffffff; font-family: opensans;">OFFICE RACKS</span></strong></span></p>','white',4,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,0), (97,1,1479,260,174,29,'','rack_server_rack',0,3600,1,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,'0.000','0.000',0,0,'analogic_1','time','Europe/Madrid',0,60), (98,2,709,103,0,400,'','white',19,3600,0,0,0,0,1,0,0,0,0,'line','down','','#FFFFFF',0,0,'default',0,0.000,0.000,0,0,'digital_1','timedate','Europe/Madrid',0,0), - (99,2,178,481,111,111,'','status',0,3600,11556,430,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0.000,0.000,0,0,'analogic_1','time','Europe/Madrid',0,0), - (100,2,542,481,111,111,'','status',0,3600,13,2,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0.000,0.000,0,0,'analogic_1','time','Europe/Madrid',0,0), - (101,2,905,481,111,111,'','status',0,3600,114,11,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0.000,0.000,0,0,'analogic_1','time','Europe/Madrid',0,0), - (102,2,1276,481,111,111,'','status',0,3600,7,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0.000,0.000,0,0,'analogic_1','time','Europe/Madrid',0,0), + (99,2,178,481,111,111,'','status',0,3600,50,4,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0,0,0,0,'analogic_1','time','Europe/Madrid',0,0), + (100,2,542,481,111,111,'','status',0,3600,51,4,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0,0,0,0,'analogic_1','time','Europe/Madrid',0,0), + (101,2,905,481,111,111,'','status',0,3600,52,4,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0,0,0,0,'analogic_1','time','Europe/Madrid',0,0), + (102,2,1276,481,111,111,'','status',0,3600,53,4,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0,0,0,0,'analogic_1','time','Europe/Madrid',0,0), (103,2,1631,482,111,111,'','status',0,3600,11547,1,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0.000,0.000,0,0,'analogic_1','time','Europe/Madrid',0,0), - (104,2,157,393,0,0,'

Backups

\n

 

','white', -4,3600,0,0,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0.000,0.000,0,0,'analogic_1','time','Europe/Madrid',0,0), - (105,2,512,382,96,172,'<p style="overflow: hidden;"><span class="visual_font_size_28pt" style="font-family: opensans; color: #ffffff;">DB Status</span></p> <p style="overflow: hidden;">&nbsp;</p>','white',4,3600,0,0,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0.000,0.000,0,0,'analogic_1','time','Europe/Madrid',0,0), + (104,2,157,393,0,0,'

Backups

\n

 

','white',4,3600,0,0,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0.000,0.000,0,0,'analogic_1','time','Europe/Madrid',0,0), + (105,2,512,382,96,172,'<p style="overflow: hidden;"><span class="visual_font_size_28pt" style="font-family: opensans; color: #ffffff;">DB Status</span></p> <p style="overflow: hidden;">&nbsp;</p>','white',4,3600,0,0,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0.000,0.000,0,0,'analogic_1','time','Europe/Madrid',0,0), (106,2,886,382,0,0,'

Disk slave

\n

 

','white',4,3600,0,0,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0.000,0.000,0,0,'analogic_1','time','Europe/Madrid',0,0), (107,2,1251,382,0,0,'

Disk /var

\n

 

','white',4,3600,0,0,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0.000,0.000,0,0,'analogic_1','time','Europe/Madrid',0,0), - (108,2,1547,382,0,0,'<p style="line-height: 18px; overflow: hidden;"><span class="visual_font_size_28pt" style="color: #ffffff; font-family: opensans;">Authentification</span></p>','white',4,3600,0,0,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0.000,0.000,0,0,'analogic_1','time','Europe/Madrid',0,0), + (108,2,1547,382,0,0,'<p style="line-height: 18px; overflow: hidden;"><span class="visual_font_size_28pt" style="color: #ffffff; font-family: opensans;">Authentification</span></p>','white',4,3600,0,0,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0.000,0.000,0,0,'analogic_1','time','Europe/Madrid',0,0), (109,2,126,820,0,0,'<p style="line-height: 18px; overflow: hidden;"><strong><span class="visual_font_size_36pt" style="font-family: opensans; color: #ffffff;">Processing</span></strong></p>','white',4,3600,0,0,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0.000,0.000,0,0,'analogic_1','time','Europe/Madrid',0,0), (110,2,755,820,0,0,'<p style="line-height: 18px; overflow: hidden;"><strong><span class="visual_font_size_36pt" style="font-family: opensans; color: #ffffff;">Network</span></strong></p>','white',4,3600,0,0,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0.000,0.000,0,0,'analogic_1','time','Europe/Madrid',0,0), - (111,2,1281,820,0,0,'<p style="line-height: 18px; overflow: hidden;"><strong><span class="visual_font_size_36pt" style="color: #ffffff; font-family: opensans;">Storage</span></strong></p>','white',4,3600,0,0,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0.000,0.000,0,0,'analogic_1','time','Europe/Madrid',0,0) + (111,2,1281,820,0,0,'<p style="line-height: 18px; overflow: hidden;"><strong><span class="visual_font_size_36pt" style="color: #ffffff; font-family: opensans;">Storage</span></strong></p>','white',4,3600,0,0,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0.000,0.000,0,0,'analogic_1','time','Europe/Madrid',0,0), + (112,2,387,825,100,226,'<p style="line-height: 26px;"><span class="visual_font_size_60pt"><strong><span style="line-height: 26px; font-family: roboto; color: #ffff99;">(_VALUE_)</span></strong></span></p>','',2,300,54,4,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0,0,0,0,'analogic_1','time','Europe/Madrid',0,0), + (113,2,936,799,0,226,'<p style="line-height: 18px; overflow: hidden;"><strong><span class="visual_font_size_60pt" style="font-family: roboto; color: #ccffcc;">(_VALUE_)</span></strong></p>','',2,300,55,4,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0,0,0,0,'analogic_1','time','Europe/Madrid',0,0), + (114,2,1476,818,0,226,'<p style="line-height: 18px; overflow: hidden;"><span class="visual_font_size_36pt" style="color: #ccffff; font-family: roboto;">(_VALUE_)</span></p> <div id="gtx-trans" style="position: absolute; left: 43px; top: 4.65625px;">&nbsp;</div>','',2,300,56,4,0,0,1,0,0,0,0,'line','down','','',0,0,'default',0,0,0,0,0,'analogic_1','time','Europe/Madrid',0,0) ; diff --git a/pandora_server/bin/pandora_server b/pandora_server/bin/pandora_server index d91b523da6..7cf34ff112 100755 --- a/pandora_server/bin/pandora_server +++ b/pandora_server/bin/pandora_server @@ -387,7 +387,10 @@ sub pandora_server_tasks ($) { && $pa_config->{"sample_agent"} == 1 && !is_metaconsole($pa_config) && $counter % $pa_config->{"sample_agent_interval"} == 0) { - pandora_sample_agent ($pa_config); + pandora_update_config_token ($dbh, 'sample_agent', 1); + pandora_sample_agent ($pa_config); + } else { + pandora_update_config_token ($dbh, 'sample_agent', 0); } # Avoid counter overflow