Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Feature Search Box...

 
Post new topic   Reply to topic    Cacti Forum Index -> Feature Requests
Author Message
americo



Joined: 17 Sep 2002
Posts: 8

PostPosted: Mon Sep 30, 2002 12:29 pm    Post subject: Feature Search Box... Reply with quote

when i have a lot of users/graphs/.. etc. is dificult to find it. A search box will be more efficient to admin my resources.

thanks
Back to top
yid
Cacti User


Joined: 20 Apr 2002
Posts: 83

PostPosted: Tue Oct 01, 2002 9:56 am    Post subject: Reply with quote

Or a filter!

Kind of the same thing, except rather than returning results, you'd just limit your current view.

Lucent's Vitalsuite offers something like this, and its one of their better features (by better I mean it actually works).

Aaron
Back to top
americo



Joined: 17 Sep 2002
Posts: 8

PostPosted: Thu Oct 03, 2002 1:46 pm    Post subject: Reply with quote

yes.. a filter... and i did something like that...

In the file "include/form.php" i added the next code:
/* ------------------ Search Box ---------------------- */
function DrawSearchBoxFormHeader($form_top_title,$form_encoding_upload, $form_left_column)
{
global $current_path; include ("$current_path/config.php"); ?>
<table border="0" width="96%">
<?if ($form_left_column == true) {?><td bgcolor="#<?print $color_light;?>" width="1%" rowspan="99999"></td><?}?>
<tr>
<td bgcolor="#<?print $color_dark_bar;?>">
<font class="textHeader"><?print $form_top_title;?></font>
</td>
</tr>
<form method="get">
<?}
function DrawFormFindButton() { ?>
<td>
(input type="submit" value="Find")
</td>

<?}
function DrawSearchBoxFormFooter() {?>
</form>
<?}
--------------------------------------------------------------------------------
then in the files like grap_view.php i added the in the list section the next code:

case 'list':
//------------------ Add search box
DrawSearchBoxFormHeader("Search","",false);
DrawFormItem("Delimit the list","To see all clients, leave the box empty.");
DrawFormItemTextBox("search_word","","","");
DrawFormFindButton();
print "(input type=\"hidden\" name=\"action\" value=\"list\")";
DrawSearchBoxFormFooter();
----------- Note: Change "(" with <" in some lines.
-------------------------------------------- rest of the code.
But a added the next options to a $sql_id query to filter the results:
where title like '%$search_word%'

Some similar i did in the files graps.php (Graphs admin), user_admin.php (User Administration.. =) ).

works fine

bye
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2234
Location: Carlisle, PA

PostPosted: Thu Jan 30, 2003 12:59 am    Post subject: Reply with quote

Sounds like most/all of this feature has already been added to 0.8. On the graph management page, you can filter by host or arbitrary text. For a data source you can filter by host.

I will add a feature request to add this capability to the user management page as well.

-Ian
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Feature Requests All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group