From: <rm...@hy...> - 2009-05-19 23:14:06
|
Author: rmorgan Date: 2009-05-19 16:13:55 -0700 (Tue, 19 May 2009) New Revision: 13203 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=13203 Modified: trunk/src/org/hyperic/hq/hqu/rendit_sys/metaclass/ResourceCategory.groovy Log: getAlertDefinitions() should only return definitions that have not been deleted. Modified: trunk/src/org/hyperic/hq/hqu/rendit_sys/metaclass/ResourceCategory.groovy =================================================================== --- trunk/src/org/hyperic/hq/hqu/rendit_sys/metaclass/ResourceCategory.groovy 2009-05-19 22:35:55 UTC (rev 13202) +++ trunk/src/org/hyperic/hq/hqu/rendit_sys/metaclass/ResourceCategory.groovy 2009-05-19 23:13:55 UTC (rev 13203) @@ -155,13 +155,15 @@ } static List getAlertDefinitions(Resource r, AuthzSubject user) { + def alertDefs if (r.isPlatform() || r.isServer() || r.isService()) { // Individual alert definition - return defMan.findAlertDefinitions(user, r.entityId) + alertDefs = defMan.findAlertDefinitions(user, r.entityId) } else { // Resource type alert definition - return defMan.findAlertDefinitions(user, r) + alertDefs = defMan.findAlertDefinitions(user, r) } + alertDefs.findAll { !it.deleted } } /** |