Search in sources :

Example 6 with ALERT_TYPE

use of com.ctrip.xpipe.redis.console.alert.ALERT_TYPE in project x-pipe by ctripcorp.

the class ScheduledAlertMessageDecorator method generateBody.

public String generateBody(Map<ALERT_TYPE, Set<AlertEntity>> redisAlerts) {
    VelocityContext context = generateCommonContext();
    for (ALERT_TYPE type : redisAlerts.keySet()) {
        context.put(type + "", type);
    }
    context.put("redisAlerts", redisAlerts);
    context.put("title", generateTitle());
    return getRenderedString(TEMPLATE_NAME, context);
}
Also used : VelocityContext(org.apache.velocity.VelocityContext) ALERT_TYPE(com.ctrip.xpipe.redis.console.alert.ALERT_TYPE)

Aggregations

ALERT_TYPE (com.ctrip.xpipe.redis.console.alert.ALERT_TYPE)6 AlertEntity (com.ctrip.xpipe.redis.console.alert.AlertEntity)5 AbstractConsoleIntegrationTest (com.ctrip.xpipe.redis.console.AbstractConsoleIntegrationTest)4 Test (org.junit.Test)4 HostPort (com.ctrip.xpipe.endpoint.HostPort)3 ConcurrentSet (io.netty.util.internal.ConcurrentSet)2 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)2 HashMap (java.util.HashMap)1 Set (java.util.Set)1 VelocityContext (org.apache.velocity.VelocityContext)1