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>
|
2013-07-22 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
* operation/agentes/stat_win.php: Change the order of jquery
|
* 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;">';
|
echo '<table cellspacing="4" cellpadding="4" border="0" class="databox alternate" style="width:90%; min-width: 300px;">';
|
||||||
//Agent name
|
//Agent name
|
||||||
echo '<tr><td class="datos"><b>'.__('Agent name').'</b></td>';
|
echo '<tr><td class="datos"><b>'.__('Agent name').'</b></td>';
|
||||||
|
|
||||||
if ($agent['disabled']) {
|
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 {
|
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>';
|
echo '<td class="datos"><b>'.$cellName.'</b></td>';
|
||||||
|
|
||||||
//Addresses
|
//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 server url to concatenate at the begin of the link
|
||||||
* @param string extra parameters to concatenate in 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 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
|
* @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) {
|
if ($known_agent_name === false) {
|
||||||
$agent_name = (string) agents_get_name ($id_agent);
|
$agent_name = (string) agents_get_name ($id_agent);
|
||||||
}
|
}
|
||||||
|
@ -639,6 +640,7 @@ 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);
|
$agent_name = ui_print_truncate_text($agent_name, $cutoff, true, true, true, '[…]', $style);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($link) {
|
||||||
$url = $server_url . 'index.php?sec=estado&'.
|
$url = $server_url . 'index.php?sec=estado&'.
|
||||||
'sec2=operation/agentes/ver_agente&' .
|
'sec2=operation/agentes/ver_agente&' .
|
||||||
'id_agente=' . $id_agent.$extra_params;
|
'id_agente=' . $id_agent.$extra_params;
|
||||||
|
@ -646,6 +648,10 @@ function ui_print_agent_name ($id_agent, $return = false, $cutoff = 'agent_mediu
|
||||||
$output = '<a style="' . $style . '"' .
|
$output = '<a style="' . $style . '"' .
|
||||||
' href="' . $url . '"' .
|
' href="' . $url . '"' .
|
||||||
' title="'.$agent_name_full.'"><b><span style="'.$style.'">'.$agent_name.'</span></b></a>';
|
' 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
|
//TODO: Add a pretty javascript (using jQuery) popup-box with agent details
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue