Conflicts:
	lib/galaxy/tools/parameters/validation.py
This commit is contained in:
Nicola Soranzo
2015-06-17 12:44:53 +01:00
35 changed files with 230 additions and 42 deletions
+129
View File
@@ -0,0 +1,129 @@
# Contributors
The following individuals have contributed code to Galaxy:
* Enis Afgan <afgane@gmail.com>
* Istvan Albert <istvan.albert@gmail.com>
* Renato Alves <alves.rjc@gmail.com> <rjalves@igc.gulbenkian.pt>
* Guruprasad Ananda <gua110@bx.psu.edu>
* Florent Angly <florent.angly@gmail.com>
* Raj Ayyampalayam <raj76@uga.edu>
* Finn Bacall <finn.bacall@cs.man.ac.uk>
* Dannon Baker <dannon.baker@gmail.com>
* Christopher Bare <christopherbare@gmail.com>
* Dan Blanchard <dan.blanchard@gmail.com>
* Daniel Blankenberg <dan.blankenberg@gmail.com> <dan@bx.psu.edu>
* James Boocock <sfk2001@gmail.com>
* Carlos Borroto <carlos.borroto@gmail.com>
* Daniel Bouchard <dbouchard@corefacility.ca> <daniel.bouchard@phac-aspc.gc.ca>
* Dave Bouvier <dave@bx.psu.edu>
* Adam Brenner <aebrenne@uci.edu>
* Anthony Bretaudeau <anthony.bretaudeau@rennes.inra.fr> <abretaud@irisa.fr>
* Richard Burhans <burhans@bx.psu.edu>
* Jennifer Cabral <jencabral@gmail.com>
* Martin Čech <marten@bx.psu.edu>
* Ramkrishna Chakrabarty <rc@bx.psu.edu>
* Brad Chapman <chapmanb@50mail.com>
* John Chilton <jmchilton@gmail.com>
* Saket Choudhary <saketkc@gmail.com>
* Wen-Yu Chung <wychung@bx.psu.edu>
* Dave Clements <clements@galaxyproject.org>
* Peter Cock <p.j.a.cock@googlemail.com>
* Ira Cooke <iracooke@gmail.com>
* Nate Coraor <nate@bx.psu.edu>
* Michael Cotterell <mepcotterell@gmail.com>
* Gianmauro Cuccuru <gmauro@crs4.it>
* Frederik Delaere <frederik.delaere@gmail.com>
* Olivia Doppelt <olivia.doppelt@pasteur.fr>
* John Duddy <jduddy@illumina.com>
* Carl Eberhard <carlfeberhard@gmail.com>
* Kyle Ellrott <kellrott@gmail.com> <kellrott@soe.ucsc.edu>
* Eric Enns <eric.enns@gmail.com>
* Dorine Francheteau <dorine@bx.psu.edu>
* Jaime Frey <jfrey@cs.wisc.edu>
* Carie Genote <cganote@iu.edu>
* Jeremy Goecks <jeremy.goecks@emory.edu> <jgoecks@gwu.edu>
* Nuwan Goonasekera <nuwan.goonasekera@gmail.com>
* Björn Grüning <bjoern.gruening@gmail.com> <bjoern@gruenings.eu>
* Aysam Guerler <aysam.guerler@gmail.com>
* Simon Guest <simon.guest@agresearch.co.nz>
* Jianbin He <jbhe@bx.psu.edu>
* Morita Hideyuki <h-morita@esm.co.jp>
* Rob Hooft <rob.hooft@nbic.nl>
* Y. Hoogstrate <y.hoogstrate@erasmusmc.nl>
* Jian-Long Huang <jlh@pyhub.org>
* Gert Hulselmans <gert.hulselmans@med.kuleuven.be>
* Jennifer Jackson <jen@bx.psu.edu>
* Joachim Jacob <joachim.jacob@gmail.com>
* Jim Johnson <jj@umn.edu> <jj@msi.umn.edu>
* Radhesh Kamath <radhesh@bx.psu.edu>
* Jan Kanis <jan.code@jankanis.nl>
* David King <dcking@bx.psu.edu>
* Rory Kirchner <roryk@mit.edu>
* Brad Langhorst <langhorst@neb.com>
* Ross Lazarus <ross.lazarus@gmail.com> <rossl@bx.psu.edu>
* Simone Leo <simone.leo@gmail.com>
* Kanwei Li <kanwei@gmail.com>
* Michael Li <michael.li@uwaterloo.ca>
* Philip Mabon <philipmabon@gmail.com>
* Remi Marenco <remi.marenco@gmail.com> <remimarenco@gmail.com>
* Thomas McGowan <mcgo0092@msi.umn.edu>
* Scott McManus <scottmcmanus@emory.edu> <scottmcmanus@gatech.edu>
* Hunter Moseley <hunter.moseley@louisville.edu>
* Arjun Nath <arjun@bx.psu.edu>
* Anton Nekrutenko <anton@bx.psu.edu> <anton@nekrut.org>
* Eric Paniagua <paniagua.cshl@gmail.com>
* Richard Park <rpark@bu.edu>
* Lance Parsons <lparsons@princeton.edu>
* Chinmay Rao <chinmay@bx.psu.edu>
* Eric Rasche <esr@tamu.edu> <rasche.eric@gmail.com> <rasche.eric@yandex.ru>
* Andrew Robinson <Andrew.Robinson@latrobe.edu.au>
* Andrea Sbardellati <andrea.sbardellati@crs4.it>
* Ian Schenck <ian@bx.psu.edu>
* Nick Semenkovich <semenko@alum.mit.edu>
* Matthew Shirley <mdshw5@gmail.com>
* Clare Sloggett <sloc@unimelb.edu.au>
* Nicola Soranzo <nicola.soranzo@tgac.ac.uk> <nsoranzo@tiscali.it> <soranzo@crs4.it>
* Roy Storey <kiwiroy@gmail.com>
* Hanfei Sun <ad9075@gmail.com>
* Ilya Sytchev <hackdna@gmail.com>
* James Taylor <james@jamestaylor.org>
* Tomithy Too <tomithy.too@gmail.com>
* David Trudgian <dave@trudgian.net> <david.trudgian@utsouthwestern.edu>
* Nitesh Turaga <nitesh.turaga@gmail.com>
* Clayton Turner <clayclay911@gmail.com>
* Marek Vavruša <marek@vavrusa.com>
* Martijn Vermaat <m.vermaat.hg@lumc.nl>
* Kelly Vincent <kpvincent@bx.psu.edu>
* Greg Von Kuster <greg@bx.psu.edu>
* Hiral Vora <hvora1@uncc.edu>
* Andrew Warren <anwarren@vbi.vt.edu>
* Trevor Wennblom <trevor@well.com>
* Yi Zhang <yizhang@bx.psu.edu>
* Freek de Bruijn <freek.de.bruijn@nbic.nl>
* Peter van Heusden <pvh@sanbi.ac.za>
* Marius van den Beek <m.vandenbeek@gmail.com>
# Institutional sponsors
Galaxy development began at The Pennsylvania State University in 2006.
In 2009 all contributions to that point were licensed by The
Pennsylvania State University under the terms of the Academic Free
License 3.0 (see LICENSE.txt). This license applies to all subsequent
contributions - including but not limited to development at The
Pennsylvania State University, Emory University, Johns Hopkins
University, and George Washington University as part of the following
NIH and NSF grants:
* NSF DBI 0543285, “Tailoring genomic data to the needs of experimental
biologists and educators”
* NIH R21 HG005133, “A turnkey solution for next generation sequence
data analysis”
* NIH R01 HG004909, “An efficient lightweight environment for biomedical
computation”
* NSF DBI 0850103, “Cyberinfrastructure for accessible and reproducible
research in life sciences”
* NIH RC2 HG005542, “Dynamically scalable accessible analysis for next
generation sequence data”
* NIH U41 HG006620, “Democratization of data analysis in life sciences
through Galaxy”
+1 -1
View File
@@ -1,4 +1,4 @@
Copyright (c) 2005-2013 Pennsylvania State University
Copyright (c) 2005-2015 Galaxy Contributors (see CONTRIBUTORS.md)
Licensed under the Academic Free License version 3.0
+1 -1
View File
@@ -124,7 +124,7 @@ define([], function() {
tmp += '<div class="ui-table-form-info">';
if (options.help) {
tmp += options.help;
if (options.argument && options.help.indexOf(options.argument) == -1) {
if (options.argument && options.help.indexOf('(' + options.argument + ')') == -1) {
tmp += ' (' + options.argument + ')';
}
}
@@ -1,6 +1,6 @@
define([
"libs/toastr",
"mvc/groups/group-model"
"toolshed/scripts/mvc/groups/group-model"
],
function(
mod_toastr,
@@ -1,12 +1,12 @@
define([
"libs/toastr",
"mvc/groups/group-model",
"mvc/groups/group-listrow-view"
"toolshed/scripts/mvc/groups/group-model",
"toolshed/scripts/mvc/groups/group-listrow-view"
], function(
mod_toastr,
mod_group_model,
mod_group_listrow_view
mod_group_row
){
var GroupListView = Backbone.View.extend({
@@ -71,7 +71,7 @@ var GroupListView = Backbone.View.extend({
* @param {Group} model of the view that will be rendered
*/
renderOne: function( options ){
var rowView = new mod_group_listrow_view.GroupListRowView( options );
var rowView = new mod_group_row.GroupListRowView( options );
this.$el.find( '#group_list_body' ).append( rowView.el );
},
-3
View File
@@ -1,3 +0,0 @@
define( [], function() {
return 'Remove this file';
});
@@ -3,9 +3,9 @@
// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
define([
"mvc/groups/group-list-view",
"mvc/groups/group-detail-view",
"mvc/groups/group-model"
'toolshed/scripts/mvc/groups/group-list-view',
'toolshed/scripts/mvc/groups/group-detail-view',
'toolshed/scripts/mvc/groups/group-model'
],
function(
mod_group_list,
+50 -7
View File
@@ -5,11 +5,13 @@ Classes related to parameter validation.
import logging
import re
from galaxy import model
from galaxy import util
log = logging.getLogger( __name__ )
class LateValidationError( Exception ):
def __init__( self, message ):
self.message = message
@@ -18,6 +20,7 @@ class Validator( object ):
"""
A validator checks that a value meets some conditions OR raises ValueError
"""
@classmethod
def from_element( cls, param, elem ):
type = elem.get( 'type', None )
@@ -46,6 +49,7 @@ class RegexValidator( Validator ):
...
ValueError: Not gonna happen
"""
@classmethod
def from_element( cls, param, elem ):
return cls( elem.get( 'message' ), elem.text )
@@ -79,6 +83,7 @@ class ExpressionValidator( Validator ):
...
ValueError: Not gonna happen
"""
@classmethod
def from_element( cls, param, elem ):
return cls( elem.get( 'message' ), elem.text, elem.get( 'substitute_value_in_message' ) )
@@ -105,10 +110,13 @@ class InRangeValidator( Validator ):
>>> from galaxy.tools.parameters.basic import ToolParameter
>>> p = ToolParameter.build( None, XML( '''
... <param name="blah" type="integer" size="10" value="10">
... <validator type="in_range" message="Not gonna happen" min="10" max="20"/>
... <validator type="in_range" message="Not gonna happen" min="10" exclude_min="true" max="20"/>
... </param>
... ''' ) )
>>> t = p.validate( 10 )
Traceback (most recent call last):
...
ValueError: Not gonna happen
>>> t = p.validate( 15 )
>>> t = p.validate( 20 )
>>> t = p.validate( 21 )
@@ -116,22 +124,50 @@ class InRangeValidator( Validator ):
...
ValueError: Not gonna happen
"""
@classmethod
def from_element( cls, param, elem ):
return cls( elem.get( 'message', None ), elem.get( 'min' ), elem.get( 'max' ) )
return cls( elem.get( 'message', None ), elem.get( 'min' ),
elem.get( 'max' ), elem.get( 'exclude_min', 'false' ),
elem.get( 'exclude_max', 'false' ) )
def __init__( self, message, range_min, range_max ):
def __init__( self, message, range_min, range_max, exclude_min=False, exclude_max=False ):
"""
When the optional exclude_min and exclude_max attributes are set
to true, the range excludes the end points (i.e., min < value < max),
while if set to False ( the default), then range includes the end points
(1.e., min <= value <= max). Combinations of exclude_min and exclude_max
values are allowed.
"""
self.min = float( range_min if range_min is not None else '-inf' )
self.exclude_min = util.asbool( exclude_min )
self.max = float( range_max if range_max is not None else 'inf' )
self.exclude_max = util.asbool( exclude_max )
assert self.min <= self.max, 'min must be less than or equal to max'
# Remove unneeded 0s and decimal from floats to make message pretty.
self_min_str = str( self.min ).rstrip( '0' ).rstrip( '.' )
self_max_str = str( self.max ).rstrip( '0' ).rstrip( '.' )
self.message = message or "Value must be between %s and %s" % ( self_min_str, self_max_str )
op1 = '>='
op2 = '<='
if self.exclude_min:
op1 = '>'
if self.exclude_max:
op2 = '<'
self.message = message or "Value must be %s %s and %s %s" % ( op1, self_min_str, op2, self_max_str )
def validate( self, value, history=None ):
if not( self.min <= float( value ) <= self.max ):
raise ValueError( self.message )
if self.exclude_min:
if not self.min < float( value ):
raise ValueError( self.message )
else:
if not self.min <= float( value ):
raise ValueError( self.message )
if self.exclude_max:
if not float( value ) < self.max:
raise ValueError( self.message )
else:
if not float( value ) <= self.max:
raise ValueError( self.message )
class LengthValidator( Validator ):
@@ -156,6 +192,7 @@ class LengthValidator( Validator ):
...
ValueError: Must have length no more than 8
"""
@classmethod
def from_element( cls, param, elem ):
return cls( elem.get( 'message', None ), elem.get( 'min', None ), elem.get( 'max', None ) )
@@ -180,6 +217,7 @@ class DatasetOkValidator( Validator ):
"""
Validator that checks if a dataset is in an 'ok' state
"""
def __init__( self, message=None ):
self.message = message
@@ -198,6 +236,7 @@ class MetadataValidator( Validator ):
"""
Validator that checks for missing metadata
"""
def __init__( self, message=None, check="", skip="" ):
self.message = message
self.check = check.split( "," )
@@ -221,6 +260,7 @@ class UnspecifiedBuildValidator( Validator ):
"""
Validator that checks for dbkey not equal to '?'
"""
def __init__( self, message=None ):
if message is None:
self.message = "Unspecified genome build, click the pencil icon in the history item to set the genome build"
@@ -243,6 +283,7 @@ class UnspecifiedBuildValidator( Validator ):
class NoOptionsValidator( Validator ):
"""Validator that checks for empty select list"""
def __init__( self, message=None ):
self.message = message
@@ -259,6 +300,7 @@ class NoOptionsValidator( Validator ):
class EmptyTextfieldValidator( Validator ):
"""Validator that checks for empty text field"""
def __init__( self, message=None ):
self.message = message
@@ -277,6 +319,7 @@ class MetadataInFileColumnValidator( Validator ):
"""
Validator that checks if the value for a dataset's metadata item exists in a file.
"""
@classmethod
def from_element( cls, param, elem ):
filename = elem.get( "filename", None )
@@ -315,6 +358,7 @@ class MetadataInDataTableColumnValidator( Validator ):
"""
Validator that checks if the value for a dataset's metadata item exists in a file.
"""
@classmethod
def from_element( cls, param, elem ):
table_name = elem.get( "table_name", None )
@@ -363,7 +407,6 @@ class MetadataInDataTableColumnValidator( Validator ):
return
raise ValueError( self.message )
validator_types = dict( expression=ExpressionValidator,
regex=RegexValidator,
in_range=InRangeValidator,
@@ -14,7 +14,7 @@ class Group( BaseUIController ):
def index( self, trans, **kwd ):
# define app configuration for generic mako template
app = {
'jscript' : "toolshed.groups"
'jscript' : "../toolshed/scripts/toolshed.groups"
}
return trans.fill_template( '/webapps/tool_shed/group/index.mako',
config = {
+6 -3
View File
@@ -877,10 +877,13 @@ class ToolModule( WorkflowModule ):
# Create new PJA associations with the created job, to be run on completion.
# PJA Parameter Replacement (only applies to immediate actions-- rename specifically, for now)
# Pass along replacement dict with the execution of the PJA so we don't have to modify the object.
post_job_actions = step.post_job_actions
# Combine workflow and runtime post job actions into the effective post
# job actions for this execution.
effective_post_job_actions = step.post_job_actions[:]
for key, value in self.runtime_post_job_actions.iteritems():
post_job_actions.append( self.__to_pja( key, value, step ) )
for pja in post_job_actions:
effective_post_job_actions.append( self.__to_pja( key, value, None ) )
for pja in effective_post_job_actions:
if pja.action_type in ActionBox.immediate_actions:
ActionBox.execute( self.trans.app, self.trans.sa_session, pja, job, replacement_dict )
else:
+4 -2
View File
@@ -94,8 +94,10 @@ def display( url, api_key=None, return_formatted=True ):
print 'Collection Members'
print '------------------'
for n, i in enumerate(r):
# All collection members should have a name and url in the response.
print '#%d: %s' % (n+1, i.pop( 'url' ) )
# All collection members should have a name in the response.
# url is optional
if 'url' in i:
print '#%d: %s' % (n+1, i.pop( 'url' ) )
if 'name' in i:
print ' name: %s' % i.pop( 'name' )
for k, v in i.items():
+4 -2
View File
@@ -89,8 +89,10 @@ def display( api_key, url, return_formatted=True ):
print 'Collection Members'
print '------------------'
for n, i in enumerate(r):
# All collection members should have a name and url in the response.
print '#%d: %s' % (n+1, i.pop( 'url' ) )
# All collection members should have a name in the response.
# url is optional
if 'url' in i:
print '#%d: %s' % (n+1, i.pop( 'url' ) )
if 'name' in i:
print ' name: %s' % i.pop( 'name' )
for k, v in i.items():
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"form-input.js","sources":["../../../src/mvc/form/form-input.js"],"names":["define","Backbone","View","extend","initialize","app","options","this","text_enable","text_disable","cls_enable","cls_disable","field","default_value","setElement","_template","$field","$el","find","$optional","$optional_icon","$error_text","$error","prepend","collapsed","collapsible","value","JSON","stringify","collapsible_value","_refresh","self","on","trigger","error","text","html","show","addClass","reset","hide","removeClass","_tooltip","fadeIn","title","cls","length","tooltip","placement","attr","tmp","label","help","argument","indexOf"],"mappings":"AAGAA,UAAW,WACP,MAAOC,UAASC,KAAKC,QACjBC,WAAY,SAASC,EAAKC,GAEtBC,KAAKF,IAAMA,EAGXE,KAAKC,YAAiBH,EAAIC,QAAQE,aAAe,SACjDD,KAAKE,aAAiBJ,EAAIC,QAAQG,cAAgB,UAClDF,KAAKG,WAAiBL,EAAIC,QAAQI,YAAc,4BAChDH,KAAKI,YAAiBN,EAAIC,QAAQK,aAAe,0BAGjDJ,KAAKK,MAAQN,EAAQM,MACrBL,KAAKM,cAAgBP,EAAQO,cAG7BN,KAAKO,WAAWP,KAAKQ,UAAUT,IAG/BC,KAAKS,OAAST,KAAKU,IAAIC,KAAK,wBAC5BX,KAAKY,UAAYZ,KAAKU,IAAIC,KAAK,2BAC/BX,KAAKa,eAAiBb,KAAKU,IAAIC,KAAK,2BAA2BA,KAAK,SACpEX,KAAKc,YAAcd,KAAKU,IAAIC,KAAK,6BACjCX,KAAKe,OAASf,KAAKU,IAAIC,KAAK,wBAG5BX,KAAKS,OAAOO,QAAQhB,KAAKK,MAAMK,KAG/BV,KAAKK,MAAMY,UAAalB,EAAQmB,aAAenB,EAAQoB,OAC/BC,KAAKC,UAAUtB,EAAQoB,QAAUC,KAAKC,UAAUtB,EAAQuB,mBAGhFtB,KAAKuB,UAGL,IAAIC,GAAOxB,IACXA,MAAKY,UAAUa,GAAG,QAAS,WAEvBD,EAAKnB,MAAMY,WAAaO,EAAKnB,MAAMY,UAGnCO,EAAKD,WAGLC,EAAK1B,IAAI4B,QAAQ,aAMzBC,MAAO,SAASC,GACZ5B,KAAKc,YAAYe,KAAKD,GACtB5B,KAAKe,OAAOe,OACZ9B,KAAKU,IAAIqB,SAAS,aAKtBC,MAAO,WACHhC,KAAKe,OAAOkB,OACZjC,KAAKU,IAAIwB,YAAY,aAKzBX,SAAU,WAENvB,KAAKa,eAAeqB,cAAcH,SAAS,QAGtC/B,KAAKK,MAAMY,WAOZjB,KAAKS,OAAOwB,OACZjC,KAAKmC,SAASnC,KAAKC,YAAaD,KAAKG,YACrCH,KAAKK,MAAMc,OAASnB,KAAKK,MAAMc,MAAMnB,KAAKM,iBAP1CN,KAAKS,OAAO2B,OAAO,QACnBpC,KAAKmC,SAASnC,KAAKE,aAAcF,KAAKI,aACtCJ,KAAKF,IAAI4B,QAAQ,YAWzBS,SAAU,SAASE,EAAOC,GAClBtC,KAAKY,UAAU2B,QACfvC,KAAKa,eAAekB,SAASO,GACTE,SAAUC,UAAW,WACrBC,KAAK,sBAAuBL,GAC5BG,QAAQ,YAAYA,QAAQ,SAMxDhC,UAAW,SAAST,GAEhB,GAAI4C,GAAQ,8LAkCZ,OA1BIA,IADA5C,EAAQmB,YACQ,wDAC0BnB,EAAQ6C,MAClC,SAET7C,EAAQ6C,MAInBD,GAAgB,0CAIhBA,GAAoB,mCAChB5C,EAAQ8C,OACRF,GAAoB5C,EAAQ8C,KACxB9C,EAAQ+C,UAAsD,IAA1C/C,EAAQ8C,KAAKE,QAAQhD,EAAQ+C,YACjDH,GAAO,KAAO5C,EAAQ+C,SAAW,MAGzCH,GAAoB,SAGpBA,GAAgB"}
{"version":3,"file":"form-input.js","sources":["../../../src/mvc/form/form-input.js"],"names":["define","Backbone","View","extend","initialize","app","options","this","text_enable","text_disable","cls_enable","cls_disable","field","default_value","setElement","_template","$field","$el","find","$optional","$optional_icon","$error_text","$error","prepend","collapsed","collapsible","value","JSON","stringify","collapsible_value","_refresh","self","on","trigger","error","text","html","show","addClass","reset","hide","removeClass","_tooltip","fadeIn","title","cls","length","tooltip","placement","attr","tmp","label","help","argument","indexOf"],"mappings":"AAGAA,UAAW,WACP,MAAOC,UAASC,KAAKC,QACjBC,WAAY,SAASC,EAAKC,GAEtBC,KAAKF,IAAMA,EAGXE,KAAKC,YAAiBH,EAAIC,QAAQE,aAAe,SACjDD,KAAKE,aAAiBJ,EAAIC,QAAQG,cAAgB,UAClDF,KAAKG,WAAiBL,EAAIC,QAAQI,YAAc,4BAChDH,KAAKI,YAAiBN,EAAIC,QAAQK,aAAe,0BAGjDJ,KAAKK,MAAQN,EAAQM,MACrBL,KAAKM,cAAgBP,EAAQO,cAG7BN,KAAKO,WAAWP,KAAKQ,UAAUT,IAG/BC,KAAKS,OAAST,KAAKU,IAAIC,KAAK,wBAC5BX,KAAKY,UAAYZ,KAAKU,IAAIC,KAAK,2BAC/BX,KAAKa,eAAiBb,KAAKU,IAAIC,KAAK,2BAA2BA,KAAK,SACpEX,KAAKc,YAAcd,KAAKU,IAAIC,KAAK,6BACjCX,KAAKe,OAASf,KAAKU,IAAIC,KAAK,wBAG5BX,KAAKS,OAAOO,QAAQhB,KAAKK,MAAMK,KAG/BV,KAAKK,MAAMY,UAAalB,EAAQmB,aAAenB,EAAQoB,OAC/BC,KAAKC,UAAUtB,EAAQoB,QAAUC,KAAKC,UAAUtB,EAAQuB,mBAGhFtB,KAAKuB,UAGL,IAAIC,GAAOxB,IACXA,MAAKY,UAAUa,GAAG,QAAS,WAEvBD,EAAKnB,MAAMY,WAAaO,EAAKnB,MAAMY,UAGnCO,EAAKD,WAGLC,EAAK1B,IAAI4B,QAAQ,aAMzBC,MAAO,SAASC,GACZ5B,KAAKc,YAAYe,KAAKD,GACtB5B,KAAKe,OAAOe,OACZ9B,KAAKU,IAAIqB,SAAS,aAKtBC,MAAO,WACHhC,KAAKe,OAAOkB,OACZjC,KAAKU,IAAIwB,YAAY,aAKzBX,SAAU,WAENvB,KAAKa,eAAeqB,cAAcH,SAAS,QAGtC/B,KAAKK,MAAMY,WAOZjB,KAAKS,OAAOwB,OACZjC,KAAKmC,SAASnC,KAAKC,YAAaD,KAAKG,YACrCH,KAAKK,MAAMc,OAASnB,KAAKK,MAAMc,MAAMnB,KAAKM,iBAP1CN,KAAKS,OAAO2B,OAAO,QACnBpC,KAAKmC,SAASnC,KAAKE,aAAcF,KAAKI,aACtCJ,KAAKF,IAAI4B,QAAQ,YAWzBS,SAAU,SAASE,EAAOC,GAClBtC,KAAKY,UAAU2B,QACfvC,KAAKa,eAAekB,SAASO,GACTE,SAAUC,UAAW,WACrBC,KAAK,sBAAuBL,GAC5BG,QAAQ,YAAYA,QAAQ,SAMxDhC,UAAW,SAAST,GAEhB,GAAI4C,GAAQ,8LAkCZ,OA1BIA,IADA5C,EAAQmB,YACQ,wDAC0BnB,EAAQ6C,MAClC,SAET7C,EAAQ6C,MAInBD,GAAgB,0CAIhBA,GAAoB,mCAChB5C,EAAQ8C,OACRF,GAAoB5C,EAAQ8C,KACxB9C,EAAQ+C,UAAkE,IAAtD/C,EAAQ8C,KAAKE,QAAQ,IAAMhD,EAAQ+C,SAAW,OAClEH,GAAO,KAAO5C,EAAQ+C,SAAW,MAGzCH,GAAoB,SAGpBA,GAAgB"}
+1 -1
View File
@@ -1,2 +1,2 @@
define([],function(){return Backbone.View.extend({initialize:function(a,b){this.app=a,this.text_enable=a.options.text_enable||"Enable",this.text_disable=a.options.text_disable||"Disable",this.cls_enable=a.options.cls_enable||"fa fa-caret-square-o-down",this.cls_disable=a.options.cls_disable||"fa fa-caret-square-o-up",this.field=b.field,this.default_value=b.default_value,this.setElement(this._template(b)),this.$field=this.$el.find(".ui-table-form-field"),this.$optional=this.$el.find(".ui-table-form-optional"),this.$optional_icon=this.$el.find(".ui-table-form-optional").find(".icon"),this.$error_text=this.$el.find(".ui-table-form-error-text"),this.$error=this.$el.find(".ui-table-form-error"),this.$field.prepend(this.field.$el),this.field.collapsed=b.collapsible&&b.value&&JSON.stringify(b.value)==JSON.stringify(b.collapsible_value),this._refresh();var c=this;this.$optional.on("click",function(){c.field.collapsed=!c.field.collapsed,c._refresh(),c.app.trigger("change")})},error:function(a){this.$error_text.html(a),this.$error.show(),this.$el.addClass("ui-error")},reset:function(){this.$error.hide(),this.$el.removeClass("ui-error")},_refresh:function(){this.$optional_icon.removeClass().addClass("icon"),this.field.collapsed?(this.$field.hide(),this._tooltip(this.text_enable,this.cls_enable),this.field.value&&this.field.value(this.default_value)):(this.$field.fadeIn("fast"),this._tooltip(this.text_disable,this.cls_disable),this.app.trigger("change"))},_tooltip:function(a,b){this.$optional.length&&this.$optional_icon.addClass(b).tooltip({placement:"bottom"}).attr("data-original-title",a).tooltip("fixTitle").tooltip("hide")},_template:function(a){var b='<div class="ui-table-form-element"><div class="ui-table-form-error ui-error"><span class="fa fa-arrow-down"/><span class="ui-table-form-error-text"/></div><div class="ui-table-form-title">';return b+=a.collapsible?'<div class="ui-table-form-optional"><i class="icon"/>'+a.label+"</div>":a.label,b+='</div><div class="ui-table-form-field">',b+='<div class="ui-table-form-info">',a.help&&(b+=a.help,a.argument&&-1==a.help.indexOf(a.argument)&&(b+=" ("+a.argument+")")),b+="</div>",b+="</div></div>"}})});
define([],function(){return Backbone.View.extend({initialize:function(a,b){this.app=a,this.text_enable=a.options.text_enable||"Enable",this.text_disable=a.options.text_disable||"Disable",this.cls_enable=a.options.cls_enable||"fa fa-caret-square-o-down",this.cls_disable=a.options.cls_disable||"fa fa-caret-square-o-up",this.field=b.field,this.default_value=b.default_value,this.setElement(this._template(b)),this.$field=this.$el.find(".ui-table-form-field"),this.$optional=this.$el.find(".ui-table-form-optional"),this.$optional_icon=this.$el.find(".ui-table-form-optional").find(".icon"),this.$error_text=this.$el.find(".ui-table-form-error-text"),this.$error=this.$el.find(".ui-table-form-error"),this.$field.prepend(this.field.$el),this.field.collapsed=b.collapsible&&b.value&&JSON.stringify(b.value)==JSON.stringify(b.collapsible_value),this._refresh();var c=this;this.$optional.on("click",function(){c.field.collapsed=!c.field.collapsed,c._refresh(),c.app.trigger("change")})},error:function(a){this.$error_text.html(a),this.$error.show(),this.$el.addClass("ui-error")},reset:function(){this.$error.hide(),this.$el.removeClass("ui-error")},_refresh:function(){this.$optional_icon.removeClass().addClass("icon"),this.field.collapsed?(this.$field.hide(),this._tooltip(this.text_enable,this.cls_enable),this.field.value&&this.field.value(this.default_value)):(this.$field.fadeIn("fast"),this._tooltip(this.text_disable,this.cls_disable),this.app.trigger("change"))},_tooltip:function(a,b){this.$optional.length&&this.$optional_icon.addClass(b).tooltip({placement:"bottom"}).attr("data-original-title",a).tooltip("fixTitle").tooltip("hide")},_template:function(a){var b='<div class="ui-table-form-element"><div class="ui-table-form-error ui-error"><span class="fa fa-arrow-down"/><span class="ui-table-form-error-text"/></div><div class="ui-table-form-title">';return b+=a.collapsible?'<div class="ui-table-form-optional"><i class="icon"/>'+a.label+"</div>":a.label,b+='</div><div class="ui-table-form-field">',b+='<div class="ui-table-form-info">',a.help&&(b+=a.help,a.argument&&-1==a.help.indexOf("("+a.argument+")")&&(b+=" ("+a.argument+")")),b+="</div>",b+="</div></div>"}})});
//# sourceMappingURL=../../../maps/mvc/form/form-input.js.map
@@ -1,2 +0,0 @@
define(["libs/toastr","mvc/groups/group-model"],function(a,b){var c=Backbone.View.extend({el:"#groups_element",options:{},app:null,initialize:function(a){this.options=_.extend(this.options,a),this.app=window.globalTS.groups,null!==this.app.collection?(this.model=this.app.collection.get(this.options.group_id),this.render()):this.fetchGroup()},fetchGroup:function(c){var d=this;this.options=_.extend(this.options,c),this.model=new b.Group({id:this.options.group_id}),this.model.fetch({success:function(a){console.log("received data: "),console.log(a),d.render()},error:function(b,c){a.error("undefined"!=typeof c.responseJSON?c.responseJSON.err_msg:"An error ocurred.")}})},render:function(){var a=this.templateRow();this.$el.html(a({group:this.model})),$("#center [data-toggle]").tooltip()},templateRow:function(){return _.template(["<div>",'<h3><%= group.get("name") %></h3>','<p class="" style="color:gray;">','A group of <%= group.get("members").length %> members with <%= group.get("repositories").length %> repositories and a total of <%= group.get("total_downloads") %> combined tool downloads.</p>',"<h3>Members</h3>",'<table class="grid table table-condensed">',"<thead>","<th>Name</th>","<th>Repositories</th>","<th>Registered</th>","</thead>","<tbody>",'<% _.each(group.get("members"), function(member) { %>',"<tr>","<td>","<%= member.username %>","</td>","<td>",'<a data-toggle="tooltip" data-placement="top" title="Repositories of <%= member.username %>" href="/repository/browse_repositories_by_user?user_id=<%= member.id %>&use_panels=true" id="<%= member.id %>"><%= member.user_repos_count %></a>',"</td>","<td>","<%= member.time_created %>","</td>","</tr>","<% }); %>","</tbody>","</table>","<h3>Repositories</h3>",'<table class="grid table table-condensed">',"<thead>","<th>Name</th>","<th>Description</th>","<th>Downloads</th>","<th>Owner</th>","<th>Created</th>","<th>Rating</th>","<th>Verified</th>","</thead>","<tbody>",'<% _.each(group.get("repositories"), function(repo) { %>',"<tr>","<td>",'<a data-toggle="tooltip" data-placement="top" title="Details of <%= repo.name %>" href="/view/<%= repo.owner %>/<%= repo.name %>" id="<%= repo.id %>"><%= repo.name %></a>',"</td>","<td>","<%= repo.description %>","</td>","<td>","<%= repo.times_downloaded %>","</td>","<td>","<%= repo.owner %>","</td>","<td>","<%= repo.time_created %>","</td>","<td>","<%= repo.ratings_mean %>","</td>","<td>","<%= repo.approved %>","</td>","</tr>","<% }); %>","</tbody>","</table>","</div>"].join(""))}});return{GroupDetailView:c}});
//# sourceMappingURL=../../../maps/mvc/groups/group-detail-view.js.map
@@ -1,2 +0,0 @@
define([],function(){var a=Backbone.View.extend({events:{},initialize:function(a){this.render(a)},render:function(a){var b=this.templateRow();return this.setElement(b({group:a})),this.$el.show(),this},templateRow:function(){return _.template(["<div>TEST GROUP PAGE</div>"].join(""))}});return{GroupDetailView:a}});
//# sourceMappingURL=../../../maps/mvc/groups/group-groupdetail-view.js.map
@@ -1,2 +0,0 @@
define([],function(){var a=Backbone.View.extend({events:{},initialize:function(a){this.render(a)},render:function(a){var b=this.templateRow();return this.setElement(b({group:a})),this.$el.show(),this},templateRow:function(){return _.template(['<tr class="" data-id="<%- group.get("id") %>">','<td><a href="/groups/<%= group.get("id") %>"><%= group.get("name") %></a></td>',"<td>description</td>",'<td><%= group.get("total_members") %></td>','<td><%= group.get("total_repos") %></td>',"</tr>"].join(""))}});return{GroupRowView:a}});
//# sourceMappingURL=../../../maps/mvc/groups/group-grouprow-view.js.map
@@ -1,2 +0,0 @@
define(["libs/toastr","mvc/groups/group-model","mvc/groups/group-listrow-view"],function(a,b,c){var d=Backbone.View.extend({el:"#groups_element",defaults:{},initialize:function(c){this.options=_.defaults(this.options||{},this.defaults,c);var d=this;window.globalTS.groups.collection=new b.Groups,window.globalTS.groups.collection.fetch({success:function(a){console.log("received data: "),console.log(a),d.render()},error:function(b,c){a.error("undefined"!=typeof c.responseJSON?c.responseJSON.err_msg:"An error ocurred.")}})},fetch:function(){},render:function(a){this.options=_.extend(this.options,a),$(".tooltip").hide();var b=this.templateGroupsList();this.$el.html(b({length:10,order:"asc"})),this.renderRows(window.globalTS.groups.collection.models),$("#center [data-toggle]").tooltip(),$("#center").css("overflow","auto")},renderRows:function(a){for(var b=0;b<a.length;b++){var c=a[b];this.renderOne({group:c})}},renderOne:function(a){var b=new c.GroupListRowView(a);this.$el.find("#group_list_body").append(b.el)},templateGroupsList:function(){return tmpl_array=[],tmpl_array.push('<div id="groups">'),tmpl_array.push("</div>"),tmpl_array.push('<div class="groups_container table-responsive">'),tmpl_array.push("<% if(length === 0) { %>"),tmpl_array.push("<div>There are no groups yet.</div>"),tmpl_array.push("<% } else{ %>"),tmpl_array.push('<table class="grid table table-condensed">'),tmpl_array.push(" <thead>"),tmpl_array.push(' <th style="width:30%;"><a class="sort-groups-link" title="Click to reverse order" href="#">name</a> <span title="Sorted alphabetically" class="fa fa-sort-alpha-<%- order %>"></span></th>'),tmpl_array.push(' <th style="width:22%;">description</th>'),tmpl_array.push(' <th style="width:22%;">members</th> '),tmpl_array.push(' <th style="width:26%;">repositories</th>'),tmpl_array.push(" </thead>"),tmpl_array.push(' <tbody id="group_list_body">'),tmpl_array.push(" </tbody>"),tmpl_array.push("</table>"),tmpl_array.push("<% }%>"),tmpl_array.push("</div>"),_.template(tmpl_array.join(""))}});return{GroupListView:d}});
//# sourceMappingURL=../../../maps/mvc/groups/group-list-view.js.map
-2
View File
@@ -1,2 +0,0 @@
define([],function(){var a=Backbone.Model.extend({urlRoot:"/api/groups/"}),b=Backbone.Collection.extend({url:"/api/groups",model:a});return{Group:a,Groups:b}});
//# sourceMappingURL=../../../maps/mvc/groups/group.model.js.map
-2
View File
@@ -1,2 +0,0 @@
define(["mvc/groups/group-list-view","mvc/groups/group-detail-view","mvc/groups/group-model"],function(a,b){var c=Backbone.Router.extend({routes:{"":"groups",":group_id":"group_page"}}),d=Backbone.View.extend({groupListView:null,groupDetailView:null,collection:null,initialize:function(){window.globalTS.groups=this,this.ts_router=new c,this.ts_router.on("route:groups",function(){window.globalTS.groups.groupListView=new a.GroupListView}),this.ts_router.on("route:group_page",function(a){window.globalTS.groups.groupDetailView=new b.GroupDetailView({group_id:a})}),Backbone.history.start({pushState:!1})}});return{ToolshedGroups:d}});
//# sourceMappingURL=../maps/toolshed.groups.js.map
@@ -0,0 +1 @@
{"version":3,"file":"group-detail-view.js","sources":["../../../src/mvc/groups/group-detail-view.js"],"names":["define","mod_toastr","mod_group_model","GroupDetailView","Backbone","View","extend","el","options","app","initialize","this","_","window","globalTS","groups","collection","model","get","group_id","render","fetchGroup","that","Group","id","fetch","success","console","log","error","response","responseJSON","err_msg","template","templateRow","$el","html","group","$","tooltip","join"],"mappings":"AAAAA,QACI,cACA,2CAEJ,SACIC,EACAC,GAIJ,GAAIC,GAAkBC,SAASC,KAAKC,QAChCC,GAAI,kBACJC,WACAC,IAAK,KAELC,WAAa,SAAUF,GACnBG,KAAKH,QAAUI,EAAEN,OAAQK,KAAKH,QAASA,GACvCG,KAAKF,IAAMI,OAAOC,SAASC,OAEE,OAAxBJ,KAAKF,IAAIO,YACVL,KAAKM,MAAQN,KAAKF,IAAIO,WAAWE,IAAKP,KAAKH,QAAQW,UACnDR,KAAKS,UAELT,KAAKU,cAKbA,WAAY,SAAUb,GAClB,GAAIc,GAAOX,IACXA,MAAKH,QAAUI,EAAEN,OAAQK,KAAKH,QAASA,GACvCG,KAAKM,MAAQ,GAAIf,GAAgBqB,OAASC,GAAIb,KAAKH,QAAQW,WAC3DR,KAAKM,MAAMQ,OACTC,QAAS,SAAUT,GACjBU,QAAQC,IAAK,mBACbD,QAAQC,IAAKX,GACbK,EAAKF,UAEPS,MAAO,SAAUZ,EAAOa,GAElB7B,EAAW4B,MADyB,mBAA1BC,GAASC,aACDD,EAASC,aAAaC,QAEtB,yBAM9BZ,OAAQ,WACJ,GAAIa,GAAWtB,KAAKuB,aACpBvB,MAAKwB,IAAIC,KAAMH,GAAYI,MAAO1B,KAAKM,SACvCqB,EAAE,yBAAyBC,WAG/BL,YAAa,WACT,MAAOtB,GAAEqB,UACD,QACI,oCACA,mCACA,kMAEA,mBACA,6CACI,UACI,gBACA,wBACA,sBACJ,WACA,UACI,wDACA,OACI,OACI,yBACJ,QACA,OACI,gPACJ,QACA,OACI,6BACJ,QACJ,QACA,YACJ,WACJ,WAEA,wBACA,6CACI,UACI,gBACA,uBACA,qBACA,iBACA,mBACA,kBACA,oBACJ,WACA,UACI,2DACA,OACI,OACI,6KACJ,QACA,OACI,0BACJ,QACA,OACI,+BACJ,QACA,OACI,oBACJ,QACA,OACI,2BACJ,QACA,OACI,2BACJ,QACA,OACI,uBACJ,QACJ,QACA,YACJ,WACJ,WACJ,UACNO,KAAK,OAGf,QACIrC,gBAAiBA"}
@@ -0,0 +1 @@
{"version":3,"file":"group-list-view.js","sources":["../../../src/mvc/groups/group-list-view.js"],"names":["define","mod_toastr","mod_group_model","mod_group_row","GroupListView","Backbone","View","extend","el","defaults","initialize","options","this","_","that","window","globalTS","groups","collection","Groups","fetch","success","model","console","log","render","error","response","responseJSON","err_msg","$","hide","template","templateGroupsList","$el","html","length","order","renderRows","models","tooltip","css","groups_to_render","i","group","renderOne","rowView","GroupListRowView","find","append","tmpl_array","push","join"],"mappings":"AAAAA,QACI,cACA,0CACA,kDAED,SACCC,EACAC,EACAC,GAGJ,GAAIC,GAAgBC,SAASC,KAAKC,QAC9BC,GAAI,kBACJC,YAOAC,WAAa,SAAUC,GACnBC,KAAKD,QAAUE,EAAEJ,SAAUG,KAAKD,YAAeC,KAAKH,SAAUE,EAC9D,IAAIG,GAAOF,IACXG,QAAOC,SAASC,OAAOC,WAAa,GAAIhB,GAAgBiB,OACxDJ,OAAOC,SAASC,OAAOC,WAAWE,OAChCC,QAAS,SAAUC,GACjBC,QAAQC,IAAK,mBACbD,QAAQC,IAAKF,GACbR,EAAKW,UAEPC,MAAO,SAAUJ,EAAOK,GAElB1B,EAAWyB,MADyB,mBAA1BC,GAASC,aACDD,EAASC,aAAaC,QAEtB,yBAO9BT,MAAO,aAMPK,OAAQ,SAAWd,GACfC,KAAKD,QAAUE,EAAEN,OAAQK,KAAKD,QAASA,GACvCmB,EAAG,YAAaC,MAChB,IAAIC,GAAWpB,KAAKqB,oBACpBrB,MAAKsB,IAAIC,KAAMH,GAAYI,OAAQ,GAAIC,MAAO,SAC9CzB,KAAK0B,WAAYvB,OAAOC,SAASC,OAAOC,WAAWqB,QACnDT,EAAG,yBAA0BU,UAC7BV,EAAG,WAAYW,IAAK,WAAW,SAOnCH,WAAY,SAAUI,GAClB,IAAM,GAAIC,GAAI,EAAGA,EAAID,EAAiBN,OAAQO,IAAM,CAChD,GAAIC,GAAQF,EAAiBC,EAC7B/B,MAAKiC,WAAaD,MAAOA,MAQjCC,UAAW,SAAUlC,GACjB,GAAImC,GAAU,GAAI3C,GAAc4C,iBAAkBpC,EAClDC,MAAKsB,IAAIc,KAAM,oBAAqBC,OAAQH,EAAQtC,KAyCxDyB,mBAAoB,WAuBhB,MAtBAiB,eAEAA,WAAWC,KAAK,qBAChBD,WAAWC,KAAK,UAChBD,WAAWC,KAAK,mDAChBD,WAAWC,KAAK,4BAChBD,WAAWC,KAAK,uCAChBD,WAAWC,KAAK,iBAChBD,WAAWC,KAAK,8CAChBD,WAAWC,KAAK,cAChBD,WAAWC,KAAK,mMAChBD,WAAWC,KAAK,gDAChBD,WAAWC,KAAK,6CAChBD,WAAWC,KAAK,iDAChBD,WAAWC,KAAK,eAChBD,WAAWC,KAAK,mCAEhBD,WAAWC,KAAK,eAChBD,WAAWC,KAAK,YAChBD,WAAWC,KAAK,UAChBD,WAAWC,KAAK,UAETtC,EAAEmB,SAASkB,WAAWE,KAAK,OAK1C,QACIhD,cAAeA"}
@@ -0,0 +1 @@
{"version":3,"file":"group-listrow-view.js","sources":["../../../src/mvc/groups/group-listrow-view.js"],"names":["define","GroupListRowView","Backbone","View","extend","events","initialize","options","this","render","group","tmpl","templateRow","setElement","$el","show","_","template","join"],"mappings":"AAAAA,UACA,WAGA,GAAIC,GAAmBC,SAASC,KAAKC,QACjCC,UAEAC,WAAa,SAAUC,GACnBC,KAAKC,OAAQF,EAAQG,QAGzBD,OAAQ,SAAUC,GACd,GAAIC,GAAOH,KAAKI,aAGhB,OAFAJ,MAAKK,WAAWF,GAAQD,MAAMA,KAC9BF,KAAKM,IAAIC,OACFP,MAGXI,YAAa,WACT,MAAOI,GAAEC,UACD,iDACA,iFACA,uBACA,6CACA,2CACA,SACNC,KAAK,OAKf,QACIjB,iBAAkBA"}
@@ -0,0 +1 @@
{"version":3,"file":"group-model.js","sources":["../../../src/mvc/groups/group-model.js"],"names":["define","Group","Backbone","Model","extend","urlRoot","Groups","Collection","url","model"],"mappings":"AAAAA,UAAW,WAKP,GAAIC,GAAQC,SAASC,MAAMC,QACzBC,QAAS,gBAGPC,EAASJ,SAASK,WAAWH,QAC/BI,IAAK,cAELC,MAAOR,GAIb,QACIA,MAAOA,EACPK,OAAQA"}
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"test-file.js","sources":["../src/test-file.js"],"names":["define"],"mappings":"AAAAA,UAAY,WACX,MAAO"}
@@ -0,0 +1 @@
{"version":3,"file":"toolshed.groups.js","sources":["../src/toolshed.groups.js"],"names":["define","mod_group_list","mod_group_detail","ToolshedRouter","Backbone","Router","extend","routes",":group_id","ToolshedGroups","View","groupListView","groupDetailView","collection","initialize","window","globalTS","groups","this","ts_router","on","GroupListView","group_id","GroupDetailView","history","start","pushState"],"mappings":"AAIAA,QACQ,8CACA,gDACA,2CAEJ,SACIC,EACAC,GAMR,GAAIC,GAAiBC,SAASC,OAAOC,QACjCC,QACI,GAA4B,SAC5BC,YAA4B,gBAKhCC,EAAiBL,SAASM,KAAKJ,QAC/BK,cAAe,KACfC,gBAAiB,KACjBC,WAAY,KAEZC,WAAa,WACTC,OAAOC,SAASC,OAASC,KAEzBA,KAAKC,UAAY,GAAIhB,GACrBe,KAAKC,UAAUC,GAAI,eAAgB,WAC/BL,OAAOC,SAASC,OAAON,cAAgB,GAAIV,GAAeoB,gBAG9DH,KAAKC,UAAUC,GAAI,mBAAoB,SAAUE,GAC7CP,OAAOC,SAASC,OAAOL,gBAAkB,GAAIV,GAAiBqB,iBAAmBD,SAAUA,MAG/FlB,SAASoB,QAAQC,OAAOC,WAAW,MAI3C,QACIjB,eAAgBA"}
@@ -0,0 +1,2 @@
define(["libs/toastr","toolshed/scripts/mvc/groups/group-model"],function(a,b){var c=Backbone.View.extend({el:"#groups_element",options:{},app:null,initialize:function(a){this.options=_.extend(this.options,a),this.app=window.globalTS.groups,null!==this.app.collection?(this.model=this.app.collection.get(this.options.group_id),this.render()):this.fetchGroup()},fetchGroup:function(c){var d=this;this.options=_.extend(this.options,c),this.model=new b.Group({id:this.options.group_id}),this.model.fetch({success:function(a){console.log("received data: "),console.log(a),d.render()},error:function(b,c){a.error("undefined"!=typeof c.responseJSON?c.responseJSON.err_msg:"An error ocurred.")}})},render:function(){var a=this.templateRow();this.$el.html(a({group:this.model})),$("#center [data-toggle]").tooltip()},templateRow:function(){return _.template(["<div>",'<h3><%= group.get("name") %></h3>','<p class="" style="color:gray;">','A group of <%= group.get("members").length %> members with <%= group.get("repositories").length %> repositories and a total of <%= group.get("total_downloads") %> combined tool downloads.</p>',"<h3>Members</h3>",'<table class="grid table table-condensed">',"<thead>","<th>Name</th>","<th>Repositories</th>","<th>Registered</th>","</thead>","<tbody>",'<% _.each(group.get("members"), function(member) { %>',"<tr>","<td>","<%= member.username %>","</td>","<td>",'<a data-toggle="tooltip" data-placement="top" title="Repositories of <%= member.username %>" href="/repository/browse_repositories_by_user?user_id=<%= member.id %>&use_panels=true" id="<%= member.id %>"><%= member.user_repos_count %></a>',"</td>","<td>","<%= member.time_created %>","</td>","</tr>","<% }); %>","</tbody>","</table>","<h3>Repositories</h3>",'<table class="grid table table-condensed">',"<thead>","<th>Name</th>","<th>Description</th>","<th>Downloads</th>","<th>Owner</th>","<th>Created</th>","<th>Rating</th>","<th>Verified</th>","</thead>","<tbody>",'<% _.each(group.get("repositories"), function(repo) { %>',"<tr>","<td>",'<a data-toggle="tooltip" data-placement="top" title="Details of <%= repo.name %>" href="/view/<%= repo.owner %>/<%= repo.name %>" id="<%= repo.id %>"><%= repo.name %></a>',"</td>","<td>","<%= repo.description %>","</td>","<td>","<%= repo.times_downloaded %>","</td>","<td>","<%= repo.owner %>","</td>","<td>","<%= repo.time_created %>","</td>","<td>","<%= repo.ratings_mean %>","</td>","<td>","<%= repo.approved %>","</td>","</tr>","<% }); %>","</tbody>","</table>","</div>"].join(""))}});return{GroupDetailView:c}});
//# sourceMappingURL=../../../maps/mvc/groups/group-detail-view.js.map
@@ -0,0 +1,2 @@
define(["libs/toastr","toolshed/scripts/mvc/groups/group-model","toolshed/scripts/mvc/groups/group-listrow-view"],function(a,b,c){var d=Backbone.View.extend({el:"#groups_element",defaults:{},initialize:function(c){this.options=_.defaults(this.options||{},this.defaults,c);var d=this;window.globalTS.groups.collection=new b.Groups,window.globalTS.groups.collection.fetch({success:function(a){console.log("received data: "),console.log(a),d.render()},error:function(b,c){a.error("undefined"!=typeof c.responseJSON?c.responseJSON.err_msg:"An error ocurred.")}})},fetch:function(){},render:function(a){this.options=_.extend(this.options,a),$(".tooltip").hide();var b=this.templateGroupsList();this.$el.html(b({length:10,order:"asc"})),this.renderRows(window.globalTS.groups.collection.models),$("#center [data-toggle]").tooltip(),$("#center").css("overflow","auto")},renderRows:function(a){for(var b=0;b<a.length;b++){var c=a[b];this.renderOne({group:c})}},renderOne:function(a){var b=new c.GroupListRowView(a);this.$el.find("#group_list_body").append(b.el)},templateGroupsList:function(){return tmpl_array=[],tmpl_array.push('<div id="groups">'),tmpl_array.push("</div>"),tmpl_array.push('<div class="groups_container table-responsive">'),tmpl_array.push("<% if(length === 0) { %>"),tmpl_array.push("<div>There are no groups yet.</div>"),tmpl_array.push("<% } else{ %>"),tmpl_array.push('<table class="grid table table-condensed">'),tmpl_array.push(" <thead>"),tmpl_array.push(' <th style="width:30%;"><a class="sort-groups-link" title="Click to reverse order" href="#">name</a> <span title="Sorted alphabetically" class="fa fa-sort-alpha-<%- order %>"></span></th>'),tmpl_array.push(' <th style="width:22%;">description</th>'),tmpl_array.push(' <th style="width:22%;">members</th> '),tmpl_array.push(' <th style="width:26%;">repositories</th>'),tmpl_array.push(" </thead>"),tmpl_array.push(' <tbody id="group_list_body">'),tmpl_array.push(" </tbody>"),tmpl_array.push("</table>"),tmpl_array.push("<% }%>"),tmpl_array.push("</div>"),_.template(tmpl_array.join(""))}});return{GroupListView:d}});
//# sourceMappingURL=../../../maps/mvc/groups/group-list-view.js.map
@@ -0,0 +1,2 @@
define(["toolshed/scripts/mvc/groups/group-list-view","toolshed/scripts/mvc/groups/group-detail-view","toolshed/scripts/mvc/groups/group-model"],function(a,b){var c=Backbone.Router.extend({routes:{"":"groups",":group_id":"group_page"}}),d=Backbone.View.extend({groupListView:null,groupDetailView:null,collection:null,initialize:function(){window.globalTS.groups=this,this.ts_router=new c,this.ts_router.on("route:groups",function(){window.globalTS.groups.groupListView=new a.GroupListView}),this.ts_router.on("route:group_page",function(a){window.globalTS.groups.groupDetailView=new b.GroupDetailView({group_id:a})}),Backbone.history.start({pushState:!1})}});return{ToolshedGroups:d}});
//# sourceMappingURL=../maps/toolshed.groups.js.map
@@ -41,6 +41,11 @@
<script type="text/javascript">
window.globalTS = new Object();
$( function(){
require.config({
paths: {
'toolshed': '../toolshed'
}
});
require([ '${config.get( "app" ).get( "jscript" )}' ], function( groups ){
app = new groups.ToolshedGroups();
});
+7
View File
@@ -867,6 +867,13 @@ test_data:
content = self.dataset_populator.get_history_dataset_details( history_id, wait=True, assert_ok=True )
assert content[ "name" ] == "foo was replaced", content[ "name" ]
# Test for regression of previous behavior where runtime post job actions
# would be added to the original workflow post job actions.
workflow_id = workflow_request["workflow_id"]
downloaded_workflow = self._download_workflow( workflow_id )
pjas = downloaded_workflow[ "steps" ][ "2" ][ "post_job_actions" ].values()
assert len( pjas ) == 0, len( pjas )
@skip_without_tool( "cat1" )
def test_run_with_delayed_runtime_pja( self ):
workflow_id = self._upload_yaml_workflow("""