Skip to content

Commit

Permalink
Hover menu childs (e.g. services in host object hover) can now be lef…
Browse files Browse the repository at this point in the history
…t unsorted (keep original sorting)
  • Loading branch information
LarsMichelsen committed Sep 4, 2017
1 parent bb2a592 commit 3f82036
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,9 @@
1.9.4 1.9.4
Core:
* List of hover menu childs (e.g. services in host object hover) can now be
left unsorted (keep original sorting). This is useful for aggregation objects
where the single elements have a defined order and should not be sorted by state
(Configure this per object by adding the attribute hover_childs_sort=k).


1.9.3 1.9.3
Core: Core:
Expand Down
2 changes: 1 addition & 1 deletion docs/en_US/nagvis_config_format_description.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ <h2>Description of the sections in detail</h2>
<td> hoverchildsshow </td><td> 1 </td><td>Enable/Disable the child objects in hover menu</td> <td> hoverchildsshow </td><td> 1 </td><td>Enable/Disable the child objects in hover menu</td>
</tr> </tr>
<tr> <tr>
<td> hoverchildssort </td><td> a </td><td>Sort method of the child objects (available: "s": state, "a": alphabet )</td> <td> hoverchildssort </td><td> a </td><td>Sort method of the child objects (available: "s": state, "a": alphabet, "k": keep original order)</td>
</tr> </tr>
<tr> <tr>
<td> hoverdelay </td><td> 0 </td><td>Delay of hover menu appearance in seconds</td> <td> hoverdelay </td><td> 0 </td><td>Delay of hover menu appearance in seconds</td>
Expand Down
3 changes: 3 additions & 0 deletions share/server/core/classes/objects/NagVisObject.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -327,6 +327,9 @@ public function getSortedObjectMembers() {
// Order by State // Order by State
usort($aTmpMembers, Array("NagVisObject", "sortObjectsByState")); usort($aTmpMembers, Array("NagVisObject", "sortObjectsByState"));
break; break;
case 'k':
// Keep original order (as provided by backend)
break;
case 'a': case 'a':
default: default:
// Order alhpabetical // Order alhpabetical
Expand Down
1 change: 1 addition & 0 deletions share/server/core/functions/core.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ function listHoverChildSorters() {
return Array( return Array(
'a' => l('Alphabetically'), 'a' => l('Alphabetically'),
's' => l('State'), 's' => l('State'),
'k' => l('Keep original order'),
); );
} }


Expand Down

0 comments on commit 3f82036

Please sign in to comment.