Open-AudIT
https://www.open-audit.org/phpBB3/

Adding colums to group views
https://www.open-audit.org/phpBB3/viewtopic.php?f=20&t=5938
Page 1 of 1

Author:  shramkop [ Fri Sep 14, 2012 12:49 am ]
Post subject:  Adding colums to group views

I am trying to add some columns to the OAV2 list views but I cannot find the files that I need to edit in order to accomplish this. Essentially I am trying to add a column to list the service pack of the installed OS in the Windows groups and a column to show the user name in the Workstation groups.

I know this is a fairly straightforward and easy to do modification, I'm just having trouble finding the files that define the columns in the various group and report views in OAV2. If this does not make sense, I'll add more specifics.

Author:  Mark [ Fri Sep 14, 2012 10:56 am ]
Post subject:  Re: Adding colums to group views

What you need to alter is the definition of the GROUP. The first page you see when you select a Group from the homepage is defined in the Group definition. Also in there are items like what is the SQL used to define the system's that match, the Group name, etc, etc. None of this is stored in a tradition PHP file you would normally use. Group definition XML file are store (those that ship with OAv2) in /code_igniter/system/application/controllers/groups

If a Group definition contains a SQL statement for group_display_sql, then that is used. You have to also add which extra columns you would like displayed below this. There are a default list of columns which work with the default group_display_sql (which is used if a specific one does not exist in the definition).

So - as far as displaying the service pack for a Group listing is concerned, the attribute is stored in sys_sw_windows.windows_service_pack in the database. You will need to alter the Group Display SQL. You will also need to add it to the columns to be displayed. I've attached an example based on the Windows Server group.

As for displaying the username - take a look at the Windows XP group definition. It already does this. See if you can make it work for you and let us know how it goes. I can help further if you can't get it...

Attachments:
File comment: Windows Servers (inc Service Pack) group definition
WindowsServers_inc_service_pack.xml [4.75 KiB]
Downloaded 443 times

Author:  shramkop [ Thu Sep 20, 2012 12:14 am ]
Post subject:  Re: Adding colums to group views

Awesome, thanks Mark. I'll give it a go now and see what happens :)

Author:  shramkop [ Tue Sep 25, 2012 12:55 am ]
Post subject:  Re: Adding colums to group views

Thanks Mark. That worked perfectly and now that I see how it's done I can make custom groups easily whenever I need to.

Author:  Mark [ Tue Sep 25, 2012 8:24 am ]
Post subject:  Re: Adding colums to group views

Nice to hear.

Page 1 of 1 All times are UTC + 10 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/