mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-22 21:35:12 +02:00
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
345971e7e6
commit
d7435de974
@ -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:
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
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');
|
||||
|
@ -402,7 +402,9 @@ 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>";
|
||||
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>";
|
||||
@ -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"]))
|
||||
|
@ -462,9 +462,10 @@ foreach ($modules as $module) {
|
||||
|
||||
$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) {
|
||||
@ -526,11 +527,12 @@ foreach ($modules as $module) {
|
||||
// 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']);
|
||||
|
||||
|
@ -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,13 +397,15 @@ 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']);
|
||||
@ -416,7 +417,6 @@ foreach ($simple_alerts as $alert) {
|
||||
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)
|
||||
@ -446,14 +446,12 @@ foreach ($simple_alerts as $alert) {
|
||||
|
||||
$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>';
|
||||
|
@ -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)) {
|
||||
|
@ -180,7 +180,8 @@ if(!empty($groups)) {
|
||||
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);
|
||||
|
@ -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] = '';
|
||||
|
@ -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>';
|
||||
}
|
||||
|
@ -153,14 +153,12 @@ if (!empty($result)){
|
||||
$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[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> ';
|
||||
|
||||
|
||||
|
||||
$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>';
|
||||
@ -168,10 +166,11 @@ if (!empty($result)){
|
||||
}
|
||||
|
||||
html_print_table ($table);
|
||||
|
||||
}
|
||||
else {
|
||||
// No tags available or selected
|
||||
}else
|
||||
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>
|
||||
|
@ -484,7 +484,9 @@ 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);
|
||||
|
@ -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;'>";
|
||||
|
@ -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;
|
||||
}
|
||||
@ -410,12 +405,7 @@ function html_print_select_from_sql ($sql, $name, $selected = '', $script = '',
|
||||
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);
|
||||
|
@ -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,7 +2635,8 @@ 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
|
||||
|
||||
@ -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,7 +2844,8 @@ 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;
|
||||
@ -2854,7 +2862,8 @@ 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;
|
||||
@ -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,7 +2897,7 @@ 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;
|
||||
@ -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;
|
||||
@ -2968,7 +2977,8 @@ 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;
|
||||
@ -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,7 +3005,8 @@ 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;
|
||||
@ -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,7 +3061,8 @@ 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;
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -4152,7 +4169,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
||||
continue;
|
||||
}
|
||||
|
||||
$file_name = string2image(ui_print_truncate_text($module['name'], 30, false, true, false, '...'), false, false, 6, 270, '#90B165', 'FFF', 4, 0);
|
||||
$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>";
|
||||
}
|
||||
|
||||
@ -4199,7 +4216,7 @@ 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']);
|
||||
|
||||
|
@ -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'));
|
||||
|
||||
|
@ -65,9 +65,10 @@ class ViewAlerts {
|
||||
|
||||
$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;
|
||||
|
@ -108,14 +108,9 @@ class EventsView {
|
||||
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
|
||||
WHERE 1=1 ' . $sqlGroups . $sqlEventType . $sqlSeverity .
|
||||
@ -184,14 +179,15 @@ class EventsView {
|
||||
$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…
x
Reference in New Issue
Block a user