From 42676da889a38b777620ff33ea6c2635a4f89beb Mon Sep 17 00:00:00 2001 From: opensides Date: Mon, 17 Oct 2005 09:41:57 +0000 Subject: [PATCH] last bit of the nagios plugins updates git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1582 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/groups/class_groupGeneric.inc | 28 +++++++++++++++++++-- plugins/admin/groups/generic.tpl | 11 ++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/plugins/admin/groups/class_groupGeneric.inc b/plugins/admin/groups/class_groupGeneric.inc index 52df6e023..37e1814d5 100644 --- a/plugins/admin/groups/class_groupGeneric.inc +++ b/plugins/admin/groups/class_groupGeneric.inc @@ -75,6 +75,11 @@ class group extends plugin } else { $this->fon_group= TRUE; } + if (array_search ('nagiosContactGroup', $this->attrs['objectClass']) == NULL ){ + $this->nagios_group= FALSE; + } else { + $this->nagios_group= TRUE; + } } /* Set mail flag */ @@ -293,6 +298,13 @@ class group extends plugin } $smarty->assign("fon_groupACL", chkacl($this->acl, "fon_group")); + if ($this->nagios_group){ + $smarty->assign("nagios_group", "checked"); + } else { + $smarty->assign("nagios_group", ""); + } + $smarty->assign("nagios_groupACL", chkacl($this->acl, "nagios_group")); + /* Fields */ foreach (array("cn", "description", "gidNumber") as $val){ $smarty->assign("$val", $this->$val); @@ -427,7 +439,13 @@ class group extends plugin $this->fon_group= FALSE; } } - + if (chkacl ($this->acl, "nagios_group") == ""){ + if (isset ($_POST['nagios_group'])){ + $this->nagios_group= TRUE; + } else { + $this->nagios_group= FALSE; + } + } } } @@ -462,7 +480,8 @@ class group extends plugin for ($i= 0; $iattrs["objectClass"]); $i++){ if ($this->attrs['objectClass'][$i] != 'sambaGroupMapping' && $this->attrs['objectClass'][$i] != 'sambaIdmapEntry' && - $this->attrs['objectClass'][$i] != 'goFonPickupGroup'){ + $this->attrs['objectClass'][$i] != 'goFonPickupGroup' && + $this->attrs['objectClass'][$i] != 'nagiosContactGroup'){ $tmp[]= $this->attrs['objectClass'][$i]; } } @@ -514,6 +533,11 @@ class group extends plugin $this->attrs['objectClass'][]= "goFonPickupGroup"; } + /* Add nagios functionality */ + if ($this->nagios_group){ + $this->attrs['objectClass'][]= "nagiosContactGroup"; + } + /* Take members array */ if (count ($this->memberUid)){ $this->attrs['memberUid']= array_unique($this->memberUid); diff --git a/plugins/admin/groups/generic.tpl b/plugins/admin/groups/generic.tpl index e6a6360d0..e6e786044 100644 --- a/plugins/admin/groups/generic.tpl +++ b/plugins/admin/groups/generic.tpl @@ -66,6 +66,17 @@ {t}Members are in a phone pickup group{/t} + +
+ + +
+ + + + {t}Members are in a nagios group{/t} + + -- 2.30.2