Update of /cvsroot/perfparse/_perfparse-phpgui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18809
Modified Files:
perfparse.php utils.php
Log Message:
delete saved graphs is possible now
Index: utils.php
===================================================================
RCS file: /cvsroot/perfparse/_perfparse-phpgui/utils.php,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** utils.php 3 Dec 2007 20:07:19 -0000 1.46
--- utils.php 3 Dec 2007 20:39:03 -0000 1.47
***************
*** 853,856 ****
--- 853,865 ----
}
+ function delete_saved_graph(&$db,$graphid) {
+ $query='delete from perfdata_graphs where id=?';
+ if(!$db->Execute($query,array($graphid))) {
+ $errormsg="Error saving graph: ".$db->ErrorMsg();
+ }
+ if(isset($errormsg)) return($errormsg);
+
+ }
+
function sync_nagios_hostgroups(&$db,&$nagiosconfig) {
// insert nagios config
Index: perfparse.php
===================================================================
RCS file: /cvsroot/perfparse/_perfparse-phpgui/perfparse.php,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -d -r1.59 -r1.60
*** perfparse.php 26 Nov 2007 00:01:16 -0000 1.59
--- perfparse.php 3 Dec 2007 20:39:03 -0000 1.60
***************
*** 509,512 ****
--- 509,517 ----
$smarty->assign('sort',$sort);
+
+ if(get_request_var('delete','int')) {
+ delete_saved_graph($db,$delete);
+ }
+
// get graph tiles for table display
$graphs=get_graphs($db,$sort); // third parameter selects graphs of selected groups only
***************
*** 525,528 ****
--- 530,535 ----
}
+
+
$smarty->display($config['PHP_Style'].$_REQUEST['page'].'.tpl.html');
break;
|