}
@RequestMapping(value = "/solid/{referenceId}", method = RequestMethod.GET)
public ModelAndView solidStats(@PathVariable(value = "referenceId") Long referenceId, ModelMap model) throws IOException {
model.put("platformtype", PlatformType.SOLID);
SequencerReference sr = requestManager.getSequencerReferenceById(referenceId);
if (!sr.getPlatform().getPlatformType().equals(PlatformType.SOLID)) {
throw new IOException("Trying to interrogate a " + sr.getPlatform().getPlatformType().getKey() + " sequencer reference with a SOLiD strategy");
}
if (!sr.getPlatform().getInstrumentModel().contains("5500xl")) {
SolidService ss = new SolidService(new URL("http://"+sr.getFQDN()+":8080/sets/webservice/solid?wsdl"), new QName("http://solid.aga.appliedbiosystems.com", "SolidService"));
StringBuilder sb = new StringBuilder();
try {
InputStream in = StatsController.class.getResourceAsStream("/integration/solid/xsl/clusterStatus.xsl");
if (in != null) {
String xsl = LimsUtils.inputStreamToString(in);
sb.append(SubmissionUtils.xslTransform(ss.getSolidPort().getClusterStatus().getXml(), xsl));
}
}
catch (TransformerException e) {
sb.append("Unable to transform Cluster Status XML: " + e.getMessage());
e.printStackTrace();
}
model.put("clusterStatus", sb.toString());
}
model.put("stats", requestManager.listAllStatusBySequencerName(sr.getName()));
model.put("referenceName", sr.getName());
model.put("referenceId", sr.getId());
return new ModelAndView("/pages/viewStats.jsp", model);
}