Skip to content
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

Release53 #183

Merged
merged 82 commits into from
May 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
b53feac
Merge pull request #177 from warelab/master
ajo2995 Nov 16, 2016
550104a
hard coded exclusion of Vitis vinifera because Atlas has no organism …
ajo2995 Nov 22, 2016
9de8539
move code to function possiblyHandleIdList()
ajo2995 Nov 22, 2016
7d0f9c1
idList filters should be treated as Gene filters
ajo2995 Nov 22, 2016
9d0c8af
Merge pull request #178 from warelab/idList
ajo2995 Nov 22, 2016
20044d6
trim version numbers from idList entries
ajo2995 Nov 29, 2016
7c887f6
make domain architecture query work again
ajo2995 Dec 1, 2016
1c6ecb5
Merge pull request #179 from warelab/idList
ajo2995 Dec 2, 2016
48cb3ee
hard coded exclusion of Vitis vinifera because Atlas has no organism …
ajo2995 Jan 13, 2017
664900e
footer link should remove all filters
ajo2995 Jan 13, 2017
20e2f4c
hide drupal page (if any) when clicking on logo
ajo2995 Jan 13, 2017
b6b4514
replace the existing drupal links
ajo2995 Jan 13, 2017
07fd2f2
use data.gramene.org/drupal instead
ajo2995 Jan 17, 2017
62c750e
clean up drupal fetch
ajo2995 Jan 18, 2017
c2db506
turn off failed attempt at history
ajo2995 Jan 18, 2017
60cfbea
use react-router for drupal content
ajo2995 Jan 26, 2017
ee90093
make DrupalPage a child of WelcomePage
ajo2995 Jan 26, 2017
9cf86d4
load blog posts via router. try htaccess hack for apache
ajo2995 Jan 26, 2017
4b4c747
make travis copy the .htaccess file
ajo2995 Jan 26, 2017
a90960f
roll back the htaccess hack
ajo2995 Jan 27, 2017
2489628
tidy up DrupalPage
ajo2995 Jan 27, 2017
ddd89c5
Merge pull request #180 from warelab/react-router
ajo2995 Jan 27, 2017
4106b52
show drupal web_widget in iframe
ajo2995 Jan 31, 2017
88e02f1
add track hub registry link
ajo2995 Feb 3, 2017
425690b
check if any filters are set before removing them
ajo2995 Feb 3, 2017
ed9958d
render the footer at build time
ajo2995 Feb 7, 2017
dc3625a
locally grown feedback form
ajo2995 Feb 7, 2017
70b437c
recaptcha
ajo2995 Feb 8, 2017
f796326
server recaptcha validation
ajo2995 Feb 8, 2017
ee83b8c
mantis bug submission
ajo2995 Feb 9, 2017
72696e8
email notification
ajo2995 Feb 11, 2017
6970e4a
relative path
ajo2995 Feb 12, 2017
e94f6c2
avoid warning message
ajo2995 Feb 15, 2017
26368b5
require consensus branches of dependencies
ajo2995 Feb 22, 2017
ee70043
use the latest non-svg-msa genetree vis
ajo2995 Feb 27, 2017
f73e500
setting up for diagram js
ajo2995 Mar 1, 2017
0927a5f
reactome DiagramJs demo
ajo2995 Mar 1, 2017
40829b8
fullscreen modal for details
ajo2995 Mar 1, 2017
f39e44c
show gene info on full screen result detail modal
ajo2995 Mar 2, 2017
fb1174b
fix some bugs
ajo2995 Mar 2, 2017
adfc6df
example usage of reactome's FireworksJs widget
ajo2995 Mar 3, 2017
a85a1de
get multiple tabs working for result summary visualizations
ajo2995 Mar 7, 2017
9baeab6
initialize fireworksJs properly
ajo2995 Mar 8, 2017
0383906
add a link to ensembl.gramene.org/tools.html
ajo2995 Mar 8, 2017
f41cad6
customize primary links for arabidopsis and maize
ajo2995 Mar 8, 2017
3e52f5e
Merge pull request #181 from warelab/consensus
ajo2995 Mar 8, 2017
d05e502
test drive setAnalysisToken
ajo2995 Mar 9, 2017
0ca73be
make drupal db connection failure okay - for dev
ajo2995 Mar 14, 2017
2981094
revert to human pathway example
ajo2995 Mar 14, 2017
046a835
split init and load functionality for pathway diagram
ajo2995 Mar 15, 2017
f065fff
bleeding edge stuff
ajo2995 Apr 10, 2017
bbb1048
reaction hierarchy links working
ajo2995 Apr 11, 2017
22c90cd
fix the location viewer
ajo2995 Apr 11, 2017
bd93d2f
put reactome url in package.json and add links and explorations to pa…
ajo2995 Apr 19, 2017
deeaec4
intercept links in drupal content
ajo2995 Apr 21, 2017
cddc40d
null ref hack and a fix for <a><span/></a>
ajo2995 Apr 21, 2017
85f7d36
define ensemblURL in package.json
ajo2995 Apr 21, 2017
9b17554
use ensemblURL to define links
ajo2995 Apr 25, 2017
965ebc4
switch to dev branch of gramene-genetree-vis
ajo2995 Apr 25, 2017
4f1ae8d
render static page and welcome page separately
ajo2995 Apr 27, 2017
2598d36
revert to master branch of gramene-genetree-vis
ajo2995 Apr 27, 2017
2230b3d
have gene of interest drawn first in TreeViz
ajo2995 Apr 28, 2017
9d5e8d6
focus on the searchbox after choosing a filter and possibly fixed a bug
ajo2995 Apr 28, 2017
8996094
suppress browser suggestions on searchBox
ajo2995 Apr 28, 2017
46e4621
use a version of node that works better with React Router
ajo2995 Apr 28, 2017
ecc2652
remove redundant text
ajo2995 Apr 28, 2017
951281c
undo non-helpful semi-refactoring
ajo2995 May 1, 2017
9ab2460
update logos
ajo2995 May 3, 2017
a2ff2eb
don't render the static widgets on the server
ajo2995 May 4, 2017
2399bce
fix twitter
ajo2995 May 4, 2017
c184f29
wtf
ajo2995 May 4, 2017
a183b84
focus on the search box
ajo2995 May 5, 2017
0716781
scroll to top except when asking for more genes
ajo2995 May 5, 2017
597a343
clean up deprecated code and add date to blog feed
ajo2995 May 5, 2017
8c15410
remove top suggestions with 0 results fixes #171
ajo2995 May 5, 2017
130b684
put link to ensembl species page on species name
ajo2995 May 9, 2017
743b10c
use ensemblURL for gene tree link
ajo2995 May 11, 2017
4dfe72e
switch ensemblURL
ajo2995 May 12, 2017
333ad81
add google analytics events
ajo2995 May 15, 2017
2c011ed
more react-ga
ajo2995 May 19, 2017
99516f6
use production ensemblURL
ajo2995 May 19, 2017
239d460
Upgrade to 3.0.0 for release 53
ajo2995 May 19, 2017
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# ignore static files generated during build process
/static/app.html.fragment
/static/static.html.fragment
/static/blogFeed.json

# deploy key
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- 6.3.1
- 7.9.0
before_script:
- npm install -g grunt-cli
script: grunt package
Expand Down
95 changes: 85 additions & 10 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ var moment = require('moment');
var fs = require('fs');

var grameneRelease = require('./package.json').gramene.dbRelease;
var reactomeURL = require('./package.json').gramene.reactomeURL;

var webserviceVersion = 'v' + grameneRelease;

module.exports = function (grunt) {
Expand All @@ -29,11 +31,11 @@ module.exports = function (grunt) {
},

exec: {
generateStaticApp: {
cmd: 'node scripts/babel.js'
generateStaticWelcome: {
cmd: 'node scripts/babel.js -c app'
},
blogFeed: {
cmd: 'node scripts/getBlogFeed.js'
generateStaticApp: {
cmd: 'node scripts/babel.js -c static'
}
},

Expand Down Expand Up @@ -96,7 +98,7 @@ module.exports = function (grunt) {
},
html: {
files: ['*.template.html'],
tasks: ['packageIndexHtml']
tasks: ['packageIndexHtml','packageStaticHtml']
},
styles: {
files: ['styles/*.less'],
Expand All @@ -121,7 +123,7 @@ module.exports = function (grunt) {
{expand: true, cwd: 'assets/', src: ['**'], dest: 'build/assets/'},
{
expand: true,
cwd: 'node_modules/gramene-dalliance',
cwd: 'node_modules/dalliance',
src: [
'css/*-scoped.css',
'css/font-awesome.min.css',
Expand All @@ -131,8 +133,12 @@ module.exports = function (grunt) {
dest: 'build/assets/gramene-dalliance/'
},
{
src: 'node_modules/gramene-dalliance/prebuilt/worker-all.js',
src: 'node_modules/dalliance/prebuilt/worker-all.js',
dest: 'build/assets/gramene-dalliance/worker-all.js'
},
{
src: 'node_modules/dalliance/prebuilt/dalliance-all.js',
dest: 'build/assets/gramene-dalliance/dalliance-all.js'
}
]
},
Expand Down Expand Up @@ -195,7 +201,8 @@ module.exports = function (grunt) {
footer: footer,
content: content,
loadingMessage: loadingMessage,
hideIntro: hideIntro
hideIntro: hideIntro,
reactomeURL: reactomeURL
};

return template(props);
Expand All @@ -205,9 +212,77 @@ module.exports = function (grunt) {

var atlas = grunt.file.read('./static/atlasWidget.template.html')
grunt.file.write('build/atlasWidget.html', atlas);

// var htaccess = "RewriteBase /\n"
// + "RewriteRule ^index\.html$ - [L]\n"
// + "RewriteCond %{REQUEST_FILENAME} !-f\n"
// + "RewriteCond %{REQUEST_FILENAME} !-d\n"
// + "RewriteRule . /index.html [L]\n";
// grunt.file.write('build/.htaccess', htaccess);
});

grunt.registerTask('generateStaticFiles', ['exec:blogFeed', 'copy:assets', 'copy:icons', 'exec:generateStaticApp', 'packageIndexHtml']);

grunt.registerTask('packageStaticHtml', 'Build static.html for distribution.', function () {
var footer = (function compileFooterTemplate() {
function defaultServer() {
const PROD_SERVER = 'http://data.gramene.org/';
const DEV_SERVER = 'http://devdata.gramene.org/';
var defaultServer;

if (process.env.GRAMENE_SERVER) {
defaultServer = process.env.GRAMENE_SERVER;
}
else if (props.tag || props.branch === 'master') {
defaultServer = PROD_SERVER;
}
else {
defaultServer = DEV_SERVER;
}

defaultServer += webserviceVersion + '/swagger';

return defaultServer;
}

var template = _.template(grunt.file.read('./static/footer.template.html'));

var props = {
jobId: process.env.TRAVIS_JOB_ID,
jobNumber: process.env.TRAVIS_JOB_NUMBER,
branch: process.env.TRAVIS_BRANCH,
tag: process.env.TRAVIS_TAG,
user: process.env.USER,
date: moment().format('MMMM Do YYYY [at] h:mm:ss a'),
isDev: process.env.isDev,
grameneRelease: grameneRelease
};

props.defaultServer = defaultServer();
console.log("This build will use " + props.defaultServer + " as default web service server");

return template(props);
})();

var index = (function compileIndexTemplate() {
var template = _.template(grunt.file.read('./static/index.template.html'));
var content = grunt.file.read('./static/static.html.fragment');
var loadingMessage = grunt.file.read('./static/loading-message.html.fragment');
var hideIntro = grunt.file.read('./static/hide-intro.html.fragment');

var props = {
footer: footer,
content: content,
loadingMessage: loadingMessage,
hideIntro: hideIntro,
reactomeURL: reactomeURL
};

return template(props);
})();

grunt.file.write('build/static.html', index);
});

grunt.registerTask('generateStaticFiles', ['copy:assets', 'copy:icons', 'exec:generateStaticApp', 'exec:generateStaticWelcome', 'packageStaticHtml', 'packageIndexHtml']);
grunt.registerTask('test', ['jasmine_node']);
grunt.registerTask('default', ['env:dev', 'generateStaticFiles', 'less:dev', 'browserify:dev', 'watch']);
grunt.registerTask('package', ['env:prod', 'generateStaticFiles', 'less:production', 'browserify:production', 'test']);
Expand Down
Binary file added assets/images/welcome/TrackHub.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/welcome/ensemblgramene.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/images/welcome/plantReactome.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/welcome/tools.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 29 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"name": "gramoogle",
"version": "2.5.1",
"version": "3.0.0",
"description": "Gramene search interface",
"main": "index.js",
"gramene": {
"dbRelease": 52
"dbRelease": 53,
"reactomeURL": "//plantreactome.gramene.org",
"ensemblURL": "//ensembl.gramene.org"
},
"scripts": {
"build": "grunt package",
Expand All @@ -23,25 +25,44 @@
"homepage": "https://github.com/warelab/gramoogle",
"dependencies": {
"axios": "^0.9.1",
"body-parser": "^1.16.0",
"component-closest": "^1.0.1",
"compression": "^1.6.2",
"cors": "^2.8.1",
"dalliance": "git://github.com/ajo2995/dalliance.git#cran",
"email": "^0.2.6",
"express": "^4.14.0",
"flat-to-nested": "^1.0.2",
"gramene-bins-client": "^2.2.9",
"gramene-client-cache": "1.0.0",
"gramene-dalliance": "^0.13.2",
"gramene-dbxrefs": "^3.0.2",
"gramene-genetree-vis": "3.1.4",
"gramene-genetree-vis": "git://github.com/warelab/gramene-genetree-vis.git",
"gramene-search-client": "^3.0.4",
"gramene-search-vis": "^4.1.2",
"gramene-taxonomy-with-genomes": "^3.0.8",
"gramene-trees-client": "2.4.7",
"gramene-trees-client": "git://github.com/warelab/gramene-trees-client.git#consensus",
"history": "^4.5.1",
"is-email": "^1.0.0",
"lodash": "^4.3.0",
"mysql": "^2.13.0",
"node-schedule": "^1.2.0",
"normalize.less": "^1.0.0",
"numeral": "^1.5.3",
"path": "^0.12.7",
"q": "^1.2.0",
"query-string": "^4.2.2",
"react": "^15.0.1",
"react-bootstrap": "^0.30.0",
"react-dom": "^15.0.1",
"react": "^15.4.2",
"react-bootstrap": "^0.30.7",
"react-dom": "^15.4.2",
"react-ga": "^2.2.0",
"react-recaptcha": "^2.2.6",
"react-router": "^3.0.2",
"react-tree-menu": "^1.5.0",
"reactify": "^1.1.1",
"reflux": "^0.4.1",
"rss-parser": "latest",
"soap": "^0.18.0",
"tree-model": "^1.0.6",
"xml2js": "^0.4.16"
},
"devDependencies": {
Expand Down
16 changes: 14 additions & 2 deletions scripts/actions/docActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function getClientPromise(collection) {
return client[collection];
}

DocActions.needDocs.listen(function (collection, id, postprocessFn) {
DocActions.needDocs.listen(function (collection, id, postprocessFn, callbackFn) {
var cacheKey, clientCall;
cacheKey = [collection,id];
console.log('DocActions.needDocs', collection, id);
Expand All @@ -43,7 +43,13 @@ DocActions.needDocs.listen(function (collection, id, postprocessFn) {

var promise, cached;
if ((cached = docCache.get(cacheKey))) {
promise = Q(cached);
promise = Q(cached)
.then(function callbackMaybe(result) {
if (callbackFn) {
callbackFn(result.docs);
}
return result;
});
}
else {
docCache.set(id, 'loading…');
Expand Down Expand Up @@ -71,6 +77,12 @@ DocActions.needDocs.listen(function (collection, id, postprocessFn) {
}
return result;
})
.then(function callbackMaybe(result) {
if (callbackFn) {
callbackFn(result.docs);
}
return result;
})
.then(function addToCache(result) {
docCache.set(cacheKey, result);
return result;
Expand Down
26 changes: 26 additions & 0 deletions scripts/actions/drupalActions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import Reflux from "reflux";
import {getBlogFeed} from "../welcome/getDrupalContent.js";
// import Q from 'q';

const DrupalActions = Reflux.createActions([
{'refreshBlogFeed': {asyncResult: true}},
// {'fetchDrupalPage': {asyncResult: true}}
]);

// console.log(DrupalActions);

DrupalActions.refreshBlogFeed.listen(function () {
console.log("Will refreshBlog Feed");
getBlogFeed()
.then(this.completed)
.catch(this.failed);
});

// DrupalActions.fetchDrupalPage.listen(function (url) {
// console.log("Will fetchDrupalPage from", url);
// getDrupalPage(url)
// .then(this.completed)
// .catch(this.failed);
// });

export default DrupalActions;
9 changes: 0 additions & 9 deletions scripts/actions/welcomeActions.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
import Reflux from "reflux";
import getBlogFeed from "../welcome/getBlogFeed.js";
import Q from 'q';

const WelcomeActions = Reflux.createActions([
{'refreshBlogFeed': {asyncResult: true}},
{'flashSearchBox': {asyncResult: true}}
]);

console.log(WelcomeActions);

WelcomeActions.refreshBlogFeed.listen(function () {
console.log("Will refreshBlog Feed");
getBlogFeed()
.then(this.completed)
.catch(this.failed);
});

WelcomeActions.flashSearchBox.listen(function (delayMs = 500) {
const deferred = Q.defer();
setTimeout(()=>deferred.resolve("finish"), delayMs);
Expand Down
5 changes: 4 additions & 1 deletion scripts/babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
'use strict';

var fs = require('fs');
var argv = require('minimist')(process.argv.slice(2));

var serverRenderMode = argv.c;

require('babel-register')({
presets: ['es2015', 'react']
Expand All @@ -16,4 +19,4 @@ var ReactDOMServer = require('react-dom/server');

var App = React.createFactory(require('./components/appStatic.jsx').default);

fs.writeFileSync('static/app.html.fragment', ReactDOMServer.renderToString(new App({context: 'compile'})));
fs.writeFileSync(`static/${serverRenderMode}.html.fragment`, ReactDOMServer.renderToString(new App({serverRenderMode})));
Loading