Skip to content

Commit

Permalink
Merge branch 'dev' into unify_label_name_000
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Feb 28, 2017
2 parents b9ba754 + a505fa7 commit c80380d
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 57 deletions.
1 change: 1 addition & 0 deletions .ci/flake8_blacklist.txt
Expand Up @@ -5,3 +5,4 @@ database/
doc/source/conf.py
eggs/
lib/galaxy/util/jstree.py
lib/galaxy/web/proxy/js/node_modules/
12 changes: 0 additions & 12 deletions client/galaxy/scripts/mvc/grid/grid-view.js
Expand Up @@ -155,18 +155,6 @@ return Backbone.View.extend({
});
});

// Initialize autocomplete for text inputs in search UI.
var t1 = this.$el.find('#input-tags-filter');
if (t1.length) {
t1.autocomplete(this.grid.history_tag_autocomplete_url,
{ selectFirst: false, autoFill: false, highlight: false, mustMatch: false });
}
var t2 = this.$el.find('#input-name-filter');
if (t2.length) {
t2.autocomplete(this.grid.history_name_autocomplete_url,
{ selectFirst: false, autoFill: false, highlight: false, mustMatch: false });
}

// Initialize standard, advanced search toggles.
this.$el.find('.advanced-search-toggle').each( function() {
$(this).off();
Expand Down
Expand Up @@ -6,7 +6,7 @@
# appropriate `apt-get/pip install` statements.
---
-
image: bgruening/docker-jupyter-notebook:16.01
image: bgruening/docker-jupyter-notebook:16.01.1
description: |
The Jupyter notebook is the next iteration of IPython, allowing
analysis in many different languages. This image features the Python,
Expand Down
36 changes: 16 additions & 20 deletions lib/galaxy/auth/providers/ldap_ad.py
Expand Up @@ -15,7 +15,7 @@


def _get_subs(d, k, params):
if k not in d:
if k not in d or not d[k]:
raise ConfigurationError("Missing '%s' parameter in LDAP options" % k)
return str(d[k]).format(**params)

Expand All @@ -25,17 +25,17 @@ def _parse_ldap_options(ldap, options_unparsed):
if not options_unparsed:
return []

if "=" not in options_unparsed:
log.error("LDAP authenticate: Invalid syntax in <ldap-options>. Syntax should be option1=value1,option2=value2")
return []

ldap_options = []

# Valid options must start with this prefix. See help(ldap)
prefix = "OPT_"

for opt in options_unparsed.split(","):
key, value = opt.split("=")
try:
key, value = opt.split("=")
except ValueError:
log.warning("LDAP authenticate: Invalid syntax '%s' inside <ldap-options> element. Syntax should be option1=value1,option2=value2" % opt)
continue

try:
pair = []
Expand Down Expand Up @@ -109,14 +109,18 @@ def authenticate(self, email, username, password, options):
else:
ldap_options = _parse_ldap_options(ldap, ldap_options_raw)

if 'search-fields' in options:
try:
# setup connection
ldap.set_option(ldap.OPT_REFERRALS, 0)
try:
# setup connection
ldap.set_option(ldap.OPT_REFERRALS, 0)

for opt in ldap_options:
ldap.set_option(*opt)
for opt in ldap_options:
ldap.set_option(*opt)
except Exception:
log.exception('LDAP authenticate: set_option exception')
return (failure_mode, '', '')

if 'search-fields' in options:
try:
l = ldap.initialize(_get_subs(options, 'server', params))
l.protocol_version = 3

Expand Down Expand Up @@ -155,17 +159,9 @@ def authenticate(self, email, username, password, options):

# bind as user to check their credentials
try:
# setup connection
ldap.set_option(ldap.OPT_REFERRALS, 0)

for opt in ldap_options:
ldap.set_option(*opt)

l = ldap.initialize(_get_subs(options, 'server', params))
l.protocol_version = 3
bind_password = _get_subs(options, 'bind-password', params)
if not bind_password:
raise RuntimeError('LDAP authenticate: empty password')
l.simple_bind_s(_get_subs(
options, 'bind-user', params), bind_password)
try:
Expand Down
11 changes: 10 additions & 1 deletion lib/galaxy/visualization/plugins/plugin.py
Expand Up @@ -274,7 +274,16 @@ def get_api_key():
render_vars[ 'plugin_path' ] = os.path.abspath( self.path )

if self.config.get( 'plugin_type', 'visualization' ) == "interactive_environment":
request = self.INTENV_REQUEST_FACTORY( trans, self )
try:
request = self.INTENV_REQUEST_FACTORY( trans, self )
except:
log.exception("IE plugin request handling failed")
return trans.fill_template( 'message.mako',
message='Loading the interactive environment failed, please contact the {admin_tag} for assistance'.format(
admin_tag='<a href="mailto:{admin_mail}">Galaxy administrator</a>'.format(
admin_mail=trans.app.config.error_email_to)
if trans.app.config.error_email_to else 'Galaxy administrator'),
status='error')
render_vars[ "ie_request" ] = request

template_filename = self.config[ 'entry_point' ][ 'file' ]
Expand Down
15 changes: 0 additions & 15 deletions lib/galaxy/webapps/galaxy/controllers/history.py
Expand Up @@ -1261,21 +1261,6 @@ def set_accessible_async( self, trans, id=None, accessible=False ):
return
# TODO: used in page/editor.mako

@web.expose
def name_autocomplete_data( self, trans, q=None, limit=None, timestamp=None ):
"""Return autocomplete data for history names"""
user = trans.get_user()
if not user:
return

ac_data = ""
for history in ( trans.sa_session.query( model.History )
.filter_by( user=user )
.filter( func.lower( model.History.name ).like(q.lower() + "%") ) ):
ac_data = ac_data + history.name + "\n"
return ac_data
# TODO: used in grid_base.mako

@web.expose
@web.require_login( "rename histories" )
def rename( self, trans, id=None, name=None, **kwd ):
Expand Down
10 changes: 6 additions & 4 deletions scripts/bootstrap_history.py
Expand Up @@ -100,15 +100,17 @@
**Feature3**
Feature description.
`Github <https://github.com/galaxyproject/galaxy>`__
===========================================================
Get Galaxy
==========
The code lives at `Github <https://github.com/galaxyproject/galaxy>`__ and you should have `Git <https://git-scm.com/>`__ to obtain it.
New Galaxy repository
To get a new Galaxy repository run:
.. code-block:: shell
$$ git clone -b release_${release} https://github.com/galaxyproject/galaxy.git
Update of existing Galaxy repository
To update an existing Galaxy repository run:
.. code-block:: shell
$$ git checkout release_${release} && git pull --ff-only origin release_${release}
Expand Down
2 changes: 1 addition & 1 deletion static/maps/mvc/grid/grid-view.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/scripts/mvc/grid/grid-view.js

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions templates/grid_base.mako
Expand Up @@ -101,8 +101,6 @@
'cur_page_num' : cur_page_num,
'num_pages' : num_pages,
'num_page_links' : num_page_links,
'history_tag_autocomplete_url' : url( controller='tag', action='tag_autocomplete_data', item_class=item_class ),
## 'history_name_autocomplete_url' : url( controller='history', action='name_autocomplete_data' ),
'status' : status,
'message' : util.restore_text(message),
'global_actions' : [],
Expand Down
1 change: 1 addition & 0 deletions tools/data_source/upload.py
Expand Up @@ -95,6 +95,7 @@ def add_file( dataset, registry, json_file, output_path ):
file_err( 'Unable to fetch %s\n%s' % ( dataset.path, str( e ) ), dataset, json_file )
return
dataset.path = temp_name
dataset.name = os.path.basename( dataset.name )
# See if we have an empty file
if not os.path.exists( dataset.path ):
file_err( 'Uploaded temporary file (%s) does not exist.' % dataset.path, dataset, json_file )
Expand Down

0 comments on commit c80380d

Please sign in to comment.