2009-03-20 Evi Vanoost <vanooste@rcbi.rochester.edu>
* include/functions_incidents.php: Style change * include/functions.php: Never is not correct in some cases. Unknown is a better expression. * include/functions_ui.php: Added style attribute (default to nowrap) * include/functions_db.php: get_server_info now processes modules outside the loop. Less queries and now returns load as well * include/functions_html.php: print_submit_button now accepts arrays * operation/servers/view_server.php, operation/incidents/incident.php: Better use of functions and style git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1551 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
a5ba82d4ca
commit
a142d85ad2
|
@ -1,3 +1,20 @@
|
|||
2009-03-20 Evi Vanoost <vanooste@rcbi.rochester.edu>
|
||||
|
||||
* include/functions_incidents.php: Style change
|
||||
|
||||
* include/functions.php: Never is not correct in some cases. Unknown is
|
||||
a better expression.
|
||||
|
||||
* include/functions_ui.php: Added style attribute (default to nowrap)
|
||||
|
||||
* include/functions_db.php: get_server_info now processes modules outside
|
||||
the loop. Less queries and now returns load as well
|
||||
|
||||
* include/functions_html.php: print_submit_button now accepts arrays
|
||||
|
||||
* operation/servers/view_server.php, operation/incidents/incident.php:
|
||||
Better use of functions and style
|
||||
|
||||
2009-03-18 Esteban Sanchez <estebans@artica.es>
|
||||
|
||||
* godmode/agentes/massive_edit_modules.php: Added to repository. New
|
||||
|
|
|
@ -414,7 +414,7 @@ function get_system_time () {
|
|||
*/
|
||||
function human_time_description_raw ($seconds) {
|
||||
if (empty ($seconds)) {
|
||||
return __('Never');
|
||||
return __('Unknown');
|
||||
}
|
||||
|
||||
if ($seconds < 60)
|
||||
|
|
|
@ -2612,6 +2612,23 @@ function get_server_info ($id_server = -1) {
|
|||
$select_id = "";
|
||||
}
|
||||
|
||||
$modules_info = array ();
|
||||
$modules_total = 0;
|
||||
$result = get_db_all_rows_sql ("SELECT DISTINCT(tagente_estado.running_by) , COUNT(*) AS modules
|
||||
FROM tagente_estado, tagente_modulo
|
||||
WHERE tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo
|
||||
AND tagente_modulo.disabled = 0
|
||||
AND tagente_modulo.delete_pending = 0 GROUP BY running_by");
|
||||
if (empty ($result)) {
|
||||
$result = array ();
|
||||
}
|
||||
|
||||
foreach ($result as $row) {
|
||||
$modules_info[$row["running_by"]] = $row["modules"];
|
||||
$modules_total += $row["modules"];
|
||||
}
|
||||
|
||||
|
||||
$sql = "SELECT * FROM tserver".$select_id;
|
||||
$result = get_db_all_rows_sql ($sql);
|
||||
$time = get_system_time ();
|
||||
|
@ -2640,33 +2657,22 @@ function get_server_info ($id_server = -1) {
|
|||
$server["type"] = "unknown";
|
||||
}
|
||||
|
||||
$modules = array ();
|
||||
$result = get_db_all_rows_sql ("SELECT tagente_estado.id_agente_modulo, tagente_modulo.nombre FROM tagente_estado, tagente_modulo
|
||||
WHERE tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo
|
||||
AND tagente_modulo.disabled = 0
|
||||
AND tagente_modulo.delete_pending = 0
|
||||
AND tagente_estado.running_by = ".$server["id_server"]);
|
||||
|
||||
if ($result === false) {
|
||||
$result = array ();
|
||||
if (empty ($modules_info[$server["id_server"]])) {
|
||||
$server["modules"] = 0;
|
||||
} else {
|
||||
$server["modules"] = $modules_info[$server["id_server"]];
|
||||
}
|
||||
foreach ($result as $module_info) {
|
||||
$modules[$module_info["id_agente_modulo"]] = $module_info["nombre"];
|
||||
}
|
||||
|
||||
$server["modules"] = count ($modules);
|
||||
$server["module_info"] = $modules; //We have it, so we might as well pass it just in case somebody might find out a use for it.
|
||||
$server["module_lag"] = 0;
|
||||
$server["lag"] = 0;
|
||||
$server["load"] = 0;
|
||||
$server["modules_total"] = $modules_total;
|
||||
|
||||
if ($server["modules"] > 0) {
|
||||
//If the server doesn't have modules, it doesn't have lag
|
||||
|
||||
$result = get_db_row_sql ("SELECT COUNT(*) AS module_lag, MAX(last_execution_try - current_interval) AS lag FROM tagente_estado
|
||||
WHERE last_execution_try > 0
|
||||
AND current_interval > 0
|
||||
AND running_by = ".$server["id_server"]."
|
||||
AND id_agente_modulo IN (".implode (",", array_keys ($modules)).")
|
||||
AND (UNIX_TIMESTAMP() - last_execution_try - current_interval < current_interval * 2)");
|
||||
|
||||
// Lag over current_interval * 2 is not lag, it's a timed out module
|
||||
|
@ -2678,6 +2684,8 @@ function get_server_info ($id_server = -1) {
|
|||
if (!empty ($result["module_lag"])) {
|
||||
$server["module_lag"] = $result["module_lag"];
|
||||
}
|
||||
|
||||
$server["load"] = (int) $server["modules"] / $modules_total * 100;
|
||||
}
|
||||
|
||||
//Push the raw data on the return stack
|
||||
|
|
|
@ -326,7 +326,7 @@ function print_input_hidden ($name, $value, $return = false) {
|
|||
* @param string $label Input label.
|
||||
* @param string $name Input name.
|
||||
* @param bool $disabled Whether to disable by default or not. Enabled by default.
|
||||
* @param string $attributes Additional HTML attributes.
|
||||
* @param array $attributes Additional HTML attributes.
|
||||
* @param bool $return Whether to return an output string or echo now (optional, echo by default).
|
||||
*
|
||||
* @return string HTML code if return parameter is true.
|
||||
|
@ -334,7 +334,15 @@ function print_input_hidden ($name, $value, $return = false) {
|
|||
function print_submit_button ($label = 'OK', $name = '', $disabled = false, $attributes = '', $return = false) {
|
||||
if (!$name) {
|
||||
$name="unnamed";
|
||||
}
|
||||
}
|
||||
|
||||
if (is_array ($attributes)) {
|
||||
$attr_array = $attributes;
|
||||
$attributes = '';
|
||||
foreach ($attr_array as $attribute => $value) {
|
||||
$attributes .= $attribute.'="'.$value.'" ';
|
||||
}
|
||||
}
|
||||
|
||||
$output = '<input type="submit" id="submit-'.$name.'" name="'.$name.'" value="'. $label .'" '. $attributes;
|
||||
if ($disabled)
|
||||
|
|
|
@ -43,22 +43,22 @@ function get_incidents_priorities () {
|
|||
function print_incidents_priority_img ($id_priority, $return = false) {
|
||||
switch ($id_priority) {
|
||||
case 0:
|
||||
$img = '<img src="images/dot_green.png" /><img src="images/dot_green.png" /><img src="images/dot_yellow.png" />';
|
||||
$img = print_image ("images/dot_green.png", true).print_image ("images/dot_green.png", true).print_image ("images/dot_yellow.png", true);
|
||||
break;
|
||||
case 1:
|
||||
$img = '<img src="images/dot_green.png" /><img src="images/dot_yellow.png" /><img src="images/dot_yellow.png" />';
|
||||
$img = print_image ("images/dot_green.png", true).print_image ("images/dot_yellow.png", true).print_image ("images/dot_yellow.png", true);
|
||||
break;
|
||||
case 2:
|
||||
$img = '<img src="images/dot_yellow.png" /><img src="images/dot_yellow.png" /><img src="images/dot_red.png" />';
|
||||
$img = print_image ("images/dot_yellow.png", true).print_image ("images/dot_yellow.png", true).print_image ("images/dot_red.png", true);
|
||||
break;
|
||||
case 3:
|
||||
$img = '<img src="images/dot_yellow.png" /><img src="images/dot_red.png" /><img src="images/dot_red.png" />';
|
||||
$img = print_image ("images/dot_yellow.png", true).print_image ("images/dot_red.png", true).print_image ("images/dot_red.png", true);
|
||||
break;
|
||||
case 4:
|
||||
$img = '<img src="images/dot_red.png" /><img src="images/dot_red.png" /><img src="images/dot_red.png" />';
|
||||
$img = print_image ("images/dot_red.png", true).print_image ("images/dot_red.png", true).print_image ("images/dot_red.png", true);
|
||||
break;
|
||||
case 10:
|
||||
$img = '<img src="images/dot_green.png" /><img src="images/dot_green.png" /><img src="images/dot_green.png" />';
|
||||
$img = print_image ("images/dot_green.png", true).print_image ("images/dot_green.png", true).print_image ("images/dot_green.png", true);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -95,19 +95,19 @@ function get_incidents_status () {
|
|||
function print_incidents_status_img ($id_status, $return = false) {
|
||||
switch ($id_status) {
|
||||
case 0:
|
||||
$img = '<img src="images/dot_red.png" />';
|
||||
$img = print_image ("images/dot_red.png", true);
|
||||
break;
|
||||
case 1:
|
||||
$img = '<img src="images/dot_yellow.png" />';
|
||||
$img = print_image ("images/dot_yellow.png", true);
|
||||
break;
|
||||
case 2:
|
||||
$img = '<img src="images/dot_blue.png" />';
|
||||
$img = print_image ("images/dot_blue.png", true);
|
||||
break;
|
||||
case 3:
|
||||
$img = '<img src="images/dot_green.png" />';
|
||||
$img = print_image ("images/dot_green.png", true);
|
||||
break;
|
||||
case 13:
|
||||
$img = '<img src="images/dot_white.png" />';
|
||||
$img = print_image ("images/dot_white.png", true);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -82,6 +82,12 @@ function print_timestamp ($unixtime, $return = false, $option = array ()) {
|
|||
$tag = "span";
|
||||
}
|
||||
|
||||
if (empty ($option["style"])) {
|
||||
$style = 'style="white-space:nowrap;"';
|
||||
} else {
|
||||
$style = 'style="'.$option["style"].'"';
|
||||
}
|
||||
|
||||
if (!empty ($option["prominent"])) {
|
||||
$prominent = $option["prominent"];
|
||||
} else {
|
||||
|
@ -94,8 +100,8 @@ function print_timestamp ($unixtime, $return = false, $option = array ()) {
|
|||
|
||||
//prominent_time is either timestamp or comparation
|
||||
if ($unixtime == 0) {
|
||||
$title = __('Never');
|
||||
$data = __('Never');
|
||||
$title = __('Unknown').'/'.__('Never');
|
||||
$data = __('Unknown');
|
||||
} elseif ($prominent == "timestamp") {
|
||||
$title = human_time_comparation ($unixtime);
|
||||
$data = date ($config["date_format"], $unixtime);
|
||||
|
@ -113,7 +119,7 @@ function print_timestamp ($unixtime, $return = false, $option = array ()) {
|
|||
case "h2":
|
||||
case "h3":
|
||||
//Above tags don't have title attributes
|
||||
$output .= ' '.$attributes.'>'.$data.'</'.$tag.'>';
|
||||
$output .= ' '.$attributes.' '.$style.'>'.$data.'</'.$tag.'>';
|
||||
}
|
||||
|
||||
if ($return)
|
||||
|
|
|
@ -167,10 +167,9 @@ if (empty ($result)) {
|
|||
}
|
||||
|
||||
echo '<h2>'.__('Incident management').' > '.__('Manage incidents').'</h2>
|
||||
<form name="visualizacion" method="POST" action="index.php?sec=incidencias&sec2=operation/incidents/incident">
|
||||
<table class="databox" cellpadding="4" cellspacing="4" width="700px"><tr>
|
||||
<td valign="middle">
|
||||
<h3>'.__('Filter').'</h3>';
|
||||
<form name="visualizacion" method="post" action="index.php?sec=incidencias&sec2=operation/incidents/incident">
|
||||
<table class="databox" cellpadding="4" cellspacing="4" width="95%"><tr>
|
||||
<td valign="middle"><h3>'.__('Filter').'</h3>';
|
||||
|
||||
$fields = get_incidents_status ();
|
||||
$fields[-1] = __('All incidents');
|
||||
|
@ -179,7 +178,7 @@ print_select ($fields, "estado", $estado, 'javascript:this.form.submit();', '',
|
|||
|
||||
//Legend
|
||||
echo '</td><td valign="middle"><noscript>';
|
||||
print_submit_button (__('Show'), 'submit-estado', false, 'class="sub" border="0"');
|
||||
print_submit_button (__('Show'), 'submit-estado', false, array ("class" => "sub"));
|
||||
|
||||
echo '</noscript></td><td rowspan="5" class="f9" style="padding-left: 30px; vertical-align: top;"><h3>'.__('Status').'</h3>';
|
||||
foreach (get_incidents_status () as $id => $str) {
|
||||
|
@ -201,13 +200,13 @@ $fields[-1] = __('All priorities');
|
|||
print_select ($fields, "prioridad", $prioridad, 'javascript:this.form.submit();', '','',false,false,false,'w155');
|
||||
|
||||
echo '</td><td valign="middle"><noscript>';
|
||||
print_submit_button (__('Show'), 'submit-prioridad', false, 'class="sub" border="0"');
|
||||
print_submit_button (__('Show'), 'submit-prioridad', false, array ("class" => "sub"));
|
||||
echo '</noscript></td></tr><tr><td>';
|
||||
|
||||
print_select ($groups, "grupo", $grupo, 'javascript:this.form.submit();','','',false,false,false,'w155');
|
||||
|
||||
echo '</td><td valign="middle"><noscript>';
|
||||
print_submit_button (__('Show'), 'submit-grupo', false, 'class="sub" border="0"');
|
||||
print_submit_button (__('Show'), 'submit-grupo', false, array ("class" => "sub"));
|
||||
echo '</noscript>';
|
||||
|
||||
// Pass search parameters for possible future filter searching by user
|
||||
|
@ -220,21 +219,21 @@ if ($count < 1) {
|
|||
echo '<div class="nf">'.__('No incidents match your search filter').'</div><br />';
|
||||
} else {
|
||||
// TOTAL incidents
|
||||
$url = "index.php?sec=incidencias&sec2=operation/incidents/incident";
|
||||
$url = "index.php?sec=incidencias&sec2=operation/incidents/incident";
|
||||
|
||||
$estado = -1;
|
||||
|
||||
// add form filter values for group, priority, state, and search fields: user and text
|
||||
if ($grupo != -1)
|
||||
$url .= "&grupo=".$grupo;
|
||||
$url .= "&grupo=".$grupo;
|
||||
if ($prioridad != -1)
|
||||
$url .= "&prioridad=".$prioridad;
|
||||
$url .= "&prioridad=".$prioridad;
|
||||
if ($estado != -1)
|
||||
$url .= "&estado=".$estado;
|
||||
$url .= "&estado=".$estado;
|
||||
if ($usuario != '')
|
||||
$url .= "&usuario=".$usuario;
|
||||
$url .= "&usuario=".$usuario;
|
||||
if ($texto != '')
|
||||
$url .= "&texto=".$texto;
|
||||
$url .= "&texto=".$texto;
|
||||
|
||||
// Show pagination
|
||||
pagination ($count, $url, $offset);
|
||||
|
@ -271,15 +270,15 @@ if ($count < 1) {
|
|||
foreach ($result as $row) {
|
||||
$data = array();
|
||||
|
||||
$data[0] = '<a href="index.php?sec=incidencias&sec2=operation/incidents/incident_detail&id='.$row["id_incidencia"].'">'.$row["id_incidencia"].'</a>';
|
||||
$data[0] = '<a href="index.php?sec=incidencias&sec2=operation/incidents/incident_detail&id='.$row["id_incidencia"].'">'.$row["id_incidencia"].'</a>';
|
||||
$attach = get_incidents_attach ($row["id_incidencia"]);
|
||||
|
||||
if (!empty ($attach))
|
||||
$data[0] .= ' <img src="images/file.png" align="middle" />';
|
||||
$data[0] .= ' '.print_image ("images/file.png", true, array ("style" => "align:middle;"));
|
||||
|
||||
$data[1] = print_incidents_status_img ($row["estado"], true);
|
||||
|
||||
$data[2] = '<a href="index.php?sec=incidencias&sec2=operation/incidents/incident_detail&id='.$row["id_incidencia"].'">'.safe_input (substr ($row["titulo"],0,45)).'</a>';
|
||||
$data[2] = '<a href="index.php?sec=incidencias&sec2=operation/incidents/incident_detail&id='.$row["id_incidencia"].'">'.safe_input (substr ($row["titulo"],0,45)).'</a>';
|
||||
|
||||
$data[3] = print_incidents_priority_img ($row["prioridad"], true);
|
||||
|
||||
|
@ -300,7 +299,7 @@ if ($count < 1) {
|
|||
array_push ($table->data, $data);
|
||||
}
|
||||
|
||||
echo '<form method="post" action="'.$url.'&action=mass" style="margin-bottom: 0px;">';
|
||||
echo '<form method="post" action="'.$url.'&action=mass" style="margin-bottom: 0px;">';
|
||||
print_table ($table);
|
||||
if (give_acl ($config["id_user"], 0, "IM")) {
|
||||
echo '<div style="text-align:right; float:right; padding-right: 30px;">';
|
||||
|
@ -314,7 +313,7 @@ if ($count < 1) {
|
|||
|
||||
if (give_acl ($config["id_user"], 0, "IW")) {
|
||||
echo '<div style="text-align:right; float:right; padding-right: 30px;">';
|
||||
echo '<form method="post" action="index.php?sec=incidencias&sec2=operation/incidents/incident_detail&insert_form=1">';
|
||||
echo '<form method="post" action="index.php?sec=incidencias&sec2=operation/incidents/incident_detail&insert_form=1">';
|
||||
print_submit_button (__('Create incident'), 'crt', false, 'class="sub next"');
|
||||
echo '</form>';
|
||||
echo '</div>';
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
// Load global vars
|
||||
require("include/config.php");
|
||||
require_once ("include/config.php");
|
||||
|
||||
check_login ();
|
||||
|
||||
|
@ -33,98 +33,92 @@ $total_modules_network = 0;
|
|||
$total_modules_data = 0;
|
||||
|
||||
|
||||
echo "<h2>".__('Pandora servers')." > ";
|
||||
echo __('Configuration detail')."</h2>";
|
||||
echo "<h2>".__('Pandora servers')." > ".__('Configuration detail')."</h2>";
|
||||
|
||||
$total_modules = (int) get_db_sql ("SELECT COUNT(*)
|
||||
FROM tagente_modulo
|
||||
WHERE tagente_modulo.disabled = 0");
|
||||
$servers = get_db_all_rows_in_table ('tserver');
|
||||
if (sizeof ($servers) == 0)
|
||||
return;
|
||||
|
||||
$servers = get_server_info ();
|
||||
|
||||
$table->width = '98%';
|
||||
$table->size = array ();
|
||||
$table->size[6] = '60';
|
||||
|
||||
$table->align = array ();
|
||||
$table->align[1] = 'center';
|
||||
$table->align[6] = 'center';
|
||||
|
||||
$table->head = array ();
|
||||
$table->head[0] = __('Name');
|
||||
$table->head[1] = __('Status');
|
||||
$table->head[2] = __('Load');
|
||||
$table->head[3] = __('Modules');
|
||||
$table->head[4] = __('LAG');
|
||||
$table->head[4] = __('Lag');
|
||||
$table->head[5] = __('Type');
|
||||
$table->head[6] = __('Version');
|
||||
// This will have a column of data such as "6 hours"
|
||||
$table->head[7] = __('Updated');
|
||||
$table->data = array ();
|
||||
|
||||
if (!$servers){
|
||||
echo "<div class='nf'>".__('There are no servers configured into the database')."</div>";
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($servers as $server) {
|
||||
$data = array ();
|
||||
$serverinfo = server_status ($server['id_server']);
|
||||
if ($server["recon_server"]==1)
|
||||
$data[0] = "<b><a href='index.php?sec=estado_server&sec2=operation/servers/view_server_detail&server_id=".$server["id_server"]."'>".$server['name']."</A></b>";
|
||||
else
|
||||
$data[0] = "<b>".$server['name']."</b>";
|
||||
|
||||
if ($server['status'] == 0){
|
||||
$data[1] = '<img src="images/pixel_red.png" width="20" height="20">';
|
||||
if ($server["recon_server"] == 1) {
|
||||
$data[0] = '<b><a href="index.php?sec=estado_server&sec2=operation/servers/view_server_detail&server_id='.$server["id_server"].'">'.$server["name"].'</a></b>';
|
||||
} else {
|
||||
$data[1] = '<img src="images/pixel_green.png" width="20" height="20">';
|
||||
$data[0] = "<b>".$server['name']."</b>";
|
||||
}
|
||||
|
||||
if ($server['status'] == 0) {
|
||||
$data[1] = print_image ("images/pixel_red.png", true, array ("width" => 20, "height" => 20));
|
||||
} else {
|
||||
$data[1] = print_image ("images/pixel_green.png", true, array ("width" => 20, "height" => 20));
|
||||
}
|
||||
|
||||
// Load
|
||||
if ($total_modules > 0)
|
||||
$load_percent = $serverinfo["modules"] / ($total_modules / 100);
|
||||
else
|
||||
$load_percent = 0;
|
||||
if ($load_percent > 100)
|
||||
$load_percent = 100;
|
||||
$data[2] = '<img src="reporting/fgraph.php?tipo=progress&percent='.$load_percent.'&height=20&width=80">';
|
||||
$data[3] = $serverinfo["modules"] . " ".__('of')." ". $total_modules;
|
||||
$data[4] = human_time_description_raw ($serverinfo["lag"]) . " / ". $serverinfo["module_lag"];
|
||||
$data[5] = '';
|
||||
$data[2] = print_image ("reporting/fgraph.php?tipo=progress&percent=".$server["load"]."&height=20&width=80", true);
|
||||
$data[3] = $server["modules"] . " ".__('of')." ". $server["modules_total"];
|
||||
$data[4] = '<span style="white-space:nowrap;">'.human_time_description_raw ($server["lag"]) . " / ". $server["module_lag"].'</span>';
|
||||
$data[5] = '<span style="white-space:nowrap;">';
|
||||
if ($server['network_server'] == 1) {
|
||||
$data[5] .= ' <img src="images/network.png" title="'.__('Network Server').'">';
|
||||
$data[5] .= print_image ("images/network.png", true, array ("title" => __('Network Server')));
|
||||
}
|
||||
if ($server['data_server'] == 1) {
|
||||
$data[5] .= ' <img src="images/data.png" title="'.__('Data Server').'">';
|
||||
$data[5] .= print_image ("images/data.png", true, array ("title" => __('Data Server')));
|
||||
}
|
||||
if ($server['snmp_server'] == 1) {
|
||||
$data[5] .= ' <img src="images/snmp.png" title="'.__('SNMP server').'">';
|
||||
$data[5] .= print_image ("images/snmp.png", true, array ("title" => __('SNMP Server')));
|
||||
}
|
||||
if ($server['recon_server'] == 1) {
|
||||
$data[5] .= ' <img src="images/recon.png" title="'.__('Recon Server').'">';
|
||||
$data[5] .= print_image ("images/recon.png", true, array ("title" => __('Recon Server')));
|
||||
}
|
||||
if ($server['export_server'] == 1) {
|
||||
$data[5] .= ' <img src="images/database_refresh.png" title="'.__('Export server').'">';
|
||||
$data[5] .= print_image ("images/database_refresh.png", true, array ("title" => __('Export Server')));
|
||||
}
|
||||
if ($server['wmi_server'] == 1) {
|
||||
$data[5] .= ' <img src="images/wmi.png" title="'.__('WMI Server').'">';
|
||||
$data[5] .= print_image ("images/wmi.png", true, array ("title" => __('WMI Server')));
|
||||
}
|
||||
if ($server['prediction_server'] == 1) {
|
||||
$data[5] .= ' <img src="images/chart_bar.png" title="'.__('Prediction Server').'">';
|
||||
$data[5] .= print_image ("images/chart_bar.png", true, array ("title" => __('Prediction Server')));
|
||||
}
|
||||
if ($server['plugin_server'] == 1) {
|
||||
$data[5] .= ' <img src="images/plugin.png" title="'.__('Plugin Server').'">';
|
||||
$data[5] .= print_image ("images/plugin.png", true, array ("title" => __('Plugin Server')));
|
||||
}
|
||||
if ($server['master'] == 1) {
|
||||
$data[5] .= ' <img src="images/master.png" title="'.__('Master server').'">';
|
||||
$data[5] .= print_image ("images/master.png", true, array ("title" => __('Master Server')));
|
||||
}
|
||||
if ($server['checksum'] == 1){
|
||||
$data[5] .= ' <img src="images/binary.png" title="'.__('MD5 check').'">';
|
||||
$data[5] .= print_image ("images/binary.png", true, array ("title" => __('MD5 Check')));
|
||||
}
|
||||
$data[5] .= '</span>';
|
||||
$data[6] = $server['version'];
|
||||
$data[7] = human_time_comparation ($server['keepalive']) . "</td>";
|
||||
$data[7] = print_timestamp ($server['keepalive'], true);
|
||||
|
||||
array_push ($table->data, $data);
|
||||
}
|
||||
|
||||
print_table ($table);
|
||||
?>
|
||||
if (!empty ($table->data)) {
|
||||
print_table ($table);
|
||||
} else {
|
||||
echo "<div class='nf'>".__('There are no servers configured into the database')."</div>";
|
||||
}
|
||||
?>
|
Loading…
Reference in New Issue