Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Fri Mar 29, 2024 9:46 am

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
PostPosted: Mon Mar 12, 2007 7:01 am 
Offline
Newbie

Joined: Tue Mar 06, 2007 12:46 pm
Posts: 16
Location: Auckland, NZ
I wanted an easy way to be able to group all domains/workgroups and group systems under those domains so I added a 'View all Domains/Wrkgrps' to the Queries list.

Code below.


list_viewdef_all_domains.php
[code]<?php

$query_array=array("headline"=>__("List all Domains/Workgroups"),
"sql"=>"SELECT count(net_domain) AS domain_count, net_domain
FROM system
GROUP BY net_domain",
"sort"=>"net_domain",
"dir"=>"ASC",
"get"=>array("file"=>"list.php",
"title"=>__("Hosts with this domain"),
"var"=>array("view"=>"systems_for_domains",
"name"=>"%net_domain",
"headline_addition"=>"%net_domain",
),
),
"fields"=>array("10"=>array("name"=>"domain_count",
"head"=>__("Count"),
"show"=>"y",
"link"=>"y",
),
"20"=>array("name"=>"net_domain",
"head"=>__("Domain/Workgroup"),
"show"=>"y",
"link"=>"y",
"sort"=>"y",
"search"=>"y",
),
),
);
?>
[/code]


list_viewdef_systems_for_domains.php
[code]<?php

$query_array=array("headline"=>__("List Systems with Domain/Workgroup"),
"sql"=>"SELECT * FROM system WHERE net_domain = '" . $_GET["name"] . "' ",
"sort"=>"system_name",
"dir"=>"ASC",
"get"=>array("file"=>"system.php",
"title"=>"Go to System",
"var"=>array("pc"=>"%system_uuid",
"view"=>"summary",
),
),
"fields"=>array("10"=>array("name"=>"system_uuid",
"head"=>__("UUID"),
"show"=>"n",
),
"20"=>array("name"=>"net_ip_address",
"head"=>__("IP"),
"show"=>"y",
"link"=>"y",
),
"30"=>array("name"=>"system_name",
"head"=>__("Hostname"),
"show"=>"y",
"link"=>"y",
),
),
);
?>
[/code]

Add the following line to the queries array in inc_menu_array.php. It can go wherever you like, just change the array number. In my case it is after 'View all servers'. Watch the line wrap.

[code]"45"=>array("name"=>"All Domains/Wrkgrps", "link"=>"./list.php?view=all_domains", "image"=>"images/computer.png", "title"=>"All Domains/Wrkgrps",),
[/code]

_________________
Jon Blakely

Computer Troubleshooters - Howick
Auckland
NZ

http://technologysolved.co.nz


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group