/** * Renders the object * * @param object the object * @return the rendered model and view */ public String render(Object object) { ModelAndView modelAndView = (ModelAndView) object; return render(modelAndView); }
@Override public String render(ModelAndView modelAndView) { return engine.render(modelAndView); }
/** * Renders the object * * @param object the object * @return the rendered model and view */ public String render(Object object) { ModelAndView modelAndView = (ModelAndView) object; return render(modelAndView); }
@Override public String render(ModelAndView modelAndView) { return engine.render(modelAndView); }
@Override public Object adapt(int code, SparkWebContext context) { if (code == HttpConstants.UNAUTHORIZED) { stop(401, templateEngine.render(new ModelAndView(new HashMap<>(), "error401.mustache"))); } else if (code == HttpConstants.FORBIDDEN) { stop(403, templateEngine.render(new ModelAndView(new HashMap<>(), "error403.mustache"))); } else { return super.adapt(code, context); } return null; } }
String tableHtml = thymeleaf.render(new ModelAndView(params, "table")); response.status(200);
List<AnomalyReport> reports = executionService.getReports(anomalies, job); tableParams.put(DatabaseConstants.ANOMALIES, reports); String tableHtml = thymeleaf.render(new ModelAndView(tableParams, "table")); modelParams.put("tableHtml", tableHtml); } catch (Exception e) {
String data = gson.toJson(EgadsResult.fuseResults(egadsResult), jsonType); tableParams.put(DatabaseConstants.ANOMALIES, reports); String tableHtml = thymeleaf.render(new ModelAndView(tableParams, "table")); modelParams.put("tableHtml", tableHtml); modelParams.put("data", data);
tableParams.put(Constants.INSTANTVIEW, "true"); tableParams.put(DatabaseConstants.ANOMALIES, reports); params.put("tableHtml", thymeleaf.render(new ModelAndView(tableParams, "table"))); Type jsonType = new TypeToken<EgadsResult.Series[]>() { }.getType(); params.put("data", new Gson().toJson(EgadsResult.fuseResults(egadsResult), jsonType));