Module: nagvis Branch: master Commit: 74c31876c4e2d4e5ef25f50af7e247580367469f URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=74c31876c4e2d4e5ef25f50af7e247580367469f
Author: LaMi <[email protected]> Date: Thu Dec 31 13:57:06 2009 +0100 #118 [name], [alias] and [service_description] macros are now shown in WUI --- share/frontend/wui/classes/WuiMap.php | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/share/frontend/wui/classes/WuiMap.php b/share/frontend/wui/classes/WuiMap.php index 2cbeb97..cd9bc1b 100644 --- a/share/frontend/wui/classes/WuiMap.php +++ b/share/frontend/wui/classes/WuiMap.php @@ -308,8 +308,19 @@ class WuiMap extends GlobalMap { $this->moveable .= '"abs_label_'.$obj['type'].'_'.$obj['id'].'",'; } + // Translate some macros in labels (Only the static ones) + $label = str_replace('[name]', $obj[$name], $obj['label_text']); + + if(isset($obj['alias'])) { + $label = str_replace('[alias]', $obj['alias'], $label); + } + + if($obj['type'] == 'service') { + $label = str_replace('[name]', $obj['name'], $label); + } + $ret = '<div '.$id.' class="object_label" style="background:'.$obj['label_background'].';border-color:'.$obj['label_border'].';left:'.$obj['label_x'].'px;top:'.$obj['label_y'].'px;width:'.$obj['label_width'].';z-index:'.($obj['z']+1).';overflow:visible;">'; - $ret .= '<span>'.$obj['label_text'].'</span>'; + $ret .= '<span>'.$label.'</span>'; $ret .= '</div>'; return $ret; ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
