mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
fixed bug when disabling modules and disabled modules count
This commit is contained in:
parent
a8e10e4c26
commit
db88876748
@ -137,7 +137,16 @@ $table->data[] = $tdata;
|
|||||||
|
|
||||||
// Modules by status.
|
// Modules by status.
|
||||||
$tdata = [];
|
$tdata = [];
|
||||||
$tdata[0] = reporting_get_stats_modules_status($data, 180, 100);
|
|
||||||
|
$data_agents = [
|
||||||
|
__('Critical') => $data['monitor_critical'],
|
||||||
|
__('Warning') => $data['monitor_warning'],
|
||||||
|
__('Normal') => $data['monitor_ok'],
|
||||||
|
__('Unknown') => $data['monitor_unknown'],
|
||||||
|
__('Not init') => $data['monitor_not_init'],
|
||||||
|
];
|
||||||
|
|
||||||
|
$tdata[0] = reporting_get_stats_modules_status($data, 180, 100, false, $data_agents);
|
||||||
$table->rowclass[] = '';
|
$table->rowclass[] = '';
|
||||||
$table->data[] = $tdata;
|
$table->data[] = $tdata;
|
||||||
|
|
||||||
|
@ -466,7 +466,14 @@ if ($module_action === 'delete') {
|
|||||||
$id_agent_module_disable
|
$id_agent_module_disable
|
||||||
);
|
);
|
||||||
|
|
||||||
if (db_process_sql($sql)) {
|
$id_agent_changed[] = modules_get_agentmodule_agent($id_agent_module_disable);
|
||||||
|
$agent_update_result = db_process_sql_update(
|
||||||
|
'tagente',
|
||||||
|
['update_module_count' => 1],
|
||||||
|
['id_agente' => $id_agent_changed]
|
||||||
|
);
|
||||||
|
|
||||||
|
if (db_process_sql($sql) !== false && $agent_update_result !== false) {
|
||||||
$updated_count++;
|
$updated_count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user