Skip to content

uwsgi integration #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions hicbrowser/client/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@

<title>HiCBrowser</title>

<!-- build:css /static/css/App.css -->
<link rel="stylesheet" href="../static/css/App.css">
<!-- build:css static/css/App.css -->
<link rel="stylesheet" href="static/css/App.css">
<!-- /build -->

</head>

<body>

<header class="intro-header" style="background-image: url(../static/img/banner.jpg)">
<header class="intro-header" style="background-image: url(static/img/banner.jpg)">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<div class="site-heading">
<div class="search-box">
<div class="row">
<div class="col-md-2">
<div class="fly">
<img src="/static/img/circose.png">
<img src="static/img/circose.png">
</div>
</div>
<div class="col-md-9 col-md-offset-1">
Expand All @@ -50,21 +50,21 @@ <h1>HiCBrowser</h1>
<div class="container">
<div class="row">
<div class="col-md-3 img-portfolio vcenter">
<!-- build:src /static/img/minerva.png -->
<img src="../static/img/minerva.png">
<!-- build:src static/img/minerva.png -->
<img src="static/img/minerva.png">
<!-- /build -->
</div>
<div class="col-md-3 img-portfolio vcenter">
<a href="http://www.ie-freiburg.mpg.de/">
<!-- build:src /static/img/ie_logo.png -->
<img src="../static/img/ie_logo.png">
<!-- build:src static/img/ie_logo.png -->
<img src="static/img/ie_logo.png">
<!-- /build -->
</a>
</div>
<div class="col-md-3 img-portfolio vcenter">
<a href="http://www.biochem.mpg.de">
<!-- build:src /static/img/biochem.logo.png -->
<img src="../static/img/biochem.logo.png">
<!-- build:src static/img/biochem.logo.png -->
<img src="static/img/biochem.logo.png">
<!-- /build -->
</a>
</div>
Expand All @@ -74,8 +74,8 @@ <h1>HiCBrowser</h1>


</body>
<!-- build:js /static/js/App.js -->
<script src="../static/js/App.js"></script>
<!-- build:js static/js/App.js -->
<script src="static/js/App.js"></script>
<!-- /build -->

<script>
Expand Down
4 changes: 2 additions & 2 deletions hicbrowser/client/js/models/browser.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = Backbone.Model.extend({
urlRoot: '/browser'
});
urlRoot: 'browser'
});
4 changes: 2 additions & 2 deletions hicbrowser/client/js/models/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = Backbone.Model.extend({
defaults: {
browser_example: '',
gene_example: '',
icon: '/static/img/circose.png'
icon: 'static/img/circose.png'
},
urlRoot: '/static/json/config.json'
urlRoot: 'static/json/config.json'
});
4 changes: 2 additions & 2 deletions hicbrowser/client/js/models/gene.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = Backbone.Model.extend({
urlRoot: '/gene'
});
urlRoot: 'gene'
});
22 changes: 11 additions & 11 deletions hicbrowser/client/js/templates.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 20 additions & 20 deletions hicbrowser/client/js/views/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,75 +15,75 @@ function _getParameterByName(name, url) {
}

function _onload(e){

var img = e.target;

var imgWrapper = img.parentNode;
imgWrapper.className += imgWrapper.className ? ' loaded' : 'loaded';
}

function _onerror(e){
var img = e.target;
img.src = '/static/img/not_found.png';
img.src = 'static/img/not_found.png';

var imgWrapper = img.parentNode;
imgWrapper.className += imgWrapper.className ? ' loaded' : 'loaded';
}

function _load_images(imgDefer, n, index){

var i = index || 0, j = 0;
while( i < imgDefer.length && j < n){
if(imgDefer[i].getAttribute('data-original')) {

imgDefer[i].onload = _onload;
imgDefer[i].onerror = _onerror;
imgDefer[i].setAttribute('src', imgDefer[i].getAttribute('data-original'));
j ++;
}
i++;
}

if(i < imgDefer.length -1 ){
setTimeout(_load_images, 600, imgDefer, n, i);
}
}


module.exports = Backbone.View.extend({

initialize: function(options){
this.options = options;
},

render: function(render){

if(render.region === _browser.region){
return;
}

render.tracks = _.sortBy(_.flatten(render.tracks), function(url){
return + _getParameterByName('id', url);
});

$(this.options.el).css({opacity: 0.0, visibility: 'hidden'});


var tpl = templates.browser(render);

if( ! _.isUndefined($div) ) $div.remove();

$div = $('<div></div>')
.hide()
.append(tpl);

$(this.el).append($div);

_load_images(document.getElementsByTagName('img'), 6);
},

setVisible: function(){
$div.show().siblings().hide();
$(this.el).css({opacity: 0.0, visibility: 'visible'}).animate({opacity: 1.0}, 800);
}
});
});
2 changes: 1 addition & 1 deletion hicbrowser/client/templates/gene.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<ul class="nav nav-pills">
<li class="active">
<a href="/#/browser/{{chromosome}}:{{start}}-{{end}}">Explore region in browser</a>
<a href="#/browser/{{chromosome}}:{{start}}-{{end}}">Explore region in browser</a>
</li>
</ul>
{{/if}}
Expand Down
4 changes: 2 additions & 2 deletions hicbrowser/client/templates/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<p>It is based on <strong>HiCExplorer</strong>, a set of programs that enable you to process, normalize, analyze and visualize Hi-C data.</p>
</div>
<div class="col-md-6">
<!-- build:src /static/img/vis.png -->
<img class="img-responsive" src="../static/img/vis.png" alt="">
<!-- build:src static/img/vis.png -->
<img class="img-responsive" src="static/img/vis.png" alt="">
<!-- /build -->
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions hicbrowser/client/templates/loading.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="search-box" style="width:100%">
<!-- build:src /static/img/loading.gif -->
<img src="../static/img/loading.gif">
<!-- build:src static/img/loading.gif -->
<img src="static/img/loading.gif">
<!-- /build -->
<h1>Loading ...</h1>
</div>
</div>
</div>
</div>
</div>
Loading