Update of /cvsroot/perfparse/_perfparse-phpgui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27891
Modified Files:
Makefile.am perfparse.php utils.php
Log Message:
more work on policy management. Added comments to policies.
Index: utils.php
===================================================================
RCS file: /cvsroot/perfparse/_perfparse-phpgui/utils.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** utils.php 2 Dec 2006 21:31:11 -0000 1.31
--- utils.php 29 Dec 2006 00:27:06 -0000 1.32
***************
*** 493,497 ****
function get_delete_policies(&$db) {
! $query='select policy_id,policy_name,delete_policy_seconds
from perfdata_delete_policy';
$res=$db->GetAll($query);
--- 493,497 ----
function get_delete_policies(&$db) {
! $query='select policy_id,policy_name,delete_policy_seconds,policy_comment
from perfdata_delete_policy';
$res=$db->GetAll($query);
***************
*** 499,506 ****
}
! function create_delete_policy(&$db,$policy,$seconds) {
$query='insert into perfdata_delete_policy
! (policy_name,delete_policy_seconds) values (?,?)';
! $db->Execute($query,array($policy,$seconds));
return($db->ErrorNo());
}
--- 499,506 ----
}
! function create_delete_policy(&$db,$policy,$seconds,$comment='') {
$query='insert into perfdata_delete_policy
! (policy_name,policy_comment,delete_policy_seconds) values (?,?,?)';
! $db->Execute($query,array($policy,$comment,$seconds));
return($db->ErrorNo());
}
Index: Makefile.am
===================================================================
RCS file: /cvsroot/perfparse/_perfparse-phpgui/Makefile.am,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Makefile.am 17 Dec 2006 22:11:55 -0000 1.4
--- Makefile.am 29 Dec 2006 00:27:06 -0000 1.5
***************
*** 8,11 ****
--- 8,12 ----
perfparse.php \
smarty_extensions/block.tr.php \
+ smarty_extensions/modifier.difftime.php \
templates/flo/add_amend_host_group.tpl.html \
templates/flo/all_bin.tpl.html \
Index: perfparse.php
===================================================================
RCS file: /cvsroot/perfparse/_perfparse-phpgui/perfparse.php,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** perfparse.php 2 Dec 2006 21:31:11 -0000 1.43
--- perfparse.php 29 Dec 2006 00:27:06 -0000 1.44
***************
*** 493,496 ****
--- 493,497 ----
get_request_var('create_policy','string','');
if(!empty($create_policy)) {
+ get_request_var('create_policy_comment','string','');
get_request_var('create_policy_days','int',0);
get_request_var('create_policy_hours','int',0);
***************
*** 501,505 ****
3600*$create_policy_hours+
86400*$create_policy_days;
! if(create_delete_policy($db,$create_policy,$create_policy_seconds)!=0) {
$smarty->assign('sql_error',$db->ErrorMsg());
}
--- 502,506 ----
3600*$create_policy_hours+
86400*$create_policy_days;
! if(create_delete_policy($db,$create_policy,$create_policy_seconds,$create_policy_comment)!=0) {
$smarty->assign('sql_error',$db->ErrorMsg());
}
***************
*** 516,519 ****
--- 517,521 ----
// load infos for display
$policies=get_delete_policies($db);
+ // echo "<pre>";print_r($policies);echo "</pre>";
$smarty->assign_by_ref('policies',$policies);
|