Skip to content
Snippets Groups Projects
Commit 8def8394 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

pileup visualization updated

popup window when clicking on a variant gene in geneome broswer added
parent a949048e
No related branches found
No related tags found
1 merge request!5Frontend refactor
Showing
with 1719 additions and 965 deletions
......@@ -131,6 +131,32 @@ public class BigFileCache {
});
}
/**
* Returns a path for a file in local file system.
*
* @param url
* ftp url to the file
* @return a path for a file in local file systeml
* @throws FileNotFoundException
* thrown when file should be in file system, but couldn't be found
* there (somebody manually removed it)
*/
public String getAbsolutePathForFile(String url) throws FileNotFoundException {
BigFileEntry entry = bigFileEntryDao.getByUrl(url);
if (entry == null) {
return null;
}
if (entry.getDownloadProgress() == null || entry.getDownloadProgress() < 100.0) {
throw new FileNotFoundException("File is not complete: " + entry.getLocalPath() + ". Downloaded from: " + url);
}
File f = new File(Configuration.getWebAppDir() + entry.getLocalPath());
if (!f.exists()) {
throw new FileNotFoundException("Missing big file: " + Configuration.getWebAppDir() + entry.getLocalPath() + ". Downloaded from: " + url);
}
return f.getAbsolutePath();
}
/**
* Returns a path for a file in local file system for an ftp url.
*
......@@ -154,7 +180,7 @@ public class BigFileCache {
throw new FileNotFoundException("Missing big file: " + Configuration.getWebAppDir() + entry.getLocalPath() + ". Downloaded from: " + url);
}
return f.getAbsolutePath();
return entry.getLocalPath();
}
/**
......@@ -264,7 +290,7 @@ public class BigFileCache {
FTPClient ftp = ftpClientFactory.createFtpClient();
try {
try {
if (getLocalPathForFile(url) != null) {
if (getAbsolutePathForFile(url) != null) {
logger.warn("File already downloaded. Skipping...");
return null;
}
......@@ -386,7 +412,7 @@ public class BigFileCache {
CountingOutputStream cos = null;
try {
try {
if (getLocalPathForFile(url) != null) {
if (getAbsolutePathForFile(url) != null) {
logger.warn("File already downloaded. Skipping...");
return null;
}
......
......@@ -235,7 +235,7 @@ public class MiRNAParser extends CachableInterface implements IExternalService {
throw new IOException("Problem with downloading file: " + URL_SOURCE_DATABASE, e);
}
}
String filename = bigFileCache.getLocalPathForFile(URL_SOURCE_DATABASE);
String filename = bigFileCache.getAbsolutePathForFile(URL_SOURCE_DATABASE);
byte[] buffer = new byte[BUFFER_SIZE];
int len;
InputStream stream = new FileInputStream(new File(filename));
......
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<ui:include src="/WEB-INF/components/admin/header.xhtml" />
<h:form id="menuForm">
<p:menubar >
<p:menuitem value="Comments"
url="/admin/comments.xhtml?id=#{mapMB.currentMapId}"/>
<p:menuitem value="Map manager"
url="/admin/projects.xhtml?id=#{mapMB.currentMapId}"/>
<p:menuitem value="User manager"
url="/admin/users.xhtml?id=#{mapMB.currentMapId}"/>
<p:menuitem value="Service status"
url="/admin/status.xhtml?id=#{mapMB.currentMapId}"/>
<p:menuitem value="Configuration"
url="/admin/configuration.xhtml?id=#{mapMB.currentMapId}"/>
<p:menuitem value="Miriam"
url="/admin/miriam.xhtml?id=#{mapMB.currentMapId}"/>
<!-- <p:menuitem value="Genome"
url="/admin/genomes.xhtml?id=#{mapMB.currentMapId}"/> -->
<p:menuitem value="Manual"
onclick="window.open('#{request.contextPath}/javax.faces.resource/admin_guide.pdf.xhtml?ln=other','_admin_manual_');"/>
<p:menuitem value="Logout" actionListener="#{userMB.doLogout}"
oncomplete="location.reload();"
style="position: absolute; right: 6px; color:#ffffff; "/>
</p:menubar>
</h:form>
<script type="text/javascript">
$(window).load(function(){
var url=$(location).attr('href');
var active=-1;
if(url.indexOf('comments.xhtml')>0) active=0;
if(url.indexOf('projects.xhtml')>0) active=1;
if(url.indexOf('users.xhtml')>0) active=2;
if(url.indexOf('status.xhtml')>0) active=3;
if(url.indexOf('configuration.xhtml')>0) active=4;
if(url.indexOf('miriam.xhtml')>0) active=5;
if(active>-1){
var counter=0;
var tabs = $("a.ui-menuitem-link").each(function(){
if (counter==active) $(this).attr('class', 'ui-menuitem-link ui-corner-all ui-state-active');
counter++;
});
}
});
</script>
</html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<ui:include src="/WEB-INF/components/admin/header.xhtml" />
<h:form id="menuForm">
<p:menubar >
<p:menuitem value="Comments"
url="/admin/comments.xhtml?id=#{mapMB.currentMapId}"/>
<p:menuitem value="Map manager"
url="/admin/projects.xhtml?id=#{mapMB.currentMapId}"/>
<p:menuitem value="User manager"
url="/admin/users.xhtml?id=#{mapMB.currentMapId}"/>
<p:menuitem value="Service status"
url="/admin/status.xhtml?id=#{mapMB.currentMapId}"/>
<p:menuitem value="Configuration"
url="/admin/configuration.xhtml?id=#{mapMB.currentMapId}"/>
<p:menuitem value="Miriam"
url="/admin/miriam.xhtml?id=#{mapMB.currentMapId}"/>
<p:menuitem value="Genome"
url="/admin/genomes.xhtml?id=#{mapMB.currentMapId}"/>
<p:menuitem value="Manual"
onclick="window.open('#{request.contextPath}/javax.faces.resource/admin_guide.pdf.xhtml?ln=other','_admin_manual_');"/>
<p:menuitem value="Logout" actionListener="#{userMB.doLogout}"
oncomplete="location.reload();"
style="position: absolute; right: 6px; color:#ffffff; "/>
</p:menubar>
</h:form>
<script type="text/javascript">
$(window).load(function(){
var url=$(location).attr('href');
var active=-1;
if(url.indexOf('comments.xhtml')>0) active=0;
if(url.indexOf('projects.xhtml')>0) active=1;
if(url.indexOf('users.xhtml')>0) active=2;
if(url.indexOf('status.xhtml')>0) active=3;
if(url.indexOf('configuration.xhtml')>0) active=4;
if(url.indexOf('miriam.xhtml')>0) active=5;
if(active>-1){
var counter=0;
var tabs = $("a.ui-menuitem-link").each(function(){
if (counter==active) $(this).attr('class', 'ui-menuitem-link ui-corner-all ui-state-active');
counter++;
});
}
});
</script>
</html>
......@@ -87,14 +87,14 @@
<h:outputText value="FILE: " styleClass="smallBoldText"/>
<!-- <p:fileUpload fileUploadListener="#{layoutMB.handleFileUpload}" mode="advanced" auto="true" update="layoutName,layoutType" width="100px"/> -->
<p:fileUpload fileUploadListener="#{layoutMB.handleFileUpload}" mode="advanced" auto="true" update="layoutName" width="100px"/>
<p:fileUpload fileUploadListener="#{layoutMB.handleFileUpload}" mode="advanced" auto="true" update="layoutName,layoutType" width="100px"/>
<!-- <p:fileUpload fileUploadListener="#{layoutMB.handleFileUpload}" mode="advanced" auto="true" update="layoutName" width="100px"/> -->
<!-- <h:outputText value="TYPE: " styleClass="smallBoldText"/>
<h:outputText value="TYPE: " styleClass="smallBoldText"/>
<h:selectOneRadio id="layoutType" value="#{layoutMB.layoutType}">
<f:selectItems value="#{layoutMB.colorSchemaTypes}" var="type"
itemValue="#{type}" itemLabel="#{type}"/>
</h:selectOneRadio> -->
</h:selectOneRadio>
<h:outputText value="AVAILABLE OVERLAYS: " styleClass="smallBoldText"/>
<h:outputText id="layoutNumberGreen" value="#{layoutMB.availableCustomLayoutNumber}" rendered="#{layoutMB.availableCustomLayoutNumber>0}" styleClass="greenText"/>
......
......@@ -199,6 +199,7 @@ function removeComment(id) {
<h:body onload="initMap();" >
<h:outputStylesheet library="css" name="style.css"/>
<h:outputStylesheet library="css" name="pileup.css"/>
<h:outputStylesheet library="css" name="bootstrap.min.css"/>
<h:outputScript library="primefaces" name="jquery/jquery.js" target="head" />
<div class = "containerClass">
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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