2013-07-22 Sergio Martin <sergio.martin@artica.es>
* include/functions_ui.php include/functions_treeview.php: Fixed bad link on agent info of the right side in treeview on metaconsole. And added access to node check to this link. For bug #2312 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8554 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
c5f4c6d913
commit
4cf2304b67
|
@ -1,3 +1,11 @@
|
|||
2013-07-22 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/functions_ui.php
|
||||
include/functions_treeview.php: Fixed bad link on
|
||||
agent info of the right side in treeview on metaconsole.
|
||||
And added access to node check to this link.
|
||||
For bug #2312
|
||||
|
||||
2013-07-22 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* operation/agentes/stat_win.php: Change the order of jquery
|
||||
|
|
|
@ -298,12 +298,20 @@ function treeview_printTable($id_agente, $server_data = array()) {
|
|||
echo '<table cellspacing="4" cellpadding="4" border="0" class="databox alternate" style="width:90%; min-width: 300px;">';
|
||||
//Agent name
|
||||
echo '<tr><td class="datos"><b>'.__('Agent name').'</b></td>';
|
||||
|
||||
if ($agent['disabled']) {
|
||||
$cellName = "<em>" . ui_print_agent_name ($agent["id_agente"], true, 500, "text-transform: uppercase;", true) . ui_print_help_tip(__('Disabled'), true) . "</em>";
|
||||
$cellName = "<em>";
|
||||
}
|
||||
else {
|
||||
$cellName = ui_print_agent_name ($agent["id_agente"], true, 500, "text-transform: uppercase;", true);
|
||||
$cellName = '';
|
||||
}
|
||||
|
||||
$cellName .= ui_print_agent_name ($agent["id_agente"], true, 500, "text-transform: uppercase;", true, $console_url, $url_hash, false, can_user_access_node ());
|
||||
|
||||
if ($agent['disabled']) {
|
||||
$cellName .= ui_print_help_tip(__('Disabled'), true) . "</em>";
|
||||
}
|
||||
|
||||
echo '<td class="datos"><b>'.$cellName.'</b></td>';
|
||||
|
||||
//Addresses
|
||||
|
|
|
@ -623,10 +623,11 @@ function ui_print_os_icon ($id_os, $name = true, $return = false, $apply_skin =
|
|||
* @param string server url to concatenate at the begin of the link
|
||||
* @param string extra parameters to concatenate in the link
|
||||
* @param string name of the agent to avoid the query in some cases
|
||||
* @param bool if the agent will provided with link or not
|
||||
*
|
||||
* @return string HTML with agent name and link
|
||||
*/
|
||||
function ui_print_agent_name ($id_agent, $return = false, $cutoff = 'agent_medium', $style = '', $cutname = false, $server_url = '', $extra_params = '', $known_agent_name = false) {
|
||||
function ui_print_agent_name ($id_agent, $return = false, $cutoff = 'agent_medium', $style = '', $cutname = false, $server_url = '', $extra_params = '', $known_agent_name = false, $link = true) {
|
||||
if ($known_agent_name === false) {
|
||||
$agent_name = (string) agents_get_name ($id_agent);
|
||||
}
|
||||
|
@ -639,13 +640,18 @@ function ui_print_agent_name ($id_agent, $return = false, $cutoff = 'agent_mediu
|
|||
$agent_name = ui_print_truncate_text($agent_name, $cutoff, true, true, true, '[…]', $style);
|
||||
}
|
||||
|
||||
$url = $server_url . 'index.php?sec=estado&'.
|
||||
'sec2=operation/agentes/ver_agente&' .
|
||||
'id_agente=' . $id_agent.$extra_params;
|
||||
|
||||
$output = '<a style="' . $style . '"' .
|
||||
' href="' . $url . '"' .
|
||||
' title="'.$agent_name_full.'"><b><span style="'.$style.'">'.$agent_name.'</span></b></a>';
|
||||
if ($link) {
|
||||
$url = $server_url . 'index.php?sec=estado&'.
|
||||
'sec2=operation/agentes/ver_agente&' .
|
||||
'id_agente=' . $id_agent.$extra_params;
|
||||
|
||||
$output = '<a style="' . $style . '"' .
|
||||
' href="' . $url . '"' .
|
||||
' title="'.$agent_name_full.'"><b><span style="'.$style.'">'.$agent_name.'</span></b></a>';
|
||||
}
|
||||
else {
|
||||
$output = '<b><span style="'.$style.'">'.$agent_name.'</span></b>';
|
||||
}
|
||||
|
||||
//TODO: Add a pretty javascript (using jQuery) popup-box with agent details
|
||||
|
||||
|
|
Loading…
Reference in New Issue