Merging with dev

This commit is contained in:
anuprulez
2017-06-09 14:41:26 +02:00
25 changed files with 370 additions and 225 deletions
+7 -2
View File
@@ -9,7 +9,8 @@ var jQuery = require( 'jquery' ),
UserPreferences = require( 'mvc/user/user-preferences' ),
CustomBuilds = require( 'mvc/user/user-custom-builds' ),
Tours = require( 'mvc/tours' ),
GridView = require( 'mvc/grid/grid-view' )
GridView = require( 'mvc/grid/grid-view' ),
PageList = require( 'mvc/page/page-list' ),
Workflows = require( 'mvc/workflow/workflow' ),
WorkflowsConfigureMenu = require( 'mvc/workflow/workflow-configure-menu' ),
ToolFormComposite = require( 'mvc/tool/tool-form-composite' ),
@@ -122,7 +123,11 @@ window.app = function app( options, bootstrapped ){
},
show_pages : function( action_id ) {
this.page.display( new GridView( { url_base: Galaxy.root + 'page/list_published', dict_format: true } ) );
if ( action_id == 'list' ) {
this.page.display( new PageList.View() );
} else {
this.page.display( new GridView( { url_base: Galaxy.root + 'page/list_published', dict_format: true } ) );
}
},
show_workflows : function(){
+1 -1
View File
@@ -275,7 +275,7 @@ var Collection = Backbone.Collection.extend({
target : 'galaxy_main'
},{
title : _l('Saved Pages'),
url : 'page/list',
url : 'pages/list',
target : '_top'
}]
};
+1 -1
View File
@@ -656,7 +656,7 @@ return Backbone.View.extend({
var insert = self.grid.get('insert');
// request new configuration
var json = self.dict_format ? response_text.embedded_grid || response_text : $.parseJSON(response_text);
var json = self.dict_format ? response_text : $.parseJSON(response_text);
// update
json.embedded = embedded;
@@ -0,0 +1,56 @@
/** This class renders the page list. */
define( [ 'utils/utils', 'mvc/grid/grid-view' ], function( Utils, GridView ) {
var View = Backbone.View.extend({
initialize: function( options ) {
var self = this;
this.setElement( $( '<div/>' ) );
this.model = new Backbone.Model();
Utils.get({
url : Galaxy.root + 'page/list',
success : function( response ) {
response[ 'dict_format' ] = true;
self.model.set( response );
self.render();
}
});
},
render: function() {
var grid = new GridView( this.model.attributes );
this.$el.empty().append( grid.$el );
this.$el.append( this._templateShared() );
},
_templateShared: function() {
var $tmpl = $( '<div>' +
'<h2>Pages shared with you by others</h2>' +
'</div>' );
var options = this.model.attributes;
if ( options.shared_by_others && options.shared_by_others.length > 0 ) {
var $table = $( '<table class="colored" border="0" cellspacing="0" cellpadding="0" width="100%">' +
'<tr class="header">' +
'<th>Title</th>' +
'<th>Owner</th>' +
'</tr>' +
'</table>' );
_.each( options.shared_by_others, function( page, index ) {
var display_url = Galaxy.root + 'page/display_by_username_and_slug?username=' + page.username + '&slug=' + page.slug;
$table.append( '<tr>' +
'<td>' +
'<a href="' + display_url + '">' + _.escape( page.title ) + '</a>' +
'</td>' +
'<td>' + _.escape( page.username ) + '</td>' +
'</tr>' );
});
$tmpl.append( $table );
} else {
$tmpl.append( 'No pages have been shared with you.' );
}
return $tmpl;
}
});
return {
View: View
}
});
+13 -6
View File
@@ -602,11 +602,18 @@
<datatype extension="maskinfo-asn1-binary" type="galaxy.datatypes.binary:GenericAsn1Binary" mimetype="application/octet-stream" subclass="true" display_in_upload="true" />
<datatype extension="pssm-asn1" type="galaxy.datatypes.data:GenericAsn1" mimetype="text/plain" subclass="true" display_in_upload="true" />
<!-- PlantTribes datatypes -->
<datatype extension="ptalign" type="galaxy.datatypes.text:PlantTribesMultipleSequenceAlignment" />
<datatype extension="ptortho" type="galaxy.datatypes.text:PlantTribesOrtho" />
<datatype extension="ptorthocs" type="galaxy.datatypes.text:PlantTribesOrthoCodingSequence" />
<datatype extension="pttree" type="galaxy.datatypes.text:PlantTribesPhylogeneticTree" />
<datatype extension="smat" type="galaxy.datatypes.text:Smat" display_in_upload="true" />
<datatype extension="ptalign" type="galaxy.datatypes.plant_tribes:PlantTribesMultipleSequenceAlignment" />
<datatype extension="ptalignca" type="galaxy.datatypes.plant_tribes:PlantTribesMultipleSequenceAlignmentCodonAlignment" />
<datatype extension="ptaligntrimmed" type="galaxy.datatypes.plant_tribes:PlantTribesMultipleSequenceAlignmentTrimmed" />
<datatype extension="ptaligntrimmedca" type="galaxy.datatypes.plant_tribes:PlantTribesMultipleSequenceAlignmentTrimmedCodonAlignment" />
<datatype extension="ptalignfiltered" type="galaxy.datatypes.plant_tribes:PlantTribesMultipleSequenceAlignmentFiltered" />
<datatype extension="ptalignfilteredca" type="galaxy.datatypes.plant_tribes:PlantTribesMultipleSequenceAlignmentFilteredCodonAlignment" />
<datatype extension="ptortho" type="galaxy.datatypes.plant_tribes:PlantTribesOrtho" />
<datatype extension="ptorthocs" type="galaxy.datatypes.plant_tribes:PlantTribesOrthoCodingSequence" />
<datatype extension="ptphylip" type="galaxy.datatypes.plant_tribes:PlantTribesPhylip" />
<datatype extension="pttgf" type="galaxy.datatypes.plant_tribes:PlantTribesTargetedGeneFamilies" />
<datatype extension="pttree" type="galaxy.datatypes.plant_tribes:PlantTribesPhylogeneticTree" />
<datatype extension="smat" type="galaxy.datatypes.plant_tribes:Smat" display_in_upload="true" />
</registration>
<sniffers>
<!--
@@ -616,7 +623,7 @@
defined format first, followed by next-most rigidly defined,
and so on.
-->
<sniffer type="galaxy.datatypes.text:Smat"/>
<sniffer type="galaxy.datatypes.plant_tribes:Smat"/>
<sniffer type="galaxy.datatypes.mothur:Sabund"/>
<sniffer type="galaxy.datatypes.mothur:Otu"/>
<sniffer type="galaxy.datatypes.mothur:GroupAbund"/>
+4 -4
View File
@@ -349,10 +349,10 @@ paste.app_factory = galaxy.web.buildapp:app_factory
# Interactive environment plugins root directory: where to look for interactive
# environment plugins. By default none will be loaded. Set to
# config/plugins/interactive_environments to load Galaxy's stock plugins
# (currently just Jupyter). These will require Docker to be configured and
# have security considerations, so proceed with caution. The path is relative to the
# Galaxy root dir. To use an absolute path begin the path with '/'. This is a comma
# config/plugins/interactive_environments to load Galaxy's stock plugins.
# These will require Docker to be configured and have security considerations,
# so proceed with caution. The path is relative to the Galaxy root dir. To use
# an absolute path begin the path with '/'. This is a comma
# separated list.
#interactive_environment_plugins_directory =
+22 -1
View File
@@ -367,7 +367,28 @@ class Data( object ):
file_path = trans.app.object_store.get_filename(data.dataset, extra_dir='dataset_%s_files' % data.dataset.id, alt_name=filename)
if os.path.exists( file_path ):
if os.path.isdir( file_path ):
return trans.show_error_message( "Directory listing is not allowed." ) # TODO: Reconsider allowing listing of directories?
tmp_fh = tempfile.NamedTemporaryFile(delete=False)
tmp_file_name = tmp_fh.name
dir_items = sorted(os.listdir(file_path))
base_path, item_name = os.path.split(file_path)
tmp_fh.write('<html><head><h3>Directory %s contents: %d items</h3></head>\n' % (item_name, len(dir_items)))
tmp_fh.write('<body><p/><table cellpadding="2">\n')
for index, fname in enumerate(dir_items):
if index % 2 == 0:
bgcolor = '#D8D8D8'
else:
bgcolor = '#FFFFFF'
# Can't have an href link here because there is no route
# defined for files contained within multiple subdirectory
# levels of the primary dataset. Something like this is
# close, but not quite correct:
# href = url_for(controller='dataset', action='display',
# dataset_id=trans.security.encode_id(data.dataset.id),
# preview=preview, filename=fname, to_ext=to_ext)
tmp_fh.write('<tr bgcolor="%s"><td>%s</td></tr>\n' % (bgcolor, fname))
tmp_fh.write('</table></body></html>\n')
tmp_fh.close()
return open(tmp_file_name)
mime = mimetypes.guess_type( file_path )[0]
if not mime:
try:
+213
View File
@@ -0,0 +1,213 @@
import logging
import os
import re
from galaxy.datatypes.data import get_file_peek, Text
from galaxy.datatypes.metadata import MetadataElement, MetadataParameter
from galaxy.datatypes.text import Html
from galaxy.util import nice_size
log = logging.getLogger(__name__)
class Smat(Text):
file_ext = "smat"
def display_peek(self, dataset):
try:
return dataset.peek
except:
return "ESTScan scores matrices (%s)" % (nice_size(dataset.get_size()))
def set_peek(self, dataset, is_multi_byte=False):
if not dataset.dataset.purged:
dataset.peek = get_file_peek(dataset.file_name, is_multi_byte=is_multi_byte)
dataset.blurb = "ESTScan scores matrices"
else:
dataset.peek = 'file does not exist'
dataset.blurb = 'file purged from disc'
def sniff(self, filename):
"""
The use of ESTScan implies the creation of scores matrices which
reflect the codons preferences in the studied organisms. The
ESTScan package includes scripts for generating these files. The
output of these scripts consists of the matrices, one for each
isochor, and which look like this:
FORMAT: hse_4is.conf CODING REGION 6 3 1 s C+G: 0 44
-1 0 2 -2
2 1 -8 0
>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('test_space.txt')
>>> Smat().sniff(fname)
False
>>> fname = get_test_fname('test_tab.bed')
>>> Smat().sniff(fname)
False
>>> fname = get_test_fname('1.smat')
>>> Smat().sniff(fname)
True
"""
line_no = 0
with open(filename, "r") as fh:
for line in fh:
line_no += 1
if line_no > 10000:
return True
if line_no == 1 and not line.startswith('FORMAT'):
# The first line is always the start of a format section.
return False
if not line.startswith('FORMAT'):
if line.find('\t') >= 0:
# Smat files are not tabular.
return False
items = line.split()
if len(items) != 4:
return False
for item in items:
# Make sure each item is an integer.
if re.match(r"[-+]?\d+$", item) is None:
return False
return True
class PlantTribes(Html):
"""
PlantTribes abstract class.
"""
composite_type = 'basic'
MetadataElement(name="num_files", default=0, desc="Number of files in files_path directory", param=MetadataParameter, readonly=True, visible=False, no_value=0)
def set_meta(self, dataset, overwrite=True, **kwd):
try:
efp = dataset.extra_files_path
if os.path.exists(efp):
dataset.metadata.num_files = len(os.listdir(efp))
except Exception as e:
log.warning("set_meta fname: %s %s" % (dataset.file_name if dataset and dataset.file_name else 'Unkwown', str(e)))
class PlantTribesOrtho(PlantTribes):
"""
PlantTribes sequences classified into precomputed, orthologous gene family
clusters.
"""
file_ext = "ptortho"
def set_peek(self, dataset, is_multi_byte=False):
super(PlantTribesOrtho, self).set_peek(dataset, is_multi_byte=is_multi_byte)
dataset.blurb = "Proteins orthogroup fasta files: %d items" % dataset.metadata.num_files
class PlantTribesOrthoCodingSequence(PlantTribes):
"""
PlantTribes sequences classified into precomputed, orthologous gene family
clusters and corresponding coding sequences.
"""
file_ext = "ptorthocs"
def set_peek(self, dataset, is_multi_byte=False):
super(PlantTribesOrthoCodingSequence, self).set_peek(dataset, is_multi_byte=is_multi_byte)
dataset.blurb = "Protein and coding sequences orthogroup fasta files: %d items" % dataset.metadata.num_files
class PlantTribesTargetedGeneFamilies(PlantTribes):
"""
PlantTribes targeted gene families.
"""
file_ext = "pttgf"
def set_peek(self, dataset, is_multi_byte=False):
super(PlantTribesTargetedGeneFamilies, self).set_peek(dataset, is_multi_byte=is_multi_byte)
dataset.blurb = "Targeted gene families"
class PlantTribesPhylogeneticTree(PlantTribes):
"""
PlantTribes multiple sequence alignments and inferred maximum likelihood
phylogenies for orthogroups.
"""
file_ext = "pttree"
def set_peek(self, dataset, is_multi_byte=False):
super(PlantTribesPhylogeneticTree, self).set_peek(dataset, is_multi_byte=is_multi_byte)
dataset.blurb = "Phylogenetic trees: %d items" % dataset.metadata.num_files
class PlantTribesPhylip(PlantTribes):
"""
PlantTribes orthogroup phylip multiple sequence alignments.
"""
file_ext = "ptphylip"
def set_peek(self, dataset, is_multi_byte=False):
super(PlantTribesPhylip, self).set_peek(dataset, is_multi_byte=is_multi_byte)
dataset.blurb = "Orthogroup phylip multiple sequence alignments: %d items" % dataset.metadata.num_files
class PlantTribesMultipleSequenceAlignment(PlantTribes):
"""
PlantTribes multiple sequence alignments.
"""
file_ext = "ptalign"
def set_peek(self, dataset, is_multi_byte=False):
super(PlantTribesMultipleSequenceAlignment, self).set_peek(dataset, is_multi_byte=is_multi_byte)
dataset.blurb = "Proteins orthogroup alignments: %d items" % dataset.metadata.num_files
class PlantTribesMultipleSequenceAlignmentCodonAlignment(PlantTribes):
"""
PlantTribes multiple sequence alignments with codon alignments.
"""
file_ext = "ptalignca"
def set_peek(self, dataset, is_multi_byte=False):
super(PlantTribesMultipleSequenceAlignmentCodonAlignment, self).set_peek(dataset, is_multi_byte=is_multi_byte)
dataset.blurb = "Protein and coding sequences orthogroup alignments: %d items" % dataset.metadata.num_files
class PlantTribesMultipleSequenceAlignmentTrimmed(PlantTribes):
"""
PlantTribes trimmed multiple sequence alignments.
"""
file_ext = "ptaligntrimmed"
def set_peek(self, dataset, is_multi_byte=False):
super(PlantTribesMultipleSequenceAlignmentTrimmed, self).set_peek(dataset, is_multi_byte=is_multi_byte)
dataset.blurb = "Trimmed proteins orthogroup alignments: %d items" % dataset.metadata.num_files
class PlantTribesMultipleSequenceAlignmentTrimmedCodonAlignment(PlantTribes):
"""
PlantTribes trimmed multiple sequence alignments with codon alignments.
"""
file_ext = "ptaligntrimmedca"
def set_peek(self, dataset, is_multi_byte=False):
super(PlantTribesMultipleSequenceAlignmentTrimmedCodonAlignment, self).set_peek(dataset, is_multi_byte=is_multi_byte)
dataset.blurb = "Trimmed protein and coding sequences orthogroup alignments: %d items" % dataset.metadata.num_files
class PlantTribesMultipleSequenceAlignmentFiltered(PlantTribes):
"""
PlantTribes filtered multiple sequence alignments.
"""
file_ext = "ptalignfiltered"
def set_peek(self, dataset, is_multi_byte=False):
super(PlantTribesMultipleSequenceAlignmentFiltered, self).set_peek(dataset, is_multi_byte=is_multi_byte)
dataset.blurb = "Filtered proteins orthogroup alignments: %d items" % dataset.metadata.num_files
class PlantTribesMultipleSequenceAlignmentFilteredCodonAlignment(PlantTribes):
"""
PlantTribes filtered multiple sequence alignments with codon alignments.
"""
file_ext = "ptalignfilteredca"
def set_peek(self, dataset, is_multi_byte=False):
super(PlantTribesMultipleSequenceAlignmentFilteredCodonAlignment, self).set_peek(dataset, is_multi_byte=is_multi_byte)
dataset.blurb = "Filtered protein and coding sequences orthogroup alignments: %d items" % dataset.metadata.num_files
-110
View File
@@ -546,113 +546,3 @@ class SnpSiftDbNSFP( Text ):
else:
dataset.peek = 'file does not exist'
dataset.blurb = 'file purged from disc'
class Smat(Text):
file_ext = "smat"
def display_peek(self, dataset):
try:
return dataset.peek
except:
return "ESTScan scores matrices (%s)" % (nice_size(dataset.get_size()))
def set_peek(self, dataset, is_multi_byte=False):
if not dataset.dataset.purged:
dataset.peek = get_file_peek(dataset.file_name, is_multi_byte=is_multi_byte)
dataset.blurb = "ESTScan scores matrices"
else:
dataset.peek = 'file does not exist'
dataset.blurb = 'file purged from disc'
def sniff(self, filename):
"""
The use of ESTScan implies the creation of scores matrices which
reflect the codons preferences in the studied organisms. The
ESTScan package includes scripts for generating these files. The
output of these scripts consists of the matrices, one for each
isochor, and which look like this:
FORMAT: hse_4is.conf CODING REGION 6 3 1 s C+G: 0 44
-1 0 2 -2
2 1 -8 0
>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('test_space.txt')
>>> Smat().sniff(fname)
False
>>> fname = get_test_fname('test_tab.bed')
>>> Smat().sniff(fname)
False
>>> fname = get_test_fname('1.smat')
>>> Smat().sniff(fname)
True
"""
line_no = 0
with open(filename, "r") as fh:
line_no += 1
if line_no > 10000:
return True
line = fh.readline(500)
if line_no == 1 and not line.startswith('FORMAT'):
# The first line is always the start of a format section.
return False
if not line.startswith('FORMAT'):
if line.find('\t') >= 0:
# Smat files are not tabular.
return False
items = line.split()
if len(items) != 4:
return False
for item in items:
# Make sure each item is an integer.
if re.match(r"[-+]?\d+$", item) is None:
return False
return True
class PlantTribesOrtho(Html):
"""
PlantTribes sequences classified into precomputed, orthologous gene family
clusters.
"""
file_ext = "ptortho"
def set_peek(self, dataset, is_multi_byte=False):
super(PlantTribesOrtho, self).set_peek(dataset, is_multi_byte=is_multi_byte)
dataset.blurb = "PlantTribes gene family clusters: %d files" % dataset.metadata.data_lines
class PlantTribesOrthoCodingSequence(Html):
"""
PlantTribes sequences classified into precomputed, orthologous gene family
clusters and corresponding coding sequences.
"""
file_ext = "ptorthocs"
def set_peek(self, dataset, is_multi_byte=False):
super(PlantTribesOrthoCodingSequence, self).set_peek(dataset, is_multi_byte=is_multi_byte)
dataset.blurb = "PlantTribes gene family clusters with corresponding coding sequences: %d files" % dataset.metadata.data_lines
class PlantTribesPhylogeneticTree(Html):
"""
PlantTribes multiple sequence alignments and inferred maximum likelihood
phylogenies for orthogroups.
"""
file_ext = "pttree"
def set_peek(self, dataset, is_multi_byte=False):
super(PlantTribesPhylogeneticTree, self).set_peek(dataset, is_multi_byte=is_multi_byte)
dataset.blurb = "PlantTribes phylogenetic trees: %d files" % dataset.metadata.data_lines
class PlantTribesMultipleSequenceAlignment(Html):
"""
PlantTribes multiple sequence alignments for orthogroups.
"""
file_ext = "ptalign"
def set_peek(self, dataset, is_multi_byte=False):
super(PlantTribesMultipleSequenceAlignment, self).set_peek(dataset, is_multi_byte=is_multi_byte)
dataset.blurb = "PlantTribes multiple sequence alignments: %d files" % dataset.metadata.data_lines
+15 -13
View File
@@ -46,13 +46,13 @@ class PageListGrid( grids.Grid ):
key="free-text-search", visible=False, filterable="standard" )
)
global_actions = [
grids.GridAction( "Add new page", dict( action='create' ) )
grids.GridAction( "Add new page", dict( action='create' ), target="inbound" )
]
operations = [
grids.DisplayByUsernameAndSlugGridOperation( "View", allow_multiple=False ),
grids.GridOperation( "Edit content", allow_multiple=False, url_args=dict( action='edit_content') ),
grids.GridOperation( "Edit attributes", allow_multiple=False, url_args=dict( action='edit') ),
grids.GridOperation( "Share or Publish", allow_multiple=False, condition=( lambda item: not item.deleted ), async_compatible=False ),
grids.GridOperation( "Edit content", allow_multiple=False, url_args=dict( action='edit_content' ) ),
grids.GridOperation( "Edit attributes", allow_multiple=False, url_args=dict( action='edit' ) ),
grids.GridOperation( "Share or Publish", allow_multiple=False, condition=( lambda item: not item.deleted ), url_args=dict( action='sharing' ) ),
grids.GridOperation( "Delete", confirm="Are you sure you want to delete this page?" ),
]
@@ -308,6 +308,7 @@ class PageController( BaseUIController, SharableMixin,
self.hda_manager = managers.hdas.HDAManager( app )
@web.expose
@web.json
@web.require_login()
def list( self, trans, *args, **kwargs ):
""" List user's pages. """
@@ -320,13 +321,10 @@ class PageController( BaseUIController, SharableMixin,
item = session.query( model.Page ).get( self.decode_id( id ) )
if operation == "delete":
item.deleted = True
if operation == "share or publish":
return self.sharing( trans, **kwargs )
session.flush()
# HACK: to prevent the insertion of an entire html document inside another
kwargs[ 'embedded' ] = True
# Build grid HTML.
# Build grid dictionary.
kwargs[ 'dict_format' ] = True
grid = self._page_list( trans, *args, **kwargs )
# Build list of pages shared with user.
@@ -339,7 +337,11 @@ class PageController( BaseUIController, SharableMixin,
.all()
# Render grid wrapped in panels
return trans.fill_template( "page/index.mako", embedded_grid=grid, shared_by_others=shared_by_others )
grid[ 'shared_by_others' ] = [ {
'username' : p.page.user.username,
'slug' : p.page.slug,
'title' : p.page.title } for p in shared_by_others ]
return grid
@web.expose
@web.json
@@ -384,7 +386,7 @@ class PageController( BaseUIController, SharableMixin,
session.flush()
# Display the management page
# trans.set_message( "Page '%s' created" % page.title )
return trans.response.send_redirect( web.url_for(controller='page', action='list' ) )
return trans.response.send_redirect( web.url_for(controller='pages', action='list' ) )
return trans.show_form(
web.FormBuilder( web.url_for(controller='page', action='create'), "Create new page", submit_text="Submit" )
.add_text( "page_title", "Page title", value=page_title, error=page_title_err )
@@ -429,7 +431,7 @@ class PageController( BaseUIController, SharableMixin,
self.add_item_annotation( trans.sa_session, trans.get_user(), page, page_annotation )
session.flush()
# Redirect to page list.
return trans.response.send_redirect( web.url_for(controller='page', action='list' ) )
return trans.response.send_redirect( web.url_for(controller='pages', action='list' ) )
else:
page_title = page.title
page_slug = page.slug
@@ -494,7 +496,7 @@ class PageController( BaseUIController, SharableMixin,
session.flush()
return trans.fill_template( "/sharing_base.mako",
item=page, use_panels=True )
item=page, controller_list='pages', use_panels=True )
@web.expose
@web.require_login( "use Galaxy pages" )
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"page-list.js","sources":["../../../src/mvc/page/page-list.js"],"names":["define","Utils","GridView","View","Backbone","extend","initialize","self","this","setElement","$","model","Model","get","url","Galaxy","root","success","response","set","render","grid","attributes","$el","empty","append","_templateShared","$tmpl","options","shared_by_others","length","$table","_","each","page","display_url","username","slug","escape","title"],"mappings":"AACAA,QAAU,cAAe,sBAAwB,SAAUC,EAAOC,GAC9D,GAAIC,GAAOC,SAASD,KAAKE,QACrBC,WAAY,WACR,GAAIC,GAAOC,IACXA,MAAKC,WAAYC,EAAG,WACpBF,KAAKG,MAAQ,GAAIP,UAASQ,MAC1BX,EAAMY,KACFC,IAAUC,OAAOC,KAAO,YACxBC,QAAU,SAAUC,GAChBA,EAAwB,aAAI,EAC5BX,EAAKI,MAAMQ,IAAKD,GAChBX,EAAKa,aAKjBA,OAAQ,WACJ,GAAIC,GAAO,GAAInB,GAAUM,KAAKG,MAAMW,WACpCd,MAAKe,IAAIC,QAAQC,OAAQJ,EAAKE,KAC9Bf,KAAKe,IAAIE,OAAQjB,KAAKkB,oBAG1BA,gBAAiB,WACb,GAAIC,GAAQjB,EAAI,uDAGZkB,EAAUpB,KAAKG,MAAMW,UACzB,IAAKM,EAAQC,kBAAoBD,EAAQC,iBAAiBC,OAAS,EAAI,CACnE,GAAIC,GAASrB,EAAG,8IAMhBsB,GAAEC,KAAML,EAAQC,iBAAkB,SAAUK,GACxC,GAAIC,GAAcpB,OAAOC,KAAO,8CAAgDkB,EAAKE,SAAW,SAAWF,EAAKG,IAChHN,GAAON,OAAS,oBAEsBU,EAAc,KAAOH,EAAEM,OAAQJ,EAAKK,OAAU,gBAEvDP,EAAEM,OAAQJ,EAAKE,UAAa,gBAG7DT,EAAMF,OAAQM,OAEdJ,GAAMF,OAAQ,sCAElB,OAAOE,KAIf,QACIxB,KAAMA"}
+1 -1
View File
@@ -1,2 +1,2 @@
webpackJsonp([4],{0:function(e,t,i){(function(e){var t=i(1),s=t,a=i(33).GalaxyApp,l=i(93),n=i(34);window.app=function(t,i){window.Galaxy=new a(t,i),Galaxy.debug("admin app"),Galaxy.params=Galaxy.config.params,s(function(){e.extend(t.config,{active_view:"admin"}),Galaxy.page=new n.View(e.extend(t,{Left:l}))})}}).call(t,i(2))},93:function(e,t,i){(function(t,s,a){var l=i(5),n=t.View.extend({initialize:function(e,i){var s=this;this.page=e,this.root=i.root,this.config=i.config,this.settings=i.settings,this.message=i.message,this.status=i.status,this.model=new t.Model({title:l("Administration")}),this.categories=new t.Collection([{title:"Server",items:[{title:"Data types registry",url:"admin/view_datatypes_registry"},{title:"Data tables registry",url:"admin/view_tool_data_tables"},{title:"Display applications",url:"admin/display_applications"},{title:"Manage jobs",url:"admin/jobs"}]},{title:"Tools and Tool Shed",items:[{title:"Search Tool Shed",url:"admin_toolshed/browse_tool_sheds",enabled:s.settings.is_tool_shed_installed},{title:"Search Tool Shed (Beta)",url:"admin_toolshed/browse_toolsheds",enabled:s.settings.is_tool_shed_installed&&s.config.enable_beta_ts_api_install},{title:"Monitor installing repositories",url:"admin_toolshed/monitor_repository_installation?installing_repository_ids="+s.settings.installing_repository_ids,enabled:s.settings.installing_repository_ids},{title:"Manage installed tools",url:"admin_toolshed/browse_repositories",enabled:s.settings.is_repo_installed},{title:"Reset metadata",url:"admin_toolshed/reset_metadata_on_selected_installed_repositories",enabled:s.settings.is_repo_installed},{title:"Download local tool",url:"admin/package_tool"},{title:"Tool lineage",url:"admin/tool_versions"},{title:"Reload a tool's configuration",url:"admin/reload_tool"},{title:"Review tool migration stages",url:"admin/review_tool_migration_stages"},{title:"View Tool Error Logs",url:"admin/tool_errors"},{title:"Manage Display Whitelist",url:"admin/sanitize_whitelist"},{title:"Manage Tool Dependencies",url:"admin/manage_tool_dependencies"}]},{title:"User Management",items:[{title:"Users",url:"admin/users"},{title:"Groups",url:"admin/groups"},{title:"Roles",url:"admin/roles"},{title:"API keys",url:"userskeys/all_users"},{title:"Impersonate a user",url:"admin/impersonate",enabled:s.config.allow_user_impersonation}]},{title:"Data",items:[{title:"Quotas",url:"admin/quotas",enabled:s.config.enable_quotas},{title:"Data libraries",url:"library_admin/browse_libraries"},{title:"Roles",url:"admin/roles"},{title:"Local data",url:"data_manager"}]},{title:"Form Definitions",items:[{title:"Form definitions",url:"forms/browse_form_definitions"}]},{title:"Sample Tracking",items:[{title:"Sequencers and external services",url:"external_service/browse_external_services"},{title:"Request types",url:"request_type/browse_request_types"},{title:"Sequencing requests",url:"requests_admin/browse_requests"},{title:"Find samples",url:"requests_common/find_samples?cntrller=requests_admin"}]}]),this.setElement(this._template())},render:function(){var e=this;this.$el.empty(),this.categories.each(function(t){var i=s(e._templateSection(t.attributes)),n=i.find(".ui-side-section-body");a.each(t.get("items"),function(t){(void 0===t.enabled||t.enabled)&&n.append(s("<div/>").addClass("ui-side-section-body-title").append(s("<a/>").attr({href:e.root+t.url,target:"galaxy_main"}).text(l(t.title))))}),e.$el.append(i)}),this.page.$("#galaxy_main").prop("src",this.root+"admin/center?message="+this.message+"&status="+this.status)},_templateSection:function(e){return["<div>",'<div class="ui-side-section-title">'+l(e.title)+"</div>",'<div class="ui-side-section-body"/>',"</div>"].join("")},_template:function(){return'<div class="ui-side-panel"/>'},toString:function(){return"adminPanel"}});e.exports=n}).call(t,i(3),i(1),i(2))}});
webpackJsonp([4],{0:function(e,t,i){(function(e){var t=i(1),s=t,a=i(33).GalaxyApp,l=i(94),n=i(34);window.app=function(t,i){window.Galaxy=new a(t,i),Galaxy.debug("admin app"),Galaxy.params=Galaxy.config.params,s(function(){e.extend(t.config,{active_view:"admin"}),Galaxy.page=new n.View(e.extend(t,{Left:l}))})}}).call(t,i(2))},94:function(e,t,i){(function(t,s,a){var l=i(5),n=t.View.extend({initialize:function(e,i){var s=this;this.page=e,this.root=i.root,this.config=i.config,this.settings=i.settings,this.message=i.message,this.status=i.status,this.model=new t.Model({title:l("Administration")}),this.categories=new t.Collection([{title:"Server",items:[{title:"Data types registry",url:"admin/view_datatypes_registry"},{title:"Data tables registry",url:"admin/view_tool_data_tables"},{title:"Display applications",url:"admin/display_applications"},{title:"Manage jobs",url:"admin/jobs"}]},{title:"Tools and Tool Shed",items:[{title:"Search Tool Shed",url:"admin_toolshed/browse_tool_sheds",enabled:s.settings.is_tool_shed_installed},{title:"Search Tool Shed (Beta)",url:"admin_toolshed/browse_toolsheds",enabled:s.settings.is_tool_shed_installed&&s.config.enable_beta_ts_api_install},{title:"Monitor installing repositories",url:"admin_toolshed/monitor_repository_installation?installing_repository_ids="+s.settings.installing_repository_ids,enabled:s.settings.installing_repository_ids},{title:"Manage installed tools",url:"admin_toolshed/browse_repositories",enabled:s.settings.is_repo_installed},{title:"Reset metadata",url:"admin_toolshed/reset_metadata_on_selected_installed_repositories",enabled:s.settings.is_repo_installed},{title:"Download local tool",url:"admin/package_tool"},{title:"Tool lineage",url:"admin/tool_versions"},{title:"Reload a tool's configuration",url:"admin/reload_tool"},{title:"Review tool migration stages",url:"admin/review_tool_migration_stages"},{title:"View Tool Error Logs",url:"admin/tool_errors"},{title:"Manage Display Whitelist",url:"admin/sanitize_whitelist"},{title:"Manage Tool Dependencies",url:"admin/manage_tool_dependencies"}]},{title:"User Management",items:[{title:"Users",url:"admin/users"},{title:"Groups",url:"admin/groups"},{title:"Roles",url:"admin/roles"},{title:"API keys",url:"userskeys/all_users"},{title:"Impersonate a user",url:"admin/impersonate",enabled:s.config.allow_user_impersonation}]},{title:"Data",items:[{title:"Quotas",url:"admin/quotas",enabled:s.config.enable_quotas},{title:"Data libraries",url:"library_admin/browse_libraries"},{title:"Roles",url:"admin/roles"},{title:"Local data",url:"data_manager"}]},{title:"Form Definitions",items:[{title:"Form definitions",url:"forms/browse_form_definitions"}]},{title:"Sample Tracking",items:[{title:"Sequencers and external services",url:"external_service/browse_external_services"},{title:"Request types",url:"request_type/browse_request_types"},{title:"Sequencing requests",url:"requests_admin/browse_requests"},{title:"Find samples",url:"requests_common/find_samples?cntrller=requests_admin"}]}]),this.setElement(this._template())},render:function(){var e=this;this.$el.empty(),this.categories.each(function(t){var i=s(e._templateSection(t.attributes)),n=i.find(".ui-side-section-body");a.each(t.get("items"),function(t){(void 0===t.enabled||t.enabled)&&n.append(s("<div/>").addClass("ui-side-section-body-title").append(s("<a/>").attr({href:e.root+t.url,target:"galaxy_main"}).text(l(t.title))))}),e.$el.append(i)}),this.page.$("#galaxy_main").prop("src",this.root+"admin/center?message="+this.message+"&status="+this.status)},_templateSection:function(e){return["<div>",'<div class="ui-side-section-title">'+l(e.title)+"</div>",'<div class="ui-side-section-body"/>',"</div>"].join("")},_template:function(){return'<div class="ui-side-panel"/>'},toString:function(){return"adminPanel"}});e.exports=n}).call(t,i(3),i(1),i(2))}});
//# sourceMappingURL=admin.bundled.js.map
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
File diff suppressed because one or more lines are too long
+2
View File
@@ -0,0 +1,2 @@
define(["utils/utils","mvc/grid/grid-view"],function(a,b){var c=Backbone.View.extend({initialize:function(){var b=this;this.setElement($("<div/>")),this.model=new Backbone.Model,a.get({url:Galaxy.root+"page/list",success:function(a){a.dict_format=!0,b.model.set(a),b.render()}})},render:function(){var a=new b(this.model.attributes);this.$el.empty().append(a.$el),this.$el.append(this._templateShared())},_templateShared:function(){var a=$("<div><h2>Pages shared with you by others</h2></div>"),b=this.model.attributes;if(b.shared_by_others&&b.shared_by_others.length>0){var c=$('<table class="colored" border="0" cellspacing="0" cellpadding="0" width="100%"><tr class="header"><th>Title</th><th>Owner</th></tr></table>');_.each(b.shared_by_others,function(a){var b=Galaxy.root+"page/display_by_username_and_slug?username="+a.username+"&slug="+a.slug;c.append('<tr><td><a href="'+b+'">'+_.escape(a.title)+"</a></td><td>"+_.escape(a.username)+"</td></tr>")}),a.append(c)}else a.append("No pages have been shared with you.");return a}});return{View:c}});
//# sourceMappingURL=../../../maps/mvc/page/page-list.js.map
+7 -6
View File
@@ -73,6 +73,7 @@
## Set use_panels var for use in page's URLs.
<% use_panels = context.get('use_panels', False) %>
<% controller_name = get_controller_name( item ) %>
<% controller_list = context.get('controller_list', controller_name) %>
## Render message.
%if message:
@@ -142,7 +143,7 @@
</blockquote>
%if item.published:
This ${item_class_name_lc} is publicly listed and searchable in Galaxy's <a href='${h.url_for( controller=controller_name, action='list_published' )}' target="_top">Published ${item_class_plural_name}</a> section.
This ${item_class_name_lc} is publicly listed and searchable in Galaxy's <a href='${h.url_for( controller=controller_list, action='list_published' )}' target="_top">Published ${item_class_plural_name}</a> section.
%endif
</div>
@@ -155,16 +156,16 @@
<div class="toolParamHelp">Disables ${item_class_name_lc}'s link so that it is not accessible.</div>
<br />
<input class="action-button" type="submit" name="publish" value="Publish ${item_class_name}" method="POST">
<div class="toolParamHelp">Publishes the ${item_class_name_lc} to Galaxy's <a href='${h.url_for( controller=controller_name, action='list_published' )}' target="_top">Published ${item_class_plural_name}</a> section, where it is publicly listed and searchable.</div>
<div class="toolParamHelp">Publishes the ${item_class_name_lc} to Galaxy's <a href='${h.url_for( controller=controller_list, action='list_published' )}' target="_top">Published ${item_class_plural_name}</a> section, where it is publicly listed and searchable.</div>
<br />
%else: ## item.published == True
## Item is importable and published. User can unpublish or disable import and unpublish.
<input class="action-button" type="submit" name="unpublish" value="Unpublish ${item_class_name}">
<div class="toolParamHelp">Removes this ${item_class_name_lc} from Galaxy's <a href='${h.url_for(controller=controller_name, action='list_published' )}' target="_top">Published ${item_class_plural_name}</a> section so that it is not publicly listed or searchable.</div>
<div class="toolParamHelp">Removes this ${item_class_name_lc} from Galaxy's <a href='${h.url_for(controller=controller_list, action='list_published' )}' target="_top">Published ${item_class_plural_name}</a> section so that it is not publicly listed or searchable.</div>
<br />
<input class="action-button" type="submit" name="disable_link_access_and_unpublish" value="Disable Access to ${item_class_name} via Link and Unpublish">
<div class="toolParamHelp">Disables this ${item_class_name_lc}'s link so that it is not accessible and removes ${item_class_name_lc} from Galaxy's <a href='${h.url_for(controller=controller_name, action='list_published' )}' target='_top'>Published ${item_class_plural_name}</a> section so that it is not publicly listed or searchable.</div>
<div class="toolParamHelp">Disables this ${item_class_name_lc}'s link so that it is not accessible and removes ${item_class_name_lc} from Galaxy's <a href='${h.url_for(controller=controller_list, action='list_published' )}' target='_top'>Published ${item_class_plural_name}</a> section so that it is not publicly listed or searchable.</div>
%endif
</form>
</div>
@@ -179,7 +180,7 @@
<br />
<input class="action-button" type="submit" name="make_accessible_and_publish" value="Make ${item_class_name} Accessible and Publish" method="POST">
<div class="toolParamHelp">Makes the ${item_class_name_lc} accessible via link (see above) and publishes the ${item_class_name_lc} to Galaxy's <a href='${h.url_for(controller=controller_name, action='list_published' )}' target='_top'>Published ${item_class_plural_name}</a> section, where it is publicly listed and searchable.</div>
<div class="toolParamHelp">Makes the ${item_class_name_lc} accessible via link (see above) and publishes the ${item_class_name_lc} to Galaxy's <a href='${h.url_for(controller=controller_list, action='list_published' )}' target='_top'>Published ${item_class_plural_name}</a> section, where it is publicly listed and searchable.</div>
</form>
%endif
@@ -239,5 +240,5 @@
%endif
<br /><br />
<a href="${h.url_for(controller=controller_name, action="list" )}">Back to ${item_class_plural_name} List</a>
<a href="${h.url_for(controller=controller_list, action="list" )}">Back to ${item_class_plural_name} List</a>
</%def>
+1 -1
View File
@@ -14,7 +14,7 @@
<script type="text/javascript">
// Define variables needed by galaxy.pages script.
var page_id = "${trans.security.encode_id(page.id)}",
page_list_url = '${h.url_for( controller='page', action='list' )}',
page_list_url = '${h.url_for( controller='pages', action='list' )}',
list_objects_url = "${h.url_for(controller='page', action='LIST_ACTION' )}",
set_accessible_url = "${h.url_for( controller='ITEM_CONTROLLER', action='set_accessible_async' )}",
get_name_and_link_url = "${h.url_for( controller='ITEM_CONTROLLER', action='get_name_and_link_async' )}?id=",
-53
View File
@@ -1,53 +0,0 @@
<%inherit file="/webapps/galaxy/base_panels.mako"/>
<%def name="init()">
<%
self.has_left_panel=False
self.has_right_panel=False
self.active_view="shared"
self.message_box_visible=False
%>
</%def>
<%def name="center_panel()">
<div style="overflow: auto; height: 100%;">
<div class="page-container" style="padding: 10px;">
<!-- embedded grid -->
${h.to_unicode( embedded_grid )}
<br><br>
<h2>Pages shared with you by others</h2>
%if shared_by_others:
<table class="colored" border="0" cellspacing="0" cellpadding="0" width="100%">
<tr class="header">
<th>Title</th>
<th>Owner</th>
<th></th>
</tr>
%for i, association in enumerate( shared_by_others ):
<% page = association.page %>
<tr>
<td>
<a class="menubutton" id="shared-${i}-popup" href="${h.url_for(controller='page', action='display_by_username_and_slug', username=page.user.username, slug=page.slug)}">${page.title | h}</a>
</td>
<td>${page.user.username}</td>
<td>
<div popupmenu="shared-${i}-popup">
<a class="action-button" href="${h.url_for(controller='page', action='display_by_username_and_slug', username=page.user.username, slug=page.slug)}" target="_top">View</a>
</div>
</td>
</tr>
%endfor
</table>
%else:
No pages have been shared with you.
%endif
</div>
</div>
</%def>