Skip to content

Commit 79d19d1

Browse files
nathandunnchildershsiaoyi0504Yu
authored
Nal i5 k modernize apollo (#2548)
* adding code to make comments mandatory for sequence modifications * Adding code to replace the Attributes section with a Replaced Models section. Also added a tooltip to the replaced models section. * testing NAthans code to speed up login * add apollo-config.groovy * update .gitignore * Revert "very minor changes" This reverts commit f46de7f. * re-adding the government login text * updateing with upstream * added jbrowse plugin ColorByType and setting jbrowse to a stable release that works with Apollo * adding gov't text to global login dialog * Added our google analytics to grails-app/conf/Config.groovy. Still need to add the federal analytics, will do so through jbrowse. * removing replce tag feature * updating config * updating the config. * updating config * updated apollo-config.groovy for the colorbycds branch * adding this file back in * staging for move to 2.3.0 * savign updated config file * updating config * updating config * updtating config to disable neat features * testing config options * correcting jbrowse version * updated config, reduced session timeout to 30 min * testing updated GA setup * Updated CSS formatting * Added Source Sans Pro font from google and applied to entire body of the page. * Added USWDS Library and added Government Banner Section after the open body tag. * Added NAL Footer from NAL Design System * merged versus dev Co-authored-by: Chris Childers <[email protected]> Co-authored-by: Yi Hsiao <[email protected]> Co-authored-by: Yu <[email protected]>
1 parent c1b970f commit 79d19d1

File tree

17 files changed

+80
-76
lines changed

17 files changed

+80
-76
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ tmp
2020
version.jsp
2121
update_client.sh
2222
*.log
23-
apollo-config.groovy
23+
src/java/apollo-config.groovy
2424
gwt-unitCache/**
2525
web-app/WEB-INF/deploy/**
2626
web-app/annotator/**

client/apollo/js/View/Track/AnnotTrack.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ define([
419419
var user = JSON.parse(apolloMainPanel.getCurrentUser());
420420
client.subscribe("/topic/AnnotationNotification/" + organism.id + "/" + sequence.id, dojo.hitch(track, 'annotationNotification'));
421421
client.subscribe("/topic/AnnotationNotification/user/" + user.email, dojo.hitch(track, 'annotationNotification'));
422+
localStorage.setItem('organism-id', organism.id);
422423
});
423424
console.log('connection established');
424425
},

client/apollo/js/View/Track/SequenceTrack.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,6 +1189,10 @@ function( declare,
11891189
alert("Input cannot be empty for " + type);
11901190
ok = false;
11911191
}
1192+
if (commentFieldValue.length == 0) {
1193+
alert("Please provide a justification for the sequence modification (" + type + ") in the 'Comment' field.");
1194+
ok = false;
1195+
}
11921196
if (ok) {
11931197
var input = inputField.value.toUpperCase();
11941198
if (type === "deletion_artifact") {

grails-app/services/org/bbop/apollo/ReportService.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ class ReportService {
156156

157157
AnnotatorSummary generateAnnotatorSummary(User owner) {
158158
AnnotatorSummary annotatorSummary = new AnnotatorSummary()
159-
159+
160160
// get features created by the annotator
161161
def geneCount = Gene.executeQuery("select count(distinct g) from Gene g join g.owners owner where owner = :owner", [owner: owner])[0]
162162
def transposableElementCount = TransposableElement.executeQuery("select count(distinct g) from TransposableElement g join g.owners owner where owner = :owner", [owner: owner])[0]

grails-app/views/auth/login.gsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<title>Login</title>
66
</head>
77

8-
<div>
8+
<body>
99
<g:if test="${flash.message}">
1010
<div class="message">${flash.message}</div>
1111
</g:if>

grails-app/views/google_analytics.gsp

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,23 @@
55
Time: 4:05 PM
66
--%>
77

8-
<script>
9-
(function (i, s, o, g, r, a, m) {
10-
i['GoogleAnalyticsObject'] = r;
11-
i[r] = i[r] || function () {
12-
(i[r].q = i[r].q || []).push(arguments)
13-
}, i[r].l = 1 * new Date();
14-
a = s.createElement(o),
15-
m = s.getElementsByTagName(o)[0];
16-
a.async = 1;
17-
a.src = g;
18-
m.parentNode.insertBefore(a, m)
19-
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
20-
</script>
8+
<script>
9+
(function (i, s, o, g, r, a, m) {
10+
i['GoogleAnalyticsObject'] = r;
11+
i[r] = i[r] || function () {
12+
(i[r].q = i[r].q || []).push(arguments)
13+
}, i[r].l = 1 * new Date();
14+
a = s.createElement(o),
15+
m = s.getElementsByTagName(o)[0];
16+
a.async = 1;
17+
a.src = g;
18+
m.parentNode.insertBefore(a, m)
19+
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
20+
<g:each var="google_analytics_id" in="${grailsApplication.config.apollo.google_analytics}">
21+
ga('create', '${google_analytics_id}', 'auto');
22+
</g:each>
23+
ga('send', 'pageview');
24+
25+
</script>
2126

22-
<script>
23-
<g:each var="google_analytics_id" in="${grailsApplication.config.apollo.google_analytics}" status="index">
24-
ga('create', '${google_analytics_id}', 'auto', {'name': 'Server${index}'});
25-
ga('Server${index}.send', 'pageview');
26-
</g:each>
27-
</script>
28-
<script>
29-
</script>
3027

grails-app/views/login/doLogin.gsp

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,23 @@
66
--%>
77

88
<%@ page contentType="text/html;charset=UTF-8" %>
9+
910
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
10-
<html>
11+
<html lang="en">
12+
1113
<head>
14+
1215
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
1316
<title>Login</title>
14-
<!--
15-
<link rel="stylesheet" type="text/css" href="../styles/login.css" />
16-
-->
17-
<!--
18-
<script src="jslib/jquery-1.7.1.min.js" type="text/javascript"></script>
19-
<script type="text/javascript" src="jslib/jquery-ui-1.8.9.custom/jquery-ui-1.8.9.custom.min.js"></script>
20-
-->
2117
<script>
2218
var context;
2319
$(document).ready(function () {
2420
var pathname = location.pathname;
2521
context = /^\/([^\/]+)\//.exec(pathname)[1];
26-
// $("head").append("<link rel='stylesheet' type='text/css' href='/" + context + "/styles/login.css'/>");
2722
$("#login_button").click(function () {
2823
login();
2924
});
3025
$("#clear_button").click(function () {
31-
// $(".input_field").val("");
3226
$("#username").val("");
3327
$("#password").val("");
3428
});
@@ -38,7 +32,6 @@
3832
login();
3933
}
4034
});
41-
// $("#username").focus();
4235
});
4336
4437
function login() {
@@ -85,25 +78,25 @@
8578

8679
<body>
8780

88-
<div class="input-group" style="margin-bottom: 5px;margin-top: 5px;">
89-
<input class="form-control" type="text" id="username" placeholder="Username" autofocus="autofocus"/>
90-
</div>
81+
<div class="input-group" style="margin-bottom: 5px;margin-top: 5px;">
82+
<input class="form-control" type="text" id="username" placeholder="Username" autofocus="autofocus"/>
83+
</div>
9184

92-
<div class="input-group" style="margin-bottom: 5px">
93-
<input class="form-control" type="password" id="password" placeholder="Password"/>
94-
</div>
85+
<div class="input-group" style="margin-bottom: 5px">
86+
<input class="form-control" type="password" id="password" placeholder="Password"/>
87+
</div>
9588

89+
%{-- <div class="button_login"> --}%
90+
<button class="btn btn-primary" id="login_button">Login</button>
91+
<button class="btn btn-default" id="clear_button" >Clear</button>
92+
%{-- <button class="btn btn-default" id="rememberme_button" >Remember Me</button> --}%
9693

97-
%{--<div class="button_login">--}%
98-
<button class="btn btn-primary" id="login_button">Login</button>
99-
<button class="btn btn-default" id="clear_button" >Clear</button>
100-
%{--<button class="btn btn-default" id="rememberme_button" >Remember Me</button>--}%
101-
<div>
102-
Remember me
103-
<input type="checkbox" autocomplete="off" id="remember_me" checked>
104-
</div>
94+
<div>
95+
Remember me
96+
<input type="checkbox" autocomplete="off" id="remember_me" checked>
97+
</div>
10598

106-
%{--</div>--}%
107-
<div id="message"></div>
99+
%{--</div>--}%
100+
<div id="message"></div>
108101
</body>
109102
</html>

index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!--
12
<script>
23
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
34
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -8,3 +9,5 @@
89
ga('send', 'pageview');
910
1011
</script>
12+
13+
-->

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"author": "Nathan Dunn",
1010
"license": "SEE LICENSE IN LICENSE.md",
1111
"dependencies": {
12+
"gradle": "^1.0.9",
1213
"jquery": "^1.7.2",
1314
"jqueryui": "^1.8.24"
1415
},

src/gwt/org/bbop/apollo/gwt/client/LoginDialog.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import org.gwtbootstrap3.client.ui.TextBox;
2222
import org.gwtbootstrap3.client.ui.constants.*;
2323
import org.bbop.apollo.gwt.client.rest.UserRestService;
24+
import com.google.gwt.dom.client.Style;
2425

2526
public class LoginDialog extends DialogBox {
2627
private static final Binder binder = GWT.create(Binder.class);
@@ -53,6 +54,7 @@ interface Binder extends UiBinder<Widget, LoginDialog> {
5354

5455
public LoginDialog() {
5556
getElement().setId("loginDialogId");
57+
getElement().getStyle().setWidth(500, Style.Unit.PX);
5658
setText("Login");
5759
setAnimationEnabled(true);
5860
// Enable glass background.
@@ -74,7 +76,7 @@ public void setError(String errorMessage){
7476
errorText.setText(errorMessage);
7577
errorHtml.setVisible(true);
7678
}
77-
79+
7880
public void clearErrors(){
7981
errorText.setText("");
8082
errorHtml.setVisible(false);

src/templates/war/web.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@
7676
<!-- 2 days -->
7777
<!--<session-timeout>2880</session-timeout>-->
7878
<!-- 16 hours -->
79-
<session-timeout>960</session-timeout>
79+
<!--<session-timeout>960</session-timeout>-->
80+
<!-- 1 hours 01-21-2020_cpc -->
81+
<session-timeout>30</session-timeout>
8082
</session-config>
8183

8284
<welcome-file-list>

tools/data/add_features_from_gff3_to_annotations.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
use warnings;
55

66
use FindBin qw($RealBin);
7-
use lib "$RealBin/../../jbrowse/src/perl5";
7+
#use lib "$RealBin/../../jbrowse/src/perl5";
8+
use lib "../../src/perl5";
89
use JBlibs;
910

1011
use File::Basename;

web-app/css/Annotator.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/** Add css rules here for your application. */
22

3-
43
/** Example rules used by the template application (remove for your app) */
54
h1 {
65
font-size: 2em;

web-app/css/chado.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@CHARSET "UTF-8";
1+
@charset "UTF-8";
22

33
table {
44
border-width: 1px;

web-app/css/login.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
@CHARSET "UTF-8";
1+
@charset "UTF-8";
22

33
.user_login {
44
/* width:30%; */
5-
margin:5px;
5+
margin: 5px;
66
}
77

88
.fieldname {
9-
margin-right:5px;
9+
margin-right: 5px;
1010
font-size: 1.3em;
1111
}
1212

@@ -16,7 +16,7 @@
1616
}
1717

1818
.button_login {
19-
text-align:center;
20-
margin-top:10px;
19+
text-align: center;
20+
margin-top: 10px;
2121
width: 100%;
22-
}
22+
}

web-app/css/search_sequence.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@CHARSET "UTF-8";
1+
@charset "UTF-8";
22

33
.search_sequence_label {
44
font-size: 1.5em;
@@ -75,4 +75,4 @@
7575

7676
.search_sequence {
7777
font-size: 12px;
78-
}
78+
}

web-app/css/ui-layout.css

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/**
32
UI.Layout CSS
43
*************************************/
@@ -12,12 +11,12 @@
1211
overflow: auto;
1312
}
1413

15-
.ui-splitbar{
16-
display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6 */
17-
display: -moz-box; /* OLD - Firefox 19- (buggy but mostly works) */
18-
display: -ms-flexbox; /* TWEENER - IE 10 */
19-
display: -webkit-flex; /* NEW - Chrome */
20-
display: flex; /* NEW, Spec - Opera 12.1, Firefox 20+ */
14+
.ui-splitbar {
15+
display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6 */
16+
display: -moz-box; /* OLD - Firefox 19- (buggy but mostly works) */
17+
display: -ms-flexbox; /* TWEENER - IE 10 */
18+
display: -webkit-flex; /* NEW - Chrome */
19+
display: flex; /* NEW, Spec - Opera 12.1, Firefox 20+ */
2120
-webkit-justify-content: center;
2221
justify-content: center;
2322

@@ -27,15 +26,17 @@
2726
z-index: 1010;
2827
}
2928

30-
.ui-layout-row > .ui-splitbar{
31-
height: 8px; width: 100%;
29+
.ui-layout-row > .ui-splitbar {
30+
height: 8px;
31+
width: 100%;
3232
cursor: row-resize;
3333
text-align: center;
3434
justify-content: center;
3535
align-items: center;
3636
}
37-
.ui-layout-column > .ui-splitbar{
38-
width: 8px; height: 100%;
37+
.ui-layout-column > .ui-splitbar {
38+
width: 8px;
39+
height: 100%;
3940
cursor: col-resize;
4041
-webkit-flex-direction: column;
4142
flex-direction: column;
@@ -46,4 +47,4 @@
4647
color: #fff;
4748
cursor: pointer;
4849
font-size: 9px;
49-
}
50+
}

0 commit comments

Comments
 (0)