2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/7fc48713b918/ Changeset: 7fc48713b918 User: dannon Date: 2013-09-23 19:12:34 Summary: Correctly use tool_conf.xml,shed_tool_conf.xml as the default tool config file entry (as shown in universe_wsgi.ini.sample) Affected #: 1 file diff -r d4c6a250afd03a942e70f04ee7da8335dfea476b -r 7fc48713b918011a814269e4a210471afc2f8ac2 lib/galaxy/config.py --- a/lib/galaxy/config.py +++ b/lib/galaxy/config.py @@ -63,7 +63,7 @@ elif 'tool_config_files' in kwargs: tcf = kwargs[ 'tool_config_files' ] else: - tcf = 'tool_conf.xml' + tcf = 'tool_conf.xml,shed_tool_conf.xml' self.tool_filters = listify( kwargs.get( "tool_filters", [] ) ) self.tool_label_filters = listify( kwargs.get( "tool_label_filters", [] ) ) self.tool_section_filters = listify( kwargs.get( "tool_section_filters", [] ) ) https://bitbucket.org/galaxy/galaxy-central/commits/87d9c0ca5a4f/ Changeset: 87d9c0ca5a4f User: dannon Date: 2013-09-23 19:12:45 Summary: Merge Affected #: 11 files diff -r 7fc48713b918011a814269e4a210471afc2f8ac2 -r 87d9c0ca5a4f8ba1f73411ac7f9c23f59ce2cac4 eggs.ini --- a/eggs.ini +++ b/eggs.ini @@ -40,13 +40,14 @@ docutils = 0.7 drmaa = 0.4b3 elementtree = 1.2.6_20050316 -Fabric = 1.4.2 +Fabric = 1.7.0 GeneTrack = 2.0.0_beta_1 lrucache = 0.2 Mako = 0.4.1 nose = 0.11.1 NoseHTML = 0.4.1 NoseTestDiff = 0.1 +paramiko = 1.11.1 Parsley = 1.1 Paste = 1.7.5.1 PasteDeploy = 1.5.0 diff -r 7fc48713b918011a814269e4a210471afc2f8ac2 -r 87d9c0ca5a4f8ba1f73411ac7f9c23f59ce2cac4 lib/galaxy/web/base/controller.py --- a/lib/galaxy/web/base/controller.py +++ b/lib/galaxy/web/base/controller.py @@ -587,8 +587,10 @@ hda_dict[ 'api_type' ] = "file" # Add additional attributes that depend on trans can hence must be added here rather than at the model level. - - #NOTE: access is an expensive operation - removing it and adding the precondition of access is already checked + can_access_hda = trans.app.security_agent.can_access_dataset( trans.get_current_user_roles(), hda.dataset ) + can_access_hda = ( trans.user_is_admin() or can_access_hda ) + if not can_access_hda: + return self.get_inaccessible_hda_dict( trans, hda ) hda_dict[ 'accessible' ] = True # ---- return here if deleted AND purged OR can't access @@ -634,6 +636,18 @@ return trans.security.encode_dict_ids( hda_dict ) + def get_inaccessible_hda_dict( self, trans, hda ): + return trans.security.encode_dict_ids({ + 'id' : hda.id, + 'history_id': hda.history.id, + 'hid' : hda.hid, + 'name' : hda.name, + 'state' : hda.state, + 'deleted' : hda.deleted, + 'visible' : hda.visible, + 'accessible': False + }) + def get_hda_dict_with_error( self, trans, hda, error_msg='' ): return trans.security.encode_dict_ids({ 'id' : hda.id, diff -r 7fc48713b918011a814269e4a210471afc2f8ac2 -r 87d9c0ca5a4f8ba1f73411ac7f9c23f59ce2cac4 lib/galaxy/webapps/galaxy/controllers/history.py --- a/lib/galaxy/webapps/galaxy/controllers/history.py +++ b/lib/galaxy/webapps/galaxy/controllers/history.py @@ -309,7 +309,6 @@ # If deleting the current history, make a new current. if history == trans.get_history(): deleted_current = True - trans.get_or_create_default_history() trans.log_event( "History (%s) marked as deleted" % history.name ) n_deleted += 1 if purge and trans.app.config.allow_user_dataset_purge: @@ -339,6 +338,8 @@ part += " but the datasets were not removed from disk because that feature is not enabled in this Galaxy instance" message_parts.append( "%s. " % part ) if deleted_current: + #note: this needs to come after commits above or will use an empty history that was deleted above + trans.get_or_create_default_history() message_parts.append( "Your active history was deleted, a new empty history is now active. " ) status = INFO return ( status, " ".join( message_parts ) ) diff -r 7fc48713b918011a814269e4a210471afc2f8ac2 -r 87d9c0ca5a4f8ba1f73411ac7f9c23f59ce2cac4 lib/galaxy/webapps/tool_shed/controllers/repository.py --- a/lib/galaxy/webapps/tool_shed/controllers/repository.py +++ b/lib/galaxy/webapps/tool_shed/controllers/repository.py @@ -973,9 +973,9 @@ flush_needed = True if flush_needed: trans.sa_session.flush() - message = "Repository '%s' has been created." % repository.name + message = "Repository <b>%s</b> has been created." % str( repository.name ) trans.response.send_redirect( web.url_for( controller='repository', - action='view_repository', + action='manage_repository', message=message, id=trans.security.encode_id( repository.id ) ) ) repository_type_select_field = rt_util.build_repository_type_select_field( trans ) diff -r 7fc48713b918011a814269e4a210471afc2f8ac2 -r 87d9c0ca5a4f8ba1f73411ac7f9c23f59ce2cac4 static/scripts/galaxy.base.js --- a/static/scripts/galaxy.base.js +++ b/static/scripts/galaxy.base.js @@ -66,7 +66,10 @@ }; /** - * Sets up popupmenu rendering and binds options functions to the appropriate links + * Sets up popupmenu rendering and binds options functions to the appropriate links. + * initial_options is a dict with text describing the option pointing to either (a) a + * function to perform; or (b) another dict with two required keys, 'url' and 'action' (the + * function to perform. (b) is useful for exposing the underlying URL of the option. */ function make_popupmenu(button_element, initial_options) { /* Use the $.data feature to store options with the link element. @@ -92,7 +95,9 @@ } $.each( options, function( k, v ) { if (v) { - menu_element.append( $("<li></li>").append( $("<a href='#'></a>").html(k).click(v) ) ); + // Action can be either an anonymous function and a mapped dict. + var action = v.action || v; + menu_element.append( $("<li></li>").append( $("<a>").attr("href", v.url).html(k).click(action) ) ); } else { menu_element.append( $("<li></li>").addClass( "head" ).append( $("<a href='#'></a>").html(k) ) ); } @@ -164,43 +169,24 @@ options[ link.text() ] = null; } else { - options[ link.text() ] = function() { + options[ link.text() ] = { + url: href, + action: function() { - // if theres confirm text, send the dialog - if ( !confirmtext || confirm( confirmtext ) ) { - var f; - // relocate the center panel - if ( target === "_parent" ) { - window.parent.location = href; - - // relocate the entire window - } else if ( target === "_top" ) { - window.top.location = href; - - // Http request target is a window named demolocal on the local box - } else if ( target === "demo" ) { - if ( f === undefined || f.closed ) { - f = window.open( href,target ); - f.creator = self; + // if theres confirm text, send the dialog + if ( !confirmtext || confirm( confirmtext ) ) { + var f; + // Http request target is a window named demolocal on the local box + if ( target === "demo" ) { + if ( f === undefined || f.closed ) { + f = window.open( href,target ); + f.creator = self; + } + } - - // this panel or other, valid panels - } else { - // it may be that the button and menu href are not in the same frame: - // allow certain frame names to be used as a target - var other_valid_targets = [ - 'galaxy_main' - // following are blocked until needed - //'galaxy_tools', - //'galaxy_history' - ]; - if( ( target && ( target in window ) - && ( other_valid_targets.indexOf( target ) !== -1 ) ) ){ - window[ target ].location = href; - - // relocate this panel - } else { - window.location = href; + // For all other links, do the default action. + else { + link.trigger('click'); } } } diff -r 7fc48713b918011a814269e4a210471afc2f8ac2 -r 87d9c0ca5a4f8ba1f73411ac7f9c23f59ce2cac4 static/scripts/galaxy.panels.js --- a/static/scripts/galaxy.panels.js +++ b/static/scripts/galaxy.panels.js @@ -168,16 +168,17 @@ this.$overlay.show(); this.$dialog.show(); this.$overlay.addClass("in"); - // Fix min-width so that modal cannot shrink considerably if - // new content is loaded. + // Fix min-width so that modal cannot shrink considerably if new content is loaded. this.$body.css( "min-width", this.$body.width() ); - // Set max-height so that modal does not exceed window size. - // FIXME: this could perhaps be handled better using a container for the modal - // header-body-footer and setting max-height for the container. + // Set max-height so that modal does not exceed window size and is in middle of page. + // TODO: this could perhaps be handled better using CSS. this.$body.css( "max-height", - // 2* to provide buffer between bottom of modal and bottom of page. - $(window).height() - 2 * this.$dialog.offset().top - - this.$footer.outerHeight() - this.$header.outerHeight()); + $(window).height() - + this.$footer.outerHeight() - + this.$header.outerHeight() - + parseInt( this.$dialog.css( "padding-top" ), 10 ) - + parseInt( this.$dialog.css( "padding-bottom" ), 10 ) + ); } // Callback on init if ( callback ) { diff -r 7fc48713b918011a814269e4a210471afc2f8ac2 -r 87d9c0ca5a4f8ba1f73411ac7f9c23f59ce2cac4 static/style/blue/base.css --- a/static/style/blue/base.css +++ b/static/style/blue/base.css @@ -756,6 +756,7 @@ .btn.active,.btn:active{color:inherit} .dropdown-menu{max-width:auto} input[type="checkbox"],input[type="radio"]{margin-left:0.5ex;margin-right:0.5ex} +.modal-body{overflow:auto} .nav-tabs{margin-bottom:15px} a{text-decoration:underline} label{font-weight:normal} @@ -1388,9 +1389,9 @@ div.historyItem-setting_metadata{background:#ffc}div.historyItem-setting_metadata .state-icon{background-image:url(data_running.gif)} div.historyItem-upload{background:#a6e4f7}div.historyItem-upload .state-icon{background-image:url(data_upload.gif)} div.historyItem-queued{background:#eee}div.historyItem-queued .state-icon{background-image:url(sprite-history-states.png);background-position:0px -45px;width:15px;height:15px;height:15px} -div.historyItem-noPermission{filter:alpha(opacity=60);-moz-opacity:.60;opacity:.60} -div.historyItem-paused{background:#d9edf7}div.historyItem-paused .state-icon{font-family:FontAwesome;font-size:1.1666666666666667em;background-image:none !important;background-position:0% 0%;background-repeat:repeat}div.historyItem-paused .state-icon:before{content:"\f04c"} -div.historyItem-new .state-icon{font-family:FontAwesome;font-size:1.1666666666666667em;background-image:none !important;background-position:0% 0%;background-repeat:repeat}div.historyItem-new .state-icon:before{content:"\f071"} +div.historyItem-noPermission{filter:alpha(opacity=60);-moz-opacity:.60;opacity:.60}div.historyItem-noPermission .state-icon{line-height:16px;font-family:FontAwesome;font-size:1.1666666666666667em;background-image:none !important;background-position:0% 0%;background-repeat:repeat}div.historyItem-noPermission .state-icon:before{content:"\f05e"} +div.historyItem-paused{background:#d9edf7}div.historyItem-paused .state-icon{line-height:16px;font-family:FontAwesome;font-size:1.1666666666666667em;background-image:none !important;background-position:0% 0%;background-repeat:repeat}div.historyItem-paused .state-icon:before{content:"\f04c"} +div.historyItem-new .state-icon{line-height:16px;font-family:FontAwesome;font-size:1.1666666666666667em;background-image:none !important;background-position:0% 0%;background-repeat:repeat}div.historyItem-new .state-icon:before{content:"\f071"} div.historyItemTitleBar.spinner .state-icon{background:url(data_running.gif) 0 1px no-repeat !important} div.historyItemButtons{float:right}div.historyItemButtons .icon-button.display{background-image:url(sprite-history-buttons.png);background-position:0px -48px;width:16px;height:16px} div.historyItemButtons .icon-button.display:hover{background-image:url(sprite-history-buttons.png);background-position:0px -64px;width:16px;height:16px} diff -r 7fc48713b918011a814269e4a210471afc2f8ac2 -r 87d9c0ca5a4f8ba1f73411ac7f9c23f59ce2cac4 static/style/src/less/base.less --- a/static/style/src/less/base.less +++ b/static/style/src/less/base.less @@ -1509,11 +1509,19 @@ filter: alpha(opacity=60); -moz-opacity: .60; opacity: .60; + .state-icon { + line-height: 16px; + .fa-icon(); + &:before { + content: "\f05e"; + } + } } div.historyItem-paused { background: @state-paused-bg; .state-icon { + line-height: 16px; .fa-icon(); &:before { content: "\f04c"; @@ -1523,6 +1531,7 @@ div.historyItem-new { .state-icon { + line-height: 16px; .fa-icon(); &:before { content: "\f071"; diff -r 7fc48713b918011a814269e4a210471afc2f8ac2 -r 87d9c0ca5a4f8ba1f73411ac7f9c23f59ce2cac4 static/style/src/less/galaxy_bootstrap/overrides.less --- a/static/style/src/less/galaxy_bootstrap/overrides.less +++ b/static/style/src/less/galaxy_bootstrap/overrides.less @@ -32,6 +32,9 @@ // Modal -- wider by default, scroll like Trello /* + +NOTE: these styles do not currently work. + .modal { position: absolute; top: 50px; @@ -54,6 +57,11 @@ } */ +// Scroll modal body. +.modal-body { + overflow: auto; +} + // Tabs -- border color is hardcoded in navs.less, change to @btnBorder here .nav-tabs { diff -r 7fc48713b918011a814269e4a210471afc2f8ac2 -r 87d9c0ca5a4f8ba1f73411ac7f9c23f59ce2cac4 test/functional/test_get_data.py --- a/test/functional/test_get_data.py +++ b/test/functional/test_get_data.py @@ -22,7 +22,7 @@ """ # in order to remove a lot of boiler plate - and not have cascading errors history = get_latest_history_for_user( user ) - self.delete_current_history() + self.delete_history( id=self.security.encode_id( history.id ) ) self.is_history_empty() return get_latest_history_for_user( user ) diff -r 7fc48713b918011a814269e4a210471afc2f8ac2 -r 87d9c0ca5a4f8ba1f73411ac7f9c23f59ce2cac4 test/tool_shed/functional/test_0440_deleting_dependency_definitions.py --- a/test/tool_shed/functional/test_0440_deleting_dependency_definitions.py +++ b/test/tool_shed/functional/test_0440_deleting_dependency_definitions.py @@ -74,7 +74,7 @@ description='Description of Deleted Dependency Definitions category for test 0440' ) self.logout() self.login( email=common.test_user_1_email, username=common.test_user_1_name ) - strings_displayed = [ "Repository 'column_maker_0440' has been created" ] + strings_displayed = [ "Repository <b>column_maker_0440</b> has been created" ] repository = self.get_or_create_repository( name=column_repository_name, description=column_repository_description, long_description=column_repository_long_description, @@ -99,7 +99,7 @@ category = test_db_util.get_category_by_name( 'Test 0440 Deleted Dependency Definitions' ) self.logout() self.login( email=common.test_user_1_email, username=common.test_user_1_name ) - strings_displayed = [ "Repository 'convert_chars_0440' has been created" ] + strings_displayed = [ "Repository <b>convert_chars_0440</b> has been created" ] repository = self.get_or_create_repository( name=convert_repository_name, description=convert_repository_description, long_description=convert_repository_long_description, @@ -182,7 +182,7 @@ category = test_db_util.get_category_by_name( 'Test 0440 Deleted Dependency Definitions' ) self.logout() self.login( email=common.test_user_1_email, username=common.test_user_1_name ) - strings_displayed = [ "Repository 'bwa_package_0440' has been created" ] + strings_displayed = [ "Repository <b>bwa_package_0440</b> has been created" ] repository = self.get_or_create_repository( name=bwa_package_repository_name, description=bwa_package_repository_description, long_description=bwa_package_repository_long_description, @@ -208,7 +208,7 @@ category = test_db_util.get_category_by_name( 'Test 0440 Deleted Dependency Definitions' ) self.logout() self.login( email=common.test_user_1_email, username=common.test_user_1_name ) - strings_displayed = [ "Repository 'bwa_base_0440' has been created" ] + strings_displayed = [ "Repository <b>bwa_base_0440</b> has been created" ] repository = self.get_or_create_repository( name=bwa_base_repository_name, description=bwa_base_repository_description, long_description=bwa_base_repository_long_description, @@ -291,7 +291,7 @@ category = test_db_util.get_category_by_name( 'Test 0440 Deleted Dependency Definitions' ) self.logout() self.login( email=common.test_user_1_email, username=common.test_user_1_name ) - strings_displayed = [ "Repository 'bwa_tool_dependency_0440' has been created" ] + strings_displayed = [ "Repository <b>bwa_tool_dependency_0440</b> has been created" ] repository = self.get_or_create_repository( name=bwa_tool_dependency_repository_name, description=bwa_tool_dependency_repository_description, long_description=bwa_tool_dependency_repository_long_description, Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.