2012-06-14 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_reporting.php, include/functions_groups.php, include/functions_visual_map.php, include/ajax/reporting.ajax.php, include/functions_ui.php, extensions/agents_modules.php, extensions/module_groups.php, operation/incidents/incident.php, operation/incidents/incident_detail.php, operation/agentes/status_monitor.php, operation/agentes/estado_ultimopaquete.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/snmpconsole/snmp_view.php. operation/integria_incidents/incident.incident.php, mobile/operation/agents/monitor_status.php, mobile/operation/agents/view_agents.php, mobile/operation/agents/view_alerts.php, mobile/operation/events/events.php, godmode/groups/modu_group_list.php, godmode/groups/group_list.php, godmode/agentes/module_manager.php, godmode/agentes/modificar_agente.php, godmode/agentes/configurar_agente.php, godmode/alerts/alert_list.list.php, godmode/setup/os.list.php, godmode/users/configure_user.php, godmode/modules/manage_network_templates.php, godmode/reporting/reporting_builder.list_items.php, godmode/tag/tag.php: changed the calls of "ui_print_truncate_text" now we are trying that more easy and standar, now the string name of agent have the equal number of characters in all code...but there are two styles, small and medium size for agents text name, modules text name, but description is only size. You can set this sizes in the visual setup page into your Pandora. MERGED from 4.0.2 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6554 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
85086ef5cd
commit
45641e2d38
|
@ -1,3 +1,38 @@
|
|||
2012-06-14 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_html.php, include/functions_reporting.php,
|
||||
include/functions_groups.php, include/functions_visual_map.php,
|
||||
include/ajax/reporting.ajax.php, include/functions_ui.php,
|
||||
extensions/agents_modules.php, extensions/module_groups.php,
|
||||
operation/incidents/incident.php,
|
||||
operation/incidents/incident_detail.php,
|
||||
operation/agentes/status_monitor.php,
|
||||
operation/agentes/estado_ultimopaquete.php,
|
||||
operation/agentes/estado_agente.php,
|
||||
operation/agentes/ver_agente.php,
|
||||
operation/snmpconsole/snmp_view.php.
|
||||
operation/integria_incidents/incident.incident.php,
|
||||
mobile/operation/agents/monitor_status.php,
|
||||
mobile/operation/agents/view_agents.php,
|
||||
mobile/operation/agents/view_alerts.php,
|
||||
mobile/operation/events/events.php,
|
||||
godmode/groups/modu_group_list.php, godmode/groups/group_list.php,
|
||||
godmode/agentes/module_manager.php,
|
||||
godmode/agentes/modificar_agente.php,
|
||||
godmode/agentes/configurar_agente.php,
|
||||
godmode/alerts/alert_list.list.php, godmode/setup/os.list.php,
|
||||
godmode/users/configure_user.php,
|
||||
godmode/modules/manage_network_templates.php,
|
||||
godmode/reporting/reporting_builder.list_items.php,
|
||||
godmode/tag/tag.php: changed the calls of "ui_print_truncate_text"
|
||||
now we are trying that more easy and standar, now the string name of
|
||||
agent have the equal number of characters in all code...but there
|
||||
are two styles, small and medium size for agents text name, modules
|
||||
text name, but description is only size. You can set this sizes in
|
||||
the visual setup page into your Pandora.
|
||||
|
||||
MERGED from 4.0.2
|
||||
|
||||
2012-06-14 Vanessa Gil <vanessa.gil@artica.es>
|
||||
|
||||
* include/functions_agents.php
|
||||
|
|
|
@ -222,7 +222,7 @@ function mainAgentsModules() {
|
|||
|
||||
echo "<td class='$rowcolor'>
|
||||
<a class='$rowcolor' href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=".$agent['id_agente']."'>" .
|
||||
ui_print_truncate_text(io_safe_output($agent['nombre']), 35, true, true, true, '...', 'font-size:10px; font-weight: bold;') .
|
||||
ui_print_truncate_text(io_safe_output($agent['nombre']), 'agent_size_text_small', true, true, true, '...', 'font-size:10px; font-weight: bold;') .
|
||||
"</a></td>";
|
||||
$agent_modules = agents_get_modules($agent['id_agente']);
|
||||
|
||||
|
|
|
@ -147,7 +147,7 @@ function mainModuleGroups() {
|
|||
array_walk($modelGroups, 'translate'); //Translate all head titles to language is set
|
||||
|
||||
foreach ($modelGroups as $i => $n) {
|
||||
$modelGroups[$i] = ui_print_truncate_text($n, 20);
|
||||
$modelGroups[$i] = ui_print_truncate_text($n, GENERIC_SIZE_TEXT);
|
||||
}
|
||||
|
||||
$head = $modelGroups;
|
||||
|
@ -170,7 +170,7 @@ function mainModuleGroups() {
|
|||
|
||||
$row = array();
|
||||
|
||||
array_push($row, ui_print_truncate_text($name, 20));
|
||||
array_push($row, ui_print_truncate_text($name, GENERIC_SIZE_TEXT));
|
||||
|
||||
foreach ($modelGroups as $idModelGroup => $modelGroup) {
|
||||
$query = sprintf($sql,$idAgentGroup, $idModelGroup);
|
||||
|
|
|
@ -381,17 +381,16 @@ if ($id_agente) {
|
|||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
}
|
||||
|
||||
ui_print_page_header (__('Agent configuration') . ' - ' . ui_print_truncate_text(agents_get_name ($id_agente), 25, false) . ' ' . $tab_description, "images/setup.png", false, "", true, $onheader);
|
||||
break;
|
||||
}
|
||||
|
||||
ui_print_page_header (__('Agent configuration') . ' - ' .
|
||||
ui_print_truncate_text(agents_get_name ($id_agente), 'agent_small', false) .
|
||||
' ' . $tab_description, "images/setup.png", false, "", true, $onheader);
|
||||
}
|
||||
// Create agent
|
||||
else {
|
||||
|
||||
// Create agent
|
||||
ui_print_page_header (__('Agent manager'), "images/bricks.png", false, "create_agent", true);
|
||||
|
||||
}
|
||||
|
||||
$delete_conf_file = (bool) get_parameter('delete_conf_file');
|
||||
|
|
|
@ -401,8 +401,10 @@ if ($agents !== false) {
|
|||
}
|
||||
echo '<span class="left">';
|
||||
echo "<strong><a href='index.php?sec=gagente&
|
||||
sec2=godmode/agentes/configurar_agente&tab=main&
|
||||
id_agente=".$agent["id_agente"]."'>" . ui_print_truncate_text($agent["nombre"], 60, true, true, true, '[…]', 'font-size: 7pt')."</a></strong>";
|
||||
sec2=godmode/agentes/configurar_agente&tab=main&
|
||||
id_agente=" . $agent["id_agente"] . "'>" .
|
||||
ui_print_truncate_text($agent["nombre"], 'agent_medium', true, true, true, '[…]', 'font-size: 7pt') .
|
||||
"</a></strong>";
|
||||
if ($agent["disabled"]) {
|
||||
ui_print_help_tip(__('Disabled'));
|
||||
echo "</em>";
|
||||
|
@ -426,7 +428,7 @@ if ($agents !== false) {
|
|||
|
||||
echo '</div>';
|
||||
echo "</td>";
|
||||
|
||||
|
||||
echo "<td align='center' class='$tdcolor'>";
|
||||
// Has remote configuration ?
|
||||
$agent_md5 = md5 ($agent["nombre"], false);
|
||||
|
@ -436,8 +438,8 @@ if ($agents !== false) {
|
|||
echo "</a>";
|
||||
}
|
||||
echo "</td>";
|
||||
|
||||
|
||||
|
||||
|
||||
// Operating System icon
|
||||
echo "<td class='$tdcolor' align='center' valign='middle'>";
|
||||
ui_print_os_icon ($agent["id_os"], false);
|
||||
|
@ -445,7 +447,8 @@ if ($agents !== false) {
|
|||
// Group icon and name
|
||||
echo "<td class='$tdcolor' align='center' valign='middle'>" . ui_print_group_icon ($id_grupo, true)."</td>";
|
||||
// Description
|
||||
echo "<td class='".$tdcolor."f9'>". ui_print_truncate_text($agent["comentarios"], 65, true, true, true, '[…]', 'font-size: 6.5pt;')."</td>";
|
||||
echo "<td class='".$tdcolor."f9'>" .
|
||||
ui_print_truncate_text($agent["comentarios"], 'description', true, true, true, '[…]', 'font-size: 6.5pt;')."</td>";
|
||||
// Action
|
||||
//When there is only one element in page it's necesary go back page.
|
||||
if ((count($agents) == 1) && ($offset >= $config["block_size"]))
|
||||
|
@ -483,7 +486,7 @@ $(document).ready (function () {
|
|||
function () {
|
||||
$(".actions", this).css ("visibility", "hidden");
|
||||
});
|
||||
|
||||
|
||||
$("#ag_group").click (
|
||||
function () {
|
||||
$(this).css ("width", "auto");
|
||||
|
|
|
@ -459,12 +459,13 @@ foreach ($modules as $module) {
|
|||
|
||||
$data = array ();
|
||||
}
|
||||
|
||||
$data[0] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&edit_module=1&id_agent_module='.$module['id_agente_modulo'].'">';
|
||||
|
||||
$data[0] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente=' . $id_agente . '&tab=module&edit_module=1&id_agent_module='.$module['id_agente_modulo'].'">';
|
||||
if ($module["disabled"])
|
||||
$data[0] .= '<em class="disabled_module">' . ui_print_truncate_text($module['nombre'], 50, false, true, true, '[…]', 'font-size: 7.2pt').'</em>';
|
||||
$data[0] .= '<em class="disabled_module">' .
|
||||
ui_print_truncate_text($module['nombre'], 'module_medium', false, true, true, '[…]', 'font-size: 7.2pt').'</em>';
|
||||
else
|
||||
$data[0] .= ui_print_truncate_text($module['nombre'], 50, false, true, true, '[…]', 'font-size: 7.2pt');
|
||||
$data[0] .= ui_print_truncate_text($module['nombre'], 'module_medium', false, true, true, '[…]', 'font-size: 7.2pt');
|
||||
$data[0] .= '</a>';
|
||||
|
||||
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
|
||||
|
@ -522,25 +523,26 @@ foreach ($modules as $module) {
|
|||
if ($type) {
|
||||
$data[3] = ui_print_moduletype_icon ($type, true);
|
||||
}
|
||||
|
||||
|
||||
// Module interval
|
||||
if ($module['module_interval']) {
|
||||
$data[4] = $module['module_interval'];
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$data[4] = $agent_interval;
|
||||
}
|
||||
|
||||
$data[5] = ui_print_truncate_text($module['descripcion'], 50, false);
|
||||
$data[5] = ui_print_truncate_text($module['descripcion'], 'description', false);
|
||||
|
||||
$module_status = db_get_row('tagente_estado', 'id_agente_modulo', $module['id_agente_modulo']);
|
||||
|
||||
modules_get_status($module['id_agente_modulo'], $module_status['estado'], $module_status['datos'], $status, $title);
|
||||
|
||||
|
||||
$data[6] = ui_print_status_image($status, $title, true);
|
||||
|
||||
// MAX / MIN values
|
||||
$data[7] = ui_print_module_warn_value ($module["max_warning"], $module["min_warning"], $module["str_warning"], $module["max_critical"], $module["min_critical"], $module["str_critical"]);
|
||||
|
||||
|
||||
// Delete module
|
||||
$data[8] = html_print_checkbox('id_delete[]', $module['id_agente_modulo'], false, true);
|
||||
$data[8] .= ' <a href="index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&delete_module='.$module['id_agente_modulo'].'"
|
||||
|
@ -555,7 +557,7 @@ foreach ($modules as $module) {
|
|||
$data[8] .= '</a> ';
|
||||
|
||||
// Make a data normalization
|
||||
|
||||
|
||||
if (isset($numericModules[$type])) {
|
||||
if ($numericModules[$type] === true) {
|
||||
$data[8] .= ' <a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&fix_module='.$module['id_agente_modulo'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
||||
|
@ -564,7 +566,7 @@ foreach ($modules as $module) {
|
|||
$data[8] .= '</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
array_push ($table->data, $data);
|
||||
}
|
||||
|
||||
|
|
|
@ -77,7 +77,6 @@ if ($groups_user === false) {
|
|||
}
|
||||
$groups_id = implode(',', array_keys($groups_user));
|
||||
|
||||
|
||||
$form_filter .= "<tr>\n";
|
||||
switch ($config["dbtype"]) {
|
||||
case "mysql":
|
||||
|
@ -398,25 +397,26 @@ foreach ($simple_alerts as $alert) {
|
|||
$data[0] .= '</span>';
|
||||
$data[0] .= '</a>';
|
||||
}
|
||||
$data[1] = ui_print_truncate_text(modules_get_agentmodule_name ($alert['id_agent_module']), 35, false, true, true, '[…]', 'font-size: 7.2pt');
|
||||
|
||||
$data[1] = ui_print_truncate_text(
|
||||
modules_get_agentmodule_name ($alert['id_agent_module']), 'module_small', false, true, true, '[…]', 'font-size: 7.2pt');
|
||||
|
||||
$data[2] = ' <a class="template_details"
|
||||
href="ajax.php?page=godmode/alerts/alert_templates&get_template_tooltip=1&id_template='.$alert['id_alert_template'].'">' .
|
||||
html_print_image("images/zoom.png", true, array("id" => 'template-details-'.$alert['id_alert_template'], "class" => "img_help")) . '</a> ';
|
||||
$data[2] .= "<a href='index.php?sec=galertas&sec2=godmode/alerts/configure_alert_template&id=".$alert['id_alert_template']."'>";
|
||||
$data[2] .= ui_print_truncate_text(alerts_get_alert_template_name ($alert['id_alert_template']), 55, false, true, true, '[…]', 'font-size: 7.1pt');
|
||||
$data[2] .= ui_print_truncate_text(
|
||||
alerts_get_alert_template_name ($alert['id_alert_template']), GENERIC_SIZE_TEXT, false, true, true, '[…]', 'font-size: 7.1pt');
|
||||
$data[2] .= "</a>";
|
||||
|
||||
|
||||
$actions = alerts_get_alert_agent_module_actions ($alert['id']);
|
||||
|
||||
|
||||
$data[3] = '';
|
||||
if (empty($actions)){
|
||||
if (empty($actions)) {
|
||||
// Get and show default actions for this alert
|
||||
$default_action = db_get_sql ("SELECT id_alert_action FROM talert_templates WHERE id = ".$alert["id_alert_template"]);
|
||||
if ($default_action != ""){
|
||||
$data[3] = __("Default"). " : ".db_get_sql ("SELECT name FROM talert_actions WHERE id = $default_action");
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
$data[3] = '<ul class="action_list">';
|
||||
|
@ -426,7 +426,7 @@ foreach ($simple_alerts as $alert) {
|
|||
$data[3] .= '<font class="action_name" style="font-style: italic; color: #aaaaaa;">';
|
||||
else
|
||||
$data[3] .= '<font class="action_name">';
|
||||
$data[3] .= ui_print_truncate_text($action['name'], 15, false);
|
||||
$data[3] .= ui_print_truncate_text($action['name'], GENERIC_SIZE_TEXT, false);
|
||||
$data[3] .= ' <em>(';
|
||||
if ($action['fires_min'] == $action['fires_max']) {
|
||||
if ($action['fires_min'] == 0)
|
||||
|
@ -443,22 +443,20 @@ foreach ($simple_alerts as $alert) {
|
|||
}
|
||||
if ($action['module_action_threshold'] != 0)
|
||||
$data[3] .= ' '.__('Threshold').' '.$action['module_action_threshold'];
|
||||
|
||||
|
||||
$data[3] .= ')</em>';
|
||||
$data[3] .= '</font>';
|
||||
// $data[6] .= ' <span class="delete" style="clear:right">';
|
||||
$data[3] .= '<form method="post" class="delete_link" style="display: inline; vertical-align: -50%;">';
|
||||
$data[3] .= html_print_input_image ('delete', 'images/cross.png', 1, '', true, array('title' => __('Delete')));
|
||||
$data[3] .= html_print_input_hidden ('delete_action', 1, true);
|
||||
$data[3] .= html_print_input_hidden ('id_alert', $alert['id'], true);
|
||||
$data[3] .= html_print_input_hidden ('id_action', $action_id, true);
|
||||
$data[3] .= '</form>';
|
||||
// $data[3] .= '</span>';
|
||||
$data[3] .= '</li>';
|
||||
}
|
||||
$data[3] .= '</ul>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
$data[3] .= '<a class="add_action" id="add-action-'.$alert['id'].'" href="#">';
|
||||
$data[3] .= html_print_image ('images/add.png', true);
|
||||
|
|
|
@ -321,7 +321,7 @@ if(!empty($groups)) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$tabulation = str_repeat(' ', $group['deep']);
|
||||
|
||||
if ($group['id_grupo'] == 0) {
|
||||
|
@ -333,10 +333,13 @@ if(!empty($groups)) {
|
|||
|
||||
if ($group['hash_branch']) {
|
||||
$data[0] = '<strong>'.$tabulation . ' ' .
|
||||
'<a href="javascript: showBranch(' . $group['id_grupo'] . ', ' . $group['parent'] . ');" title="' . __('Show branch children') . '"><span class="symbol_' . $group['id_grupo'] . ' ' . $symbolBranchs . '">' . $symbol . '</span> '. ui_print_truncate_text($group['nombre']).'</a></strong>';
|
||||
'<a href="javascript: showBranch(' . $group['id_grupo'] .
|
||||
', ' . $group['parent'] . ');" title="' . __('Show branch children') .
|
||||
'"><span class="symbol_' . $group['id_grupo'] . ' ' . $symbolBranchs . '">' .
|
||||
$symbol . '</span> '. ui_print_truncate_text($group['nombre']) . '</a></strong>';
|
||||
}
|
||||
else {
|
||||
$data[0] = '<strong>'.$tabulation . ' '. ui_print_truncate_text($group['nombre'], 60).'</strong>';
|
||||
$data[0] = '<strong>'.$tabulation . ' ' . ui_print_truncate_text($group['nombre']) . '</strong>';
|
||||
}
|
||||
$data[1] = $group['id_grupo'];
|
||||
$data[2] = ui_print_group_icon($group['id_grupo'], true);
|
||||
|
@ -345,7 +348,6 @@ if(!empty($groups)) {
|
|||
$data[4] = '';
|
||||
}
|
||||
else {
|
||||
|
||||
$data[4] = '<a href="index.php?sec=gagente&sec2=godmode/groups/configure_group&id_group='.$group['id_grupo'].'">' . html_print_image("images/config.png", true, array("alt" => __('Edit'), "title" => __('Edit'), "border" => '0'));
|
||||
//Check if there is only a group to unable delete it
|
||||
if ((count($groups) > 3) || (count($groups) <= 3 && $group['parent'] != 0)) {
|
||||
|
@ -356,7 +358,7 @@ if(!empty($groups)) {
|
|||
array_push ($table->data, $data);
|
||||
$iterator++;
|
||||
}
|
||||
|
||||
|
||||
html_print_table ($table);
|
||||
}
|
||||
else {
|
||||
|
@ -378,7 +380,7 @@ function showBranch(parent) {
|
|||
if (display != 'none') {
|
||||
$('.symbol_' + parent).html('+');
|
||||
$('.parent_' + parent).css('display', 'none');
|
||||
|
||||
|
||||
//Close the child branch too
|
||||
$('.branch_' + parent).css('display', 'none');
|
||||
$('.symbol_branch_' + parent).html('+');
|
||||
|
|
|
@ -151,23 +151,23 @@ switch ($config["dbtype"]) {
|
|||
LIMIT " . $config['block_size'] . " OFFSET " . $offset;
|
||||
break;
|
||||
case "oracle":
|
||||
$set = array ();
|
||||
$set['limit'] = $config["block_size"];
|
||||
$set['offset'] = $offset;
|
||||
|
||||
$sql = "SELECT *
|
||||
FROM tmodule_group
|
||||
ORDER BY name ASC";
|
||||
|
||||
$sql = oracle_recode_query ($sql, $set);
|
||||
break;
|
||||
$set = array ();
|
||||
$set['limit'] = $config["block_size"];
|
||||
$set['offset'] = $offset;
|
||||
|
||||
$sql = "SELECT *
|
||||
FROM tmodule_group
|
||||
ORDER BY name ASC";
|
||||
|
||||
$sql = oracle_recode_query ($sql, $set);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
$groups = db_get_all_rows_sql($sql);
|
||||
|
||||
$table->width = '98%';
|
||||
|
||||
if(!empty($groups)) {
|
||||
if (!empty($groups)) {
|
||||
$table->head = array ();
|
||||
$table->head[0] = __('ID');
|
||||
$table->head[1] = __('Name');
|
||||
|
@ -176,19 +176,20 @@ if(!empty($groups)) {
|
|||
$table->align[1] = 'left';
|
||||
$table->align[2] = 'center';
|
||||
$table->data = array ();
|
||||
|
||||
|
||||
foreach ($groups as $id_group ) {
|
||||
$data = array ();
|
||||
$data[0] = $id_group["id_mg"];
|
||||
$data[1] = '<strong><a href="index.php?sec=gagente&sec2=godmode/groups/configure_modu_group&id_group='.$id_group["id_mg"].'">' . ui_print_truncate_text($id_group["name"], 50).'</a></strong>';
|
||||
$data[1] = '<strong><a href="index.php?sec=gagente&sec2=godmode/groups/configure_modu_group&id_group=' . $id_group["id_mg"].'">' .
|
||||
ui_print_truncate_text($id_group["name"], GENERIC_SIZE_TEXT).'</a></strong>';
|
||||
$data[2] = '<a href="index.php?sec=gagente&sec2=godmode/groups/modu_group_list&id_group='.$id_group["id_mg"].'&delete_group=1" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">' . html_print_image("images/cross.png", true, array("border" => '0')) . '</a>';
|
||||
|
||||
array_push ($table->data, $data);
|
||||
}
|
||||
|
||||
|
||||
html_print_table ($table);
|
||||
}
|
||||
else{
|
||||
else {
|
||||
echo "<div class='nf'>".__('There are no defined module groups')."</div>";
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,8 @@ if ($delete_profile) { // if delete
|
|||
|
||||
if ($result) {
|
||||
db_pandora_audit("Module management", "Delete module template #$id");
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
db_pandora_audit("Module management", "Fail try to delete module template #$id");
|
||||
}
|
||||
|
||||
|
@ -73,7 +74,8 @@ if ($multiple_delete) {
|
|||
$str_ids = implode (',', $ids);
|
||||
if ($result) {
|
||||
db_pandora_audit("Module management", "Multiple delete module template: $str_ids");
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
db_pandora_audit("Module management", "Fail try to delete module template: $str_ids");
|
||||
}
|
||||
|
||||
|
@ -198,7 +200,7 @@ $table->data = array ();
|
|||
foreach ($result as $row) {
|
||||
$data = array ();
|
||||
$data[0] = '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates_form&id_np='.$row["id_np"].'">'. io_safe_output($row["name"]).'</a>';
|
||||
$data[1] = ui_print_truncate_text(io_safe_output($row["description"]), 80, true, true, true, '[…]');
|
||||
$data[1] = ui_print_truncate_text(io_safe_output($row["description"]), 'description', true, true, true, '[…]');
|
||||
$data[2] = html_print_input_image ("delete_profile", "images/cross.png",
|
||||
$row["id_np"],'', true,
|
||||
array ('onclick' => 'if (!confirm(\''.__('Are you sure?').'\')) return false;'));
|
||||
|
@ -222,7 +224,8 @@ if (!empty ($table->data)) {
|
|||
html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"');
|
||||
echo "</div>";
|
||||
echo "</form>";
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
echo '<div class="nf" style="width:'.$table->width.'">'.__('There are no defined network profiles').'</div>';
|
||||
}
|
||||
|
||||
|
|
|
@ -283,20 +283,20 @@ foreach ($items as $item) {
|
|||
$row[3] = '';
|
||||
}
|
||||
else {
|
||||
$row[2] = ui_print_truncate_text(agents_get_name(agents_get_agent_id_by_module_id($item['id_agent_module'])), 35);
|
||||
$row[2] = ui_print_truncate_text(agents_get_name(agents_get_agent_id_by_module_id($item['id_agent_module'])), 'agent_small');
|
||||
$module_name_db = db_get_value_filter('nombre', 'tagente_modulo', array('id_agente_modulo' => $item['id_agent_module']));
|
||||
$row[3] = ui_print_truncate_text(io_safe_output($module_name_db), 35);
|
||||
$row[3] = ui_print_truncate_text(io_safe_output($module_name_db), 'module_small');
|
||||
}
|
||||
}
|
||||
else {
|
||||
$row[2] = ui_print_truncate_text(agents_get_name($item['id_agent']), 35);
|
||||
$row[2] = ui_print_truncate_text(agents_get_name($item['id_agent']), 'agent_small');
|
||||
|
||||
if ($item['id_agent_module'] == '') {
|
||||
$row [3] = '';
|
||||
}
|
||||
else {
|
||||
$module_name_db = db_get_value_filter('nombre', 'tagente_modulo', array('id_agente_modulo' => $item['id_agent_module']))
|
||||
$row[3] = ui_print_truncate_text(io_safe_output($module_name_db),35);
|
||||
$row[3] = ui_print_truncate_text(io_safe_output($module_name_db), 'module_small');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -311,7 +311,7 @@ foreach ($items as $item) {
|
|||
$row[5] = '-';
|
||||
}
|
||||
else {
|
||||
$row[5] = ui_print_truncate_text($item['description'], 40, true, true);
|
||||
$row[5] = ui_print_truncate_text($item['description'], 'description', true, true);
|
||||
}
|
||||
|
||||
$row[6] = '';
|
||||
|
|
|
@ -38,7 +38,7 @@ $table->size[0] = '20px';
|
|||
$table->size[4] = '20px';
|
||||
|
||||
$osList = db_get_all_rows_in_table('tconfig_os');
|
||||
if($osList === false) {
|
||||
if ($osList === false) {
|
||||
$osList = array();
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ foreach ($osList as $os) {
|
|||
$data[] = ui_print_os_icon($os['id_os'], false, true);
|
||||
$data[] = $os['id_os'];
|
||||
$data[] = '<a href="index.php?sec=gsetup&sec2=godmode/setup/os&action=edit&tab=builder&id_os=' . $os['id_os'] . '">' . io_safe_output($os['name']) . '</a>';
|
||||
$data[] = ui_print_truncate_text(io_safe_output($os['description']), 25, true, true);
|
||||
$data[] = ui_print_truncate_text(io_safe_output($os['description']), 'description', true, true);
|
||||
if ($os['id_os'] > 16) {
|
||||
$data[] = '<a href="index.php?sec=gsetup&sec2=godmode/setup/os&action=delete&tab=list&id_os=' . $os['id_os'] . '">' . html_print_image("images/cross.png", true) . '</a>';
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ foreach ($osList as $os) {
|
|||
$table->data[] = $data;
|
||||
}
|
||||
|
||||
if(isset($data)) {
|
||||
if (isset($data)) {
|
||||
html_print_table($table);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -125,7 +125,7 @@ $rowPair = true;
|
|||
$iterator = 0;
|
||||
|
||||
if (!empty($result)){
|
||||
|
||||
|
||||
$table->width = '98%';
|
||||
$table->data = array ();
|
||||
$table->head = array ();
|
||||
|
@ -141,7 +141,7 @@ if (!empty($result)){
|
|||
$table->head[2] = __('Detail information');
|
||||
$table->head[3] = __('Number of modules affected');
|
||||
$table->head[4] = __('Actions');
|
||||
|
||||
|
||||
foreach ($result as $tag) {
|
||||
if ($rowPair)
|
||||
$table->rowclass[$iterator] = 'rowPair';
|
||||
|
@ -149,29 +149,28 @@ if (!empty($result)){
|
|||
$table->rowclass[$iterator] = 'rowOdd';
|
||||
$rowPair = !$rowPair;
|
||||
$iterator++;
|
||||
|
||||
|
||||
$data = array ();
|
||||
|
||||
$data[0] = "<a href='index.php?sec=gmodules&sec2=godmode/tag/edit_tag&action=update&id_tag=".$tag["id_tag"] . "'>" . $tag["name"] . "</a>";
|
||||
$data[1] = ui_print_truncate_text($tag["description"], 25, false);
|
||||
|
||||
$data[0] = "<a href='index.php?sec=gmodules&sec2=godmode/tag/edit_tag&action=update&id_tag=" . $tag["id_tag"] . "'>" . $tag["name"] . "</a>";
|
||||
$data[1] = ui_print_truncate_text($tag["description"], 'description', false);
|
||||
$data[2] = '<a href="' . $tag["url"] . '">' . $tag["url"] . '</a>';
|
||||
$data[3] = ' <a class="tag_details"
|
||||
href="ajax.php?page=godmode/tag/tag&get_tag_tooltip=1&id_tag='.$tag['id_tag'].'">' .
|
||||
html_print_image("images/zoom.png", true, array("id" => 'tag-details-'.$tag['id_tag'], "class" => "img_help")) . '</a> ';
|
||||
|
||||
|
||||
href="ajax.php?page=godmode/tag/tag&get_tag_tooltip=1&id_tag=' . $tag['id_tag'] . '">' .
|
||||
html_print_image("images/zoom.png", true, array("id" => 'tag-details-'.$tag['id_tag'], "class" => "img_help")) . '</a> ';
|
||||
|
||||
$data[3] .= tags_get_modules_count($tag["id_tag"]);
|
||||
$data[3] .= tags_get_modules_count($tag["id_tag"]);
|
||||
$data[4] = "<a href='index.php?sec=gmodules&sec2=godmode/tag/edit_tag&action=update&id_tag=".$tag["id_tag"] . "'>" . html_print_image("images/config.png", true, array("title" => "Edit")) . "</a> ";
|
||||
$data[4] .= '<a href="index.php?sec=gmodules&sec2=godmode/tag/tag&delete_tag='.$tag["id_tag"] . '"onclick="if (! confirm (\''.__('Are you sure?').'\')) return false">' . html_print_image("images/cross.png", true, array("title" => "Delete")) . '</a>';
|
||||
array_push ($table->data, $data);
|
||||
}
|
||||
|
||||
html_print_table ($table);
|
||||
|
||||
// No tags available or selected
|
||||
}else
|
||||
|
||||
html_print_table ($table);
|
||||
}
|
||||
else {
|
||||
// No tags available or selected
|
||||
echo "<div class='nf'>".__('No tags selected')."</div>";
|
||||
}
|
||||
|
||||
ui_require_css_file ('cluetip');
|
||||
ui_require_jquery_file ('cluetip');
|
||||
|
@ -187,6 +186,5 @@ ui_require_jquery_file ('cluetip');
|
|||
}).click (function () {
|
||||
return false;
|
||||
});
|
||||
|
||||
/* ]]> */
|
||||
</script>
|
||||
|
|
|
@ -482,9 +482,11 @@ foreach ($result as $profile) {
|
|||
}
|
||||
|
||||
$data = array ();
|
||||
|
||||
|
||||
$data[0] = '<a href="index.php?sec=gusaurios&sec2=godmode/users/configure_profile&id='.$profile['id_perfil'].'">'.profile_get_name ($profile['id_perfil']).'</a>';
|
||||
$data[1] = ui_print_group_icon($profile["id_grupo"],true).' <a href="index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60&group_id='.$profile['id_grupo'].'">' . ui_print_truncate_text(groups_get_name ($profile['id_grupo'], True), 35).'</a>';
|
||||
$data[1] = ui_print_group_icon($profile["id_grupo"], true) .
|
||||
' <a href="index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60&group_id='.$profile['id_grupo'].'">' .
|
||||
ui_print_truncate_text(groups_get_name ($profile['id_grupo'], True), GENERIC_SIZE_TEXT).'</a>';
|
||||
$data[2] = '<form method="post" onsubmit="if (!confirm (\''.__('Are you sure?').'\')) return false">';
|
||||
$data[2] .= html_print_input_hidden ('delete_profile', 1, true);
|
||||
$data[2] .= html_print_input_hidden ('id_user_profile', $profile['id_up'], true);
|
||||
|
@ -500,7 +502,7 @@ foreach ($result as $profile) {
|
|||
$data[0] = '<form method="post">';
|
||||
if (check_acl ($config['id_user'], 0, "PM")) {
|
||||
$data[0] .= html_print_select (profile_get_profiles (), 'assign_profile', 0, '',
|
||||
__('None'), 0, true, false, false);
|
||||
__('None'), 0, true, false, false);
|
||||
}
|
||||
else {
|
||||
$data[0] .= html_print_select (profile_get_profiles (array ('pandora_management' => '<> 1',
|
||||
|
|
|
@ -137,7 +137,7 @@ if ($get_custom_sql) {
|
|||
|
||||
if ($truncate_text) {
|
||||
$text = get_parameter ('text', '');
|
||||
return ui_print_truncate_text ($text, 20, true, false);
|
||||
return ui_print_truncate_text ($text, GENERIC_SIZE_TEXT, true, false);
|
||||
}
|
||||
|
||||
if ($get_metaconsole_hash_data) {
|
||||
|
|
|
@ -659,7 +659,7 @@ function groups_get_group_row($id_group, $group_all, $group, &$printed_groups) {
|
|||
echo "<td class='group_view_data' style='font-weight: bold; font-size: 12px;'> ";
|
||||
echo $group['prefix'] . ui_print_group_icon ($id_group, true, "groups_small", 'font-size: 7.5pt');
|
||||
echo " <a class='group_view_data' href='index.php?sec=estado&sec2=operation/agentes/estado_agente&group_id=$id_group'>";
|
||||
echo ui_print_truncate_text($group['name'], 35);
|
||||
echo ui_print_truncate_text($group['name']);
|
||||
echo "</a>";
|
||||
echo "</td>";
|
||||
echo "<td class='group_view_data' style='text-align: center; vertica-align: middle;'>";
|
||||
|
@ -675,30 +675,30 @@ function groups_get_group_row($id_group, $group_all, $group, &$printed_groups) {
|
|||
echo "<a class='group_view_data' style='font-weight: bold; font-size: 18px; text-align: center;'
|
||||
href='index.php?sec=estado&sec2=operation/agentes/estado_agente&group_id=$id_group'>";
|
||||
|
||||
//Total agent field given by function reporting_get_group_stats return the number of agents
|
||||
//of this groups and its children. It was done to print empty fathers of children groups.
|
||||
//We need to recalculate the total agents for this group here to get only the total agents
|
||||
//for this group. Of course the group All (0) is a special case.
|
||||
|
||||
$data["total_agents"];
|
||||
|
||||
if ($id_group != 0) {
|
||||
$data["total_agents"] = db_get_sql ("SELECT COUNT(id_agente) FROM tagente
|
||||
WHERE id_grupo = $id_group AND disabled = 0");
|
||||
}
|
||||
else {
|
||||
$data["total_agents"] = db_get_sql ("SELECT COUNT(id_agente) FROM tagente
|
||||
WHERE disabled = 0");
|
||||
}
|
||||
|
||||
echo $data["total_agents"];
|
||||
echo "</a>";
|
||||
//Total agent field given by function reporting_get_group_stats return the number of agents
|
||||
//of this groups and its children. It was done to print empty fathers of children groups.
|
||||
//We need to recalculate the total agents for this group here to get only the total agents
|
||||
//for this group. Of course the group All (0) is a special case.
|
||||
|
||||
$data["total_agents"];
|
||||
|
||||
if ($id_group != 0) {
|
||||
$data["total_agents"] = db_get_sql ("SELECT COUNT(id_agente) FROM tagente
|
||||
WHERE id_grupo = $id_group AND disabled = 0");
|
||||
}
|
||||
else {
|
||||
$data["total_agents"] = db_get_sql ("SELECT COUNT(id_agente) FROM tagente
|
||||
WHERE disabled = 0");
|
||||
}
|
||||
|
||||
echo $data["total_agents"];
|
||||
echo "</a>";
|
||||
|
||||
// Agents unknown
|
||||
if ($data["agents_unknown"] > 0) {
|
||||
echo "<td class='group_view_data_unk' style='font-weight: bold; font-size: 18px; text-align: center;'>";
|
||||
echo "<a class='group_view_data_unk' style='font-weight: bold; font-size: 18px; text-align: center;'
|
||||
href='index.php?sec=estado&sec2=operation/agentes/estado_agente&group_id=$id_group&status=3'>";
|
||||
href='index.php?sec=estado&sec2=operation/agentes/estado_agente&group_id=$id_group&status=3'>";
|
||||
echo $data["agents_unknown"];
|
||||
echo "</a>";
|
||||
echo "</td>";
|
||||
|
|
|
@ -228,12 +228,7 @@ function html_print_select_groups($id_user = false, $privilege = "AR", $returnAl
|
|||
|
||||
$fields = array();
|
||||
foreach ($user_groups_tree as $group) {
|
||||
if (isset($config['text_char_long'])) {
|
||||
$groupName = ui_print_truncate_text($group['nombre'], $config['text_char_long'], false, true, false);
|
||||
}
|
||||
else {
|
||||
$groupName = $group['nombre'];
|
||||
}
|
||||
$groupName = ui_print_truncate_text($group['nombre'], GENERIC_SIZE_TEXT, false, true, false);
|
||||
|
||||
$fields[$group['id_grupo']] = str_repeat(" ", $group['deep']) . $groupName;
|
||||
}
|
||||
|
@ -401,21 +396,16 @@ function html_print_select ($fields, $name, $selected = '', $script = '', $nothi
|
|||
function html_print_select_from_sql ($sql, $name, $selected = '', $script = '', $nothing = '', $nothing_value = '0', $return = false,
|
||||
$multiple = false, $sort = true, $disabled = false, $style = false, $size = false) {
|
||||
global $config;
|
||||
|
||||
|
||||
$fields = array ();
|
||||
$result = db_get_all_rows_sql ($sql);
|
||||
if ($result === false)
|
||||
$result = array ();
|
||||
|
||||
|
||||
foreach ($result as $row) {
|
||||
$id = array_shift($row);
|
||||
$value = array_shift($row);
|
||||
if (isset($config['text_char_long'])) {
|
||||
$fields[$id] = ui_print_truncate_text($value, $config['text_char_long'], false, true, false);
|
||||
}
|
||||
else {
|
||||
$fields[$id] = $value;
|
||||
}
|
||||
$fields[$id] = ui_print_truncate_text($value, GENERIC_SIZE_TEXT, false, true, false);
|
||||
}
|
||||
|
||||
return html_print_select ($fields, $name, $selected, $script, $nothing, $nothing_value, $return, $multiple, $sort,'',$disabled, $style,'', $size);
|
||||
|
@ -438,7 +428,7 @@ function html_print_select_from_sql ($sql, $name, $selected = '', $script = '',
|
|||
|
||||
function html_print_extended_select_for_time ($name, $selected = '', $script = '', $nothing = '',
|
||||
$nothing_value = '0', $size = false, $return = false, $select_style = false) {
|
||||
|
||||
|
||||
$fields = get_periods();
|
||||
|
||||
if (($selected !== false) && (!isset($fields[$selected]) && $selected != 0)) {
|
||||
|
|
|
@ -2116,8 +2116,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
case 1:
|
||||
case 'simple_graph':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Simple graph'),
|
||||
ui_print_truncate_text($agent_name, 75, false).' <br> ' .
|
||||
ui_print_truncate_text($module_name, 75, false));
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false).' <br> ' .
|
||||
ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
//RUNNING
|
||||
$table->colspan[1][0] = 4;
|
||||
|
@ -2140,7 +2140,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
break;
|
||||
case 'projection_graph':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Projection graph'),
|
||||
ui_print_truncate_text($agent_name, 75, false).' <br> ' . ui_print_truncate_text($module_name, 75, false));
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false).' <br> ' .
|
||||
ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
//RUNNING
|
||||
$table->colspan[1][0] = 4;
|
||||
|
@ -2189,8 +2190,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
break;
|
||||
case 'prediction_date':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Prediction date'),
|
||||
ui_print_truncate_text($agent_name, 75, false).' <br> ' .
|
||||
ui_print_truncate_text($module_name, 75, false));
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false).' <br> ' .
|
||||
ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
//RUNNING
|
||||
$table->colspan[1][0] = 4;
|
||||
|
@ -2223,7 +2224,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
break;
|
||||
case 'simple_baseline_graph':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Simple baseline graph'),
|
||||
ui_print_truncate_text($agent_name, 65, false).' <br> ' . ui_print_truncate_text($module_name, 65, false));
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false).' <br> ' .
|
||||
ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
//RUNNING
|
||||
$table->colspan[1][0] = 4;
|
||||
|
@ -2263,7 +2265,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
$graph = db_get_row ("tgraph", "id_graph", $content['id_gs']);
|
||||
|
||||
reporting_header_content($mini, $content, $report, $table, __('Custom graph'),
|
||||
ui_print_truncate_text($graph['name'], 25, false));
|
||||
ui_print_truncate_text($graph['name'], 'item_title', false));
|
||||
|
||||
//RUNNING
|
||||
// Put description at the end of the module (if exists)
|
||||
|
@ -2544,7 +2546,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
case 6:
|
||||
case 'monitor_report':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Monitor report'),
|
||||
ui_print_truncate_text($agent_name, 70, false).' <br> '.ui_print_truncate_text($module_name, 70, false));
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false) .
|
||||
' <br> '.ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
//RUNNING
|
||||
|
||||
|
@ -2577,7 +2580,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
case 7:
|
||||
case 'avg_value':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Avg. Value'),
|
||||
ui_print_truncate_text($agent_name, 75, false).' <br> '.ui_print_truncate_text($module_name, 75, false));
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false) .
|
||||
' <br> '.ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
//RUNNING
|
||||
|
||||
|
@ -2606,7 +2610,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
case 8:
|
||||
case 'max_value':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Max. Value'),
|
||||
ui_print_truncate_text($agent_name, 75, false).' <br> ' . ui_print_truncate_text($module_name, 75, false));
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false) .
|
||||
' <br> ' . ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
//RUNNING
|
||||
|
||||
|
@ -2630,13 +2635,14 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
case 9:
|
||||
case 'min_value':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Min. Value'),
|
||||
ui_print_truncate_text($agent_name, 75, false).' <br> '.ui_print_truncate_text($module_name, 75, false));
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false) .
|
||||
' <br> '.ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
//RUNNING
|
||||
|
||||
// Put description at the end of the module (if exists)
|
||||
$table->colspan[0][0] = 2;
|
||||
if ($content["description"] != ""){
|
||||
if ($content["description"] != "") {
|
||||
$data_desc = array();
|
||||
$data_desc[0] = $content["description"];
|
||||
array_push ($table->data, $data_desc);
|
||||
|
@ -2659,7 +2665,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
case 10:
|
||||
case 'sumatory':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Summatory'),
|
||||
ui_print_truncate_text($agent_name, 75, false).' <br> '.ui_print_truncate_text($module_name, 75, false));
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false) .
|
||||
' <br> ' . ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
//RUNNING
|
||||
|
||||
|
@ -2690,7 +2697,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
case 'agent_detailed_event':
|
||||
case 'event_report_agent':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Agent detailed event'),
|
||||
ui_print_truncate_text(agents_get_name($content['id_agent']), 75, false));
|
||||
ui_print_truncate_text(agents_get_name($content['id_agent']), 'agent_medium', false));
|
||||
|
||||
//RUNNING
|
||||
|
||||
|
@ -2837,11 +2844,12 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
break;
|
||||
case 'event_report_module':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Module detailed event'),
|
||||
ui_print_truncate_text($agent_name, 70, false).' <br> ' . ui_print_truncate_text($module_name, 70, false));
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false) .
|
||||
' <br> ' . ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
// Put description at the end of the module (if exists)
|
||||
$table->colspan[1][0] = 3;
|
||||
if ($content["description"] != ""){
|
||||
if ($content["description"] != "") {
|
||||
$data_desc = array();
|
||||
$data_desc[0] = $content["description"];
|
||||
array_push ($table->data, $data_desc);
|
||||
|
@ -2854,11 +2862,12 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
break;
|
||||
case 'alert_report_module':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Alert report module'),
|
||||
ui_print_truncate_text($agent_name, 70, false).' <br> '.ui_print_truncate_text($module_name, 70, false));
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false) .
|
||||
' <br> '.ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
// Put description at the end of the module (if exists)
|
||||
$table->colspan[1][0] = 3;
|
||||
if ($content["description"] != ""){
|
||||
if ($content["description"] != "") {
|
||||
$data_desc = array();
|
||||
$data_desc[0] = $content["description"];
|
||||
array_push ($table->data, $data_desc);
|
||||
|
@ -2871,7 +2880,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
break;
|
||||
case 'alert_report_agent':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Alert report agent'),
|
||||
ui_print_truncate_text($agent_name, 70, false));
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false));
|
||||
|
||||
// Put description at the end of the module (if exists)
|
||||
$table->colspan[1][0] = 3;
|
||||
|
@ -2888,11 +2897,11 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
break;
|
||||
case 'url':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Import text from URL'),
|
||||
ui_print_truncate_text($content["external_source"], 70, false));
|
||||
ui_print_truncate_text($content["external_source"], 'description', false));
|
||||
|
||||
// Put description at the end of the module (if exists)
|
||||
$table->colspan[1][0] = 3;
|
||||
if ($content["description"] != ""){
|
||||
if ($content["description"] != "") {
|
||||
$data_desc = array();
|
||||
$data_desc[0] = $content["description"];
|
||||
array_push ($table->data, $data_desc);
|
||||
|
@ -2910,7 +2919,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
break;
|
||||
case 'database_serialized':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Serialize data'),
|
||||
ui_print_truncate_text($module_name, 75, false));
|
||||
ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
// Put description at the end of the module (if exists)
|
||||
$table->colspan[1][0] = 3;
|
||||
|
@ -2931,7 +2940,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
array_unshift($table2->head, __('Date'));
|
||||
|
||||
$datelimit = $report["datetime"] - $content['period'];
|
||||
|
||||
|
||||
$result = db_get_all_rows_sql('SELECT *
|
||||
FROM tagente_datos
|
||||
WHERE id_agente_modulo = ' . $content['id_agent_module'] . '
|
||||
|
@ -2968,11 +2977,12 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
break;
|
||||
case 'TTRT':
|
||||
reporting_header_content($mini, $content, $report, $table, __('TTRT'),
|
||||
ui_print_truncate_text($agent_name, 70, false).' <br> '.ui_print_truncate_text($module_name, 70, false));
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false) .
|
||||
' <br> '.ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
// Put description at the end of the module (if exists)
|
||||
$table->colspan[1][0] = 3;
|
||||
if ($content["description"] != ""){
|
||||
if ($content["description"] != "") {
|
||||
$data_desc = array();
|
||||
$data_desc[0] = $content["description"];
|
||||
array_push ($table->data, $data_desc);
|
||||
|
@ -2983,7 +2993,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
$ttr = reporting_get_agentmodule_ttr ($content['id_agent_module'], $content['period'], $report["datetime"]);
|
||||
if ($ttr === false) {
|
||||
$ttr = __('Unknown');
|
||||
} else if ($ttr != 0) {
|
||||
}
|
||||
else if ($ttr != 0) {
|
||||
$ttr = human_time_description_raw ($ttr);
|
||||
}
|
||||
|
||||
|
@ -2994,11 +3005,12 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
break;
|
||||
case 'TTO':
|
||||
reporting_header_content($mini, $content, $report, $table, __('TTO'),
|
||||
ui_print_truncate_text($agent_name, 70, false).' <br> '.ui_print_truncate_text($module_name, 70, false));
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false) .
|
||||
' <br> '.ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
// Put description at the end of the module (if exists)
|
||||
$table->colspan[1][0] = 3;
|
||||
if ($content["description"] != ""){
|
||||
if ($content["description"] != "") {
|
||||
$data_desc = array();
|
||||
$data_desc[0] = $content["description"];
|
||||
array_push ($table->data, $data_desc);
|
||||
|
@ -3009,7 +3021,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
$tto = reporting_get_agentmodule_tto ($content['id_agent_module'], $content['period'], $report["datetime"]);
|
||||
if ($tto === false) {
|
||||
$tto = __('Unknown');
|
||||
} else if ($tto != 0) {
|
||||
}
|
||||
else if ($tto != 0) {
|
||||
$tto = human_time_description_raw ($tto);
|
||||
}
|
||||
|
||||
|
@ -3020,7 +3033,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
break;
|
||||
case 'MTBF':
|
||||
reporting_header_content($mini, $content, $report, $table, __('MTBF'),
|
||||
ui_print_truncate_text($agent_name, 70, false).' <br> '.ui_print_truncate_text($module_name, 70, false));
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false) .
|
||||
' <br> '.ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
// Put description at the end of the module (if exists)
|
||||
$table->colspan[1][0] = 3;
|
||||
|
@ -3035,7 +3049,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
$mtbf = reporting_get_agentmodule_mtbf ($content['id_agent_module'], $content['period'], $report["datetime"]);
|
||||
if ($mtbf === false) {
|
||||
$mtbf = __('Unknown');
|
||||
} else if ($mtbf != 0) {
|
||||
}
|
||||
else if ($mtbf != 0) {
|
||||
$mtbf = human_time_description_raw ($mtbf);
|
||||
}
|
||||
|
||||
|
@ -3046,11 +3061,12 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
break;
|
||||
case 'MTTR':
|
||||
reporting_header_content($mini, $content, $report, $table, __('MTTR'),
|
||||
ui_print_truncate_text($agent_name, 70, false).' <br> '.ui_print_truncate_text($module_name, 70, false));
|
||||
ui_print_truncate_text($agent_name, 'agent_medium', false) .
|
||||
' <br> '.ui_print_truncate_text($module_name, 'module_medium', false));
|
||||
|
||||
// Put description at the end of the module (if exists)
|
||||
$table->colspan[1][0] = 3;
|
||||
if ($content["description"] != ""){
|
||||
if ($content["description"] != "") {
|
||||
$data_desc = array();
|
||||
$data_desc[0] = $content["description"];
|
||||
array_push ($table->data, $data_desc);
|
||||
|
@ -3061,7 +3077,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
$mttr = reporting_get_agentmodule_mttr ($content['id_agent_module'], $content['period'], $report["datetime"]);
|
||||
if ($mttr === false) {
|
||||
$mttr = __('Unknown');
|
||||
} else if ($mttr != 0) {
|
||||
}
|
||||
else if ($mttr != 0) {
|
||||
$mttr = human_time_description_raw ($mttr);
|
||||
}
|
||||
|
||||
|
@ -3348,7 +3365,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
metaconsole_restore_db();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$table2->width = '99%';
|
||||
$table2->data = array ();
|
||||
$table2->head = array ();
|
||||
|
@ -3362,7 +3379,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
$i++;
|
||||
$x++;
|
||||
}
|
||||
|
||||
|
||||
foreach ($agent_list as $a) {
|
||||
$data = array();
|
||||
$data[0] = $a;
|
||||
|
@ -4141,25 +4158,25 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
break;
|
||||
}
|
||||
$table_data = '<table cellpadding="1" cellspacing="4" cellspacing="0" border="0" style="background-color: #EEE;">';
|
||||
|
||||
|
||||
$table_data .= "<th style='background-color: #799E48;'>".__("Agents")." / ".__("Modules")."</th>";
|
||||
|
||||
|
||||
$nmodules = 0;
|
||||
foreach($modules_by_name as $module) {
|
||||
foreach ($modules_by_name as $module) {
|
||||
$nmodules++;
|
||||
|
||||
if($nmodules > $block) { //Will show only the (block) first modules
|
||||
continue;
|
||||
}
|
||||
|
||||
$file_name = string2image(ui_print_truncate_text($module['name'], 30, false, true, false, '...'), false, false, 6, 270, '#90B165', 'FFF', 4, 0);
|
||||
$table_data .= '<th width="22px">'.html_print_image($file_name, true, array('title' => $module['name']))."</th>";
|
||||
$file_name = string2image(ui_print_truncate_text($module['name'], 'module_small', false, true, false, '...'), false, false, 6, 270, '#90B165', 'FFF', 4, 0);
|
||||
$table_data .= '<th width="22px">' . html_print_image($file_name, true, array('title' => $module['name']))."</th>";
|
||||
}
|
||||
|
||||
if ($block < $nmodules) {
|
||||
$table_data .= "<th width='20px' style='vertical-align:top; padding-top: 35px;' rowspan='".($nagents+1)."'><b>...</b></th>";
|
||||
}
|
||||
|
||||
|
||||
$filter_agents = false;
|
||||
if($id_group > 0) {
|
||||
$filter_agents = array('id_grupo' => $id_group);
|
||||
|
@ -4167,11 +4184,11 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
// Prepare pagination
|
||||
ui_pagination ((int)count(agents_get_agents ($filter_agents)));
|
||||
$table_data .= "<br>";
|
||||
|
||||
|
||||
foreach ($agents as $agent) {
|
||||
// Get stats for this group
|
||||
$agent_status = agents_get_status($agent['id_agente']);
|
||||
|
||||
|
||||
switch($agent_status) {
|
||||
case 4: // Alert fired status
|
||||
$rowcolor = '#ffa300';
|
||||
|
@ -4199,28 +4216,28 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
|
||||
$table_data .= "<tr style='height: 35px;'>";
|
||||
|
||||
$file_name = string2image(ui_print_truncate_text($agent['nombre'], 35, false, true, false, '...'), false, false, 6, 0, $rowcolor, $textcolor, 4, 0);
|
||||
$file_name = string2image(ui_print_truncate_text($agent['nombre'], 'agent_small', false, true, false, '...'), false, false, 6, 0, $rowcolor, $textcolor, 4, 0);
|
||||
$table_data .= "<td style='background-color: ".$rowcolor.";'>".html_print_image($file_name, true, array('title' => $agent['nombre']))."</td>";
|
||||
$agent_modules = agents_get_modules($agent['id_agente']);
|
||||
|
||||
$nmodules = 0;
|
||||
|
||||
foreach($modules_by_name as $module) {
|
||||
|
||||
foreach ($modules_by_name as $module) {
|
||||
$nmodules++;
|
||||
|
||||
if($nmodules > $block) {
|
||||
if ($nmodules > $block) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$match = false;
|
||||
foreach($module['id'] as $module_id){
|
||||
if(!$match && array_key_exists($module_id,$agent_modules)) {
|
||||
if (!$match && array_key_exists($module_id,$agent_modules)) {
|
||||
$status = modules_get_agentmodule_status($module_id);
|
||||
$table_data .= "<td style='text-align: center; background-color: #DDD;'>";
|
||||
$win_handle = dechex(crc32($module_id.$module["name"]));
|
||||
$graph_type = return_graphtype (modules_get_agentmodule_type($module_id));
|
||||
|
||||
switch($status){
|
||||
|
||||
switch ($status) {
|
||||
case 0:
|
||||
$table_data .= ui_print_status_image ('module_ok.png', $module['name']." in ".$agent['nombre'].": ".__('NORMAL'), true, array('width' => '20px', 'height' => '20px'));
|
||||
break;
|
||||
|
|
|
@ -716,7 +716,7 @@ function ui_format_alert_row ($alert, $compound = false, $agent = true, $url = '
|
|||
}
|
||||
elseif ($agent == 0) {
|
||||
$data[$index['module_name']] .=
|
||||
ui_print_truncate_text(modules_get_agentmodule_name ($alert["id_agent_module"]), 30, false, true, true, '[…]', 'font-size: 7.2pt');
|
||||
ui_print_truncate_text(modules_get_agentmodule_name ($alert["id_agent_module"]), 'module_small', false, true, true, '[…]', 'font-size: 7.2pt');
|
||||
}
|
||||
else {
|
||||
if ($agent_style !== false) {
|
||||
|
@ -726,7 +726,7 @@ function ui_format_alert_row ($alert, $compound = false, $agent = true, $url = '
|
|||
$data[$index['agent_name']] .= ui_print_agent_name (modules_get_agentmodule_agent ($alert["id_agent_module"]), true, 20, $styleDisabled);
|
||||
}
|
||||
$data[$index['module_name']] =
|
||||
ui_print_truncate_text (modules_get_agentmodule_name ($alert["id_agent_module"]), 30, false, true, true, '[…]', 'font-size: 7.2pt');
|
||||
ui_print_truncate_text (modules_get_agentmodule_name ($alert["id_agent_module"]), 'module_small', false, true, true, '[…]', 'font-size: 7.2pt');
|
||||
}
|
||||
$data[$index['agent_name']] .= $disabledHtmlEnd;
|
||||
|
||||
|
@ -741,7 +741,9 @@ function ui_format_alert_row ($alert, $compound = false, $agent = true, $url = '
|
|||
else {
|
||||
$actionDefault = db_get_value_sql("SELECT id_alert_action FROM talert_compound_actions WHERE id_alert_compound = " . $alert['id']);
|
||||
}
|
||||
$data[$index['description']] .= $disabledHtmlStart . ui_print_truncate_text (io_safe_output($description), 35, false, true, true, '[…]', 'font-size: 7.1pt') . $disabledHtmlEnd;
|
||||
$data[$index['description']] .= $disabledHtmlStart .
|
||||
ui_print_truncate_text (io_safe_output($description), 'description', false, true, true, '[…]', 'font-size: 7.1pt') .
|
||||
$disabledHtmlEnd;
|
||||
|
||||
$actions = alerts_get_alert_agent_module_actions ($alert['id'], false, $compound);
|
||||
|
||||
|
@ -772,10 +774,12 @@ function ui_format_alert_row ($alert, $compound = false, $agent = true, $url = '
|
|||
if ($alert["times_fired"] > 0) {
|
||||
$status = STATUS_ALERT_FIRED;
|
||||
$title = __('Alert fired').' '.$alert["times_fired"].' '.__('times');
|
||||
} elseif ($alert["disabled"] > 0) {
|
||||
}
|
||||
elseif ($alert["disabled"] > 0) {
|
||||
$status = STATUS_ALERT_DISABLED;
|
||||
$title = __('Alert disabled');
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$status = STATUS_ALERT_NOT_FIRED;
|
||||
$title = __('Alert not fired');
|
||||
}
|
||||
|
|
|
@ -513,16 +513,16 @@ function visual_map_process_wizard_add_modules ($id_modules, $image, $id_layout,
|
|||
switch ($label_type) {
|
||||
case 'agent_module':
|
||||
default:
|
||||
$agent_label = ui_print_truncate_text(agents_get_name ($id_agent), 10, false, true, false, '…', false);
|
||||
$module_label = ui_print_truncate_text(modules_get_agentmodule_name($id_module), 10, false, true, false, '…', false);
|
||||
$agent_label = ui_print_truncate_text(agents_get_name ($id_agent), 'agent_small', false, true, false, '…', false);
|
||||
$module_label = ui_print_truncate_text(modules_get_agentmodule_name($id_module), 'module_small', false, true, false, '…', false);
|
||||
$label = $agent_label . " - " . $module_label;
|
||||
break;
|
||||
case 'module':
|
||||
$module_label = ui_print_truncate_text(modules_get_agentmodule_name($id_module), 20, false, true, false, '…', false);
|
||||
$module_label = ui_print_truncate_text(modules_get_agentmodule_name($id_module), 'module_small', false, true, false, '…', false);
|
||||
$label = $module_label;
|
||||
break;
|
||||
case 'agent':
|
||||
$agent_label = ui_print_truncate_text(agents_get_name ($id_agent), 20, false, true, false, '…', false);
|
||||
$agent_label = ui_print_truncate_text(agents_get_name ($id_agent), 'agent_small', false, true, false, '…', false);
|
||||
$label = $agent_label;
|
||||
break;
|
||||
case 'none':
|
||||
|
@ -1514,11 +1514,11 @@ function visual_map_create_internal_name_item($label = null, $type, $image, $age
|
|||
}
|
||||
|
||||
if (!empty($agent)) {
|
||||
$text .= " (" . ui_print_truncate_text($agent, 10, false);
|
||||
$text .= " (" . ui_print_truncate_text($agent, 'agent_small', false);
|
||||
|
||||
$moduleName = io_safe_output(db_get_value('nombre', 'tagente_modulo', 'id_agente_modulo', $id_module));
|
||||
if (!empty($moduleName)) {
|
||||
$text .= " - " . ui_print_truncate_text($moduleName, 10, false);
|
||||
$text .= " - " . ui_print_truncate_text($moduleName, 'module_small', false);
|
||||
}
|
||||
|
||||
$text .= ")";
|
||||
|
|
|
@ -217,9 +217,9 @@ class MonitorStatus {
|
|||
$data[] = str_replace('<img src="' , '<img width="15" height="15" src="../../', $statusImg);
|
||||
|
||||
$data[] = '<a href="index.php?page=agent&id=' . $row['id_agent'] . '">' .
|
||||
ui_print_truncate_text($row['agent_name'], 25, true, true) . '</a>';
|
||||
ui_print_truncate_text($row['agent_name'], 'agent_small', true, true) . '</a>';
|
||||
$data[] = '<a href="index.php?page=agent&action=view_module_graph&id=' . $row['id_agente_modulo'] . '">' .
|
||||
ui_print_truncate_text($row['module_name'], 25, true, true) . '</a>';
|
||||
ui_print_truncate_text($row['module_name'], 'module_small', true, true) . '</a>';
|
||||
if (is_numeric($row["datos"]))
|
||||
$data[] = format_numeric($row["datos"]);
|
||||
else
|
||||
|
|
|
@ -108,7 +108,7 @@ class ViewAgents {
|
|||
|
||||
$data = array();
|
||||
|
||||
$truncName = ui_print_truncate_text($agent['nombre'], 25, true, true);
|
||||
$truncName = ui_print_truncate_text($agent['nombre'], 'agent_small', true, true);
|
||||
|
||||
$data[] = ui_print_group_icon_path($agent["id_grupo"], true, "../images/groups_small", '', false);
|
||||
$data[] = '<a href="index.php?page=agent&id=' . $agent['id_agente'] . '">' . $truncName . '</a>';
|
||||
|
@ -240,7 +240,7 @@ class ViewAgent {
|
|||
$data = array();
|
||||
|
||||
$data[] = '<a href="index.php?page=agent&action=view_module_graph&id=' . $module['id_agente_modulo'] . '">' .
|
||||
ui_print_truncate_text($module["nombre"], 20, true, true) . '</a>';
|
||||
ui_print_truncate_text($module["nombre"], 'module_small', true, true) . '</a>';
|
||||
$status = STATUS_MODULE_WARNING;
|
||||
$title = "";
|
||||
|
||||
|
@ -347,10 +347,10 @@ class ViewAgent {
|
|||
|
||||
$data = array();
|
||||
|
||||
$data[] = ui_print_truncate_text(modules_get_agentmodule_name($alert["id_agent_module"]), 20, true, true);
|
||||
$data[] = ui_print_truncate_text(modules_get_agentmodule_name($alert["id_agent_module"]), 'module_small', true, true);
|
||||
|
||||
$template = io_safe_output(alerts_get_alert_template ($alert['id_alert_template']));
|
||||
$data[] = ui_print_truncate_text(io_safe_output($template['name']), 20, true, true);
|
||||
$data[] = ui_print_truncate_text(io_safe_output($template['name']), GENERIC_SIZE_TEXT, true, true);
|
||||
|
||||
$data[] = ui_print_timestamp ($alert["last_fired"], true, array('units' => 'tiny'));
|
||||
|
||||
|
@ -408,7 +408,7 @@ class viewGraph {
|
|||
echo "<h3 class='title_h3'><a href='index.php?page=agent&id=" . $this->agentModule['id_agente'] . "'>" . modules_get_agentmodule_agent_name($this->idAgentModule)."</a> / ".io_safe_output($this->agentModule['nombre']) . "</h3>";
|
||||
|
||||
echo "<h3 class='title_h3'>" . __('Graph') . "</h3>";
|
||||
|
||||
|
||||
echo grafico_modulo_sparse($this->idAgentModule, $this->period, 0, 240,
|
||||
200, io_safe_output($this->agentModule['nombre']), null, false,
|
||||
false, true, 0, '', true, false, true, true, '../');
|
||||
|
@ -524,7 +524,7 @@ class viewGraph {
|
|||
$pagination = ui_pagination ($count,
|
||||
ui_get_url_refresh (array ('period' => $this->period)),
|
||||
0, 0, true);
|
||||
|
||||
|
||||
$pagination = str_replace('images/go_first.png', '../images/go_first.png', $pagination);
|
||||
$pagination = str_replace('images/go_previous.png', '../images/go_previous.png', $pagination);
|
||||
$pagination = str_replace('images/go_next.png', '../images/go_next.png', $pagination);
|
||||
|
|
|
@ -64,10 +64,11 @@ class ViewAlerts {
|
|||
$data = array();
|
||||
|
||||
$idAgent = modules_get_agentmodule_agent($alert["id_agent_module"]);
|
||||
|
||||
$data[] = '<a href="index.php?page=agent&id=' . $idAgent . '">' . ui_print_truncate_text(modules_get_agentmodule_name($alert["id_agent_module"]), 20, true, true) . '</a>';
|
||||
|
||||
$data[] = '<a href="index.php?page=agent&id=' . $idAgent . '">' .
|
||||
ui_print_truncate_text(modules_get_agentmodule_name($alert["id_agent_module"]), 'module_small', true, true) . '</a>';
|
||||
$template = io_safe_output(alerts_get_alert_template ($alert['id_alert_template']));
|
||||
$data[] = ui_print_truncate_text(io_safe_output($template['name']), 20, true, true);
|
||||
$data[] = ui_print_truncate_text(io_safe_output($template['name']), GENERIC_SIZE_TEXT, true, true);
|
||||
$data[] = ui_print_timestamp ($alert["last_fired"], true, array('units' => 'tiny'));
|
||||
|
||||
$status = STATUS_ALERT_NOT_FIRED;
|
||||
|
|
|
@ -26,7 +26,7 @@ class EventsView {
|
|||
|
||||
function show() {
|
||||
global $config;
|
||||
|
||||
|
||||
require_once ($config['homedir'].'/include/functions_agents.php');
|
||||
|
||||
$config['text_char_long'] = 12;
|
||||
|
@ -107,14 +107,9 @@ class EventsView {
|
|||
$sqlFreeSearch = '';
|
||||
if ($search != "")
|
||||
$sqlFreeSearch .= " AND evento LIKE '%".$search."%'";
|
||||
|
||||
|
||||
|
||||
|
||||
$unixtime = get_system_time () - ($event_view_hr * 3600); //Put hours in seconds
|
||||
$sqlTimestamp = " AND utimestamp > ".$unixtime;
|
||||
|
||||
|
||||
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM tevento
|
||||
|
@ -178,20 +173,21 @@ class EventsView {
|
|||
|
||||
$table->rowclass[$iterator] = get_priority_class($row["criticity"]);
|
||||
$iterator++;
|
||||
|
||||
|
||||
$data[] = ui_print_timestamp($row["timestamp"], true, array('units' => 'tiny'));
|
||||
|
||||
|
||||
$data[] = $row["evento"];
|
||||
|
||||
if ($row["event_type"] == "system") {
|
||||
$data[] = ui_print_truncate_text(__('System'), 20, true, true);
|
||||
$data[] = ui_print_truncate_text(__('System'), GENERIC_SIZE_TEXT, true, true);
|
||||
}
|
||||
elseif ($row["id_agente"] > 0) {
|
||||
// Agent name
|
||||
$data[] = '<a href="index.php?page=agent&id=' . $row["id_agente"] . '">' . ui_print_truncate_text(agents_get_name($row["id_agente"]), 20, true, true) . '</a>';
|
||||
$data[] = '<a href="index.php?page=agent&id=' . $row["id_agente"] . '">' .
|
||||
ui_print_truncate_text(agents_get_name($row["id_agente"]), 'agent_small', true, true) . '</a>';
|
||||
}
|
||||
else {
|
||||
$data[] = ui_print_truncate_text(__('Alert SNMP'), 20, true, true);
|
||||
$data[] = ui_print_truncate_text(__('Alert SNMP'), GENERIC_SIZE_TEXT, true, true);
|
||||
}
|
||||
|
||||
$table->data[] = $data;
|
||||
|
|
|
@ -476,7 +476,7 @@ foreach ($agents as $agent) {
|
|||
$data[0] .= '</a> ';
|
||||
}*/
|
||||
|
||||
$data[1] = ui_print_truncate_text($agent["description"], 50, false, true, true, '[…]', 'font-size: 6.5pt');
|
||||
$data[1] = ui_print_truncate_text($agent["description"], 'description', false, true, true, '[…]', 'font-size: 6.5pt');
|
||||
|
||||
$data[2] = ui_print_os_icon ($agent["id_os"], false, true);
|
||||
|
||||
|
|
|
@ -420,7 +420,7 @@ foreach ($modules as $module) {
|
|||
AND ($module["id_tipo_modulo"] != 17)
|
||||
AND ($module["id_tipo_modulo"] != 23)) {
|
||||
echo "</td><td class='".$tdcolor."f9' title='".io_safe_output($module["descripcion"])."'>";
|
||||
echo ui_print_truncate_text(io_safe_output($module["descripcion"]), 35, false);
|
||||
echo ui_print_truncate_text(io_safe_output($module["descripcion"]), 'description', false);
|
||||
echo "</td>";
|
||||
}
|
||||
else{
|
||||
|
|
|
@ -573,12 +573,12 @@ foreach ($result as $row) {
|
|||
}
|
||||
|
||||
$data[1] = '<strong><a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$row["id_agent"].'">';
|
||||
$data[1] .= ui_print_truncate_text($row["agent_name"], 40, false, true, false, '[…]', 'font-size:7.5pt;');
|
||||
$data[1] .= ui_print_truncate_text($row["agent_name"], 'agent_medium', false, true, false, '[…]', 'font-size:7.5pt;');
|
||||
$data[1] .= '</a></strong>';
|
||||
|
||||
$data[2] = html_print_image("images/" . modules_show_icon_type ($row["module_type"]), true);
|
||||
|
||||
$data[3] = ui_print_truncate_text($row["module_name"],30,false,true,true);
|
||||
$data[3] = ui_print_truncate_text($row["module_name"], 'module_small', false, true, true);
|
||||
if ($row["extended_info"] != "") {
|
||||
$data[3] .= ui_print_help_tip ($row["extended_info"], true, '/images/comments.png');
|
||||
}
|
||||
|
|
|
@ -342,7 +342,7 @@ if (is_ajax ()) {
|
|||
echo '<ul>';
|
||||
foreach ($bad_modules as $module) {
|
||||
echo '<li>';
|
||||
echo ui_print_truncate_text($module['nombre']);
|
||||
echo ui_print_truncate_text($module['nombre'], 'module_small');
|
||||
echo '</li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
|
@ -389,7 +389,7 @@ if (is_ajax ()) {
|
|||
$module = db_get_row ('tagente_modulo', 'id_agente_modulo', $id_module);
|
||||
echo '<h3>';
|
||||
echo html_print_image("images/brick.png", true) . ' ';
|
||||
echo ui_print_truncate_text($module['nombre'], 25, false, true, false).'</h3>';
|
||||
echo ui_print_truncate_text($module['nombre'], 'module_small', false, true, false).'</h3>';
|
||||
echo '<strong>'.__('Type').':</strong> ';
|
||||
$agentmoduletype = modules_get_agentmodule_type ($module['id_agente_modulo']);
|
||||
echo modules_get_moduletype_name ($agentmoduletype).' ';
|
||||
|
@ -403,7 +403,7 @@ if (is_ajax ()) {
|
|||
echo $modulegroup.'<br />';
|
||||
}
|
||||
echo '<strong>'.__('Agent').':</strong> ';
|
||||
echo ui_print_truncate_text(modules_get_agentmodule_agent_name($module['id_agente_modulo']), 25, false, true, false).'<br />';
|
||||
echo ui_print_truncate_text(modules_get_agentmodule_agent_name($module['id_agente_modulo']), 'agent_small', false, true, false).'<br />';
|
||||
|
||||
if($module['id_tipo_modulo'] == 18) {
|
||||
echo '<strong>'.__('Address').':</strong> ';
|
||||
|
@ -432,7 +432,7 @@ if (is_ajax ()) {
|
|||
$id_group = (int) get_parameter ('id_group');
|
||||
$group = db_get_row ('tgrupo', 'id_grupo', $id_group);
|
||||
echo '<h3>' . html_print_image("images/groups_small/" . groups_get_icon ($group['id_grupo']) . ".png", true);
|
||||
echo ui_print_truncate_text($group['nombre'], 25, false, true, false) . '</h3>';
|
||||
echo ui_print_truncate_text($group['nombre'], GENERIC_SIZE_TEXT, false, true, false) . '</h3>';
|
||||
echo '<strong>'.__('Parent').':</strong> ';
|
||||
if ($group['parent'] == 0) {
|
||||
echo __('None').'<br />';
|
||||
|
@ -759,7 +759,9 @@ switch($tab) {
|
|||
break;
|
||||
}
|
||||
|
||||
ui_print_page_header(__('Agent') . ' - ' . ui_print_truncate_text(agents_get_name($id_agente),25, false) . $header_description, $icon, false, "", false, $onheader);
|
||||
ui_print_page_header(__('Agent') . ' - ' .
|
||||
ui_print_truncate_text(agents_get_name($id_agente), 'agent_small', false) .
|
||||
$header_description, $icon, false, "", false, $onheader);
|
||||
|
||||
|
||||
switch ($tab) {
|
||||
|
|
|
@ -333,7 +333,7 @@ if ($count < 1) {
|
|||
|
||||
$data[1] = incidents_print_status_img ($row["estado"], true);
|
||||
$data[2] = '<a href="index.php?sec=workspace&sec2=operation/incidents/incident_detail&id='.$row["id_incidencia"].'">' .
|
||||
ui_print_truncate_text(io_safe_output($row["titulo"]),45).'</a>';
|
||||
ui_print_truncate_text(io_safe_output($row["titulo"]), 'item_title').'</a>';
|
||||
$data[3] = incidents_print_priority_img ($row["prioridad"], true);
|
||||
$data[4] = ui_print_group_icon ($row["id_grupo"], true);
|
||||
$data[5] = ui_print_timestamp ($row["actualizacion"], true);
|
||||
|
|
|
@ -185,7 +185,7 @@ elseif (isset ($_GET["insert_form"])) {
|
|||
if (isset ($_GET["from_event"])) {
|
||||
$event = get_parameter ("from_event");
|
||||
$texto = io_safe_output(events_get_description ($event));
|
||||
$titulo = ui_print_truncate_text(events_get_description ($event), 75, false, true, false);
|
||||
$titulo = ui_print_truncate_text(events_get_description ($event), 'description', false, true, false);
|
||||
$id_grupo = events_get_group ($event);
|
||||
$origen = "Pandora FMS Event";
|
||||
unset ($event);
|
||||
|
|
|
@ -73,7 +73,7 @@ if(!isset($result['id_incidencia'])) {
|
|||
if (isset ($_GET["from_event"])) {
|
||||
$event = get_parameter ("from_event");
|
||||
$result['descripcion'] = io_safe_output(events_get_description ($event));
|
||||
$result['titulo'] = ui_print_truncate_text($result['descripcion'], 75, false, true, false);
|
||||
$result['titulo'] = ui_print_truncate_text($result['descripcion'], 'description', false, true, false);
|
||||
unset ($event);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -476,7 +476,7 @@ if ($traps !== false) {
|
|||
$data[3] = __('N/A');
|
||||
}
|
||||
else {
|
||||
$data[3] = ui_print_truncate_text($trap["value"], 15, false);
|
||||
$data[3] = ui_print_truncate_text($trap["value"], GENERIC_SIZE_TEXT, false);
|
||||
}
|
||||
|
||||
//Custom
|
||||
|
@ -484,7 +484,7 @@ if ($traps !== false) {
|
|||
$data[4] = __('N/A');
|
||||
}
|
||||
else {
|
||||
$data[4] = ui_print_truncate_text($trap["oid_custom"], 25, false);
|
||||
$data[4] = ui_print_truncate_text($trap["oid_custom"], GENERIC_SIZE_TEXT, false);
|
||||
}
|
||||
|
||||
//User
|
||||
|
|
Loading…
Reference in New Issue