use of com.alibaba.otter.shared.common.model.config.alarm.AlarmRule in project otter by alibaba.
the class AlarmSystemList method execute.
public void execute(@Param("pipelineId") Long pipelineId, @Param("pageIndex") int pageIndex, Context context) throws Exception {
Map<String, Object> condition = new HashMap<String, Object>();
int count = alarmRuleService.getCount();
Paginator paginator = new Paginator();
paginator.setItems(count);
paginator.setPage(pageIndex);
condition.put("offset", paginator.getOffset());
condition.put("length", paginator.getLength());
List<AlarmRule> alarmRules = alarmRuleService.listAllAlarmRules(condition);
StringBuffer buffer = new StringBuffer();
for (AlarmRule alarmRule : alarmRules) {
buffer.append(alarmRule.getId());
buffer.append(",");
}
context.put("alarmRules", alarmRules);
context.put("alarmRuleIds", buffer.toString());
context.put("paginator", paginator);
}
Aggregations