Ad Widget

Collapse

Items sorting on different pages

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vrtareg
    Senior Member
    • May 2006
    • 293

    #1

    Items sorting on different pages

    Hi

    Is it possible to add sort in sql scripts?
    There are many pages which will be looks better if they will be sorted.

    You can see 2 attached images with overview page which not like good for me.
    Every time when i open this page i see different order of the servers list.
    It is difficult to examine this list.

    Regards
    Areg
    Attached Files
  • vrtareg
    Senior Member
    • May 2006
    • 293

    #2
    I patched triggers.inc.php to sort overview by the hostname too


    --- triggers.inc.php.old 2006-06-28 10:11:47.000000000 +0500
    +++ triggers.inc.php 2006-07-03 12:52:33.000000000 +0500
    @@ -1047,7 +1047,7 @@
    ' from hosts h,items i,triggers t, functions f '.$group_where.
    ' h.status='.HOST_STATUS_MONITORED.' and h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=t.triggerid'.
    ' and t.status='.TRIGGER_STATUS_ENABLED.
    - ' order by t.description');
    + ' order by h.host,t.description');
    unset($triggers);
    unset($hosts);
    while($row = DBfetch($result))
    Regards
    Areg

    Comment

    • andreas
      Junior Member
      • Apr 2006
      • 4

      #3
      works fine, but now the triggers on the left side are not sorted anymore.

      can you help please..

      Comment

      Working...