2009-04-03 Sancho Lerena <slerena@artica.es>
* include/functions_reporting.php, * include/functions_db.php: Fixed a notice who breaks the PDF report. Added homeurl preffix to some includes that breaks PDF reporting. * pandora_console_upgrade: Fixedd issue with old-style config.php. * godmode/alerts/alert_list.php: Fixed bad combo values (ID insted names). git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1596 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
3342f882c2
commit
f9dc4ed094
|
@ -1,3 +1,13 @@
|
|||
2009-04-03 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* include/functions_reporting.php,
|
||||
* include/functions_db.php: Fixed a notice who breaks the PDF report.
|
||||
Added homeurl preffix to some includes that breaks PDF reporting.
|
||||
|
||||
* pandora_console_upgrade: Fixedd issue with old-style config.php.
|
||||
|
||||
* godmode/alerts/alert_list.php: Fixed bad combo values (ID insted names).
|
||||
|
||||
2009-04-02 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* pandoradb.sql: Final DB changes proposed for closing this month the DB
|
||||
|
|
|
@ -332,8 +332,7 @@ if (! $id_agente) {
|
|||
false, '', '', true);
|
||||
|
||||
$table->data['agent'][0] = __('Agent');
|
||||
$table->data['agent'][1] = print_select (array_keys (get_group_agents (array_keys ($groups), false, "none")),
|
||||
'id_agent', 0, false, __('Select'), 0, true);
|
||||
$table->data['agent'][1] = print_select (get_group_agents (array_keys ($groups), false, "none"), 'id_agent', 0, false, __('Select'), 0, true);
|
||||
$table->data['agent'][1] .= ' <span id="agent_loading" class="invisible">';
|
||||
$table->data['agent'][1] .= '<img src="images/spinner.gif" />';
|
||||
$table->data['agent'][1] .= '</span>';
|
||||
|
|
|
@ -844,7 +844,9 @@ function get_alert_fires_in_period ($id_alert_module, $period, $date = 0) {
|
|||
* @return array An array with alerts dictionaries defined in a group.
|
||||
*/
|
||||
function get_group_alerts ($id_group) {
|
||||
require_once ('include/functions_agents.php');
|
||||
global $config;
|
||||
|
||||
require_once ($config["homedir"].'/include/functions_agents.php');
|
||||
|
||||
$alerts = array ();
|
||||
$agents = get_group_agents ($id_group, false, "none");
|
||||
|
@ -874,12 +876,15 @@ function get_alerts_fired ($alerts, $period = 0, $date = 0) {
|
|||
|
||||
$alerts_fired = array ();
|
||||
$agents = array ();
|
||||
|
||||
foreach ($alerts as $alert) {
|
||||
$fires = get_alert_fires_in_period ($alert['id'], $period, $date);
|
||||
if (! $fires) {
|
||||
continue;
|
||||
if (isset($alert['id'])){
|
||||
$fires = get_alert_fires_in_period ($alert['id'], $period, $date);
|
||||
if (! $fires) {
|
||||
continue;
|
||||
}
|
||||
$alerts_fired[$alert['id']] = $fires;
|
||||
}
|
||||
$alerts_fired[$alert['id']] = $fires;
|
||||
}
|
||||
return $alerts_fired;
|
||||
}
|
||||
|
|
|
@ -475,6 +475,7 @@ function print_group_reporting ($id_group, $return = false) {
|
|||
* @return object A table object with the alert reporting..
|
||||
*/
|
||||
function get_agent_alerts_reporting_table ($id_agent, $period = 0, $date = 0) {
|
||||
global $config;
|
||||
$table->data = array ();
|
||||
$table->head = array ();
|
||||
$table->head[0] = __('Type');
|
||||
|
@ -484,7 +485,7 @@ function get_agent_alerts_reporting_table ($id_agent, $period = 0, $date = 0) {
|
|||
$table->head[4] = __('Last fired');
|
||||
$table->head[5] = __('Times Fired');
|
||||
|
||||
require_once ('include/functions_alerts.php');
|
||||
require_once ($config["homedir"].'/include/functions_alerts.php');
|
||||
|
||||
$alerts = get_agent_alerts ($id_agent);
|
||||
/* FIXME: Add compound alerts to the report. Some extra code is needed here */
|
||||
|
|
|
@ -24,6 +24,17 @@ pandora_upgrade () {
|
|||
fi
|
||||
echo "Installing new console code in $PANDORAPATH"
|
||||
cp -R * $PANDORAPATH
|
||||
|
||||
# This makes the old-style config.php file usable with 3.0
|
||||
|
||||
line=$(grep "?>" -n $PANDORAPATH/include/config.php | head -1 | cut -f1 -d:)
|
||||
line=$(($line - 1))
|
||||
head -$line $PANDORAPATH/include/config.php > /tmp/asdf
|
||||
echo "require_once ('config_process.php');" >> /tmp/asdf
|
||||
echo "?>" >> /tmp/asdf
|
||||
mv /tmp/asdf $PANDORAPATH/include/config.php
|
||||
|
||||
# Upgrade Database ?
|
||||
|
||||
if [ "$UPGRADEDB" == "1" ]
|
||||
then
|
||||
|
|
Loading…
Reference in New Issue