mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Inprove cluster view, and change fields to insert in creation cluster modules - #1748
This commit is contained in:
parent
0808b2bf07
commit
9258d00051
@ -44,12 +44,17 @@ if ($add_cluster) {
|
||||
|
||||
// Create agent
|
||||
|
||||
$server_name = db_process_sql('select name from tserver where server_type=5 limit 1');
|
||||
|
||||
$server_name_agent = $server_name[0]['name'];
|
||||
|
||||
$values_agent = array(
|
||||
'nombre' => $name,
|
||||
'alias' => $name,
|
||||
'comentarios' => $description,
|
||||
'id_grupo' => $idGroup,
|
||||
'id_os' => 21
|
||||
'id_os' => 21,
|
||||
'server_name' => $server_name_agent
|
||||
);
|
||||
|
||||
if (trim($name) != "") {
|
||||
|
@ -12,6 +12,7 @@ if (! check_acl ($config['id_user'], 0, "AR")) {
|
||||
}
|
||||
|
||||
require_once ('include/functions_agents.php');
|
||||
require_once ('include/functions_modules.php');
|
||||
require_once('include/functions_clusters.php');
|
||||
|
||||
$id_cluster = get_parameter('id',0);
|
||||
@ -55,7 +56,35 @@ echo "<table style='width:100%;border: 1px black solid;'>";
|
||||
|
||||
$balanced_modules_in = items_get_cluster_items_id_name($id_cluster,'AP');
|
||||
|
||||
html_debug($balanced_modules_in);
|
||||
foreach ($balanced_modules_in as $key => $value) {
|
||||
$cluster_module = db_process_sql('select id_agente_modulo from tagente_modulo where custom_integer_2 = '.$key);
|
||||
|
||||
html_debug($cluster_module[0]['id_agente_modulo']);
|
||||
|
||||
$cluster_module_status = modules_get_status($cluster_module[0]['id_agente_modulo']);
|
||||
|
||||
|
||||
html_debug(modules_get_status($cluster_module_status));
|
||||
|
||||
|
||||
echo "<div style='float:left;'>";
|
||||
|
||||
if($cluster_module_status == 5){
|
||||
echo '<img style="width:18px;height:18px;" src="images/exito.png">'.$value;
|
||||
}
|
||||
else{
|
||||
echo '<img style="width:18px;height:18px;" src="images/error_1.png">'.$value;
|
||||
}
|
||||
|
||||
echo "</div>";
|
||||
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// $cluster_module_status = modules_get_status($cluster_module[0]['id_agente_modulo']);
|
||||
|
||||
// html_debug($balanced_modules_in);
|
||||
|
||||
echo "</div>";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user