lazar-gui 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/docker/Dockerfile +3 -11
- data/docker/start.sh +4 -0
- data/views/layout.haml +1 -3
- metadata +2 -3
- data/docker/swagger.html +0 -107
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c549376eed8c822acaa2c0ece7d4abfb45c5cba1658cb2a37e7715bd5ea08815
|
4
|
+
data.tar.gz: c80a58e97beccc882550b831b364f67357d9cf5c1a55e50024dfbcb906668458
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7965d14c4d1f8b018efc5765e9ed52a696c2352bbd8ddaed5b19aa9ed8e07f1781e2141ce1466c0d0d9e777bedf3f8d0ed347bba53232a878a7f56c7e1a86761
|
7
|
+
data.tar.gz: 2a21d4022ec21f0ba5ea9ebc9be63bc456bd0fca63e8b6a9df1dbf3389a7b071250b211bb13fcac3e0189d44c282e725dc1a5407232df8a3ff540cd6ea12f1a8
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.4.
|
1
|
+
1.4.2
|
data/docker/Dockerfile
CHANGED
@@ -39,11 +39,6 @@ RUN tar -xvzf mongodb-bin.tar.gz
|
|
39
39
|
WORKDIR /home/ist/src/mongodb-bin
|
40
40
|
RUN makepkg -s --noconfirm
|
41
41
|
|
42
|
-
# rest api swagger gui
|
43
|
-
WORKDIR /home/ist
|
44
|
-
RUN git clone https://github.com/swagger-api/swagger-ui.git
|
45
|
-
COPY swagger.html /home/ist/swagger-ui/dist/index.html
|
46
|
-
|
47
42
|
# start script
|
48
43
|
COPY start.sh /home/ist/start.sh
|
49
44
|
|
@@ -51,20 +46,17 @@ COPY start.sh /home/ist/start.sh
|
|
51
46
|
USER root
|
52
47
|
RUN pacman -U --noconfirm /home/ist/src/mongodb-bin/mongodb-bin*.pkg.tar.xz
|
53
48
|
|
54
|
-
# install lazar-gui gem
|
55
|
-
# lazar gem (required from lazar-gui) needs mongodb
|
49
|
+
# install lazar-gui gem after mongodb: lazar gem (required from lazar-gui) needs mongodb
|
56
50
|
RUN gem install lazar-gui
|
57
51
|
|
58
52
|
# change owners (temporary workaround)
|
59
53
|
RUN chown ist `ls -d $(gem environment gemdir)/gems/lazar-gui-*`/public
|
60
54
|
RUN chown ist `ls -d $(gem environment gemdir)/gems/lazar-gui-*`/tmp
|
55
|
+
RUN chown ist `ls -d $(gem environment gemdir)/gems/lazar-gui-*`/api
|
61
56
|
RUN chown ist `ls -d $(gem environment gemdir)/gems/lazar-gui-*`/api/api.json
|
62
57
|
|
63
58
|
USER ist
|
64
59
|
RUN rm -r /home/ist/src
|
65
|
-
# swagger links
|
66
|
-
RUN ln -s /home/ist/swagger-ui/dist/swagger-ui-bundle.js `ls -d $(gem environment gemdir)/gems/lazar-gui-*`/public/swagger-ui-bundle.js
|
67
|
-
RUN ln -s /home/ist/swagger-ui/dist/swagger-ui-standalone-preset.js `ls -d $(gem environment gemdir)/gems/lazar-gui-*`/public/swagger-ui-standalone-preset.js
|
68
|
-
RUN ln -s /home/ist/swagger-ui/dist/swagger-ui.css `ls -d $(gem environment gemdir)/gems/lazar-gui-*`/public/swagger-ui.css
|
69
60
|
|
61
|
+
EXPOSE 8088
|
70
62
|
ENTRYPOINT ["/home/ist/start.sh"]
|
data/docker/start.sh
CHANGED
@@ -5,7 +5,11 @@ mongod --bind_ip 127.0.0.1 --dbpath ~/data &
|
|
5
5
|
R CMD Rserve --vanilla &
|
6
6
|
|
7
7
|
# import data
|
8
|
+
echo "Importing data and validating models"
|
8
9
|
ruby -e "require 'lazar'; include OpenTox; Import.public_data if Model::Validation.all.empty?"
|
10
|
+
# get PubChem cids in advance to avoid timeout issues
|
11
|
+
echo "Importing PubChem CID's"
|
12
|
+
ruby -e "require 'lazar'; include OpenTox; Compound.all.each{|c| c.cid}"
|
9
13
|
|
10
14
|
# start lazar service
|
11
15
|
cd `ls -d $(gem environment gemdir)/gems/lazar-gui-*`
|
data/views/layout.haml
CHANGED
@@ -41,12 +41,10 @@
|
|
41
41
|
%span.fa.fa-envelope
|
42
42
|
[version: #{@version}]
|
43
43
|
%p
|
44
|
-
A graphical overview of the service API can be found
|
45
|
-
%a{:href => "//#{$host_with_port}/api", :rel => "external"} here.
|
46
44
|
Please cite
|
47
45
|
%a{ :href=>"https://doi.org/10.3389/fphar.2013.00038", :rel=>"external"}
|
48
46
|
%img{ :src=>"https://zenodo.org/badge/DOI/10.3389/zenodo.10.3389.svg", :alt=>"DOI"}
|
49
|
-
|
47
|
+
if you use this service for scientific purposes.
|
50
48
|
%a{:href=>"https://twitter.com/intent/tweet?source=http%3A%2F%2Flazar.in-silico.ch&text=https%3A%2F%2Flazar.in-silico.ch", :rel=>"external", :title=>"Tweet"}
|
51
49
|
%span.fa.fa-twitter-square
|
52
50
|
%a{:href=>"http://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Flazar.in-silico.ch&title=&summary=&source=https%3A%2F%2Flazar.in-silico.ch", :rel=>"external", :title=>"Share on LinkedIn"}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lazar-gui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christoph Helma
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-09-
|
12
|
+
date: 2019-09-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: lazar
|
@@ -148,7 +148,6 @@ files:
|
|
148
148
|
- config.ru
|
149
149
|
- docker/Dockerfile
|
150
150
|
- docker/start.sh
|
151
|
-
- docker/swagger.html
|
152
151
|
- helper.rb
|
153
152
|
- lazar-gui.gemspec
|
154
153
|
- lib/api.rb
|
data/docker/swagger.html
DELETED
@@ -1,107 +0,0 @@
|
|
1
|
-
<!-- HTML for static distribution bundle build -->
|
2
|
-
<!DOCTYPE html>
|
3
|
-
<html lang="en">
|
4
|
-
<head>
|
5
|
-
<meta charset="UTF-8">
|
6
|
-
<title>Swagger UI</title>
|
7
|
-
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|Source+Code+Pro:300,600|Titillium+Web:400,600,700" rel="stylesheet">
|
8
|
-
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" >
|
9
|
-
<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
|
10
|
-
<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
|
11
|
-
<style>
|
12
|
-
html
|
13
|
-
{
|
14
|
-
box-sizing: border-box;
|
15
|
-
overflow: -moz-scrollbars-vertical;
|
16
|
-
overflow-y: scroll;
|
17
|
-
}
|
18
|
-
|
19
|
-
*,
|
20
|
-
*:before,
|
21
|
-
*:after
|
22
|
-
{
|
23
|
-
box-sizing: inherit;
|
24
|
-
}
|
25
|
-
|
26
|
-
body
|
27
|
-
{
|
28
|
-
margin:0;
|
29
|
-
background: #fafafa;
|
30
|
-
}
|
31
|
-
</style>
|
32
|
-
</head>
|
33
|
-
|
34
|
-
<body>
|
35
|
-
<div id="swagger-ui"></div>
|
36
|
-
|
37
|
-
<script src="./swagger-ui-bundle.js"> </script>
|
38
|
-
<script src="./swagger-ui-standalone-preset.js"> </script>
|
39
|
-
<script>
|
40
|
-
window.onload = function() {
|
41
|
-
|
42
|
-
// Build a system
|
43
|
-
var base_url = window.location.origin;
|
44
|
-
var swagger_url = base_url + "/api/api.json";
|
45
|
-
const ui = SwaggerUIBundle({
|
46
|
-
url: swagger_url,
|
47
|
-
dom_id: '#swagger-ui',
|
48
|
-
deepLinking: true,
|
49
|
-
presets: [
|
50
|
-
SwaggerUIBundle.presets.apis,
|
51
|
-
SwaggerUIStandalonePreset
|
52
|
-
],
|
53
|
-
plugins: [
|
54
|
-
SwaggerUIBundle.plugins.DownloadUrl
|
55
|
-
],
|
56
|
-
layout: "StandaloneLayout"
|
57
|
-
})
|
58
|
-
|
59
|
-
window.ui = ui;
|
60
|
-
document.getElementsByClassName('topbar')[0].style.backgroundColor = "#fafafa";
|
61
|
-
document.getElementsByClassName('topbar-wrapper')[0].getElementsByTagName('img')[0].alt = "IST";
|
62
|
-
document.getElementsByClassName('topbar-wrapper')[0].getElementsByTagName('img')[0].src = "./IST_logo_s.png";
|
63
|
-
document.getElementsByClassName('topbar-wrapper')[0].getElementsByTagName('img')[0].width = "90";
|
64
|
-
document.getElementsByClassName('topbar-wrapper')[0].getElementsByTagName('img')[0].height = "35";
|
65
|
-
document.getElementsByClassName('topbar-wrapper')[0].getElementsByTagName('img')[0].style.marginRight = "20px";
|
66
|
-
document.getElementsByClassName('topbar-wrapper')[0].getElementsByTagName('span')[0].innerHTML = "lazar-rest-api";
|
67
|
-
};
|
68
|
-
|
69
|
-
// add link for docs
|
70
|
-
setTimeout(function() {
|
71
|
-
var base_url = window.location.origin;
|
72
|
-
var section = document.getElementsByClassName("info")[0];
|
73
|
-
var node = document.createElement("docs");
|
74
|
-
var heading = document.createElement('h2');
|
75
|
-
var headingtext = document.createTextNode("Documentation");
|
76
|
-
var link = document.createElement('a');
|
77
|
-
var linktext = document.createTextNode("See curl examples for a typical workflow.");
|
78
|
-
heading.appendChild(headingtext);
|
79
|
-
link.appendChild(linktext);
|
80
|
-
link.title = "curl examples";
|
81
|
-
link.href = "https://github.com/OpenRiskNet/home/blob/master/openshift/deployments/lazar#curl-examples";
|
82
|
-
link.target = "javascript:void(0);";
|
83
|
-
node.appendChild(heading);
|
84
|
-
node.appendChild(link);
|
85
|
-
section.appendChild(node);
|
86
|
-
}, 1000);
|
87
|
-
// add link for gui
|
88
|
-
setTimeout(function() {
|
89
|
-
var base_url = window.location.origin;
|
90
|
-
var section = document.getElementsByClassName("info")[0];
|
91
|
-
var node = document.createElement("gui");
|
92
|
-
var heading = document.createElement('h2');
|
93
|
-
var headingtext = document.createTextNode("Lazar Graphical User Interface");
|
94
|
-
var link = document.createElement('a');
|
95
|
-
var linktext = document.createTextNode("Lazar (GUI)");
|
96
|
-
heading.appendChild(headingtext);
|
97
|
-
link.appendChild(linktext);
|
98
|
-
link.title = "GUI link";
|
99
|
-
link.href = base_url = "/predict";
|
100
|
-
link.target = "javascript:void(0);";
|
101
|
-
node.appendChild(heading);
|
102
|
-
node.appendChild(link);
|
103
|
-
section.appendChild(node);
|
104
|
-
}, 1000);
|
105
|
-
</script>
|
106
|
-
</body>
|
107
|
-
</html>
|