Skip to content

Commit

Permalink
Nal i5 k modernize apollo (#2548)
Browse files Browse the repository at this point in the history
* 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 <genetics.guy@gmail.com>
Co-authored-by: Yi Hsiao <hsiaoyi0504@gmail.com>
Co-authored-by: Yu <12001004033016@FEDIDCARD.GOV>
  • Loading branch information
4 people authored Dec 17, 2020
1 parent c1b970f commit 79d19d1
Show file tree
Hide file tree
Showing 17 changed files with 80 additions and 76 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ tmp
version.jsp
update_client.sh
*.log
apollo-config.groovy
src/java/apollo-config.groovy
gwt-unitCache/**
web-app/WEB-INF/deploy/**
web-app/annotator/**
Expand Down
1 change: 1 addition & 0 deletions client/apollo/js/View/Track/AnnotTrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ define([
var user = JSON.parse(apolloMainPanel.getCurrentUser());
client.subscribe("/topic/AnnotationNotification/" + organism.id + "/" + sequence.id, dojo.hitch(track, 'annotationNotification'));
client.subscribe("/topic/AnnotationNotification/user/" + user.email, dojo.hitch(track, 'annotationNotification'));
localStorage.setItem('organism-id', organism.id);
});
console.log('connection established');
},
Expand Down
4 changes: 4 additions & 0 deletions client/apollo/js/View/Track/SequenceTrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -1189,6 +1189,10 @@ function( declare,
alert("Input cannot be empty for " + type);
ok = false;
}
if (commentFieldValue.length == 0) {
alert("Please provide a justification for the sequence modification (" + type + ") in the 'Comment' field.");
ok = false;
}
if (ok) {
var input = inputField.value.toUpperCase();
if (type === "deletion_artifact") {
Expand Down
2 changes: 1 addition & 1 deletion grails-app/services/org/bbop/apollo/ReportService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class ReportService {

AnnotatorSummary generateAnnotatorSummary(User owner) {
AnnotatorSummary annotatorSummary = new AnnotatorSummary()

// get features created by the annotator
def geneCount = Gene.executeQuery("select count(distinct g) from Gene g join g.owners owner where owner = :owner", [owner: owner])[0]
def transposableElementCount = TransposableElement.executeQuery("select count(distinct g) from TransposableElement g join g.owners owner where owner = :owner", [owner: owner])[0]
Expand Down
2 changes: 1 addition & 1 deletion grails-app/views/auth/login.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<title>Login</title>
</head>

<div>
<body>
<g:if test="${flash.message}">
<div class="message">${flash.message}</div>
</g:if>
Expand Down
39 changes: 18 additions & 21 deletions grails-app/views/google_analytics.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,23 @@
Time: 4:05 PM
--%>

<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
</script>
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
<g:each var="google_analytics_id" in="${grailsApplication.config.apollo.google_analytics}">
ga('create', '${google_analytics_id}', 'auto');
</g:each>
ga('send', 'pageview');
</script>

<script>
<g:each var="google_analytics_id" in="${grailsApplication.config.apollo.google_analytics}" status="index">
ga('create', '${google_analytics_id}', 'auto', {'name': 'Server${index}'});
ga('Server${index}.send', 'pageview');
</g:each>
</script>
<script>
</script>

47 changes: 20 additions & 27 deletions grails-app/views/login/doLogin.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,23 @@
--%>

<%@ page contentType="text/html;charset=UTF-8" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<html lang="en">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Login</title>
<!--
<link rel="stylesheet" type="text/css" href="../styles/login.css" />
-->
<!--
<script src="jslib/jquery-1.7.1.min.js" type="text/javascript"></script>
<script type="text/javascript" src="jslib/jquery-ui-1.8.9.custom/jquery-ui-1.8.9.custom.min.js"></script>
-->
<script>
var context;
$(document).ready(function () {
var pathname = location.pathname;
context = /^\/([^\/]+)\//.exec(pathname)[1];
// $("head").append("<link rel='stylesheet' type='text/css' href='/" + context + "/styles/login.css'/>");
$("#login_button").click(function () {
login();
});
$("#clear_button").click(function () {
// $(".input_field").val("");
$("#username").val("");
$("#password").val("");
});
Expand All @@ -38,7 +32,6 @@
login();
}
});
// $("#username").focus();
});
function login() {
Expand Down Expand Up @@ -85,25 +78,25 @@

<body>

<div class="input-group" style="margin-bottom: 5px;margin-top: 5px;">
<input class="form-control" type="text" id="username" placeholder="Username" autofocus="autofocus"/>
</div>
<div class="input-group" style="margin-bottom: 5px;margin-top: 5px;">
<input class="form-control" type="text" id="username" placeholder="Username" autofocus="autofocus"/>
</div>

<div class="input-group" style="margin-bottom: 5px">
<input class="form-control" type="password" id="password" placeholder="Password"/>
</div>
<div class="input-group" style="margin-bottom: 5px">
<input class="form-control" type="password" id="password" placeholder="Password"/>
</div>

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

%{--<div class="button_login">--}%
<button class="btn btn-primary" id="login_button">Login</button>
<button class="btn btn-default" id="clear_button" >Clear</button>
%{--<button class="btn btn-default" id="rememberme_button" >Remember Me</button>--}%
<div>
Remember me
<input type="checkbox" autocomplete="off" id="remember_me" checked>
</div>
<div>
Remember me
<input type="checkbox" autocomplete="off" id="remember_me" checked>
</div>

%{--</div>--}%
<div id="message"></div>
%{--</div>--}%
<div id="message"></div>
</body>
</html>
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!--
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
Expand All @@ -8,3 +9,5 @@
ga('send', 'pageview');
</script>
-->
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"author": "Nathan Dunn",
"license": "SEE LICENSE IN LICENSE.md",
"dependencies": {
"gradle": "^1.0.9",
"jquery": "^1.7.2",
"jqueryui": "^1.8.24"
},
Expand Down
4 changes: 3 additions & 1 deletion src/gwt/org/bbop/apollo/gwt/client/LoginDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.gwtbootstrap3.client.ui.TextBox;
import org.gwtbootstrap3.client.ui.constants.*;
import org.bbop.apollo.gwt.client.rest.UserRestService;
import com.google.gwt.dom.client.Style;

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

public LoginDialog() {
getElement().setId("loginDialogId");
getElement().getStyle().setWidth(500, Style.Unit.PX);
setText("Login");
setAnimationEnabled(true);
// Enable glass background.
Expand All @@ -74,7 +76,7 @@ public void setError(String errorMessage){
errorText.setText(errorMessage);
errorHtml.setVisible(true);
}

public void clearErrors(){
errorText.setText("");
errorHtml.setVisible(false);
Expand Down
4 changes: 3 additions & 1 deletion src/templates/war/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@
<!-- 2 days -->
<!--<session-timeout>2880</session-timeout>-->
<!-- 16 hours -->
<session-timeout>960</session-timeout>
<!--<session-timeout>960</session-timeout>-->
<!-- 1 hours 01-21-2020_cpc -->
<session-timeout>30</session-timeout>
</session-config>

<welcome-file-list>
Expand Down
3 changes: 2 additions & 1 deletion tools/data/add_features_from_gff3_to_annotations.pl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
use warnings;

use FindBin qw($RealBin);
use lib "$RealBin/../../jbrowse/src/perl5";
#use lib "$RealBin/../../jbrowse/src/perl5";
use lib "../../src/perl5";
use JBlibs;

use File::Basename;
Expand Down
1 change: 0 additions & 1 deletion web-app/css/Annotator.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/** Add css rules here for your application. */


/** Example rules used by the template application (remove for your app) */
h1 {
font-size: 2em;
Expand Down
2 changes: 1 addition & 1 deletion web-app/css/chado.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@CHARSET "UTF-8";
@charset "UTF-8";

table {
border-width: 1px;
Expand Down
12 changes: 6 additions & 6 deletions web-app/css/login.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
@CHARSET "UTF-8";
@charset "UTF-8";

.user_login {
/* width:30%; */
margin:5px;
margin: 5px;
}

.fieldname {
margin-right:5px;
margin-right: 5px;
font-size: 1.3em;
}

Expand All @@ -16,7 +16,7 @@
}

.button_login {
text-align:center;
margin-top:10px;
text-align: center;
margin-top: 10px;
width: 100%;
}
}
4 changes: 2 additions & 2 deletions web-app/css/search_sequence.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@CHARSET "UTF-8";
@charset "UTF-8";

.search_sequence_label {
font-size: 1.5em;
Expand Down Expand Up @@ -75,4 +75,4 @@

.search_sequence {
font-size: 12px;
}
}
25 changes: 13 additions & 12 deletions web-app/css/ui-layout.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/**
UI.Layout CSS
*************************************/
Expand All @@ -12,12 +11,12 @@
overflow: auto;
}

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

Expand All @@ -27,15 +26,17 @@
z-index: 1010;
}

.ui-layout-row > .ui-splitbar{
height: 8px; width: 100%;
.ui-layout-row > .ui-splitbar {
height: 8px;
width: 100%;
cursor: row-resize;
text-align: center;
justify-content: center;
align-items: center;
}
.ui-layout-column > .ui-splitbar{
width: 8px; height: 100%;
.ui-layout-column > .ui-splitbar {
width: 8px;
height: 100%;
cursor: col-resize;
-webkit-flex-direction: column;
flex-direction: column;
Expand All @@ -46,4 +47,4 @@
color: #fff;
cursor: pointer;
font-size: 9px;
}
}

0 comments on commit 79d19d1

Please sign in to comment.