mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge remote-tracking branch 'upstream/dev' into es6
This commit is contained in:
@@ -19,7 +19,7 @@ var Router = Backbone.Router.extend({
|
||||
url += url.indexOf( '?' ) == -1 ? '?' : '&';
|
||||
url += $.param( data , true );
|
||||
}
|
||||
Galaxy.params = {};
|
||||
Galaxy.params = data;
|
||||
this.navigate( url, { 'trigger': true } );
|
||||
},
|
||||
|
||||
|
||||
@@ -49,20 +49,26 @@ var DatasetListItemEdit = _super.extend(
|
||||
|
||||
/** Render icon-button to edit the attributes (format, permissions, etc.) this dataset. */
|
||||
_renderEditButton : function(){
|
||||
var self = this;
|
||||
// don't show edit while uploading, in-accessible
|
||||
// DO show if in error (ala previous history panel)
|
||||
if( ( this.model.get( 'state' ) === STATES.DISCARDED )
|
||||
|| ( !this.model.get( 'accessible' ) ) ){
|
||||
return null;
|
||||
}
|
||||
|
||||
var purged = this.model.get( 'purged' ),
|
||||
deleted = this.model.get( 'deleted' ),
|
||||
editBtnData = {
|
||||
title : _l( 'Edit attributes' ),
|
||||
href : Galaxy.root + 'datasets/edit?dataset_id=' + this.model.attributes.id,
|
||||
faIcon : 'fa-pencil',
|
||||
classes : 'edit-btn'
|
||||
classes : 'edit-btn',
|
||||
onclick : function( ev ) {
|
||||
if ( Galaxy.router ) {
|
||||
ev.preventDefault();
|
||||
Galaxy.router.push( 'datasets/edit', { dataset_id : self.model.attributes.id } );
|
||||
}
|
||||
}
|
||||
};
|
||||
// disable if purged or deleted and explain why in the tooltip
|
||||
if( deleted || purged ){
|
||||
@@ -195,11 +201,18 @@ var DatasetListItemEdit = _super.extend(
|
||||
|
||||
/** Render icon-button to report an error on this dataset to the galaxy admin. */
|
||||
_renderErrButton : function(){
|
||||
var self = this;
|
||||
return faIconButton({
|
||||
title : _l( 'View or report this error' ),
|
||||
href : Galaxy.root + 'datasets/error?dataset_id=' + this.model.attributes.id,
|
||||
classes : 'report-error-btn',
|
||||
faIcon : 'fa-bug'
|
||||
faIcon : 'fa-bug',
|
||||
onclick : function( ev ) {
|
||||
if ( Galaxy.router ) {
|
||||
ev.preventDefault();
|
||||
Galaxy.router.push( 'datasets/error', { dataset_id : self.model.attributes.id } );
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -214,8 +227,10 @@ var DatasetListItemEdit = _super.extend(
|
||||
target : this.linkTarget,
|
||||
faIcon : 'fa-refresh',
|
||||
onclick : function( ev ) {
|
||||
ev.preventDefault();
|
||||
Galaxy.router.push( '/', { job_id : creating_job } );
|
||||
if ( Galaxy.router ) {
|
||||
ev.preventDefault();
|
||||
Galaxy.router.push( '/', { job_id : creating_job } );
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ class XmlToolSource(ToolSource):
|
||||
def parse_provided_metadata_style(self):
|
||||
style = None
|
||||
out_elem = self.root.find("outputs")
|
||||
if out_elem and "provided_metadata_style" in out_elem.attrib:
|
||||
if out_elem is not None and "provided_metadata_style" in out_elem.attrib:
|
||||
style = out_elem.attrib["provided_metadata_style"]
|
||||
|
||||
if style is None:
|
||||
@@ -213,7 +213,7 @@ class XmlToolSource(ToolSource):
|
||||
def parse_provided_metadata_file(self):
|
||||
provided_metadata_file = "galaxy.json"
|
||||
out_elem = self.root.find("outputs")
|
||||
if out_elem and "provided_metadata_file" in out_elem.attrib:
|
||||
if out_elem is not None and "provided_metadata_file" in out_elem.attrib:
|
||||
provided_metadata_file = out_elem.attrib["provided_metadata_file"]
|
||||
|
||||
return provided_metadata_file
|
||||
|
||||
@@ -121,6 +121,10 @@ class UserListGrid(grids.Grid):
|
||||
grids.GridAction("Create new user", url_args=dict(webapp="galaxy", action="create_new_user"))
|
||||
]
|
||||
operations = [
|
||||
grids.GridOperation("Manage Information",
|
||||
condition=(lambda item: not item.deleted),
|
||||
allow_multiple=False,
|
||||
url_args=dict(controller="user", action="information", webapp="galaxy")),
|
||||
grids.GridOperation("Manage Roles and Groups",
|
||||
condition=(lambda item: not item.deleted),
|
||||
allow_multiple=False,
|
||||
@@ -208,7 +212,8 @@ class RoleListGrid(grids.Grid):
|
||||
UsersColumn("Users", attach_popup=False),
|
||||
StatusColumn("Status", attach_popup=False),
|
||||
# Columns that are valid for filtering but are not visible.
|
||||
grids.DeletedColumn("Deleted", key="deleted", visible=False, filterable="advanced")
|
||||
grids.DeletedColumn("Deleted", key="deleted", visible=False, filterable="advanced"),
|
||||
grids.GridColumn("Last Updated", key="update_time", format=time_ago)
|
||||
]
|
||||
columns.append(grids.MulticolFilterColumn("Search",
|
||||
cols_to_filter=[columns[0], columns[1], columns[2]],
|
||||
@@ -218,10 +223,14 @@ class RoleListGrid(grids.Grid):
|
||||
global_actions = [
|
||||
grids.GridAction("Add new role", url_args=dict(action="form/create_role"))
|
||||
]
|
||||
operations = [grids.GridOperation("Edit",
|
||||
operations = [grids.GridOperation("Edit Name/Description",
|
||||
condition=(lambda item: not item.deleted),
|
||||
allow_multiple=False,
|
||||
url_args=dict(action="form/rename_role")),
|
||||
grids.GridOperation("Edit Permissions",
|
||||
condition=(lambda item: not item.deleted),
|
||||
allow_multiple=False,
|
||||
url_args=dict(action="form/manage_users_and_groups_for_role", webapp="galaxy")),
|
||||
grids.GridOperation("Delete",
|
||||
condition=(lambda item: not item.deleted),
|
||||
allow_multiple=True),
|
||||
@@ -283,7 +292,8 @@ class GroupListGrid(grids.Grid):
|
||||
RolesColumn("Roles", attach_popup=False),
|
||||
StatusColumn("Status", attach_popup=False),
|
||||
# Columns that are valid for filtering but are not visible.
|
||||
grids.DeletedColumn("Deleted", key="deleted", visible=False, filterable="advanced")
|
||||
grids.DeletedColumn("Deleted", key="deleted", visible=False, filterable="advanced"),
|
||||
grids.GridColumn("Last Updated", key="update_time", format=time_ago)
|
||||
]
|
||||
columns.append(grids.MulticolFilterColumn("Search",
|
||||
cols_to_filter=[columns[0]],
|
||||
@@ -293,10 +303,14 @@ class GroupListGrid(grids.Grid):
|
||||
global_actions = [
|
||||
grids.GridAction("Add new group", url_args=dict(action="form/create_group"))
|
||||
]
|
||||
operations = [grids.GridOperation("Rename",
|
||||
operations = [grids.GridOperation("Edit Name",
|
||||
condition=(lambda item: not item.deleted),
|
||||
allow_multiple=False,
|
||||
url_args=dict(action="form/rename_group")),
|
||||
grids.GridOperation("Edit Permissions",
|
||||
condition=(lambda item: not item.deleted),
|
||||
allow_multiple=False,
|
||||
url_args=dict(action="form/manage_users_and_roles_for_group", webapp="galaxy")),
|
||||
grids.GridOperation("Delete",
|
||||
condition=(lambda item: not item.deleted),
|
||||
allow_multiple=True),
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"sources":["layout/router.js"],"names":["jQuery","require","$","Ui","Router","extend","initialize","page","options","this","push","url","data","__identifer","Math","toString","substr","random","isEmptyObject","navigate","trigger","execute","callback","args","name","Galaxy","debug","QUERY_STRING","queryObj","apply","authenticate","access_denied","display","Message","status","message","persistent","module","exports"],"mappings":"aAAA,IAAIA,OAASC,QAAS,UAClBC,EAAIF,OADJA,aAASC,QAAS,8BAClBC,GAAIF,QADR,kBAGIG,OAAKF,SAASG,OAAAC,QAGdC,WAAA,SAAAC,EAAAC,GACAC,KAAAF,KAAAA,EACAD,KAAAA,QAAaE,GAMbE,KAAM,SAAUC,EAAKC,IADrBA,EAAAA,OACMC,YAAAC,KAAeF,SAAOG,SAAA,IAAAC,OAAA,GACxBJ,EAAOA,cAAPA,KACAA,IAAiCG,GAA5BF,EAAAA,QAAmBI,KAASF,IAAd,IACdJ,GAAGO,EAAAA,MAAFN,GAAN,IAEID,OAAAA,UACHF,KAAAU,SAAAR,GAAAS,SAAA,KAMLC,QAAS,SAAUC,EAAUC,EAAMC,GADnCC,OAAAC,MAAA,kBAAAJ,EAAAC,EAAAC,GACAH,IAAAA,EAASM,aAAUL,MAAUC,EAAMC,OAC/BC,EAAAA,KAAOC,GACHE,IACJnB,KAAWmB,aAAXL,EAAAC,GACIF,EAAUO,MAAApB,KAAAc,GAEND,KAAAA,kBAKXQ,aAhC+B,SAAAP,EAAAC,GAmC5B,OAAO,GACVO,cApC+B,WAuC5BtB,KAAKF,KAAKyB,QAAS,IAAI7B,GAAG8B,SAAWC,OAAQ,SAAUC,QAAS,sEAAuEC,YAAY,QAvCvHC,OAApCC,QAAAlC","file":"../../scripts/layout/router.js","sourcesContent":["var jQuery = require( 'jquery' ),\n $ = jQuery,\n QUERY_STRING = require( 'utils/query-string-parsing' ),\n Ui = require( 'mvc/ui/ui-misc' );\n\nvar Router = Backbone.Router.extend({\n // TODO: not many client routes at this point - fill and remove from server.\n // since we're at root here, this may be the last to be routed entirely on the client.\n initialize : function( page, options ){\n this.page = page;\n this.options = options;\n },\n\n /** helper to push a new navigation state */\n push: function( url, data ) {\n data = data || {};\n data.__identifer = Math.random().toString( 36 ).substr( 2 );\n if ( !$.isEmptyObject( data ) ) {\n url += url.indexOf( '?' ) == -1 ? '?' : '&';\n url += $.param( data , true );\n }\n Galaxy.params = {};\n this.navigate( url, { 'trigger': true } );\n },\n\n /** override to parse query string into obj and send to each route */\n execute: function( callback, args, name ){\n Galaxy.debug( 'router execute:', callback, args, name );\n var queryObj = QUERY_STRING.parse( args.pop() );\n args.push( queryObj );\n if( callback ){\n if ( this.authenticate( args, name ) ) {\n callback.apply( this, args );\n } else {\n this.access_denied();\n }\n }\n },\n\n authenticate: function( args, name ) {\n return true;\n },\n\n access_denied: function() {\n this.page.display( new Ui.Message( { status: 'danger', message: 'You must be logged in with proper credentials to make this request.', persistent: true } ) );\n }\n});\n\nmodule.exports = Router"]}
|
||||
{"version":3,"sources":["layout/router.js"],"names":["jQuery","require","$","Ui","Router","extend","initialize","page","options","this","push","url","data","__identifer","Math","toString","substr","random","isEmptyObject","param","navigate","trigger","execute","callback","args","name","Galaxy","debug","QUERY_STRING","queryObj","apply","authenticate","access_denied","display","Message","status","message","persistent","module","exports"],"mappings":"aAAA,IAAIA,OAASC,QAAS,UAClBC,EAAIF,OADJA,aAASC,QAAS,8BAClBC,GAAIF,QADR,kBAGIG,OAAKF,SAASG,OAAAC,QAGdC,WAAA,SAAAC,EAAAC,GACAC,KAAAF,KAAAA,EACAD,KAAAA,QAAaE,GAMbE,KAAM,SAAUC,EAAKC,IADrBA,EAAAA,OACMC,YAAAC,KAAeF,SAAOG,SAAA,IAAAC,OAAA,GACxBJ,EAAOA,cAAPA,KACAA,IAAiCG,GAA5BF,EAAAA,QAAmBI,KAASF,IAAd,IACdJ,GAAGO,EAAAA,MAAFN,GAAN,IAEID,OAAAA,OAASQ,EACZV,KAAAW,SAAAT,GAAAU,SAAA,KAMLC,QAAS,SAAUC,EAAUC,EAAMC,GADnCC,OAAAC,MAAA,kBAAAJ,EAAAC,EAAAC,GACAH,IAAAA,EAASM,aAAUL,MAAUC,EAAMC,OAC/BC,EAAAA,KAAOC,GACHE,IACJpB,KAAWoB,aAAXL,EAAAC,GACIF,EAAUO,MAAArB,KAAAe,GAEND,KAAAA,kBAKXQ,aAhC+B,SAAAP,EAAAC,GAmC5B,OAAO,GACVO,cApC+B,WAuC5BvB,KAAKF,KAAK0B,QAAS,IAAI9B,GAAG+B,SAAWC,OAAQ,SAAUC,QAAS,sEAAuEC,YAAY,QAvCvHC,OAApCC,QAAAnC","file":"../../scripts/layout/router.js","sourcesContent":["var jQuery = require( 'jquery' ),\n $ = jQuery,\n QUERY_STRING = require( 'utils/query-string-parsing' ),\n Ui = require( 'mvc/ui/ui-misc' );\n\nvar Router = Backbone.Router.extend({\n // TODO: not many client routes at this point - fill and remove from server.\n // since we're at root here, this may be the last to be routed entirely on the client.\n initialize : function( page, options ){\n this.page = page;\n this.options = options;\n },\n\n /** helper to push a new navigation state */\n push: function( url, data ) {\n data = data || {};\n data.__identifer = Math.random().toString( 36 ).substr( 2 );\n if ( !$.isEmptyObject( data ) ) {\n url += url.indexOf( '?' ) == -1 ? '?' : '&';\n url += $.param( data , true );\n }\n Galaxy.params = data;\n this.navigate( url, { 'trigger': true } );\n },\n\n /** override to parse query string into obj and send to each route */\n execute: function( callback, args, name ){\n Galaxy.debug( 'router execute:', callback, args, name );\n var queryObj = QUERY_STRING.parse( args.pop() );\n args.push( queryObj );\n if( callback ){\n if ( this.authenticate( args, name ) ) {\n callback.apply( this, args );\n } else {\n this.access_denied();\n }\n }\n },\n\n authenticate: function( args, name ) {\n return true;\n },\n\n access_denied: function() {\n this.page.display( new Ui.Message( { status: 'danger', message: 'You must be logged in with proper credentials to make this request.', persistent: true } ) );\n }\n});\n\nmodule.exports = Router"]}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
"use strict";var jQuery=require("jquery"),$=jQuery,QUERY_STRING=require("utils/query-string-parsing"),Ui=require("mvc/ui/ui-misc"),Router=Backbone.Router.extend({initialize:function(e,t){this.page=e,this.options=t},push:function(e,t){(t=t||{}).__identifer=Math.random().toString(36).substr(2),$.isEmptyObject(t)||(e+=-1==e.indexOf("?")?"?":"&",e+=$.param(t,!0)),Galaxy.params={},this.navigate(e,{trigger:!0})},execute:function(e,t,i){Galaxy.debug("router execute:",e,t,i);var s=QUERY_STRING.parse(t.pop());t.push(s),e&&(this.authenticate(t,i)?e.apply(this,t):this.access_denied())},authenticate:function(e,t){return!0},access_denied:function(){this.page.display(new Ui.Message({status:"danger",message:"You must be logged in with proper credentials to make this request.",persistent:!0}))}});module.exports=Router;
|
||||
"use strict";var jQuery=require("jquery"),$=jQuery,QUERY_STRING=require("utils/query-string-parsing"),Ui=require("mvc/ui/ui-misc"),Router=Backbone.Router.extend({initialize:function(e,t){this.page=e,this.options=t},push:function(e,t){(t=t||{}).__identifer=Math.random().toString(36).substr(2),$.isEmptyObject(t)||(e+=-1==e.indexOf("?")?"?":"&",e+=$.param(t,!0)),Galaxy.params=t,this.navigate(e,{trigger:!0})},execute:function(e,t,i){Galaxy.debug("router execute:",e,t,i);var s=QUERY_STRING.parse(t.pop());t.push(s),e&&(this.authenticate(t,i)?e.apply(this,t):this.access_denied())},authenticate:function(e,t){return!0},access_denied:function(){this.page.display(new Ui.Message({status:"danger",message:"You must be logged in with proper credentials to make this request.",persistent:!0}))}});module.exports=Router;
|
||||
//# sourceMappingURL=../../maps/layout/router.js.map
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
<%inherit file="/base.mako"/>
|
||||
<%namespace file="/message.mako" import="render_msg" />
|
||||
<% from galaxy.util import listify, nice_size, unicodify %>
|
||||
<% from galaxy.util import nice_size, unicodify %>
|
||||
|
||||
<style>
|
||||
.inherit {
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
<%def name="inputs_recursive( input_params, param_values, depth=1, upgrade_messages=None )">
|
||||
<%
|
||||
from galaxy.util import listify
|
||||
if upgrade_messages is None:
|
||||
upgrade_messages = {}
|
||||
%>
|
||||
|
||||
Reference in New Issue
Block a user