Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev' into api.batch
Browse files Browse the repository at this point in the history
  • Loading branch information
carlfeberhard committed Jul 28, 2016
2 parents 6825f4c + 0066847 commit 15a686e
Show file tree
Hide file tree
Showing 517 changed files with 14,557 additions and 60,763 deletions.
2 changes: 2 additions & 0 deletions .ci/flake8_blacklist.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.venv/
.tox/
eggs/
client/
database/
doc/patch.py
Expand Down
627 changes: 627 additions & 0 deletions .ci/flake8_lint_include_list.txt

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions .ci/flake8_wrapper_imports.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

set -e

flake8 `paste .ci/flake8_lint_include_list.txt`
48 changes: 33 additions & 15 deletions .ci/py3_sources.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,41 @@ cron/
lib/galaxy/actions/
lib/galaxy/auth/
lib/galaxy/config.py
lib/galaxy/dataset_collections/
lib/galaxy/datatypes/binary.py
lib/galaxy/datatypes/converters/
lib/galaxy/datatypes/dataproviders/
lib/galaxy/datatypes/sequence.py
lib/galaxy/datatypes/sniff.py
lib/galaxy/datatypes/tabular.py
lib/galaxy/datatypes/tracks.py
lib/galaxy/dependencies/
lib/galaxy/eggs/
lib/galaxy/exceptions/
lib/galaxy/external_services/
lib/galaxy/forms/
lib/galaxy/jobs/
lib/galaxy/managers/
lib/galaxy/model/__init__.py
lib/galaxy/model/migrate/
lib/galaxy/objectstore/
lib/galaxy/openid/
lib/galaxy/quota/
lib/galaxy/sample_tracking/
lib/galaxy/security/
lib/galaxy/tags/
lib/galaxy/tools/cwl/
lib/galaxy/tools/parser/
lib/galaxy/tools/deps/
lib/galaxy/tools/lint.py
lib/galaxy/tools/lint_util.py
lib/galaxy/tools/linters/
lib/galaxy/tools/loader.py
lib/galaxy/tools/loader_directory.py
lib/galaxy/tools/linters/
lib/galaxy/tools/deps/
lib/galaxy/tools/toolbox/
lib/galaxy/tools/parser/
lib/galaxy/tools/toolbox/
lib/galaxy/tours/
lib/galaxy/util/
lib/galaxy/visualization/
lib/galaxy/work/
lib/galaxy_ext/
lib/galaxy_utils/
Expand All @@ -40,22 +52,28 @@ lib/tool_shed/repository_types/
lib/tool_shed/tools/
lib/tool_shed/util/
lib/tool_shed/utility_containers/
scripts/api/common.py
scripts/api/display.py
scripts/api/workflow_execute_parameters.py
scripts/api/
scripts/auth/
scripts/bootstrap_history.py
scripts/build_toolbox.py
scripts/check_eggs.py
scripts/check_galaxy.py
scripts/check_python.py
scripts/cleanup_datasets/admin_cleanup_datasets.py
scripts/cleanup_datasets/cleanup_datasets.py
test/api/test_workflows_from_yaml.py
test/base/
test/casperjs/
test/functional/
test/integration/
test/manual/
test/unit/tools/test_actions.py
test/unit/workflows/test_run_parameters.py
scripts/cleanup_datasets/pgcleanup.py
scripts/cleanup_datasets/populate_uuid.py
scripts/cleanup_datasets/remove_renamed_datasets_from_disk.py
scripts/cleanup_datasets/rename_purged_datasets.py
scripts/cleanup_datasets/update_dataset_size.py
scripts/cleanup_datasets/update_metadata.py
scripts/data_libraries/build_whoosh_index.py
scripts/db_shell.py
scripts/drmaa_external_runner.py
test/
tool_list.py
tools/data_source/
tools/evolution/
tools/sr_mapping/
tools/stats/aggregate_scores_in_intervals.py
tools/visualization/
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,4 @@ doc/build
.DS_Store
*.rej
*~
.idea/
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ env:
- TOX_ENV=py27-unit
- TOX_ENV=qunit
- TOX_ENV=first_startup
- TOX_ENV=py27-lint-imports
- TOX_ENV=py27-lint-imports-include-list

matrix:
include:
- os: osx
Expand All @@ -16,6 +19,8 @@ matrix:
- os: osx
env: TOX_ENV=py27-unit
language: generic
allow_failures:
- env: TOX_ENV=py27-lint-imports

before_install:
- if [ `uname` == "Darwin" ]; then bash -c "brew update && brew install python"; fi
Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ VENV?=.venv
IN_VENV=if [ -f $(VENV)/bin/activate ]; then . $(VENV)/bin/activate; fi;
PROJECT_URL?=https://github.com/galaxyproject/galaxy
GRUNT_DOCKER_NAME:=galaxy/client-builder:16.01
GRUNT_EXEC?=node_modules/grunt-cli/bin/grunt

all: help
@echo "This makefile is primarily used for building Galaxy's JS client. A sensible all target is not yet implemented."
Expand Down Expand Up @@ -59,10 +60,13 @@ npm-deps: ## Install NodeJS dependencies.
cd client && npm install

grunt: npm-deps ## Calls out to Grunt to build client
cd client && node_modules/grunt-cli/bin/grunt
cd client && $(GRUNT_EXEC)

style: npm-deps ## Calls the style task of Grunt
cd client && node_modules/grunt-cli/bin/grunt style
cd client && $(GRUNT_EXEC) style

client-install-libs: npm-deps ## Fetch updated client dependencies using bower.
cd client && $(GRUNT_EXEC) install-libs

client: grunt style ## Rebuild all client-side artifacts

Expand Down
98 changes: 98 additions & 0 deletions client/galaxy/scripts/layout/generic-nav-view.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
/** Real-time Communication feature **/
define(['mvc/ui/ui-modal'], function( Modal ) {

var GenericNavView = Backbone.View.extend({

initialize: function ( ) {
this.modal = null;
},

/** makes bootstrap modal and iframe inside it */
makeModalIframe: function( e ) {
// make modal
var host = window.Galaxy.config.communication_server_host,
port = window.Galaxy.config.communication_server_port,
username = escape( window.Galaxy.user.attributes.username ),
persistent_communication_rooms = escape( window.Galaxy.config.persistent_communication_rooms ),
query_string = "?username=" + username + "&persistent_communication_rooms=" + persistent_communication_rooms,
src = host + ":" + port + query_string,
$el_chat_modal_header = null,
$el_chat_modal_body = null,
iframe_template = '<iframe class="f-iframe fade in communication-iframe" src="' + src + '"> </iframe>',
header_template = '<i class="fa fa-comment" aria-hidden="true" title="Communicate with other users"></i>' +
'<i class="fa fa-expand expand-compress-modal" aria-hidden="true" title="Maximize"></i>' +
'<i class="fa fa-times close-modal" aria-hidden="true" title="Close"></i>',
frame_height = 350,
frame_width = 600,
class_names = 'ui-modal chat-modal';

// deletes the chat modal if already present and create one
if( $( '.chat-modal' ).length > 0 ) {
$( '.chat-modal' ).remove();
}
// creates a modal
GenericNavView.modal = new Modal.View({
body : iframe_template,
height : frame_height,
width : frame_width,
closing_events : true,
title_separator : false,
cls : class_names
});

// shows modal
GenericNavView.modal.show();
$el_chat_modal_header = $( '.chat-modal .modal-header' );
$el_chat_modal_body = $( '.chat-modal .modal-body' );
// adjusts the css of bootstrap modal for chat
$el_chat_modal_header.addClass('modal-header-body');
$el_chat_modal_body.addClass('modal-header-body');
$el_chat_modal_header.find( 'h4' ).remove();
$el_chat_modal_header.removeAttr( 'min-height padding border' );
$el_chat_modal_header.append( header_template );
// click event of the close button for chat
$( '.close-modal' ).click(function( e ) {
$( '.chat-modal' ).css( 'display', 'none' );
});
// click event of expand and compress icon
$( '.expand-compress-modal' ).click(function( e ) {
if( $( '.expand-compress-modal' ).hasClass( 'fa-expand' ) ) {
$( '.chat-modal .modal-dialog' ).width( '1000px' );
$( '.chat-modal .modal-body' ).height( '575px' );
$( '.expand-compress-modal' ).removeClass( 'fa-expand' ).addClass( 'fa-compress' );
$( '.expand-compress-modal' ).attr('title', 'Minimize');
$( '.expand-compress-modal' ).css('margin-left', '96.2%');
}
else {
$( '.chat-modal .modal-dialog' ).width( frame_width + 'px' );
$( '.chat-modal .modal-body' ).height( frame_height + 'px' );
$( '.expand-compress-modal' ).removeClass( 'fa-compress' ).addClass( 'fa-expand' );
$( '.expand-compress-modal' ).attr('title', 'Maximize');
$( '.expand-compress-modal' ).css('margin-left', '93.2%');
}

});
return this;
},

/**renders the chat icon as a nav item*/
render: function() {
var self = this,
navItem = {};
navItem = {
id : 'show-chat-online',
icon : 'fa-comment-o',
tooltip : 'Chat online',
visible : false,
onclick : self.makeModalIframe
}
return navItem;
}
});

return {
GenericNavView : GenericNavView
};

});

8 changes: 7 additions & 1 deletion client/galaxy/scripts/layout/menu.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** Masthead Collection **/
define(['mvc/tours'], function( Tours ) {
define(['mvc/tours', 'layout/generic-nav-view'], function( Tours, GenericNav ) {
var Collection = Backbone.Collection.extend({
model: Backbone.Model.extend({
defaults: {
Expand All @@ -11,6 +11,12 @@ var Collection = Backbone.Collection.extend({
options = options || {};
this.reset();

//
// Chat server tab
//
var extendedNavItem = new GenericNav.GenericNavView();
this.add(extendedNavItem.render());

//
// Analyze data tab.
//
Expand Down
31 changes: 30 additions & 1 deletion client/galaxy/scripts/layout/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ var PageLayoutView = Backbone.View.extend( BaseMVC.LoggableMixin ).extend({
this.renderMessageBox();
this.renderInactivityBox();
this.renderPanels();
this._checkCommunicationServerOnline();
return this;
},

Expand Down Expand Up @@ -131,7 +132,35 @@ var PageLayoutView = Backbone.View.extend( BaseMVC.LoggableMixin ).extend({
}
},

toString : function() { return 'PageLayoutView'; }
toString : function() { return 'PageLayoutView'; },

/** Check if the communication server is online and show the icon otherwise hide the icon */
_checkCommunicationServerOnline: function(){
var host = window.Galaxy.config.communication_server_host,
port = window.Galaxy.config.communication_server_port,
$chat_icon_element = $( "#show-chat-online" );
/** Check if the user has deactivated the communication in it's personal settings */
if (window.Galaxy.user.attributes.preferences !== undefined && window.Galaxy.user.attributes.preferences.communication_server === '1') {
// See if the configured communication server is available
$.ajax({
url: host + ":" + port,
})
.success( function( data ) {
// enable communication only when a user is logged in
if( window.Galaxy.user.id !== null ) {
if( $chat_icon_element.css( "visibility") === "hidden" ) {
$chat_icon_element.css( "visibility", "visible" );
}
}
})
.error( function( data ) {
// hide the communication icon if the communication server is not available
$chat_icon_element.css( "visibility", "hidden" );
});
} else {
$chat_icon_element.css( "visibility", "hidden" );
}
},
});

// ============================================================================
Expand Down
2 changes: 2 additions & 0 deletions client/galaxy/scripts/mvc/collection/collection-li.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ DCListItemView.prototype.templates = (function(){
_l( 'a pair of datasets' ),
'<% } else if( collection.collection_type === "list:paired" ){ %>',
_l( 'a list of <%- countText %>dataset pairs' ),
'<% } else if( collection.collection_type === "list:list" ){ %>',
_l( 'a list of <%- countText %>dataset lists' ),
'<% } %>',
'</div>'
], 'collection' );
Expand Down
54 changes: 51 additions & 3 deletions client/galaxy/scripts/mvc/collection/collection-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -504,10 +504,58 @@ var ListPairedDatasetCollection = DatasetCollection.extend(
});


//==============================================================================
/** @class Backbone model for a list dataset collection within a list:list dataset collection. */
var NestedListDCDCE = ListDatasetCollection.extend( BASE_MVC.mixin( DatasetCollectionElementMixin,
/** @lends NestedListDCDCE.prototype */{

/** This is both a collection and a collection element - call the constructor */
constructor : function( attributes, options ){
this.debug( '\t NestedListDCDCE.constructor:', attributes, options );
DatasetCollectionElementMixin.constructor.call( this, attributes, options );
},

/** String representation. */
toString : function(){
var objStr = ( this.object )?( '' + this.object ):( this.get( 'element_identifier' ) );
return ([ 'NestedListDCDCE(', objStr, ')' ].join( '' ));
}
}));


//==============================================================================
/** @class Backbone collection containing list dataset collections. */
var NestedListDCDCECollection = NestedDCDCECollection.extend({

/** We know this collection is composed of only nested pair collections */
model: NestedListDCDCE,

/** String representation. */
toString : function(){
return ([ 'NestedListDCDCECollection(', this.length, ')' ].join( '' ));
}
});


//==============================================================================
/** @class Backbone Model for a DatasetCollection (list) that contains other lists. */
var ListOfListsDatasetCollection = DatasetCollection.extend({

/** list:paired is the only collection that itself contains collections */
collectionClass : NestedListDCDCECollection,

/** String representation. */
toString : function(){
return ([ 'ListOfListsDatasetCollection(', this.get( 'name' ), ')' ].join( '' ));
}
});


//==============================================================================
return {
ListDatasetCollection : ListDatasetCollection,
PairDatasetCollection : PairDatasetCollection,
ListPairedDatasetCollection : ListPairedDatasetCollection
ListDatasetCollection : ListDatasetCollection,
PairDatasetCollection : PairDatasetCollection,
ListPairedDatasetCollection : ListPairedDatasetCollection,
ListOfListsDatasetCollection: ListOfListsDatasetCollection
};
});

0 comments on commit 15a686e

Please sign in to comment.