Guest User

Untitled

a guest
May 22nd, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. --- hosts.php.bak 2012-01-13 23:29:31.173823317 +0400
  2. +++ hosts.php 2012-01-13 23:46:14.049818941 +0400
  3. @@ -787,6 +787,7 @@ include_once('include/page_header.php');
  4. make_sorting_header(S_IP, 'ip'),
  5. S_PORT,
  6. S_TEMPLATES,
  7. + S_GROUPS,
  8. make_sorting_header(S_STATUS, 'status'),
  9. S_AVAILABILITY
  10. ));
  11. @@ -826,10 +827,12 @@ include_once('include/page_header.php');
  12. $options = array(
  13. 'hostids' => zbx_objectValues($hosts, 'hostid'),
  14. 'output' => API_OUTPUT_EXTEND,
  15. + 'extendoutput' => 1,
  16. 'selectParentTemplates' => array('hostid','host'),
  17. 'select_items' => API_OUTPUT_COUNT,
  18. 'select_triggers' => API_OUTPUT_COUNT,
  19. 'select_graphs' => API_OUTPUT_COUNT,
  20. + 'select_groups' => 1,
  21. 'select_applications' => API_OUTPUT_COUNT,
  22. 'nopermissions' => 1,
  23. );
  24. @@ -907,6 +910,13 @@ include_once('include/page_header.php');
  25.  
  26. $status = new CLink($status_caption, $status_url, $status_class, $status_script);
  27.  
  28. + $host_groups = array();
  29. + foreach($host['groups'] as $group){
  30. + $host_groups[] = $group['name'];
  31. + }
  32. + natcasesort($host_groups);
  33. + $host_groups = implode(', ', $host_groups);
  34. +
  35. switch($host['available']){
  36. case HOST_AVAILABLE_TRUE:
  37. $zbx_available = new CDiv(SPACE, 'iconzbxavailable');
  38. @@ -990,6 +1000,7 @@ include_once('include/page_header.php');
  39. $ip,
  40. empty($host['port']) ? '-' : $host['port'],
  41. new CCol($hostTemplates, 'wraptext'),
  42. + $host_groups,
  43. $status,
  44. $av_table
  45. ));
Add Comment
Please, Sign In to add comment