Skip to content

Commit

Permalink
Merge with dev
Browse files Browse the repository at this point in the history
  • Loading branch information
anuprulez committed Oct 30, 2016
2 parents f593ad6 + c626ff8 commit c40be4f
Show file tree
Hide file tree
Showing 132 changed files with 1,541 additions and 553 deletions.
52 changes: 34 additions & 18 deletions .ci/flake8_lint_include_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ cron/parse_builds_3_sites.py
cron/parse_builds.py
doc/parse_gx_xsd.py
lib/galaxy/actions/
lib/galaxy/auth/__init__.py
lib/galaxy/auth/providers/__init__.py
lib/galaxy/auth/
lib/galaxy/config.py
lib/galaxy/dataset_collections/builder.py
lib/galaxy/dataset_collections/__init__.py
Expand All @@ -16,6 +15,7 @@ lib/galaxy/dataset_collections/subcollections.py
lib/galaxy/dataset_collections/type_description.py
lib/galaxy/datatypes/assembly.py
lib/galaxy/datatypes/binary.py
lib/galaxy/datatypes/checkers.py
lib/galaxy/datatypes/constructive_solid_geometry.py
lib/galaxy/datatypes/converters/bcf_bgzip_to_bcf_converter.py
lib/galaxy/datatypes/converters/bcf_to_bcf_bgzip_converter.py
Expand Down Expand Up @@ -48,14 +48,17 @@ lib/galaxy/datatypes/converters/wiggle_to_array_tree_converter.py
lib/galaxy/datatypes/coverage.py
lib/galaxy/datatypes/dataproviders/base.py
lib/galaxy/datatypes/dataproviders/exceptions.py
lib/galaxy/datatypes/dataproviders/__init__.py
lib/galaxy/datatypes/data.py
lib/galaxy/datatypes/display_applications/__init__.py
lib/galaxy/datatypes/display_applications/util.py
lib/galaxy/datatypes/images.py
lib/galaxy/datatypes/__init__.py
lib/galaxy/datatypes/metadata.py
lib/galaxy/datatypes/msa.py
lib/galaxy/datatypes/ngsindex.py
lib/galaxy/datatypes/proteomics.py
lib/galaxy/datatypes/sequence.py
lib/galaxy/datatypes/tabular.py
lib/galaxy/datatypes/text.py
lib/galaxy/datatypes/tracks.py
Expand All @@ -70,14 +73,25 @@ lib/galaxy/external_services/result_handlers/__init__.py
lib/galaxy_ext/
lib/galaxy/forms/__init__.py
lib/galaxy/jobs/actions/
lib/galaxy/jobs/command_factory.py
lib/galaxy/jobs/datasets.py
lib/galaxy/jobs/deferred/
lib/galaxy/jobs/error_level.py
lib/galaxy/jobs/__init__.py
lib/galaxy/jobs/manager.py
lib/galaxy/jobs/metrics/
lib/galaxy/jobs/rules/
lib/galaxy/jobs/runners/cli.py
lib/galaxy/jobs/runners/condor.py
lib/galaxy/jobs/runners/drmaa.py
lib/galaxy/jobs/runners/godocker.py
lib/galaxy/jobs/runners/kubernetes.py
lib/galaxy/jobs/runners/local.py
lib/galaxy/jobs/runners/pbs.py
lib/galaxy/jobs/runners/pulsar.py
lib/galaxy/jobs/runners/slurm.py
lib/galaxy/jobs/runners/state_handlers/
lib/galaxy/jobs/runners/tasks.py
lib/galaxy/jobs/runners/util/cli/factory.py
lib/galaxy/jobs/runners/util/cli/job/__init__.py
lib/galaxy/jobs/runners/util/cli/job/slurm_torque.py
Expand All @@ -87,6 +101,7 @@ lib/galaxy/jobs/runners/util/drmaa/
lib/galaxy/jobs/runners/util/env.py
lib/galaxy/jobs/runners/util/external.py
lib/galaxy/jobs/runners/util/__init__.py
lib/galaxy/jobs/runners/util/job_script/
lib/galaxy/jobs/splitters/basic.py
lib/galaxy/jobs/splitters/__init__.py
lib/galaxy/jobs/stock_rules.py
Expand Down Expand Up @@ -299,6 +314,23 @@ lib/galaxy/visualization/__init__.py
lib/galaxy/visualization/plugins/__init__.py
lib/galaxy/visualization/plugins/utils.py
lib/galaxy/visualization/tracks/
lib/galaxy/web/base/controllers/__init__.py
lib/galaxy/web/base/__init__.py
lib/galaxy/web/buildapp.py
lib/galaxy/web/formatting.py
lib/galaxy/web/framework/decorators.py
lib/galaxy/web/framework/helpers/grids.py
lib/galaxy/web/framework/__init__.py
lib/galaxy/web/framework/middleware/error.py
lib/galaxy/web/framework/middleware/__init__.py
lib/galaxy/web/framework/middleware/request_id.py
lib/galaxy/web/framework/middleware/sentry.py
lib/galaxy/web/framework/middleware/static.py
lib/galaxy/web/framework/middleware/statsd.py
lib/galaxy/web/framework/middleware/translogger.py
lib/galaxy/web/framework/middleware/xforwardedhost.py
lib/galaxy/web/__init__.py
lib/galaxy/web/params.py
lib/galaxy/webapps/galaxy/api/genomes.py
lib/galaxy/webapps/galaxy/api/__init__.py
lib/galaxy/webapps/galaxy/api/jobs.py
Expand Down Expand Up @@ -341,21 +373,6 @@ lib/galaxy/webapps/tool_shed/util/__init__.py
lib/galaxy/webapps/tool_shed/util/ratings_util.py
lib/galaxy/webapps/tool_shed/util/shed_statistics.py
lib/galaxy/webapps/util.py
lib/galaxy/web/base/controllers/__init__.py
lib/galaxy/web/base/__init__.py
lib/galaxy/web/buildapp.py
lib/galaxy/web/formatting.py
lib/galaxy/web/framework/decorators.py
lib/galaxy/web/framework/helpers/grids.py
lib/galaxy/web/framework/__init__.py
lib/galaxy/web/framework/middleware/__init__.py
lib/galaxy/web/framework/middleware/request_id.py
lib/galaxy/web/framework/middleware/sentry.py
lib/galaxy/web/framework/middleware/static.py
lib/galaxy/web/framework/middleware/statsd.py
lib/galaxy/web/framework/middleware/translogger.py
lib/galaxy/web/framework/middleware/xforwardedhost.py
lib/galaxy/web/params.py
lib/galaxy/workflow/extract.py
lib/galaxy/workflow/__init__.py
lib/galaxy/workflow/render.py
Expand Down Expand Up @@ -457,7 +474,6 @@ test/api/test_dataset_collections.py
test/api/test_datasets.py
test/api/test_datatypes.py
test/api/test_framework.py
test/api/test_histories.py
test/api/test_history_contents_provenance.py
test/api/test_jobs.py
test/api/test_libraries.py
Expand Down
10 changes: 10 additions & 0 deletions .ci/py3_sources.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ lib/galaxy/tools/toolbox/
lib/galaxy/tours/
lib/galaxy/util/
lib/galaxy/visualization/
lib/galaxy/web/buildapp.py
lib/galaxy/web/framework/__init__.py
lib/galaxy/web/framework/middleware/error.py
lib/galaxy/web/framework/middleware/static.py
lib/galaxy/web/__init__.py
lib/galaxy/webapps/galaxy/api/tours.py
lib/galaxy/webapps/galaxy/controllers/userskeys.py
lib/galaxy/webapps/reports/__init__.py
lib/galaxy/webapps/tool_shed/controllers/user.py
lib/galaxy/webapps/tool_shed/__init__.py
lib/galaxy/work/
lib/galaxy/workflow/extract.py
lib/galaxy/workflow/run.py
Expand Down
8 changes: 0 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,6 @@ docs-schema-html: docs-schema-ready ## Convert Galaxy Tool XSD Markdown docs int
open-docs-schema: docs-schema-html ## Open HTML generated from Galaxy Tool XSD.
$(OPEN_RESOURCE) $(DOCS_DIR)/schema.html

ready-slides:
test -f plantuml.jar || wget http://jaist.dl.sourceforge.net/project/plantuml/plantuml.jar
java -jar plantuml.jar -c $(DOC_SOURCE_DIR)/slideshow/galaxy_architecture_2015/images/plantuml_options.txt -tsvg $(DOC_SOURCE_DIR)/slideshow/galaxy_architecture_2015/images/ *.plantuml.txt
./node_modules/mermaid/bin/mermaid.js --svg $(DOC_SOURCE_DIR)/slideshow/galaxy_architecture_2015/images/server_client.mermaid --o $(DOC_SOURCE_DIR)/slideshow/galaxy_architecture_2015/images -t ./node_modules/mermaid/dist/mermaid.forest.css -c $(DOC_SOURCE_DIR)/slideshow/galaxy_architecture_2015/images/sequence.json
./node_modules/mermaid/bin/mermaid.js --svg $(DOC_SOURCE_DIR)/slideshow/galaxy_architecture_2015/images/server_client_old.mermaid --o $(DOC_SOURCE_DIR)/slideshow/galaxy_architecture_2015/images -t ./node_modules/mermaid/dist/mermaid.forest.css -c $(DOC_SOURCE_DIR)/slideshow/galaxy_architecture_2015/images/sequence.json

$(IN_VENV) python scripts/slideshow/build_slideshow.py 'Galaxy Architecture' doc/source/slideshow/galaxy_architecture_2015/galaxy_architecture_2015.md

_open-docs:
$(OPEN_RESOURCE) $(DOCS_DIR)/_build/html/index.html

Expand Down
2 changes: 1 addition & 1 deletion client/galaxy/scripts/apps/history-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ var HistoryPanel = RightPanel.extend({
toString : function(){ return 'HistoryPanel'; }
});

module.exports = HistoryPanel;
module.exports = HistoryPanel;
2 changes: 1 addition & 1 deletion client/galaxy/scripts/layout/masthead.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ return {
View: View
};

});
});
29 changes: 25 additions & 4 deletions client/galaxy/scripts/layout/menu.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/** Masthead Collection **/
define(['mvc/tours',
'layout/generic-nav-view',
'mvc/user/user-preferences'],
function( Tours, GenericNav, Preferences ) {
define(['mvc/tours', 'layout/generic-nav-view', 'mvc/user/user-preferences', 'mvc/webhooks'],
function( Tours, GenericNav, Preferences, Webhooks ) {
var Collection = Backbone.Collection.extend({
model: Backbone.Model.extend({
defaults: {
Expand Down Expand Up @@ -110,6 +108,29 @@ var Collection = Backbone.Collection.extend({
]
});

//
// Webhooks
//
Webhooks.add({
url: 'api/webhooks/masthead/all',
callback: function(webhooks) {
$(document).ready(function() {
$.each(webhooks.models, function(index, model) {
var webhook = model.toJSON();
if (webhook.activate) {
Galaxy.page.masthead.collection.add({
id : webhook.name,
icon : webhook.config.icon,
url : webhook.config.url,
tooltip : webhook.config.tooltip,
onclick : webhook.config.function && new Function(webhook.config.function),
});
}
});
});
}
});

//
// Admin.
//
Expand Down
96 changes: 77 additions & 19 deletions client/galaxy/scripts/mvc/history/options-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ define([
"mvc/ui/popup-menu",
"mvc/history/copy-dialog",
"mvc/base-mvc",
"utils/localization"
], function( PopupMenu, historyCopyDialog, BASE_MVC, _l ){
"utils/localization",
"mvc/webhooks"
], function( PopupMenu, historyCopyDialog, BASE_MVC, _l, Webhooks ){

'use strict';

Expand All @@ -29,11 +30,15 @@ var menu = [
},
{
html : _l( 'Create New' ),
func : function(){ Galaxy.currHistoryPanel.createNewHistory(); }
func : function() {
if( Galaxy && Galaxy.currHistoryPanel ){
Galaxy.currHistoryPanel.createNewHistory();
}
},
},
{
html : _l( 'Copy History' ),
func : function(){
func : function() {
historyCopyDialog( Galaxy.currHistoryPanel.model )
.done( function(){
Galaxy.currHistoryPanel.loadCurrentHistory();
Expand All @@ -55,23 +60,15 @@ var menu = [
},
{
html : _l( 'Delete' ),
anon : true,
func : function() {
if( Galaxy && Galaxy.currHistoryPanel && confirm( _l( 'Really delete the current history?' ) ) ){
galaxy_main.window.location.href = 'history/delete?id=' + Galaxy.currHistoryPanel.model.id;
}
},
confirm : _l( 'Really delete the current history?' ),
href : 'history/delete_current',
},
{
html : _l( 'Delete Permanently' ),
confirm : _l( 'Really delete the current history permanently? This cannot be undone.' ),
href : 'history/delete_current?purge=True',
purge : true,
anon : true,
func : function() {
if( Galaxy && Galaxy.currHistoryPanel
&& confirm( _l( 'Really delete the current history permanently? This cannot be undone.' ) ) ){
galaxy_main.window.location.href = 'history/delete?purge=True&id=' + Galaxy.currHistoryPanel.model.id;
}
},
},


Expand All @@ -95,17 +92,48 @@ var menu = [
},
{
html : _l( 'Collapse Expanded Datasets' ),
func : function(){ Galaxy.currHistoryPanel.collapseAll(); }
func : function() {
if( Galaxy && Galaxy.currHistoryPanel ){
Galaxy.currHistoryPanel.collapseAll();
}
},
},
{
html : _l( 'Unhide Hidden Datasets' ),
anon : true,
func : function(){ Galaxy.currHistoryPanel.unhideHidden(); }
func : function() {
if( Galaxy && Galaxy.currHistoryPanel && confirm( _l( 'Really unhide all hidden datasets?' ) ) ){
var filtered = Galaxy.currHistoryPanel.model.contents.hidden();
//TODO: batch
filtered.ajaxQueue( Backbone.Model.prototype.save, { visible : true })
.done( function(){
Galaxy.currHistoryPanel.renderItems();
})
.fail( function(){
alert( 'There was an error unhiding the datasets' );
console.error( arguments );
});
}
},
},
{
html : _l( 'Delete Hidden Datasets' ),
anon : true,
func : function(){ Galaxy.currHistoryPanel.deleteHidden(); }
func : function() {
if( Galaxy && Galaxy.currHistoryPanel && confirm( _l( 'Really delete all hidden datasets?' ) ) ){
var filtered = Galaxy.currHistoryPanel.model.contents.hidden();
//TODO: batch
// both delete *and* unhide them
filtered.ajaxQueue( Backbone.Model.prototype.save, { deleted : true, visible: true })
.done( function(){
Galaxy.currHistoryPanel.renderItems();
})
.fail( function(){
alert( 'There was an error deleting the datasets' );
console.error( arguments );
});
}
},
},
{
html : _l( 'Purge Deleted Datasets' ),
Expand All @@ -115,6 +143,7 @@ var menu = [
anon : true,
},


{
html : _l( 'Downloads' ),
header : true
Expand All @@ -140,6 +169,35 @@ var menu = [
}
];

// Webhooks
Webhooks.add({
url: 'api/webhooks/history-menu/all',
async: false, // (hypothetically) slows down the performance
callback: function(webhooks) {
var webhooks_menu = [];

$.each(webhooks.models, function(index, model) {
var webhook = model.toJSON();
if (webhook.activate) {
webhooks_menu.push({
html : _l( webhook.config.title ),
// func: function() {},
anon : true
});
}
});

if (webhooks_menu.length > 0) {
webhooks_menu.unshift({
html : _l( 'Webhooks' ),
header : true
});
$.merge(menu, webhooks_menu);
}
}
});


function buildMenu( isAnon, purgeAllowed, urlRoot ){
return _.clone( menu ).filter( function( menuOption ){
if( isAnon && !menuOption.anon ){
Expand Down
Loading

0 comments on commit c40be4f

Please sign in to comment.