From: <cl...@hy...> - 2009-01-26 19:08:43
|
Author: clee Date: 2009-01-26 11:08:31 -0800 (Mon, 26 Jan 2009) New Revision: 12356 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=12356 Modified: trunk/ui_plugins/health/app/HealthController.groovy trunk/ui_plugins/health/etc/health_i18n.properties Log: Add selecting and purging of orphaned escalation for health plugin Modified: trunk/ui_plugins/health/app/HealthController.groovy =================================================================== --- trunk/ui_plugins/health/app/HealthController.groovy 2009-01-26 18:43:56 UTC (rev 12355) +++ trunk/ui_plugins/health/app/HealthController.groovy 2009-01-26 19:08:31 UTC (rev 12356) @@ -485,6 +485,13 @@ query: "SELECT COUNT(*) FROM EAM_AUDIT WHERE NOT EXISTS " + "(SELECT RESOURCE_GROUP_ID FROM EAM_RES_GRP_RES_MAP " + "WHERE EAM_AUDIT.RESOURCE_ID = EAM_RES_GRP_RES_MAP.RESOURCE_ID)"], + orphanedEscalationState: [ + name: localeBundle['queryOrphanedEscalationState'], + query: "SELECT COUNT(*) FROM EAM_ESCALATION_STATE WHERE " + + "(ALERT_TYPE = 559038737 AND NOT EXISTS " + + "(SELECT 1 FROM EAM_ALERT WHERE ALERT_ID = EAM_ALERT.ID)) OR " + + "(ALERT_TYPE = 195934910 AND NOT EXISTS " + + "(SELECT 1 FROM EAM_GALERT_LOGS WHERE ALERT_ID = EAM_GALERT_LOGS.ID))"], resourceAlertsActiveButDisabled: [ name: localeBundle['queryResourceAlertDefsActiveButDisabled'], query: {conn -> "select id, name, description, resource_id from EAM_ALERT_DEFINITION where "+ @@ -526,6 +533,15 @@ "DELETE FROM EAM_AIQ_PLATFORM", ] ], + escStatePurge: [ + name: localeBundle['actionPurgeEscState'], + query: [ "DELETE FROM EAM_ESCALATION_STATE WHERE " + + "(ALERT_TYPE = 559038737 AND NOT EXISTS " + + "(SELECT 1 FROM EAM_ALERT WHERE ALERT_ID = EAM_ALERT.ID)) OR " + + "(ALERT_TYPE = 195934910 AND NOT EXISTS " + + "(SELECT 1 FROM EAM_GALERT_LOGS WHERE ALERT_ID = EAM_GALERT_LOGS.ID))", + ] + ], ] } Modified: trunk/ui_plugins/health/etc/health_i18n.properties =================================================================== --- trunk/ui_plugins/health/etc/health_i18n.properties 2009-01-26 18:43:56 UTC (rev 12355) +++ trunk/ui_plugins/health/etc/health_i18n.properties 2009-01-26 19:08:31 UTC (rev 12356) @@ -55,10 +55,12 @@ queryOrphanedResources=Orphaned Resource Count queryOrphanedAlertDefs=Orphaned AlertDef Count queryOrphanedAuditRows=Orphaned Audit Count +queryOrphanedEscalationState=Stalled Escalations queryResourceAlertDefsActiveButDisabled=Active But Disabled Resource Alert Defs queryResourceTypeAlertDefsWithTriggers=Resource Type Alert Defs with Triggers queryVersion=Database Version Information actionPurgeAI=Purge AIQ Data +actionPurgeEscState=Purge Stalled Escalations noResultsFound=The query returned no results numPlatforms=# Platforms numServers=# Servers |