Skip to content
Snippets Groups Projects
Commit 47c05f71 authored by felmer's avatar felmer
Browse files

LMS-1888 weave in SyBIT image viewer, change launch button label, close...

LMS-1888 weave in SyBIT image viewer, change launch button label, close WellContentDialog after launching image viewer

SVN: 18832
parent 9506d95b
No related branches found
No related tags found
No related merge requests found
...@@ -44,5 +44,6 @@ ...@@ -44,5 +44,6 @@
<classpathentry kind="lib" path="/libraries/nativedata"/> <classpathentry kind="lib" path="/libraries/nativedata"/>
<classpathentry kind="lib" path="/libraries/fastutil/fastutil.jar" sourcepath="/libraries/fastutil/fastutil-src.zip"/> <classpathentry kind="lib" path="/libraries/fastutil/fastutil.jar" sourcepath="/libraries/fastutil/fastutil-src.zip"/>
<classpathentry kind="lib" path="/libraries/jline/jline.jar" sourcepath="/libraries/jline/src.zip"/> <classpathentry kind="lib" path="/libraries/jline/jline.jar" sourcepath="/libraries/jline/src.zip"/>
<classpathentry kind="lib" path="/libraries/sybit-image-viewer/image-viewer.jar"/>
<classpathentry kind="output" path="targets/www/WEB-INF/classes"/> <classpathentry kind="output" path="targets/www/WEB-INF/classes"/>
</classpath> </classpath>
...@@ -193,6 +193,10 @@ ...@@ -193,6 +193,10 @@
<param name="dir" value="${lib}/cisd-base" /> <param name="dir" value="${lib}/cisd-base" />
<param name="jar" value="cisd-base.jar" /> <param name="jar" value="cisd-base.jar" />
</antcall> </antcall>
<antcall target="copy-and-sign-jar">
<param name="dir" value="${lib}/sybit-image-viewer" />
<param name="jar" value="image-viewer.jar" />
</antcall>
<antcall target="copy-and-sign-jar"> <antcall target="copy-and-sign-jar">
<param name="dir" value="${lib}/spring" /> <param name="dir" value="${lib}/spring" />
<param name="jar" value="spring-web.jar" /> <param name="jar" value="spring-web.jar" />
......
...@@ -442,6 +442,7 @@ public class WellContentDialog extends Dialog ...@@ -442,6 +442,7 @@ public class WellContentDialog extends Dialog
Window.open(urlParams.toString(), "_blank", Window.open(urlParams.toString(), "_blank",
"resizable=yes,scrollbars=yes,dependent=yes"); "resizable=yes,scrollbars=yes,dependent=yes");
hide();
} }
}); });
......
...@@ -79,7 +79,7 @@ var screening = { ...@@ -79,7 +79,7 @@ var screening = {
EXPERIMENT_PLATE_MATERIAL_BROWSER_SECTION: "Library Index", EXPERIMENT_PLATE_MATERIAL_BROWSER_SECTION: "Library Index",
EXACT_MATCH_ONLY: "Exact Matches Only", EXACT_MATCH_ONLY: "Exact Matches Only",
image_viewer_button: "Launch Image Viewer", image_viewer_button: "Adjust Colors",
// LAST LINE: KEEP IT AT THE END // LAST LINE: KEEP IT AT THE END
lastline: "" // we need a line without a comma lastline: "" // we need a line without a comma
......
...@@ -30,11 +30,14 @@ import javax.servlet.http.HttpServletRequest; ...@@ -30,11 +30,14 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import ch.systemsx.cisd.base.exceptions.CheckedExceptionTunnel; import ch.systemsx.cisd.base.exceptions.CheckedExceptionTunnel;
import ch.systemsx.cisd.common.exceptions.UserFailureException; import ch.systemsx.cisd.common.exceptions.UserFailureException;
import ch.systemsx.cisd.common.logging.LogCategory;
import ch.systemsx.cisd.common.logging.LogFactory;
import ch.systemsx.cisd.common.utilities.Template; import ch.systemsx.cisd.common.utilities.Template;
import ch.systemsx.cisd.openbis.generic.client.web.server.AbstractServlet; import ch.systemsx.cisd.openbis.generic.client.web.server.AbstractServlet;
import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.ParameterNames; import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.ParameterNames;
...@@ -66,6 +69,7 @@ public class ImageViewerLaunchServlet extends AbstractServlet ...@@ -66,6 +69,7 @@ public class ImageViewerLaunchServlet extends AbstractServlet
+ " <j2se version='1.5+'/>\n" + " <j2se version='1.5+'/>\n"
+ " <jar href='screening.jar'/>\n" + " <jar href='screening.jar'/>\n"
+ " <jar href='cisd-base.jar'/>\n" + " <jar href='cisd-base.jar'/>\n"
+ " <jar href='image-viewer.jar'/>\n"
+ " <jar href='spring-web.jar'/>\n" + " <jar href='spring-web.jar'/>\n"
+ " <jar href='spring-context.jar'/>\n" + " <jar href='spring-context.jar'/>\n"
+ " <jar href='spring-beans.jar'/>\n" + " <jar href='spring-beans.jar'/>\n"
...@@ -87,9 +91,11 @@ public class ImageViewerLaunchServlet extends AbstractServlet ...@@ -87,9 +91,11 @@ public class ImageViewerLaunchServlet extends AbstractServlet
+ "${data-set-and-wells-arguments}\n" + "${data-set-and-wells-arguments}\n"
+ " </application-desc>\n" + "</jnlp>\n"); + " </application-desc>\n" + "</jnlp>\n");
private final Logger operationLog;
public ImageViewerLaunchServlet() public ImageViewerLaunchServlet()
{ {
operationLog = LogFactory.getLogger(LogCategory.OPERATION, getClass());
} }
@Override @Override
...@@ -107,8 +113,10 @@ public class ImageViewerLaunchServlet extends AbstractServlet ...@@ -107,8 +113,10 @@ public class ImageViewerLaunchServlet extends AbstractServlet
template.bind("base-URL", createBaseURL(request)); template.bind("base-URL", createBaseURL(request));
template.bind("main-class", getMainClass()); template.bind("main-class", getMainClass());
template.bind("service-URL", basicURL); template.bind("service-URL", basicURL);
template.bind("session-id", getSessionToken(request)); String sessionToken = getSessionToken(request);
template.bind("channel", getParam(request, ParameterNames.CHANNEL)); template.bind("session-id", sessionToken);
String channel = getParam(request, ParameterNames.CHANNEL);
template.bind("channel", channel);
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
for (String dataSetAndWells : getParams(request, ParameterNames.DATA_SET_AND_WELLS)) for (String dataSetAndWells : getParams(request, ParameterNames.DATA_SET_AND_WELLS))
{ {
...@@ -117,6 +125,11 @@ public class ImageViewerLaunchServlet extends AbstractServlet ...@@ -117,6 +125,11 @@ public class ImageViewerLaunchServlet extends AbstractServlet
template.bind("data-set-and-wells-arguments", builder.toString()); template.bind("data-set-and-wells-arguments", builder.toString());
writer.print(template.createText()); writer.print(template.createText());
writer.close(); writer.close();
if (operationLog.isInfoEnabled())
{
operationLog.info("Start Image Viewer for session " + sessionToken
+ " and channel " + channel);
}
} catch (UserFailureException ex) } catch (UserFailureException ex)
{ {
printError(response, ex.getMessage()); printError(response, ex.getMessage());
...@@ -125,7 +138,7 @@ public class ImageViewerLaunchServlet extends AbstractServlet ...@@ -125,7 +138,7 @@ public class ImageViewerLaunchServlet extends AbstractServlet
private String getMainClass() private String getMainClass()
{ {
return "ch.systemsx.cisd.openbis.plugin.screening.client.api.v1.ImageViewer"; return "ch.systemsx.sybit.imageviewer.gui.ImageViewer";
} }
private String createBaseURL(HttpServletRequest request) private String createBaseURL(HttpServletRequest request)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment