From: Sasha Sherstnev Date: Mon, 16 Sep 2013 14:17:02 +0000 (+0100) Subject: Re-design the ServiceStatus JSP page X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=bd6c0919476cff487ea479588d5ad9f3bdd5af1e;p=jabaws.git Re-design the ServiceStatus JSP page --- diff --git a/statpages/ServicesStatus.jsp b/statpages/ServicesStatus.jsp index b9c4fb2..7f5ffcd 100644 --- a/statpages/ServicesStatus.jsp +++ b/statpages/ServicesStatus.jsp @@ -1,6 +1,5 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%-- Author: Peter Troshin Date: May 2011 @@ -13,64 +12,170 @@ TODO refactor <%@ taglib uri="http://displaytag.sf.net" prefix="dt" %> - JABAWS Services Status - + JABAWS Web Services Status +

JABAWS Services Status

-

Server: - -${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}

+ + + +

-

All the services were tested while this page was loading. If you want to test the services again, just reload this page. Click on the service status to see the results of the testing.

+

+ Alignment Web Services +

- - - - + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + + + +
ServiceStatus
ServiceVersionStatusReference and more details
${res.service} - - - -
- + + +
${res.service}${res.version}
+ +
+ +
+ -
- - -
- - -
+
${res.reference}
+
- - - - - +
+
+

+ Disorder Web Services +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ServiceVersionStatusReference and more details
${res.service}${res.version}
+ +
+ +
+ +
+
+
+

+ Other Web Services +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
ServiceVersionStatusReference and more details
${res.service}${res.version}
+ +
+ +
+ +
+

If you would like to integrate JABAWS with automated health check system you may want to use the HTTP code response service checker. It responds with HTTP status code depending on the status of the web service. diff --git a/webservices/compbio/stat/servlet/ServiceTestResult.java b/webservices/compbio/stat/servlet/ServiceTestResult.java index e616f57..d03e6bd 100644 --- a/webservices/compbio/stat/servlet/ServiceTestResult.java +++ b/webservices/compbio/stat/servlet/ServiceTestResult.java @@ -14,15 +14,20 @@ public class ServiceTestResult { final Services service; boolean failed; String details; + String group; + String version; + String reference; public ServiceTestResult(Services service) { this.service = service; + this.group = service.getServiceGroup(); + this.version = service.getServiceVersion(); + this.reference = service.getServiceReference(); } @Override public String toString() { - return "ServiceTestResult [service=" + service + ", failed=" + failed - + ", details=" + details.toString() + "]"; + return "ServiceTestResult [service=" + service + ", failed=" + failed + ", details=" + details.toString() + "]"; } @Override @@ -59,4 +64,15 @@ public class ServiceTestResult { return details; } + public String getGroup() { + return group; + } + + public String getVersion() { + return version; + } + + public String getReference() { + return reference; + } } diff --git a/webservices/compbio/ws/client/Services.java b/webservices/compbio/ws/client/Services.java index 741f6d5..42d282e 100644 --- a/webservices/compbio/ws/client/Services.java +++ b/webservices/compbio/ws/client/Services.java @@ -127,111 +127,205 @@ public enum Services { public String getServiceInfo() { switch (this) { case AAConWS : - return AACON_INFO; + return AACON_INFO.toString(); case JpredWS : - return JPRED_INFO; + return JPRED_INFO.toString(); case ClustalOWS : - return CLUSTAL_OMEGA_INFO; + return CLUSTAL_OMEGA_INFO.toString(); case ClustalWS : - return CLUSTAL_INFO; + return CLUSTAL_INFO.toString(); case DisemblWS : - return DISEMBL_INFO; + return DISEMBL_INFO.toString(); case GlobPlotWS : - return GLOBPLOT_INFO; + return GLOBPLOT_INFO.toString(); case IUPredWS : - return IUPRED_INFO; + return IUPRED_INFO.toString(); case JronnWS : - return JRONN_INFO; + return JRONN_INFO.toString(); case MafftWS : - return MAFFT_INFO; + return MAFFT_INFO.toString(); case MuscleWS : - return MUSCLE_INFO; + return MUSCLE_INFO.toString(); case ProbconsWS : - return PROBCONS_INFO; + return PROBCONS_INFO.toString(); case TcoffeeWS : - return TCOFFEE_INFO; + return TCOFFEE_INFO.toString(); case RNAalifoldWS : - return RNAALIFOLD_INFO; + return RNAALIFOLD_INFO.toString(); default : throw new RuntimeException("Unrecognised Web Service Type " + this + " - Should never happen!"); } } - public static final String AACON_INFO = new ServiceInfo(AAConWS, - "in preparation", "1.0", "http://www.compbio.dundee.ac.uk/aacon").toString(); + public String getServiceReference() { + switch (this) { + case AAConWS : + return AACON_INFO.getReference(); + case JpredWS : + return JPRED_INFO.getReference(); + case ClustalOWS : + return CLUSTAL_OMEGA_INFO.getReference(); + case ClustalWS : + return CLUSTAL_INFO.getReference(); + case DisemblWS : + return DISEMBL_INFO.getReference(); + case GlobPlotWS : + return GLOBPLOT_INFO.getReference(); + case IUPredWS : + return IUPRED_INFO.getReference(); + case JronnWS : + return JRONN_INFO.getReference(); + case MafftWS : + return MAFFT_INFO.getReference(); + case MuscleWS : + return MUSCLE_INFO.getReference(); + case ProbconsWS : + return PROBCONS_INFO.getReference(); + case TcoffeeWS : + return TCOFFEE_INFO.getReference(); + case RNAalifoldWS : + return RNAALIFOLD_INFO.getReference(); + default : + throw new RuntimeException("Unrecognised Web Service Type " + this + " - Should never happen!"); + } + } - public static final String JPRED_INFO = new ServiceInfo(JpredWS, + public String getServiceVersion() { + switch (this) { + case AAConWS : + return AACON_INFO.getVersion(); + case JpredWS : + return JPRED_INFO.getVersion(); + case ClustalOWS : + return CLUSTAL_OMEGA_INFO.getVersion(); + case ClustalWS : + return CLUSTAL_INFO.getVersion(); + case DisemblWS : + return DISEMBL_INFO.getVersion(); + case GlobPlotWS : + return GLOBPLOT_INFO.getVersion(); + case IUPredWS : + return IUPRED_INFO.getVersion(); + case JronnWS : + return JRONN_INFO.getVersion(); + case MafftWS : + return MAFFT_INFO.getVersion(); + case MuscleWS : + return MUSCLE_INFO.getVersion(); + case ProbconsWS : + return PROBCONS_INFO.getVersion(); + case TcoffeeWS : + return TCOFFEE_INFO.getVersion(); + case RNAalifoldWS : + return RNAALIFOLD_INFO.getVersion(); + default : + throw new RuntimeException("Unrecognised Web Service Type " + this + " - Should never happen!"); + } + } + + public String getServiceGroup() { + switch (this) { + case AAConWS : + return "annotation"; + case JpredWS : + return "annotation"; + case ClustalOWS : + return "alignment"; + case ClustalWS : + return "alignment"; + case DisemblWS : + return "disorder"; + case GlobPlotWS : + return "disorder"; + case IUPredWS : + return "disorder"; + case JronnWS : + return "disorder"; + case MafftWS : + return "alignment"; + case MuscleWS : + return "alignment"; + case ProbconsWS : + return "alignment"; + case TcoffeeWS : + return "alignment"; + case RNAalifoldWS : + return "annotation"; + default : + throw new RuntimeException("Unrecognised Web Service Type " + this + " - Should never happen!"); + } + } + + static ServiceInfo AACON_INFO = new ServiceInfo(AAConWS, + "in preparation", "1.0", "http://www.compbio.dundee.ac.uk/aacon"); + + static ServiceInfo JPRED_INFO = new ServiceInfo(JpredWS, "Cole C, Barber JD, Barton GJ.reparation" + "The Jpred 3 secondary structure prediction server\n" + "Nucl. Acids Res. (2008) 36 (suppl 2): W197-W201., doi: 10.1093/nar/gkn238", - "3.0", "http://www.compbio.dundee.ac.uk/www-jpred").toString(); + "3.0.3", "http://www.compbio.dundee.ac.uk/www-jpred"); - public static final String CLUSTAL_INFO = new ServiceInfo(ClustalWS, + static ServiceInfo CLUSTAL_INFO = new ServiceInfo(ClustalWS, "Larkin MA, Blackshields G, Brown NP, Chenna R, McGettigan PA, McWilliam H, Valentin F, " + "Wallace IM, Wilm A, Lopez R, Thompson JD, Gibson TJ, Higgins DG.\n" + "(2007). Clustal W and Clustal X version 2.0. Bioinformatics, 23, 2947-2948.", - "2.0.12", "http://www.clustal.org/clustal2/").toString(); + "2.0.12", "http://www.clustal.org/clustal2/"); - public static final String CLUSTAL_OMEGA_INFO = new ServiceInfo(ClustalOWS, + static ServiceInfo CLUSTAL_OMEGA_INFO = new ServiceInfo(ClustalOWS, "Fast, scalable generation of high quality protein multiple sequence alignments using Clustal Omega\r\n" + "Fabian Sievers, Andreas Wilm, David Dineen, Toby J. Gibson, Kevin Karplus, Weizhong Li, Rodrigo Lopez, Hamish McWilliam, Michael Remmert, Johannes Söding, Julie D. Thompson, Desmond G. Higgins", - "1.0.2", "http://www.clustal.org/omega").toString(); + "1.0.2", "http://www.clustal.org/omega"); - public static final String DISEMBL_INFO = new ServiceInfo(DisemblWS, + static ServiceInfo DISEMBL_INFO = new ServiceInfo(DisemblWS, "R. Linding, L.J. Jensen, F. Diella, P. Bork, T.J. Gibson and R.B. Russell\r\n" + "Protein disorder prediction: implications for structural proteomics\r\n" + "Structure Vol 11, Issue 11, 4 November 2003", "1.5", - "http://dis.embl.de/").toString(); + "http://dis.embl.de/"); - public static final String GLOBPLOT_INFO = new ServiceInfo(GlobPlotWS, + static ServiceInfo GLOBPLOT_INFO = new ServiceInfo(GlobPlotWS, "Rune Linding, Robert B. Russell, Victor Neduva and Toby J. Gibson " + "'GlobPlot: exploring protein sequences for globularity and disorder.' " + "Nucl. Acids Res. (2003) 31 (13): 3701-3708. doi: 10.1093/nar/gkg519\r\n", - "2.3", "http://globplot.embl.de/").toString(); + "2.3", "http://globplot.embl.de/"); - public static final String IUPRED_INFO = new ServiceInfo(IUPredWS, + static ServiceInfo IUPRED_INFO = new ServiceInfo(IUPredWS, "The Pairwise Energy Content Estimated from Amino Acid Composition Discriminates between Folded and Intrinsically Unstructured Proteins\r\n" + "Zsuzsanna Dosztányi, Veronika Csizmók, Péter Tompa and István Simon\r\n" + "J. Mol. Biol. (2005) 347, 827-839.", "1.0", - "http://iupred.enzim.hu/").toString(); + "http://iupred.enzim.hu/"); - public static final String TCOFFEE_INFO = new ServiceInfo(TcoffeeWS, + static ServiceInfo TCOFFEE_INFO = new ServiceInfo(TcoffeeWS, "T-Coffee: A novel method for multiple sequence alignments " + "Notredame, Higgins, Heringa, JMB, 302 (205-217) 2000", - "8.99", "http://tcoffee.crg.cat/apps/tcoffee/index.html").toString(); + "8.99", "http://tcoffee.crg.cat/apps/tcoffee/index.html"); - public static final String MUSCLE_INFO = new ServiceInfo( - MuscleWS, + static ServiceInfo MUSCLE_INFO = new ServiceInfo(MuscleWS, "Edgar, R.C. (2004) MUSCLE: multiple sequence alignment with high accuracy and high throughput.Nucleic Acids Res. 32(5):1792-1797.\r\n" + "doi:10.1093/nar/gkh340", "3.8.31", - "http://www.drive5.com/muscle/").toString(); + "http://www.drive5.com/muscle/"); - public static final String PROBCONS_INFO = new ServiceInfo( - ProbconsWS, + static ServiceInfo PROBCONS_INFO = new ServiceInfo(ProbconsWS, "Do, C.B., Mahabhashyam, M.S.P., Brudno, M., and Batzoglou, S. 2005. PROBCONS: " + "Probabilistic Consistency-based Multiple Sequence Alignment. Genome Research 15: 330-340. ", - "1.12", "http://probcons.stanford.edu/").toString(); + "1.12", "http://probcons.stanford.edu/"); - public static final String JRONN_INFO = new ServiceInfo( - JronnWS, + static ServiceInfo JRONN_INFO = new ServiceInfo(JronnWS, "unpublished, original algorithm Yang,Z.R., Thomson,R., McMeil,P. and Esnouf,R.M. (2005) " + "RONN: the bio-basis function neural network technique applied to the " + "dectection of natively disordered regions in proteins Bioinformatics 21: 3369-3376\r\n", - "1.0", "http://www.compbio.dundee.ac.uk/jabaws/").toString(); + "1.0", "http://www.compbio.dundee.ac.uk/jabaws/"); - public static final String MAFFT_INFO = new ServiceInfo( - MafftWS, + static ServiceInfo MAFFT_INFO = new ServiceInfo(MafftWS, "Katoh, Toh 2010 (Bioinformatics 26:1899-1900)\r\n" + "Parallelization of the MAFFT multiple sequence alignment program. ", - "6.8.57", "http://mafft.cbrc.jp/alignment/software/").toString(); + "6.8.57", "http://mafft.cbrc.jp/alignment/software/"); - public static final String RNAALIFOLD_INFO = new ServiceInfo( - RNAalifoldWS, + static ServiceInfo RNAALIFOLD_INFO = new ServiceInfo(RNAalifoldWS, "Ivo L. Hofacker, Martin Fekete, and Peter F. Stadler 'Secondary Structure Prediction" + " for Aligned RNA Sequences'. J.Mol.Biol. 319: 1059-1066, 2002. Stephan H. Bernhart," + " Ivo L. Hofacker, Sebastian Will, Andreas R. Gruber, and Peter F. Stadler. " + "'RNAalifold: Improved consensus structure prediction for RNA alignments'. BMC Bioinformatics, 9:474, 2008.\r\n", - "2.1.2", "http://www.tbi.univie.ac.at/RNA/").toString(); + "2.1.2", "http://www.tbi.univie.ac.at/RNA/"); @XmlAccessorType(XmlAccessType.FIELD) static class ServiceInfo { @@ -255,12 +349,20 @@ public enum Services { @Override public String toString() { - String value = "SERVICE: " + service + " version " + version + line_delimiter; + String value = "SERVICE: " + service + " version " + version + line_delimiter + "\n"; value += "JABAWS v. " + jabaws_version + line_delimiter; - value += "REFERENCES: " + reference + line_delimiter; + value += "REFERENCE: " + reference + line_delimiter + "\n"; value += "MORE INFORMATION: " + moreinfo + line_delimiter; return value; } + + public String getReference() { + return "REFERENCE: " + reference + line_delimiter + "
MORE INFORMATION: " + moreinfo + line_delimiter; + } + + public String getVersion() { + return version; + } } public static void main(String[] args) {