Solved.

And I also changed the view page so that ID is no longer displayed.
This being because if devices are input in, the ID's were not in order
and confusing to try and look at.

I am going to create .patch files for everything I changed sometime
tomorrow (I hope) and then upload them someplace for everyone to view.

On Mon, 2007-08-06 at 14:04 -0500, Jeffrey Singleton wrote:

> Hello ...
> 
> Was wondering if there was a way to sort fields differently.
> Specifically on the Hosts_Config Diff Viewing page, I would love to have them 
> sorted by Host Name (host.name)
> 
> I added $order = "asc"; to force sorting by host.id ascending ... that worked 
> ... which leads me to believe the same function could be changed to sort by 
> host.name instead.
> 
> ## the function that does the sorting ... lib/api.hosts.inc.php:
> --------------------------------------------------------------------------------------
> function hosts_config_list($ids = NULL,$host_id = NULL, $init = NULL,$span = 
> NULL, $where_special = NULL) {
> 
>         if (!is_array($where_special)) $where_special = array();
> 
>         if ($host_id) $where_special[]=array("hosts.id","=",$host_id);
>         if ($ids) $order = "asc"; else $order = "desc"; //diff execution order
> 
>         $order = "asc";                                                       
>  // Forcing Ascending View by host.id
> 
>         return get_db_list(
>             array("hosts_config","zones","hosts"),
>             $ids,
>             array(      "hosts_config.*",
>                         "zone_description"=>"zones.zone",
>                         "host_description"=>"hosts.name" ),
>             array_merge(
>             array(
>                 array("hosts.zone","=","zones.id"),
>                 array("hosts_config.host","=","hosts.id"),
>                 array("hosts_config.id",">","1")),
>                 $where_special),
>             array (
>                 array("hosts_config.date",$order),
>                 array("hosts.id","asc")),
>                 "",NULL,$init,$span
> 
>             );
>     }
> 
> TiA
> 
> 
> --
> Jeff Singleton
> Network Systems Administrator
> 
> Secure Computing®
> your trusted source for enterprise security™
> www.securecomputing.com
> NASDAQ: SCUR
> [EMAIL PROTECTED]
> 
> Secure Computing Corporation
> 4800 North Point Parkway
> Suite 300
> Alpharetta, GA 30022
> USA
> 
> The information contained in this email message may be privileged, 
> confidential and protected from disclosure. If you are not the intended 
> recipient, any review, dissemination, distribution or copying is strictly 
> prohibited. If you have received this email message in error, please notify 
> the sender by reply email and delete the message and any attachments.        
> 
> plain text document attachment (ATT6984246.txt), "ATT6984246.txt"
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/

--
Jeff Singleton
Network Systems Administrator

Secure Computing®
your trusted source for enterprise security™
www.securecomputing.com
NASDAQ: SCUR

(678) 904-3694 (Direct Phone)
(770) 820-2909 (Mobile Phone)
[EMAIL PROTECTED]

Secure Computing Corporation
4800 North Point Parkway
Suite 300
Alpharetta, GA 30022
USA

The information contained in this email message may be privileged,
confidential and protected from disclosure. If you are not the intended
recipient, any review, dissemination, distribution or copying is
strictly prohibited. If you have received this email message in error,
please notify the sender by reply email and delete the message and any
attachments.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
jffnms-users mailing list
jffnms-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jffnms-users

Reply via email to