galaxy-dev
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
July 2009
- 14 participants
- 68 discussions
28 Jul '09
details: http://www.bx.psu.edu/hg/galaxy/rev/0564441c5043
changeset: 2499:0564441c5043
user: Kelly Vincent <kpvincent(a)bx.psu.edu>
date: Fri Jul 24 15:13:11 2009 -0400
description:
Added BWA wrapper tool to Short Read Mapping Tools
5 file(s) affected in this change:
tool-data/sequence_index_base.loc.sample
tool-data/sequence_index_color.loc.sample
tool_conf.xml.sample
tools/sr_mapping/bwa_wrapper.py
tools/sr_mapping/bwa_wrapper.xml
diffs (614 lines):
diff -r 643e3cd86e0b -r 0564441c5043 tool-data/sequence_index_base.loc.sample
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tool-data/sequence_index_base.loc.sample Fri Jul 24 15:13:11 2009 -0400
@@ -0,0 +1,28 @@
+#This is a sample file distributed with Galaxy that enables tools
+#to use a directory of BWA indexed sequences data files. You will need
+#to create these data files and then create a sequence_index_base.loc file
+#similar to this one (store it in this directory ) that points to
+#the directories in which those files are stored. The sequence_index_base.loc
+#file has this format (white space characters are TAB characters):
+#
+#<build> <file_base>
+#
+#So, for example, if you had phiX indexed stored in
+#/depot/data2/galaxy/phiX/base/,
+#then the sequence_index_base.loc entry would look like this:
+#
+#phiX /depot/data2/galaxy/phiX/base/phiX.fa
+#
+#and your /depot/data2/galaxy/phiX/base/ directory
+#would contain phiX.fa.* files:
+#
+#-rw-r--r-- 1 james universe 830134 2005-09-13 10:12 phiX.fa.amb
+#-rw-r--r-- 1 james universe 527388 2005-09-13 10:12 phiX.fa.ann
+#-rw-r--r-- 1 james universe 269808 2005-09-13 10:12 phiX.fa.bwt
+#...etc...
+#
+#Your sequence_index_base.loc file should include an entry per line for
+#each index set you have stored. The "file" in the path does not actually
+#exist, but it is the prefix for the actual index files. For example:
+#
+#phiX /depot/data2/galaxy/phiX/base/phiX.fa
diff -r 643e3cd86e0b -r 0564441c5043 tool-data/sequence_index_color.loc.sample
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tool-data/sequence_index_color.loc.sample Fri Jul 24 15:13:11 2009 -0400
@@ -0,0 +1,28 @@
+#This is a sample file distributed with Galaxy that enables tools
+#to use a directory of BWA indexed sequences data files. You will need
+#to create these data files and then create a sequence_index_color.loc file
+#similar to this one (store it in this directory ) that points to
+#the directories in which those files are stored. The sequence_index_color.loc
+#file has this format (white space characters are TAB characters):
+#
+#<build> <file_base>
+#
+#So, for example, if you had phiX indexed stored in
+#/depot/data2/galaxy/phiX/color/,
+#then the sequence_index_color.loc entry would look like this:
+#
+#phiX /depot/data2/galaxy/phiX/color/phiX.fa
+#
+#and your /depot/data2/galaxy/phiX/color/ directory
+#would contain phiX.fa.* files:
+#
+#-rw-r--r-- 1 james universe 830134 2005-09-13 10:12 phiX.fa.amb
+#-rw-r--r-- 1 james universe 527388 2005-09-13 10:12 phiX.fa.ann
+#-rw-r--r-- 1 james universe 269808 2005-09-13 10:12 phiX.fa.bwt
+#...etc...
+#
+#Your sequence_index_color.loc file should include an entry per line for
+#each index set you have stored. The "file" in the path does not actually
+#exist, but it is the prefix for the actual index files. For example:
+#
+#phiX /depot/data2/galaxy/phiX/color/phiX.fa
diff -r 643e3cd86e0b -r 0564441c5043 tool_conf.xml.sample
--- a/tool_conf.xml.sample Fri Jul 24 12:16:32 2009 -0400
+++ b/tool_conf.xml.sample Fri Jul 24 15:13:11 2009 -0400
@@ -329,8 +329,9 @@
<tool file="metag_tools/megablast_xml_parser.xml" />
<tool file="metag_tools/blat_wrapper.xml" />
<tool file="metag_tools/mapping_to_ucsc.xml" />
+ <tool file="sr_mapping/bwa_wrapper.xml" />
</section>
<section name="Tracks" id="tracks">
<tool file="visualization/genetrack.xml" />
- </section>
+ </section>
</toolbox>
diff -r 643e3cd86e0b -r 0564441c5043 tools/sr_mapping/bwa_wrapper.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/sr_mapping/bwa_wrapper.py Fri Jul 24 15:13:11 2009 -0400
@@ -0,0 +1,119 @@
+#! /usr/bin/python
+
+"""
+Runs BWA on single-end or paired-end data.
+Produces a SAM file containing the mappings.
+
+usage: python bwa_wrapper.py reference_sequence indexing_algorithm(is_or_bwtsw) forward_fastq_file reverse_fastq_file(or_None) output alignment_type(single_or_paired) parameters(pre_set_or_full) file_type(solexa_or_solid) file_source(indexed_or_history) maxEditDist fracMissingAligns maxGapOpens maxGapExtens disallowLongDel disallowIndel seed maxEditDistSeed numThreads mismatchPenalty gapOpenPenalty gapExtensPenalty colorSpaceRev suboptAlign noIterSearch outputTopN maxInsertSize maxOccurPairing\nThe last eighteen need to all be specified, or all be None
+"""
+
+import optparse, os, sys, tempfile
+
+def stop_err( msg ):
+ sys.stderr.write( "%s\n" % msg )
+ sys.exit()
+
+def __main__():
+ #Parse Command Line
+ parser = optparse.OptionParser()
+ parser.add_option('', '--ref', dest='ref', help='The reference genome to use or index')
+ parser.add_option('', '--indexingAlg', dest='indexingAlg', help='The algorithm to use while indexing')
+ parser.add_option('', '--fastq', dest='fastq', help='The (forward) fastq file to use for the mapping')
+ parser.add_option('', '--rfastq', dest='rfastq', help='The reverse fastq file to use for mapping if paired-end data')
+ parser.add_option('', '--output', dest='output', help='The file to save the output (SAM format)')
+ parser.add_option('', '--genAlignType', dest='genAlignType', help='The type of pairing (single or paired)')
+ parser.add_option('', '--params', dest='params', help='Parameter setting to use (pre_set or full)')
+ parser.add_option('', '--fileType', dest='fileType', help='Type of reference sequence file (solid or solexa)')
+ parser.add_option('', '--fileSource', dest='fileSource', help='Whether to use a previously indexed reference sequence or one form history (indexed or history)')
+ parser.add_option('-n', '--maxEditDist', dest='maxEditDist', help='Maximum edit distance if integer')
+ parser.add_option('', '--fracMissingAligns', dest='fracMissingAligns', help='Fraction of missing alignments given 2% uniform base error rate if fraction')
+ parser.add_option('-o', '--maxGapOpens', dest='maxGapOpens', help='Maximum number of gap opens')
+ parser.add_option('-e', '--maxGapExtens', dest='maxGapExtens', help='Maximum number of gap extensions')
+ parser.add_option('-d', '--disallowLongDel', dest='disallowLongDel', help='Disallow a long deletion within specified bps')
+ parser.add_option('-i', '--disallowIndel', dest='disallowIndel', help='Disallow indel within specified bps')
+ parser.add_option('-l', '--seed', dest='seed', help='Take the first specified subsequences')
+ parser.add_option('-k', '--maxEditDistSeed', dest='maxEditDistSeed', help='Maximum edit distance to the seed')
+ parser.add_option('-t', '--numThreads', dest='numThreads', help='Number of threads')
+ parser.add_option('-M', '--mismatchPenalty', dest='mismatchPenalty', help='Mismatch penalty')
+ parser.add_option('-O', '--gapOpenPenalty', dest='gapOpenPenalty', help='Gap open penalty')
+ parser.add_option('-E', '--gapExtensPenalty', dest='gapExtensPenalty', help='Gap extension penalty')
+ parser.add_option('-c', '--colorSpaceRev', dest='colorSpaceRev', help="Reverse query but don't complement it")
+ parser.add_option('-R', '--suboptAlign', dest='suboptAlign', help='Proceed with suboptimal alignments even if the top hit is a repeat')
+ parser.add_option('-N', '--noIterSearch', dest='noIterSearch', help='Disable iterative search')
+ parser.add_option('', '--outputTopN', dest='outputTopN', help='Output top specified hits')
+ parser.add_option('', '--maxInsertSize', dest='maxInsertSize', help='Maximum insert size for a read pair to be considered mapped good')
+ parser.add_option('', '--maxOccurPairing', dest='maxOccurPairing', help='Maximum occurrences of a read for pairings')
+ (options, args) = parser.parse_args()
+
+ # index if necessary
+ if options.fileSource == 'history':
+ # make temp directory for placement of indices and copy reference file there
+ tmp_dir = tempfile.gettempdir()
+ try:
+ os.system('cp %s %s' % (options.ref, tmp_dir))
+ except Exception, erf:
+ stop_err('Error creating temp directory for indexing purposes\n' + str(erf))
+ if options.fileType == 'solid':
+ indexing_cmds = '-c -a %s' % options.indexingAlg
+ else:
+ indexing_cmds = '-a %s' % options.indexingAlg
+ options.ref = os.path.join(tmp_dir,os.path.split(options.ref)[1])
+ cmd1 = 'bwa index %s %s 2> /dev/null' % (indexing_cmds, options.ref)
+ try:
+ os.system(cmd1)
+ except Exception, erf:
+ stop_err('Error indexing reference sequence\n' + str(erf))
+
+ # set up aligning and generate aligning command options
+ if options.params == 'pre_set':
+ if options.fileType == 'solid':
+ aligning_cmds = '-c'
+ else:
+ aligning_cmds = ''
+ gen_alignment_cmds = ''
+ else:
+ aligning_cmds = '-n %s -o %s -e %s -d %s -i %s %s -k %s -t %s -M %s -O %s -E %s %s %s %s' % \
+ ((options.fracMissingAligns, options.maxEditDist)[options.maxEditDist != '0'],
+ options.maxGapOpens, options.maxGapExtens, options.disallowLongDel,
+ options.disallowIndel, ('',' -l %s'%options.seed)[options.seed!=-1],
+ options.maxEditDistSeed, options.numThreads, options.mismatchPenalty,
+ options.gapOpenPenalty, options.gapExtensPenalty, ('',' -c')[options.colorSpaceRev=='true'],
+ ('',' -R')[options.suboptAlign=='true'], ('',' -N')[options.noIterSearch=='true'])
+ if options.genAlignType == 'single':
+ gen_alignment_cmds = '-n %s' % options.outputTopN
+ elif options.genAlignType == 'paired':
+ gen_alignment_cmds = '-a %s -o %s' % (options.maxInsertSize, options.maxOccurPairing)
+
+ # set up output file
+ file(options.output,'w').write('QNAME\tFLAG\tRNAME\tPOS\tMAPQ\tCIGAR\tMRNM\tMPOS\tISIZE\tSEQ\tQUAL\tOPT\n')
+ tmp_align_out = tempfile.NamedTemporaryFile()
+
+ # prepare actual aligning and generate aligning commands
+ cmd2 = 'bwa aln %s %s %s > %s 2> /dev/null' % (aligning_cmds, options.ref, options.fastq, tmp_align_out.name)
+ cmd2b = ''
+ if options.genAlignType == 'paired':
+ tmp_align_out2 = tempfile.NamedTemporaryFile()
+ cmd2b = 'bwa aln %s %s %s > %s 2> /dev/null' % (aligning_cmds, options.ref, options.rfastq, tmp_align_out2.name)
+ cmd3 = 'bwa sampe %s %s %s %s %s %s >> %s 2> /dev/null' % (gen_alignment_cmds, options.ref, tmp_align_out.name, tmp_align_out2.name, options.fastq, options.rfastq, options.output)
+ else:
+ cmd3 = 'bwa samse %s %s %s %s >> %s 2> /dev/null' % (gen_alignment_cmds, options.ref, tmp_align_out.name, options.fastq, options.output)
+
+ # align
+ try:
+ os.system(cmd2)
+ except Exception, erf:
+ stop_err("Error aligning sequence\n" + str(erf))
+ # and again if paired data
+ try:
+ if cmd2b:
+ os.system(cmd2b)
+ except Exception, erf:
+ stop_err("Error aligning second sequence\n" + str(erf))
+
+ # generate align
+ try:
+ os.system(cmd3)
+ except Exception, erf:
+ stop_err("Error sequence aligning sequence\n" + str(erf))
+
+if __name__=="__main__": __main__()
diff -r 643e3cd86e0b -r 0564441c5043 tools/sr_mapping/bwa_wrapper.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/sr_mapping/bwa_wrapper.xml Fri Jul 24 15:13:11 2009 -0400
@@ -0,0 +1,409 @@
+<tool id="bwa_wrapper" name="BWA" version="1.0.0">
+ <description> fast mapping of reads against reference sequence</description>
+ <command interpreter="python">
+ bwa_wrapper.py
+ #if $solidOrSolexa.solidRefGenomeSource.refGenomeSource == "history":
+ --ref=$solidOrSolexa.solidRefGenomeSource.ownFile
+ --indexingAlg=$solidOrSolexa.solidRefGenomeSource.algorithm
+ #else:
+ --ref=$solidOrSolexa.solidRefGenomeSource.indices.value
+ --indexingAlg="None"
+ #end if
+ --fastq=$paired.input1
+ #if $paired.sPaired == "paired":
+ --rfastq=$paired.input2
+ #else:
+ --rfastq="None"
+ #end if
+ --output=$output
+ --genAlignType=$paired.sPaired
+ --params=$params.source_select
+ --fileType=$solidOrSolexa.solidSolexa
+ --fileSource=$solidOrSolexa.solidRefGenomeSource.refGenomeSource
+ #if $params.source_select == "pre_set":
+ --maxEditDist="None"
+ --fracMissingAligns="None"
+ --maxGapOpens="None"
+ --maxGapExtens="None"
+ --disallowLongDel="None"
+ --disallowIndel="None"
+ --seed="None"
+ --maxEditDistSeed="None"
+ --numThreads="None"
+ --mismatchPenalty="None"
+ --gapOpenPenalty="None"
+ --gapExtensPenalty="None"
+ --colorSpaceRev="None"
+ --suboptAlign="None"
+ --noIterSearch="None"
+ --outputTopN="None"
+ --maxInsertSize="None"
+ --maxOccurPairing="None"
+ #else:
+ --maxEditDist=$params.maxEditDist
+ --fracMissingAligns=$params.fracMissingAligns
+ --maxGapOpens=$params.maxGapOpens
+ --maxGapExtens=$params.maxGapExtens
+ --disallowLongDel=$params.disallowLongDel
+ --disallowIndel=$params.disallowIndel
+ --seed=$params.seed
+ --maxEditDistSeed=$params.maxEditDistSeed
+ --numThreads=$params.numThreads
+ --mismatchPenalty=$params.mismatchPenalty
+ --gapOpenPenalty=$params.gapOpenPenalty
+ --gapExtensPenalty=$params.gapExtensPenalty
+ --colorSpaceRev=$params.colorSpaceRev
+ --suboptAlign=$params.suboptAlign
+ --noIterSearch=$params.noIterSearch
+ --outputTopN=$params.outputTopN
+ --maxInsertSize=$params.maxInsertSize
+ --maxOccurPairing=$params.maxOccurPairing
+ #end if
+ </command>
+ <inputs>
+ <conditional name="solidOrSolexa">
+ <param name="solidSolexa" type="select" label="Select SOLiD or Solexa format for the original dataset">
+ <option value="solexa">Solexa</option>
+ <option value="solid">SOLiD</option>
+ </param>
+ <when value="solid">
+ <conditional name="solidRefGenomeSource">
+ <param name="refGenomeSource" type="select" label="Will you select a reference genome from your history or use a built-in index?">
+ <option value="indexed">Use a built-in index</option>
+ <option value="history">Use one from the history</option>
+ </param>
+ <when value="history">
+ <param name="ownFile" type="data" label="Select a reference genome" />
+ <param name="algorithm" type="select" label="Select an indexing algorithm" help="IS works on databses 2GB or less, and is linear-time. BWT-SW works on database 10MB and larger, and trades speed for memory.">
+ <option value="is">IS</option>
+ <option value="bwtsw">BWT-SW</option>
+ </param>
+ </when>
+ <when value="indexed">
+ <param name="indices" type="select" label="Select a reference genome">
+ <options from_file="sequence_index_color.loc">
+ <column name="value" index="1" />
+ <column name="name" index="0" />
+ <filter type="sort_by" column="0" />
+ </options>
+ </param>
+ </when>
+ </conditional>
+ </when>
+ <when value="solexa">
+ <conditional name="solidRefGenomeSource">
+ <param name="refGenomeSource" type="select" label="Will you select a reference genome from your history or use a built-in index?">
+ <option value="indexed">Use a built-in index</option>
+ <option value="history">Use one from the history</option>
+ </param>
+ <when value="history">
+ <param name="ownFile" type="data" label="Select a reference genome" />
+ <param name="algorithm" type="select" label="Select an indexing algorithm" help="IS works on databses 2GB or less, and is linear-time. BWT-SW works on database 10MB and larger, and trades speed for memory.">
+ <option value="is">IS</option>
+ <option value="bwtsw">BWT-SW</option>
+ </param>
+ </when>
+ <when value="indexed">
+ <param name="indices" type="select" label="Select a reference genome">
+ <options from_file="sequence_index_base.loc">
+ <column name="value" index="1" />
+ <column name="name" index="0" />
+ <filter type="sort_by" column="0" />
+ </options>
+ </param>
+ </when>
+ </conditional>
+ </when>
+ </conditional>
+ <conditional name="paired">
+ <param name="sPaired" type="select" label="Is this library mate-paired?">
+ <option value="single">Single-end</option>
+ <option value="paired">Paired-end</option>
+ </param>
+ <when value="single">
+ <param name="input1" type="data" label="FASTQ file" />
+ </when>
+ <when value="paired">
+ <param name="input1" type="data" label="Forward FASTQ file" />
+ <param name="input2" type="data" label="Reverse FASTQ file" />
+ </when>
+ </conditional>
+ <conditional name="params">
+ <param name="source_select" type="select" label="BWA settings to use" help="For most mapping needs use Commonly used settings. If you want full control use Full List">
+ <option value="pre_set">Commonly used</option>
+ <option value="full">Full Parameter List</option>
+ </param>
+ <when value="pre_set" />
+ <when value="full">
+ <param name="maxEditDist" type="integer" value="0" label="Maximum edit distance" help="Enter this value OR a fraction of missing alignments, not both" />
+ <param name="fracMissingAligns" type="float" value="0.04" label="Fraction of missing alignments given 2% uniform base error rate" help="Enter this value OR maximum edit distance, not both" />
+ <param name="maxGapOpens" type="integer" value="1" label="Maximum number of gap opens" />
+ <param name="maxGapExtens" type="integer" value="-1" label="Maximum number of gap extensions" help="-1 for k-difference mode (disallowing long gaps)" />
+ <param name="disallowLongDel" type="integer" value="16" label="Disallow long deletion within [value] towards the 3'-end" />
+ <param name="disallowIndel" type="integer" value="5" label="Disallow insertion/deletion within [value] bp towards the end" />
+ <param name="seed" type="integer" value="-1" label="Number of first subsequences to take as seed" help="Enter -1 for infinity" />
+ <param name="maxEditDistSeed" type="integer" value="2" label="Maximum edit distance in the seed" />
+ <param name="numThreads" type="integer" value="1" label="Number of threads, in multi-threading mode" />
+ <param name="mismatchPenalty" type="integer" value="3" label="Mismatch penalty" help="BWA will not search for suboptimal hits with a score lower than [value]" />
+ <param name="gapOpenPenalty" type="integer" value="1" label="Gap open penalty" />
+ <param name="gapExtensPenalty" type="integer" value="4" label="Gap extension penalty" />
+ <param name="colorSpaceRev" type="select" label="Reverse query but don't compement it" help="Reverse query for all alignment in color space">
+ <option value="false">Don't reverse query</option>
+ <option value="true">Reverse query</option>
+ </param>
+ <param name="suboptAlign" type="boolean" truevalue="true" falsevalue="false" checked="no" label="Proceed with suboptimal alignments even if the top hit is a repeat" help="By default, BWA only searches for suboptimal alignments if the top hit is unique. Using this option has no effect on accuracy for single-end reads. It is mainly designed for improving the alignment accuracy of paired-end reads. However, the pairing procedure will be slowed down, especially for very short reads (~32bp)" />
+ <param name="noIterSearch" type="boolean" truevalue="true" falsevalue="false" checked="no" label="Disable iterative search" help="All hits with no more than maxDiff differences will be found. This mode is much slower than the default." />
+ <param name="outputTopN" type="integer" value="-1" label="Output top [value] hits" help="For single-end reads only. Enter -1 to disable outputting multiple hits" />
+ <param name="maxInsertSize" type="integer" value="500" label="Maximum insert size for a read pair to be considered as being mapped properly" help="For paired-end reads only. Only used when there are not enough good alignment to infer the distribution of insert sizes" />
+ <param name="maxOccurPairing" type="integer" value="100000" label="Maximum occurrences of a read for pairing" help="For paired-end reads only. A read with more occurrences will be treated as a single-end read. Reducing this parameter helps faster pairing" />
+ </when>
+ </conditional>
+ </inputs>
+ <outputs>
+ <data format="tabular" name="output" />
+ </outputs>
+<!-- Tests all fail because of problem with nested conditionals in test framework
+ <tests>
+ <test>
+ <param name="solidSolexa" value="solexa" />
+ <param name="refGenomeSource" value="indexed" />
+ <param name="indices" value="phiX" />
+ <param name="sPaired" value="single" />
+ <param name="input1" value="bwa_phiX_sanger.fastq" />
+ <param name="source_select" value="pre_set" />
+ <output name="output" file="bwa_wrapper_out0.tabular" />
+ </test>
+ <test>
+ <param name="solidSolexa" value="solid" />
+ <param name="refGenomeSource" value="history" />
+ <param name="ownFile" value="phiX.fa" />
+ <param name="algorithm" value="is" />
+ <param name="sPaired" value="single" />
+ <param name="input1" value="bwa_phiX_sanger.fastq" />
+ <param name="source_select" value="pre_set" />
+ <output name="output" file="bwa_wrapper_out0b.tabular" />
+ </test>
+ <test>
+ <param name="solidSolexa" value="solid" />
+ <param name="refGenomeSource" value="indexed" />
+ <param name="indices" value="phiX" />
+ <param name="sPaired" value="single" />
+ <param name="input1" value="bwa_solid.fastq" />
+ <param name="source_select" value="full" />
+ <param name="maxEditDist" value="0" />
+ <param name="fracMissingAligns" value="0.04" />
+ <param name="maxGapOpens" value="1" />
+ <param name="maxGapExtens" value="-1" />
+ <param name="disallowLongDel" value="16" />
+ <param name="disallowIndel" value="5" />
+ <param name="seed" value="-1" />
+ <param name="maxEditDistSeed" value="2" />
+ <param name="numThreads" value="1" />
+ <param name="mismatchPenalty" value="3" />
+ <param name="gapOpenPenalty" value="1" />
+ <param name="gapExtensPenalty" value="4" />
+ <param name="colorSpaceRev" value="true" />
+ <param name="suboptAlign" value="true" />
+ <param name="noIterSearch" value="true" />
+ <param name="outputTopN" value="-1" />
+ <param name="maxInsertSize" value="500" />
+ <param name="maxOccurPairing" value="100000" />
+ <output name="output" file="bwa_wrapper_out1.tabular" />
+ </test>
+ <test>
+ <param name="solidSolexa" value="solid" />
+ <param name="refGenomeSource" value="indexed" />
+ <param name="indices" value="phiX" />
+ <param name="sPaired" value="paired" />
+ <param name="input1" value="bwa_solid_f.fastq" />
+ <param name="input2" value="bwa_solid_r.fastq" />
+ <param name="source_select" value="full" />
+ <param name="maxEditDist" value="0" />
+ <param name="fracMissingAligns" value="0.04" />
+ <param name="maxGapOpens" value="1" />
+ <param name="maxGapExtens" value="-1" />
+ <param name="disallowLongDel" value="16" />
+ <param name="disallowIndel" value="5" />
+ <param name="seed" value="-1" />
+ <param name="maxEditDistSeed" value="2" />
+ <param name="numThreads" value="1" />
+ <param name="mismatchPenalty" value="3" />
+ <param name="gapOpenPenalty" value="1" />
+ <param name="gapExtensPenalty" value="4" />
+ <param name="colorSpaceRev" value="true" />
+ <param name="suboptAlign" value="true" />
+ <param name="noIterSearch" value="true" />
+ <param name="outputTopN" value="-1" />
+ <param name="maxInsertSize" value="500" />
+ <param name="maxOccurPairing" value="100000" />
+ <output name="output" file="bwa_wrapper_out2.tabular" />
+ </test>
+ <test>
+ <param name="solidSolexa" value="solexa" />
+ <param name="refGenomeSource" value="indexed" />
+ <param name="indices" value="phiX" />
+ <param name="sPaired" value="single" />
+ <param name="input1" value="bwa_phiX_sanger.fastq" />
+ <param name="source_select" value="full" />
+ <param name="maxEditDist" value="0" />
+ <param name="fracMissingAligns" value="0.04" />
+ <param name="maxGapOpens" value="1" />
+ <param name="maxGapExtens" value="-1" />
+ <param name="disallowLongDel" value="16" />
+ <param name="disallowIndel" value="5" />
+ <param name="seed" value="-1" />
+ <param name="maxEditDistSeed" value="2" />
+ <param name="numThreads" value="1" />
+ <param name="mismatchPenalty" value="3" />
+ <param name="gapOpenPenalty" value="1" />
+ <param name="gapExtensPenalty" value="4" />
+ <param name="colorSpaceRev" value="false" />
+ <param name="suboptAlign" value="true" />
+ <param name="noIterSearch" value="true" />
+ <param name="outputTopN" value="-1" />
+ <param name="maxInsertSize" value="500" />
+ <param name="maxOccurPairing" value="100000" />
+ <output name="output" file="bwa_wrapper_out3.tabular" />
+ </test>
+ <test>
+ <param name="solidSolexa" value="solexa" />
+ <param name="refGenomeSource" value="indexed" />
+ <param name="indices" value="phiX" />
+ <param name="sPaired" value="paired" />
+ <param name="input1" value="bwa_phiX_sanger_f.fastq" />
+ <param name="input2" value="bwa_phiX_sanger_r.fastq" />
+ <param name="source_select" value="full" />
+ <param name="maxEditDist" value="0" />
+ <param name="fracMissingAligns" value="0.04" />
+ <param name="maxGapOpens" value="1" />
+ <param name="maxGapExtens" value="-1" />
+ <param name="disallowLongDel" value="16" />
+ <param name="disallowIndel" value="5" />
+ <param name="seed" value="-1" />
+ <param name="maxEditDistSeed" value="2" />
+ <param name="numThreads" value="1" />
+ <param name="mismatchPenalty" value="3" />
+ <param name="gapOpenPenalty" value="1" />
+ <param name="gapExtensPenalty" value="4" />
+ <param name="colorSpaceRev" value="false" />
+ <param name="suboptAlign" value="true" />
+ <param name="noIterSearch" value="true" />
+ <param name="outputTopN" value="-1" />
+ <param name="maxInsertSize" value="500" />
+ <param name="maxOccurPairing" value="100000" />
+ <output name="output" file="bwa_wrapper_out4.tabular" />
+ </test>
+ </tests>
+-->
+ <help>
+
+**What it does**
+
+**BWA** is a high performance sequence aligner that succeeds MAQ. It is based on BWT-SW but uses a completely different algorithm, and it is aimed toward short read alignments. It is fast--it can map the human genome in only 15-25 minutes. Heng Li of the Sanger Institute wrote the majority of the code, with contributions by Chi-Kwong Wong at the University of Hong Kong, Nong Ge at Sun Yat-Sen University, and Yuta Mori.
+
+------
+
+**Input formats**
+
+BWA accepts files in FASTQ format.
+
+------
+
+**Outputs**
+
+The output is in SAM format, and has the following columns::
+
+ 1 QNAME - Query (pair) NAME
+ 2 FLAG - bitwise FLAG
+ 3 RNAME - Reference sequence NAME
+ 4 POS - 1-based leftmost POSition/coordinate of clipped sequence
+ 5 MAPQ - MAPping Quality (Phred-scaled)
+ 6 CIGAR - extended CIGAR string
+ 7 MRNM - Mate Reference sequence NaMe ('=' if same as RNAME)
+ 8 MPOS - 1-based Mate POSition
+ 9 ISIZE - Inferred insert SIZE
+ 10 SEQ - query SEQuence on the same strand as the reference
+ 11 QUAL - query QUALity (ASCII-33 gives the Phred base quality)
+ 12 OPT - variable OPTional fields in the format TAG:VTYPE:VALU
+
+The flags are as follows::
+
+ Flag - Description
+ 0x0001 - the read is paired in sequencing
+ 0x0002 - the read is mapped in a proper pair
+ 0x0004 - the query sequence itself is unmapped
+ 0x0008 - the mate is unmapped
+ 0x0010 - strand of the query (1 for reverse)
+ 0x0020 - strand of the mate
+ 0x0040 - the read is the first read in a pair
+ 0x0080 - the read is the second read in a pair
+ 0x0100 - the alignment is not primary
+
+It looks like this (scroll sideways to see the entire example)::
+
+ QNAME FLAG RNAME POS MAPQ CIAGR MRNM MPOS ISIZE SEQ QUAL OPT
+ HWI-EAS91_1_30788AAXX:1:1:1761:343 4 * 0 0 * * 0 0 AAAAAAANNAAAAAAAAAAAAAAAAAAAAAAAAAAACNNANNGAGTNGNNNNNNNGCTTCCCACAGNNCTGG hhhhhhh;;hhhhhhhhhhh^hOhhhhghhhfhhhgh;;h;;hhhh;h;;;;;;;hhhhhhghhhh;;Phhh
+ HWI-EAS91_1_30788AAXX:1:1:1578:331 4 * 0 0 * * 0 0 GTATAGANNAATAAGAAAAAAAAAAATGAAGACTTTCNNANNTCTGNANNNNNNNTCTTTTTTCAGNNGTAG hhhhhhh;;hhhhhhhhhhhhhhhhhhhhhhhhhhhh;;h;;hhhh;h;;;;;;;hhhhhhhhhhh;;hhVh
+
+-------
+
+**BWA Settings**
+
+All of the options have a default value. You can change any of them. All of the options in BWA have been implemented here.
+
+------
+
+**BWA parameter list**
+
+This is an exhaustive list of BWA options:
+
+For **aln**::
+
+ -n NUM Maximum edit distance if the value is INT, or the fraction of missing
+ alignments given 2% uniform base error rate if FLOAT. In the latter
+ case, the maximum edit distance is automatically chosen for different
+ read lengths. [0.04]
+ -o INT Maximum number of gap opens [1]
+ -e INT Maximum number of gap extensions, -1 for k-difference mode
+ (disallowing long gaps) [-1]
+ -d INT Disallow a long deletion within INT bp towards the 3'-end [16]
+ -i INT Disallow an indel within INT bp towards the ends [5]
+ -l INT Take the first INT subsequence as seed. If INT is larger than the
+ query sequence, seeding will be disabled. For long reads, this option
+ is typically ranged from 25 to 35 for '-k 2'. [inf]
+ -k INT Maximum edit distance in the seed [2]
+ -t INT Number of threads (multi-threading mode) [1]
+ -M INT Mismatch penalty. BWA will not search for suboptimal hits with a score
+ lower than (bestScore-misMsc). [3]
+ -O INT Gap open penalty [11]
+ -E INT Gap extension penalty [4]
+ -c Reverse query but not complement it, which is required for alignment
+ in the color space.
+ -R Proceed with suboptimal alignments even if the top hit is a repeat. By
+ default, BWA only searches for suboptimal alignments if the top hit is
+ unique. Using this option has no effect on accuracy for single-end
+ reads. It is mainly designed for improving the alignment accuracy of
+ paired-end reads. However, the pairing procedure will be slowed down,
+ especially for very short reads (~32bp).
+ -N Disable iterative search. All hits with no more than maxDiff
+ differences will be found. This mode is much slower than the default.
+
+For **samse**::
+
+ -n INT Output up to INT top hits. Value -1 to disable outputting multiple
+ hits. [-1]
+
+For **sampe**::
+
+ -a INT Maximum insert size for a read pair to be considered as being mapped
+ properly. Since 0.4.5, this option is only used when there are not
+ enough good alignment to infer the distribution of insert sizes. [500]
+ -o INT Maximum occurrences of a read for pairing. A read with more
+ occurrences will be treated as a single-end read. Reducing this
+ parameter helps faster pairing. [100000]
+
+
+ </help>
+</tool>
+
+
1
0
details: http://www.bx.psu.edu/hg/galaxy/rev/0d7a8525da9e
changeset: 2501:0d7a8525da9e
user: James Taylor <james(a)jamestaylor.org>
date: Fri Jul 24 16:26:32 2009 -0400
description:
Fixes and missed files for CSS
5 file(s) affected in this change:
static/june_2007_style/blue/base.css
static/june_2007_style/blue/history-buttons.png
static/june_2007_style/blue/history-states.png
static/june_2007_style/blue/history.css
static/june_2007_style/process_css.py
diffs (43 lines):
diff -r 3d4d44d7a275 -r 0d7a8525da9e static/june_2007_style/blue/base.css
--- a/static/june_2007_style/blue/base.css Fri Jul 24 16:14:46 2009 -0400
+++ b/static/june_2007_style/blue/base.css Fri Jul 24 16:26:32 2009 -0400
@@ -84,11 +84,8 @@
div.popupmenu{display:none;background:#eeeeee;color:#333;font-size:110%;font-weight:bold;font-style:normal;white-space:nowrap;position:absolute;z-index:20000;border:solid #aaaaaa 1px;padding:3px 0;-moz-border-radius:0.5em;-webkit-border-radius:0.5em;border-radius:0.5em;user-select:none;-moz-user-select:none;-webkit-user-select:none;}
div.popupmenu-item{padding:3px 1em;cursor:pointer;}
div.popupmenu-item:hover{background:#aaaaaa;}
-.popup-arrow{font-size:80%;cursor:pointer;text-decoration:none;color:#555
-}
-
-.popup-arrow:hover {
- color: black;}
+.popup-arrow{font-size:80%;cursor:pointer;text-decoration:none;color:#555;}
+.popup-arrow:hover{color:black;}
div.permissionContainer{padding-left:20px;}
.grid-header{padding-bottom:1em;}
.grid-header h2{margin:0;margin-bottom:0.5em;}
diff -r 3d4d44d7a275 -r 0d7a8525da9e static/june_2007_style/blue/history-buttons.png
Binary file static/june_2007_style/blue/history-buttons.png has changed
diff -r 3d4d44d7a275 -r 0d7a8525da9e static/june_2007_style/blue/history-states.png
Binary file static/june_2007_style/blue/history-states.png has changed
diff -r 3d4d44d7a275 -r 0d7a8525da9e static/june_2007_style/blue/history.css
--- a/static/june_2007_style/blue/history.css Fri Jul 24 16:14:46 2009 -0400
+++ b/static/june_2007_style/blue/history.css Fri Jul 24 16:26:32 2009 -0400
@@ -1,5 +1,5 @@
body{background:#C1C9E5;color:#303030;background-image:url(menu_bg.png);background-repeat:repeat-x;background-position:top;margin:5px;border:0;padding:0;}
-a{color:#base_text;}
+a{color:#303030;}
div.historyLinks{padding:5px;margin:5px 0 5px 0;}
div.historyItem{margin:5px -5px 5px 0px;padding:5px 11px 5px 5px;border:solid #888888 1px;border-left:solid #888888 5px;border-right:none;background:#EEEEEE;}
div.historyItem div.historyItemTitleBar{padding-left:20px;background-position:0 1px;background-repeat:no-repeat;}
diff -r 3d4d44d7a275 -r 0d7a8525da9e static/june_2007_style/process_css.py
--- a/static/june_2007_style/process_css.py Fri Jul 24 16:14:46 2009 -0400
+++ b/static/june_2007_style/process_css.py Fri Jul 24 16:26:32 2009 -0400
@@ -11,7 +11,7 @@
import sys, string, os.path
from pyparsing import *
-from galaxy.util.odict import odict
+from odict import odict
import Image
def cross_lists(*sets):
1
0
28 Jul '09
details: http://www.bx.psu.edu/hg/galaxy/rev/3d4d44d7a275
changeset: 2500:3d4d44d7a275
user: James Taylor <james(a)jamestaylor.org>
date: Fri Jul 24 16:14:46 2009 -0400
description:
New (custom) CSS processor, supports nested rules, background sprites, selector mixins, et cetera. Some styles have been updated to use this. History images now use sprites. All images have been optomized with advpng and optipng.
53 file(s) affected in this change:
lib/galaxy/web/framework/__init__.py
lib/galaxy/web/framework/helpers/__init__.py
static/june_2007_style/base.css.tmpl
static/june_2007_style/blue/base.css
static/june_2007_style/blue/base_bg.png
static/june_2007_style/blue/button_bar_bg_light.png
static/june_2007_style/blue/data_empty.png
static/june_2007_style/blue/data_error.png
static/june_2007_style/blue/data_ok.png
static/june_2007_style/blue/data_queued.png
static/june_2007_style/blue/done_message_icon.png
static/june_2007_style/blue/error_large.png
static/june_2007_style/blue/error_message_icon.png
static/june_2007_style/blue/error_small.png
static/june_2007_style/blue/footer_title_bg.png
static/june_2007_style/blue/form_body_bg.png
static/june_2007_style/blue/gray_bg.png
static/june_2007_style/blue/hgrad.png
static/june_2007_style/blue/hgrad_over.png
static/june_2007_style/blue/history.css
static/june_2007_style/blue/info_large.png
static/june_2007_style/blue/info_message_icon.png
static/june_2007_style/blue/info_small.png
static/june_2007_style/blue/iphone.css
static/june_2007_style/blue/layout_callout_top.png
static/june_2007_style/blue/library.css
static/june_2007_style/blue/masthead.css
static/june_2007_style/blue/masthead_bg.png
static/june_2007_style/blue/ok_large.png
static/june_2007_style/blue/ok_small.png
static/june_2007_style/blue/panel_header_bg.png
static/june_2007_style/blue/panel_layout.css
static/june_2007_style/blue/popupmenu_callout_top.png
static/june_2007_style/blue/reset.css
static/june_2007_style/blue/tiny_arror_right.png
static/june_2007_style/blue/tiny_arrow_left.png
static/june_2007_style/blue/tiny_arrow_right.png
static/june_2007_style/blue/tool_menu.css
static/june_2007_style/blue/wait_large.png
static/june_2007_style/blue/wait_small.png
static/june_2007_style/blue/warn_large.png
static/june_2007_style/blue/warn_message_icon.png
static/june_2007_style/blue/warn_small.png
static/june_2007_style/blue/workflow_circle_drag.png
static/june_2007_style/blue/workflow_circle_green.png
static/june_2007_style/blue/workflow_circle_open.png
static/june_2007_style/history.css.tmpl
static/june_2007_style/make_style.py
static/june_2007_style/panel_layout.css.tmpl
static/june_2007_style/process_css.py
templates/base_panels.mako
templates/root/history.mako
templates/root/history_common.mako
diffs (1437 lines):
diff -r 0564441c5043 -r 3d4d44d7a275 lib/galaxy/web/framework/__init__.py
--- a/lib/galaxy/web/framework/__init__.py Fri Jul 24 15:13:11 2009 -0400
+++ b/lib/galaxy/web/framework/__init__.py Fri Jul 24 16:14:46 2009 -0400
@@ -14,8 +14,7 @@
pkg_resources.require( "simplejson" )
import simplejson
-pkg_resources.require( "WebHelpers" )
-import webhelpers
+import helpers
pkg_resources.require( "PasteDeploy" )
from paste.deploy.converters import asbool
@@ -567,19 +566,19 @@
return self.fill_template_mako( filename, **kwargs )
else:
template = Template( file=os.path.join(self.app.config.template_path, filename),
- searchList=[kwargs, self.template_context, dict(caller=self, t=self, h=webhelpers, util=util, request=self.request, response=self.response, app=self.app)] )
+ searchList=[kwargs, self.template_context, dict(caller=self, t=self, h=helpers, util=util, request=self.request, response=self.response, app=self.app)] )
return str( template )
def fill_template_mako( self, filename, **kwargs ):
template = self.webapp.mako_template_lookup.get_template( filename )
template.output_encoding = 'utf-8'
- data = dict( caller=self, t=self, trans=self, h=webhelpers, util=util, request=self.request, response=self.response, app=self.app )
+ data = dict( caller=self, t=self, trans=self, h=helpers, util=util, request=self.request, response=self.response, app=self.app )
data.update( self.template_context )
data.update( kwargs )
return template.render( **data )
def stream_template_mako( self, filename, **kwargs ):
template = self.webapp.mako_template_lookup.get_template( filename )
template.output_encoding = 'utf-8'
- data = dict( caller=self, t=self, trans=self, h=webhelpers, util=util, request=self.request, response=self.response, app=self.app )
+ data = dict( caller=self, t=self, trans=self, h=helpers, util=util, request=self.request, response=self.response, app=self.app )
data.update( self.template_context )
data.update( kwargs )
## return template.render( **data )
diff -r 0564441c5043 -r 3d4d44d7a275 lib/galaxy/web/framework/helpers/__init__.py
--- a/lib/galaxy/web/framework/helpers/__init__.py Fri Jul 24 15:13:11 2009 -0400
+++ b/lib/galaxy/web/framework/helpers/__init__.py Fri Jul 24 16:14:46 2009 -0400
@@ -1,3 +1,6 @@
+import pkg_resources
+
+pkg_resources.require( "WebHelpers" )
from webhelpers import *
from datetime import datetime
@@ -9,4 +12,20 @@
if a:
return b
else:
- return c
\ No newline at end of file
+ return c
+
+# Quick helpers for static content
+
+def css( *args ):
+ """
+ Take a list of stylesheet names (no extension) and return appropriate string
+ of link tags.
+ """
+ return "\n".join( [ stylesheet_link_tag( "/static/style/" + name + ".css" ) for name in args ] )
+
+def js( *args ):
+ """
+ Take a list of javascript names (no extension) and return appropriate
+ string of script tags.
+ """
+ return "\n".join( [ javascript_include_tag( "/static/scripts/" + name + ".js" ) for name in args ] )
\ No newline at end of file
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/base.css.tmpl
--- a/static/june_2007_style/base.css.tmpl Fri Jul 24 15:13:11 2009 -0400
+++ b/static/june_2007_style/base.css.tmpl Fri Jul 24 16:14:46 2009 -0400
@@ -1,8 +1,9 @@
-@import url( "reset.css" );
+## Font settings from YUI + verdana
+body{font:13px/1.231 verdana,arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}select,input,button,textarea,button{font:99% verdana,arial,helvetica,clean,sans-serif;}table{font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}
+body{font-size:75%;}
body
{
- font: 75% verdana, "Bitstream Vera Sans", geneva, arial, helvetica, helve, sans-serif;
background: $base_bg_bottom;
color: $base_text;
background-image: url(base_bg.png);
@@ -590,7 +591,7 @@
font-size: 80%;
cursor: pointer;
text-decoration: none;
- color: #555
+ color: #555;
}
.popup-arrow:hover {
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/base.css
--- a/static/june_2007_style/blue/base.css Fri Jul 24 15:13:11 2009 -0400
+++ b/static/june_2007_style/blue/base.css Fri Jul 24 16:14:46 2009 -0400
@@ -1,1 +1,101 @@
-@import url("reset.css");body{font:75% verdana,"Bitstream Vera Sans",geneva,arial,helvetica,helve,sans-serif;background:#FFF;color:#303030;background-image:url(base_bg.png);background-repeat:repeat-x;background-position:top;margin:10px;}img{border:0;}a:link,a:visited,a:active{color:#303030;}h1,h2,h3,h4{color:#023858;}hr{border:none;height:0;border-bottom:dotted #303030 1px;}div.toolForm{border:solid #d8b365 1px;}div.toolFormTitle{font-weight:bold;padding:5px;padding-left:10px;padding-right:10px;background:#d2c099;background-image:url(form_title_bg.png);background-repeat:repeat-x;background-position:top;border-bottom:solid #d8b365 1px;}div.toolParamHelp{color:#666;}div.toolParamHelp a{color:#666;}div.toolFormBody{background:#FFF;background-image:url(form_body_bg.png);background-repeat:repeat-x;background-position:top;padding:5px 0;}div.toolFormBody div.toolFormTitle{background:transparent;border:none;font-weight:bold;border-bottom:solid #d8b365 1px;margin-bottom:5px;}div.tool
FormDisabled div.toolFormTitle{background:#eee;border-color:#999;}div.toolFormDisabled{border-color:#999;}div.toolHelpBody{width:100%;overflow:auto;}div.titleRow{font-weight:bold;border-bottom:dotted gray 1px;margin-bottom:.5em;padding-bottom:.25em;}div.form{border:solid #d8b365 1px;}div.form-title{font-weight:bold;padding:5px 10px;background:#d2c099;background-image:url(form_title_bg.png);background-repeat:repeat-x;background-position:top;border-bottom:solid #d8b365 1px;}div.form-body{padding:5px 0;}div.form-row{padding:5px 10px;}div.form-title-row{padding:5px 10px;}div.repeat-group-item{border-left:solid #d8b365 5px;margin-left:10px;margin-bottom:10px;}div.form-row-error{background:#FCC;}div.form-row label{font-weight:bold;display:block;margin-bottom:.2em;}div.form-row-input{float:left;width:300px;}div.form-row-input>input{max-width:300px;}div.form-row-error-message{width:300px;float:left;color:red;font-weight:bold;padding:3px 0 0 1em;}select,input,textarea{font:inherit;fo
nt-size:115%;}select,textarea,input[type="text"],input[type="file"],input[type="password"]{-webkit-box-sizing:border-box;max-width:300px;}.errormessage,.warningmessage,.donemessage,.infomessage,.welcomeBlue,.welcomeRed,.screencastBox,.yellowbox,.redbox,.bluebox,.greenbox{padding:10px;padding-left:52px;min-height:32px;border:1px solid #A66;background-color:#FCC;background-image:url(error_message_icon.png);background-repeat:no-repeat;background-position:10px 10px;}.warningmessage{background-image:url(warn_message_icon.png);border-color:#AA6;background-color:#FFC;}.donemessage{background-image:url(done_message_icon.png);border-color:#6A6;background-color:#CFC;}.infomessage{background-image:url(info_message_icon.png);border-color:#66A;background-color:#CCF;}.welcomeBlue{padding-left:10px;border-color:#66A;background-color:#CCF;background-image:none;}.welcomeRed{padding-left:10px;border-color:#A66;background-color:#FCC;background-image:none;}.screencastBox{padding-left:10px;borde
r-color:#AA6;background-color:#FFC;background-image:none;}.redbox{border:none;padding:10px;border-color:#000;background-color:#F66;background-image:none;border-right-width:1px;border-right-style:dotted;border-bottom-width:1px;border-bottom-style:dotted;margin-top:5px;min-height:32px;}.yellowbox{border:none;padding:10px;border-color:#000;background-color:#FC0;background-image:none;border-right-width:1px;border-right-style:dotted;border-bottom-width:1px;border-bottom-style:dotted;margin-top:5px;min-height:32px;}.bluebox{border:none;padding:10px;border-color:#000;background-color:#66F;background-image:none;border-right-width:1px;border-right-style:dotted;border-bottom-width:1px;border-bottom-style:dotted;margin-top:5px;color:#FFF;min-height:32px;}.greenbox{border:none;padding:10px;border-color:#000;background-color:#0C0;background-image:none;border-right-width:1px;border-right-style:dotted;border-bottom-width:1px;border-bottom-style:dotted;margin-top:5px;min-height:32px;}.redbo
x li,.yellowbox li,.bluebox li,.greenbox li{list-style:disc;text-transform:none;list-style-position:inside;list-style-image:none;margin:3px;}.errormessagesmall,.warningmessagesmall,.donemessagesmall,.infomessagesmall{padding:5px;padding-left:25px;min-height:25px;border:1px solid #A66;background-color:#FCC;background-image:url(error_small.png);background-repeat:no-repeat;background-position:5px 5px;}.warningmessagesmall{background-image:url(warn_small.png);border-color:#AA6;background-color:#FFC;}.donemessagesmall{background-image:url(ok_small.png);border-color:#6A6;background-color:#CFC;}.infomessagesmall{background-image:url(info_small.png);border-color:#66A;background-color:#CCF;}.errormark,.warningmark,.donemark,.infomark,.ok_bgr,.err_bgr{padding-left:20px;min-height:15px;background:url(error_small.png) no-repeat;}.warningmark{background-image:url(warn_small.png);}.donemark{background-image:url(ok_small.png);}.infomark,.ok_bgr{background-image:url(info_small.png);}table.c
olored{border-top:solid #d8b365 1px;border-bottom:solid #d8b365 1px;}table.colored td,table.colored th{text-align:left;padding:5px;}table.colored tr.header{background:#ebd9b2;background-image:url(form_title_bg.png);background-repeat:repeat-x;background-position:top;border-bottom:solid #d8b365 1px;font-weight:bold;}table.colored tr{background:white;}table.colored tr.odd_row{background:#DADFEF;}div.debug{margin:10px;padding:5px;background:#FF9;border:solid #FF3 1px;color:black;}div.odd_row{background:#DADFEF;}#footer{display:none;}td.panel-body{background:white;color:#303030;background:#C1C9E5 url(menu_bg.png) top repeat-x;}div.toolSectionPad{margin:0;padding:0;height:5px;font-size:0;}div.toolSectionDetailsInner{margin-left:5px;margin-right:5px;}div.toolSectionTitle{padding-bottom:0;font-weight:bold;}div.toolTitle{padding-top:5px;padding-bottom:5px;margin-left:16px;margin-right:10px;display:list-item;list-style:square outside;}span.toolParameterExpandableCollapsable{font-weigh
t:bold;cursor:pointer;}ul.toolParameterExpandableCollapsable{list-style:none;}ul.manage-table-actions{float:right;margin-top:-2.5em;}ul.manage-table-actions li{display:block;float:left;margin-left:.5em;}.state-color-queued{border-color:#888;background:#EEE;}.state-color-ok{border-color:#6A6;background:#CFC;}.state-color-error{border-color:#A66;background:#FCC;}.state-color-running{border-color:#AA6;background:#FFC;}.state-fg-queued{color:#888;}.state-fg-ok{color:#6A6;}.state-fg-running{color:#AA6;}.state-fg-error{color:#A66;}.action-button{background:#eee;color:#333;text-decoration:none;font-size:95%;font-weight:bold;display:inline-block;cursor:pointer;padding:2px;border:solid #aaa 1px;padding-right:.5em;padding-left:.5em;-moz-border-radius:.5em;-webkit-border-radius:.5em;border-radius:.5em;user-select:none;-moz-user-select:none;-webkit-user-select:none;}.action-button>*{vertical-align:middle;}.action-button:hover{color:black;background:#ddd;}.action-button:active{color:whit
e;background:#aaa;}div.popupmenu{display:none;background:#eee;color:#333;font-size:110%;font-weight:bold;font-style:normal;white-space:nowrap;position:absolute;z-index:20000;border:solid #aaa 1px;padding:3px 0;-moz-border-radius:.5em;-webkit-border-radius:.5em;border-radius:.5em;user-select:none;-moz-user-select:none;-webkit-user-select:none;}div.popupmenu-item{padding:3px 1em;cursor:pointer;}div.popupmenu-item:hover{background:#aaa;}.popup-arrow{font-size:80%;cursor:pointer;text-decoration:none;color:#555;}.popup-arrow:hover{color:black;}div.permissionContainer{padding-left:20px;}.grid-header{padding-bottom:1em;}.grid-header h2{margin:0;margin-bottom:.5em;}.grid-header .title{font-weight:bold;}.grid{padding-top:1em;border-collapse:collapse;width:100%;}.grid tbody td{border-top:solid #DDD 1px;border-bottom:solid #DDD 1px;padding:.5em 1em;}.grid tbody td:empty{padding:0;}.grid thead th{background:#ebd9b2;background-image:url(form_title_bg.png);background-repeat:repeat-x;backg
round-position:top;border-top:solid #d8b365 1px;border-bottom:solid #d8b365 1px;padding:.5em 1em;text-align:left;}.grid tfoot td{background-color:#F8F8F8;border-top:solid #DDD 1px;border-bottom:solid #DDD 1px;padding:.5em 1em;}.grid .current{background-color:#EEF;}
\ No newline at end of file
+body{font:13px/1.231 verdana,arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}
+select,input,button,textarea,button{font:99% verdana,arial,helvetica,clean,sans-serif;}
+table{font-size:inherit;font:100%;}
+pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}
+body{font-size:75%;}
+body{background:#FFFFFF;color:#303030;background-image:url(base_bg.png);background-repeat:repeat-x;background-position:top;margin:10px;}
+img{border:0;}
+a:link,a:visited,a:active{color:#303030;}
+h1,h2,h3,h4{color:#023858;}
+hr{border:none;height:0px;border-bottom:dotted #303030 1px;}
+div.toolForm{border:solid #d8b365 1px;}
+div.toolFormTitle{font-weight:bold;padding:5px;padding-left:10px;padding-right:10px;background:#d2c099;background-image:url(form_title_bg.png);background-repeat:repeat-x;background-position:top;border-bottom:solid #d8b365 1px;}
+div.toolParamHelp{color:#666;}
+div.toolParamHelp a{color:#666;}
+div.toolFormBody{background:#FFFFFF;background-image:url(form_body_bg.png);background-repeat:repeat-x;background-position:top;padding:5px 0;}
+div.toolFormBody div.toolFormTitle{background:transparent;border:none;font-weight:bold;border-bottom:solid #d8b365 1px;margin-bottom:5px;}
+div.toolFormDisabled div.toolFormTitle{background:#eee;border-color:#999;}
+div.toolFormDisabled{border-color:#999;}
+div.toolHelp{}
+div.toolHelpBody{width:100%;overflow:auto;}
+div.titleRow{font-weight:bold;border-bottom:dotted gray 1px;margin-bottom:0.5em;padding-bottom:0.25em;}
+div.form{border:solid #d8b365 1px;}
+div.form-title{font-weight:bold;padding:5px 10px;background:#d2c099;background-image:url(form_title_bg.png);background-repeat:repeat-x;background-position:top;border-bottom:solid #d8b365 1px;}
+div.form-body{padding:5px 0;}
+div.form-row{padding:5px 10px;}
+div.form-title-row{padding:5px 10px;}
+div.repeat-group-item{border-left:solid #d8b365 5px;margin-left:10px;margin-bottom:10px;}
+div.form-row-error{background:#FFCCCC;}
+div.form-row label{font-weight:bold;display:block;margin-bottom:.2em;}
+div.form-row-input{float:left;width:300px;}
+div.form-row-input > input{max-width:300px;}
+div.form-row-error-message{width:300px;float:left;color:red;font-weight:bold;padding:3px 0 0 1em;}
+select,input,textarea{font:inherit;font-size:115%;}
+select,textarea,input[type="text"],input[type="file"],input[type="password"]{-webkit-box-sizing:border-box;max-width:300px;}
+.errormessage,.warningmessage,.donemessage,.infomessage,.welcomeBlue,.welcomeRed,.screencastBox,.yellowbox,.redbox,.bluebox,.greenbox{padding:10px;padding-left:52px;min-height:32px;border:1px solid #AA6666;background-color:#FFCCCC;background-image:url(error_message_icon.png);background-repeat:no-repeat;background-position:10px 10px;}
+.warningmessage{background-image:url(warn_message_icon.png);border-color:#AAAA66;background-color:#FFFFCC;}
+.donemessage{background-image:url(done_message_icon.png);border-color:#66AA66;background-color:#CCFFCC;}
+.infomessage{background-image:url(info_message_icon.png);border-color:#6666AA;background-color:#CCCCFF;}
+.welcomeBlue{padding-left:10px;border-color:#6666AA;background-color:#CCCCFF;background-image:none;}
+.welcomeRed{padding-left:10px;border-color:#AA6666;background-color:#FFCCCC;background-image:none;}
+.screencastBox{padding-left:10px;border-color:#AAAA66;background-color:#FFFFCC;background-image:none;}
+.redbox{border:none;padding:10px;border-color:#000000;background-color:#FF6666;background-image:none;border-right-width:1px;border-right-style:dotted;border-bottom-width:1px;border-bottom-style:dotted;margin-top:5px;min-height:32px;}
+.yellowbox{border:none;padding:10px;border-color:#000000;background-color:#FFCC00;background-image:none;border-right-width:1px;border-right-style:dotted;border-bottom-width:1px;border-bottom-style:dotted;margin-top:5px;min-height:32px;}
+.bluebox{border:none;padding:10px;border-color:#000000;background-color:#6666FF;background-image:none;border-right-width:1px;border-right-style:dotted;border-bottom-width:1px;border-bottom-style:dotted;margin-top:5px;color:#FFFFFF;min-height:32px;}
+.greenbox{border:none;padding:10px;border-color:#000000;background-color:#00CC00;background-image:none;border-right-width:1px;border-right-style:dotted;border-bottom-width:1px;border-bottom-style:dotted;margin-top:5px;min-height:32px;}
+.redbox li,.yellowbox li,.bluebox li,.greenbox li{list-style:disc;text-transform:none;list-style-position:inside;list-style-image:none;margin:3px;}
+.errormessagesmall,.warningmessagesmall,.donemessagesmall,.infomessagesmall{padding:5px;padding-left:25px;min-height:25px;border:1px solid #AA6666;background-color:#FFCCCC;background-image:url(error_small.png);background-repeat:no-repeat;background-position:5px 5px;}
+.warningmessagesmall{background-image:url(warn_small.png);border-color:#AAAA66;background-color:#FFFFCC;}
+.donemessagesmall{background-image:url(ok_small.png);border-color:#66AA66;background-color:#CCFFCC;}
+.infomessagesmall{background-image:url(info_small.png);border-color:#6666AA;background-color:#CCCCFF;}
+.errormark,.warningmark,.donemark,.infomark,.ok_bgr,.err_bgr{padding-left:20px;min-height:15px;background:url(error_small.png) no-repeat;}
+.warningmark{background-image:url(warn_small.png);}
+.donemark{background-image:url(ok_small.png);}
+.infomark,.ok_bgr{background-image:url(info_small.png);}
+table.colored{border-top:solid #d8b365 1px;border-bottom:solid #d8b365 1px;}
+table.colored td,table.colored th{text-align:left;padding:5px;}
+table.colored tr.header{background:#ebd9b2;background-image:url(form_title_bg.png);background-repeat:repeat-x;background-position:top;border-bottom:solid #d8b365 1px;font-weight:bold;}
+table.colored tr{background:white;}
+table.colored tr.odd_row{background:#DADFEF;}
+div.debug{margin:10px;padding:5px;background:#FFFF99;border:solid #FFFF33 1px;color:black;}
+div.odd_row{background:#DADFEF;}
+#footer{display:none;}
+td.panel-body{background:white;color:#303030;background:#C1C9E5 url(menu_bg.png) top repeat-x;}
+div.toolSectionPad{margin:0;padding:0;height:5px;font-size:0px;}
+div.toolSectionDetailsInner{margin-left:5px;margin-right:5px;}
+div.toolSectionTitle{padding-bottom:0px;font-weight:bold;}
+div.toolTitle{padding-top:5px;padding-bottom:5px;margin-left:16px;margin-right:10px;display:list-item;list-style:square outside;}
+span.toolParameterExpandableCollapsable{font-weight:bold;cursor:pointer;}
+ul.toolParameterExpandableCollapsable{list-style:none;}
+ul.manage-table-actions{float:right;margin-top:-2.5em;}
+ul.manage-table-actions li{display:block;float:left;margin-left:0.5em;}
+.state-color-queued{border-color:#888888;background:#EEEEEE;}
+.state-color-ok{border-color:#66AA66;background:#CCFFCC;}
+.state-color-error{border-color:#AA6666;background:#FFCCCC;}
+.state-color-running{border-color:#AAAA66;background:#FFFFCC;}
+.state-fg-queued{color:#888888;}
+.state-fg-ok{color:#66AA66;}
+.state-fg-running{color:#AAAA66;}
+.state-fg-error{color:#AA6666;}
+.action-button{background:#eeeeee;color:#333;text-decoration:none;font-size:95%;font-weight:bold;display:inline-block;cursor:pointer;padding:2px;border:solid #aaaaaa 1px;padding-right:0.5em;padding-left:0.5em;-moz-border-radius:0.5em;-webkit-border-radius:0.5em;border-radius:0.5em;user-select:none;-moz-user-select:none;-webkit-user-select:none;}
+.action-button > *{vertical-align:middle;}
+.action-button:hover{color:black;background:#dddddd;}
+.action-button:active{color:white;background:#aaaaaa;}
+div.popupmenu{display:none;background:#eeeeee;color:#333;font-size:110%;font-weight:bold;font-style:normal;white-space:nowrap;position:absolute;z-index:20000;border:solid #aaaaaa 1px;padding:3px 0;-moz-border-radius:0.5em;-webkit-border-radius:0.5em;border-radius:0.5em;user-select:none;-moz-user-select:none;-webkit-user-select:none;}
+div.popupmenu-item{padding:3px 1em;cursor:pointer;}
+div.popupmenu-item:hover{background:#aaaaaa;}
+.popup-arrow{font-size:80%;cursor:pointer;text-decoration:none;color:#555
+}
+
+.popup-arrow:hover {
+ color: black;}
+div.permissionContainer{padding-left:20px;}
+.grid-header{padding-bottom:1em;}
+.grid-header h2{margin:0;margin-bottom:0.5em;}
+.grid-header .title{font-weight:bold;}
+.grid{padding-top:1em;border-collapse:collapse;width:100%;}
+.grid tbody td{border-top:solid #DDDDDD 1px;border-bottom:solid #DDDDDD 1px;padding:0.5em 1em;}
+.grid tbody td:empty{padding:0;}
+.grid thead th{background:#ebd9b2;background-image:url(form_title_bg.png);background-repeat:repeat-x;background-position:top;border-top:solid #d8b365 1px;border-bottom:solid #d8b365 1px;padding:0.5em 1em;text-align:left;}
+.grid tfoot td{background-color:#F8F8F8;border-top:solid #DDDDDD 1px;border-bottom:solid #DDDDDD 1px;padding:0.5em 1em;}
+.grid .current{background-color:#EEEEFF;}
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/base_bg.png
Binary file static/june_2007_style/blue/base_bg.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/button_bar_bg_light.png
Binary file static/june_2007_style/blue/button_bar_bg_light.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/data_empty.png
Binary file static/june_2007_style/blue/data_empty.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/data_error.png
Binary file static/june_2007_style/blue/data_error.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/data_ok.png
Binary file static/june_2007_style/blue/data_ok.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/data_queued.png
Binary file static/june_2007_style/blue/data_queued.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/done_message_icon.png
Binary file static/june_2007_style/blue/done_message_icon.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/error_large.png
Binary file static/june_2007_style/blue/error_large.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/error_message_icon.png
Binary file static/june_2007_style/blue/error_message_icon.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/error_small.png
Binary file static/june_2007_style/blue/error_small.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/footer_title_bg.png
Binary file static/june_2007_style/blue/footer_title_bg.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/form_body_bg.png
Binary file static/june_2007_style/blue/form_body_bg.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/gray_bg.png
Binary file static/june_2007_style/blue/gray_bg.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/hgrad.png
Binary file static/june_2007_style/blue/hgrad.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/hgrad_over.png
Binary file static/june_2007_style/blue/hgrad_over.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/history.css
--- a/static/june_2007_style/blue/history.css Fri Jul 24 15:13:11 2009 -0400
+++ b/static/june_2007_style/blue/history.css Fri Jul 24 16:14:46 2009 -0400
@@ -1,1 +1,31 @@
-body{background:#C1C9E5;color:#303030;background-image:url(menu_bg.png);background-repeat:repeat-x;background-position:top;margin:5px;border:0;padding:0;}a{color:#base_text;}div.historyLinks{padding:5px;margin-top:5px;margin-bottom:5px;padding-right:5px;padding-left:5px;margin-bottom:5px;}div.historyItem{margin-right:-5px;margin-top:5px;margin-bottom:5px;padding:5px;padding-right:11px;border:solid #888 1px;border-left:solid #888 5px;border-right:none;background:#EEE;background-image:url(gray_bg.png);background-repeat:repeat-x;background-position:top;}div.historyItem div.historyItem{margin-right:-11px;}div.historyItem-ok{border-color:#6A6;background:#CFC;}div.historyItem-error,div.historyItem-empty{border-color:#A66;background:#FCC;}div.historyItem-running{border-color:#AA6;background:#FFC;}div.historyItem-upload{border-color:#66A;background:#CCF;}div.historyItem-noPermission{filter:alpha(opacity=60);-moz-opacity:.60;opacity:.60;}div.historyItemBody div{padding-top:2px;}pre.p
eek{background:white;color:black;width:100%;overflow:auto;}pre.peek th{color:white;background:#023858;}
\ No newline at end of file
+body{background:#C1C9E5;color:#303030;background-image:url(menu_bg.png);background-repeat:repeat-x;background-position:top;margin:5px;border:0;padding:0;}
+a{color:#base_text;}
+div.historyLinks{padding:5px;margin:5px 0 5px 0;}
+div.historyItem{margin:5px -5px 5px 0px;padding:5px 11px 5px 5px;border:solid #888888 1px;border-left:solid #888888 5px;border-right:none;background:#EEEEEE;}
+div.historyItem div.historyItemTitleBar{padding-left:20px;background-position:0 1px;background-repeat:no-repeat;}
+div.historyItem div.historyItem{margin-right:-11px;}
+div.historyItem-ok{border-color:#66AA66;background:#CCFFCC;}
+div.historyItem-ok div.historyItemTitleBar{padding-left:0;}
+div.historyItem-error{border-color:#AA6666;background:#FFCCCC;}
+div.historyItem-error div.historyItemTitleBar{background:url(history-states.png) no-repeat 0px -0px;}
+div.historyItem-empty{border-color:#AA6666;background:#FFCCCC;}
+div.historyItem-empty div.historyItemTitleBar{background:url(history-states.png) no-repeat 0px -25px;}
+div.historyItem-running{border-color:#AAAA66;background:#FFFFCC;}
+div.historyItem-running div.historyItemTitleBar{background-image:url(data_running.gif);}
+div.historyItem-upload{border-color:#6666AA;background:#CCCCFF;}
+div.historyItem-upload div.historyItemTitleBar{background-image:url(data_upload.gif);}
+div.historyItem-queued{background:#EEEEEE;}
+div.historyItem-queued div.historyItemTitleBar{background:url(history-states.png) no-repeat 0px -50px;}
+div.historyItem-noPermission{filter:alpha(opacity=60);-moz-opacity:.60;opacity:.60;}
+div.historyItemTitleBar.spinner{background:url(data_running.gif) 0 1px no-repeat !important;padding-left:20px !important;}
+div.historyItemButtons{float:right;}
+.icon-button{width:16px;height:16px;display:block;float:left;margin-left:2px;text-indent:20px;}
+.icon-button.display{background:url(history-buttons.png) no-repeat 0px -0px;}
+.icon-button.display:hover{background:url(history-buttons.png) no-repeat 0px -26px;}
+.icon-button.edit{background:url(history-buttons.png) no-repeat 0px -52px;}
+.icon-button.edit:hover{background:url(history-buttons.png) no-repeat 0px -78px;}
+.icon-button.delete{background:url(history-buttons.png) no-repeat 0px -104px;}
+.icon-button.delete:hover{background:url(history-buttons.png) no-repeat 0px -130px;}
+div.historyItemBody div{padding-top:2px;}
+pre.peek{background:white;color:black;width:100%;overflow:auto;}
+pre.peek th{color:white;background:#023858;}
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/info_large.png
Binary file static/june_2007_style/blue/info_large.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/info_message_icon.png
Binary file static/june_2007_style/blue/info_message_icon.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/info_small.png
Binary file static/june_2007_style/blue/info_small.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/iphone.css
--- a/static/june_2007_style/blue/iphone.css Fri Jul 24 15:13:11 2009 -0400
+++ b/static/june_2007_style/blue/iphone.css Fri Jul 24 16:14:46 2009 -0400
@@ -1,1 +1,54 @@
-body{margin:0;font-family:Helvetica;background:#FFF;color:#000;overflow-x:hidden;-webkit-user-select:none;-webkit-text-size-adjust:none;}body>*:not(.toolbar){display:none;position:absolute;margin:0;padding:0;left:0;width:100%;min-height:372px;}body[orient="landscape"]>*:not(.toolbar){min-height:268px;}body>*[selected="true"]{display:block;}a[selected],a:active{background-color:#194fdb!important;background-image:url(../iui/listArrowSel.png),url(../iui/selection.png)!important;background-repeat:no-repeat,repeat-x;background-position:right center,left top;color:#FFF!important;}a[selected="progress"]{background-image:url(../iui/loading.gif),url(../iui/selection.png)!important;}body>.toolbar{position:relative;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;border-bottom:1px solid #2d3642;padding:10px;height:45px;background:url(../iui/toolbar.png) #6d84a2 repeat-x;}.toolbar>h1{position:absolute;overflow:hidden;left:50%;margin:1px 0 0 -75px;height:45p
x;font-size:20px;width:150px;font-weight:bold;text-shadow:rgba(0,0,0,0.4) 0 -1px 0;text-align:center;text-overflow:ellipsis;white-space:nowrap;color:#FFF;}body[orient="landscape"]>.toolbar>h1{margin-left:-125px;width:250px;}body>.toolbar.masthead{background:#2C3143 repeat-x;}body>.toolbar.masthead>h1{left:0;margin-left:0;width:100%;}.button{position:absolute;overflow:hidden;top:8px;right:6px;margin:0;border-width:0 5px;padding:0 3px;width:auto;height:30px;line-height:30px;font-family:inherit;font-size:12px;font-weight:bold;color:#FFF;text-shadow:rgba(0,0,0,0.6) 0 -1px 0;text-overflow:ellipsis;text-decoration:none;white-space:nowrap;background:none;-webkit-border-image:url(../iui/toolButton.png) 0 5 0 5;}.blueButton{-webkit-border-image:url(../iui/blueButton.png) 0 5 0 5;border-width:0 5px;}.leftButton{left:6px;right:auto;}#backButton{display:none;left:6px;right:auto;padding:0;max-width:55px;border-width:0 8px 0 14px;-webkit-border-image:url(../iui/backButton.png) 0 8 0 14;}.
whiteButton,.grayButton{display:block;border-width:0 12px;padding:10px;text-align:center;font-size:20px;font-weight:bold;text-decoration:inherit;color:inherit;}.whiteButton{-webkit-border-image:url(../iui/whiteButton.png) 0 12 0 12;text-shadow:rgba(255,255,255,0.7) 0 1px 0;}.grayButton{-webkit-border-image:url(../iui/grayButton.png) 0 12 0 12;color:#FFF;}body>ul>li{position:relative;margin:0;border-bottom:1px solid #E0E0E0;padding:8px 0 8px 10px;font-size:20px;font-weight:bold;list-style:none;}body>ul>li.group{position:relative;top:-1px;margin-bottom:-2px;border-top:1px solid #7d7d7d;border-bottom:1px solid #999;padding:1px 10px;background:url(../iui/listGroup.png) repeat-x;font-size:17px;font-weight:bold;text-shadow:rgba(0,0,0,0.4) 0 1px 0;color:#FFF;}body>ul>li.group:first-child{top:0;border-top:none;}body>ul>li>a{display:block;margin:-8px 0 -8px -10px;padding:8px 32px 8px 10px;text-decoration:none;color:inherit;background:url(../iui/listArrow.png) no-repeat right center;}
a[target="_replace"]{box-sizing:border-box;-webkit-box-sizing:border-box;padding-top:25px;padding-bottom:25px;font-size:18px;color:cornflowerblue;background-color:#FFF;background-image:none;}body>.dialog{top:0;width:100%;min-height:417px;z-index:2;background:rgba(0,0,0,0.8);padding:0;text-align:right;}.dialog>fieldset{box-sizing:border-box;-webkit-box-sizing:border-box;width:100%;margin:0;border:none;border-top:1px solid #6d84a2;padding:10px 6px;background:url(../iui/toolbar.png) #7388a5 repeat-x;}.dialog>fieldset>h1{margin:0 10px 0 10px;padding:0;font-size:20px;font-weight:bold;color:#FFF;text-shadow:rgba(0,0,0,0.4) 0 -1px 0;text-align:center;}.dialog>fieldset>label{position:absolute;margin:16px 0 0 6px;font-size:14px;color:#999;}input:not(input[type|=radio]):not(input[type|=checkbox]){box-sizing:border-box;-webkit-box-sizing:border-box;width:100%;margin:8px 0 0 0;padding:6px 6px 6px 44px;font-size:16px;font-weight:normal;}body>.panel{box-sizing:border-box;-moz-box-sizing:b
order-box;-webkit-box-sizing:border-box;padding:10px;background:#c8c8c8 url(../iui/pinstripes.png);}.panel>fieldset{position:relative;margin:0 0 20px 0;padding:0;background:#FFF;-webkit-border-radius:10px;-moz-border-radius:10px;border:1px solid #999;text-align:right;font-size:16px;}.row{position:relative;min-height:42px;border-bottom:1px solid #999;-webkit-border-radius:0;text-align:right;overflow:hidden;text-overflow:ellipsis;}fieldset>.row:last-child{border-bottom:none!important;}.row>input:not(input[type|=radio]):not(input[type|=checkbox]){box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;margin:0;border:none;padding:12px 10px 0 110px;height:42px;background:none;}.row>input[type|=radio],.row>input[type|=checkbox]{margin:7px 7px 0 0;height:25px;width:25px;}.row>label{position:absolute;margin:0 0 0 14px;line-height:42px;font-weight:bold;}.row>a{font-weight:bold;text-align:left;display:block;padding:8px 32px 8px 14px;text-decoration:none;color:i
nherit;background:url(../iui/listArrow.png) no-repeat right center;}.row>.error{height:25px;text-align:left;font-size:14px;padding:0 0 0 110px;color:red;}.row>span{position:absolute;padding:12px 10px 0 110px;margin:0;}.row>.toggle{position:absolute;top:6px;right:6px;width:100px;height:28px;}.toggle{border:1px solid #888;-webkit-border-radius:6px;background:#FFF url(../iui/toggle.png) repeat-x;font-size:19px;font-weight:bold;line-height:30px;}.toggle[toggled="true"]{border:1px solid #143fae;background:#194fdb url(../iui/toggleOn.png) repeat-x;}.toggleOn{display:none;position:absolute;width:60px;text-align:center;left:0;top:0;color:#FFF;text-shadow:rgba(0,0,0,0.4) 0 -1px 0;}.toggleOff{position:absolute;width:60px;text-align:center;right:0;top:0;color:#666;}.toggle[toggled="true"]>.toggleOn{display:block;}.toggle[toggled="true"]>.toggleOff{display:none;}.thumb{position:absolute;top:-1px;left:-1px;width:40px;height:28px;border:1px solid #888;-webkit-border-radius:6px;background:
#fff url(../iui/thumb.png) repeat-x;}.toggle[toggled="true"]>.thumb{left:auto;right:-1px;}.panel>h2{margin:0 0 8px 14px;font-size:inherit;font-weight:bold;color:#4d4d70;text-shadow:rgba(255,255,255,0.75) 2px 2px 0;}#preloader{display:none;background-image:url(loading.gif),url(selection.png),url(blueButton.png),url(listArrowSel.png),url(listGroup.png);}.state-color-queued{background:#EEE;}.state-color-ok{background:#CFC;}.state-color-error{background:#FCC;}.state-color-running{background:#FFC;}
\ No newline at end of file
+body{margin:0;font-family:Helvetica;background:#FFFFFF;color:#000000;overflow-x:hidden;-webkit-user-select:none;-webkit-text-size-adjust:none;}
+body > *:not(.toolbar){display:none;position:absolute;margin:0;padding:0;left:0;width:100%;min-height:372px;}
+body[orient="landscape"] > *:not(.toolbar){min-height:268px;}
+body > *[selected="true"]{display:block;}
+a[selected],a:active{background-color:#194fdb !important;background-image:url(../iui/listArrowSel.png), url(../iui/selection.png) !important;background-repeat:no-repeat, repeat-x;background-position:right center, left top;color:#FFFFFF !important;}
+a[selected="progress"]{background-image:url(../iui/loading.gif), url(../iui/selection.png) !important;}
+body > .toolbar{position:relative;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;border-bottom:1px solid #2d3642;padding:10px;height:45px;background:url(../iui/toolbar.png) #6d84a2 repeat-x;}
+.toolbar > h1{position:absolute;overflow:hidden;left:50%;margin:1px 0 0 -75px;height:45px;font-size:20px;width:150px;font-weight:bold;text-shadow:rgba(0, 0, 0, 0.4) 0px -1px 0;text-align:center;text-overflow:ellipsis;white-space:nowrap;color:#FFFFFF;}
+body[orient="landscape"] > .toolbar > h1{margin-left:-125px;width:250px;}
+body > .toolbar.masthead{background:#2C3143 repeat-x;}
+body > .toolbar.masthead > h1{left:0;margin-left:0;width:100%;}
+.button{position:absolute;overflow:hidden;top:8px;right:6px;margin:0;border-width:0 5px;padding:0 3px;width:auto;height:30px;line-height:30px;font-family:inherit;font-size:12px;font-weight:bold;color:#FFFFFF;text-shadow:rgba(0, 0, 0, 0.6) 0px -1px 0;text-overflow:ellipsis;text-decoration:none;white-space:nowrap;background:none;-webkit-border-image:url(../iui/toolButton.png) 0 5 0 5;}
+.blueButton{-webkit-border-image:url(../iui/blueButton.png) 0 5 0 5;border-width:0 5px;}
+.leftButton{left:6px;right:auto;}
+#backButton{display:none;left:6px;right:auto;padding:0;max-width:55px;border-width:0 8px 0 14px;-webkit-border-image:url(../iui/backButton.png) 0 8 0 14;}
+.whiteButton,.grayButton{display:block;border-width:0 12px;padding:10px;text-align:center;font-size:20px;font-weight:bold;text-decoration:inherit;color:inherit;}
+.whiteButton{-webkit-border-image:url(../iui/whiteButton.png) 0 12 0 12;text-shadow:rgba(255, 255, 255, 0.7) 0 1px 0;}
+.grayButton{-webkit-border-image:url(../iui/grayButton.png) 0 12 0 12;color:#FFFFFF;}
+body > ul > li{position:relative;margin:0;border-bottom:1px solid #E0E0E0;padding:8px 0 8px 10px;font-size:20px;font-weight:bold;list-style:none;}
+body > ul > li.group{position:relative;top:-1px;margin-bottom:-2px;border-top:1px solid #7d7d7d;border-bottom:1px solid #999999;padding:1px 10px;background:url(../iui/listGroup.png) repeat-x;font-size:17px;font-weight:bold;text-shadow:rgba(0, 0, 0, 0.4) 0 1px 0;color:#FFFFFF;}
+body > ul > li.group:first-child{top:0;border-top:none;}
+body > ul > li > a{display:block;margin:-8px 0 -8px -10px;padding:8px 32px 8px 10px;text-decoration:none;color:inherit;background:url(../iui/listArrow.png) no-repeat right center;}
+a[target="_replace"]{box-sizing:border-box;-webkit-box-sizing:border-box;padding-top:25px;padding-bottom:25px;font-size:18px;color:cornflowerblue;background-color:#FFFFFF;background-image:none;}
+body > .dialog{top:0;width:100%;min-height:417px;z-index:2;background:rgba(0, 0, 0, 0.8);padding:0;text-align:right;}
+.dialog > fieldset{box-sizing:border-box;-webkit-box-sizing:border-box;width:100%;margin:0;border:none;border-top:1px solid #6d84a2;padding:10px 6px;background:url(../iui/toolbar.png) #7388a5 repeat-x;}
+.dialog > fieldset > h1{margin:0 10px 0 10px;padding:0;font-size:20px;font-weight:bold;color:#FFFFFF;text-shadow:rgba(0, 0, 0, 0.4) 0px -1px 0;text-align:center;}
+.dialog > fieldset > label{position:absolute;margin:16px 0 0 6px;font-size:14px;color:#999999;}
+input:not(input[type|=radio]):not(input[type|=checkbox]){box-sizing:border-box;-webkit-box-sizing:border-box;width:100%;margin:8px 0 0 0;padding:6px 6px 6px 44px;font-size:16px;font-weight:normal;}
+body > .panel{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:10px;background:#c8c8c8 url(../iui/pinstripes.png);}
+.panel > fieldset{position:relative;margin:0 0 20px 0;padding:0;background:#FFFFFF;-webkit-border-radius:10px;-moz-border-radius:10px;border:1px solid #999999;text-align:right;font-size:16px;}
+.row{position:relative;min-height:42px;border-bottom:1px solid #999999;-webkit-border-radius:0;text-align:right;overflow:hidden;text-overflow:ellipsis;}
+fieldset > .row:last-child{border-bottom:none !important;}
+.row > input:not(input[type|=radio]):not(input[type|=checkbox]){box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;margin:0;border:none;padding:12px 10px 0 110px;height:42px;background:none;}
+.row > input[type|=radio],.row > input[type|=checkbox]{margin:7px 7px 0 0;height:25px;width:25px;}
+.row > label{position:absolute;margin:0 0 0 14px;line-height:42px;font-weight:bold;}
+.row > a{font-weight:bold;text-align:left;display:block;padding:8px 32px 8px 14px;text-decoration:none;color:inherit;background:url(../iui/listArrow.png) no-repeat right center;}
+.row > .error{height:25px;text-align:left;font-size:14px;padding:0 0 0 110px;color:red;}
+.row > span{position:absolute;padding:12px 10px 0 110px;margin:0;}
+.row > .toggle{position:absolute;top:6px;right:6px;width:100px;height:28px;}
+.toggle{border:1px solid #888888;-webkit-border-radius:6px;background:#FFFFFF url(../iui/toggle.png) repeat-x;font-size:19px;font-weight:bold;line-height:30px;}
+.toggle[toggled="true"]{border:1px solid #143fae;background:#194fdb url(../iui/toggleOn.png) repeat-x;}
+.toggleOn{display:none;position:absolute;width:60px;text-align:center;left:0;top:0;color:#FFFFFF;text-shadow:rgba(0, 0, 0, 0.4) 0px -1px 0;}
+.toggleOff{position:absolute;width:60px;text-align:center;right:0;top:0;color:#666666;}
+.toggle[toggled="true"] > .toggleOn{display:block;}
+.toggle[toggled="true"] > .toggleOff{display:none;}
+.thumb{position:absolute;top:-1px;left:-1px;width:40px;height:28px;border:1px solid #888888;-webkit-border-radius:6px;background:#ffffff url(../iui/thumb.png) repeat-x;}
+.toggle[toggled="true"] > .thumb{left:auto;right:-1px;}
+.panel > h2{margin:0 0 8px 14px;font-size:inherit;font-weight:bold;color:#4d4d70;text-shadow:rgba(255, 255, 255, 0.75) 2px 2px 0;}
+#preloader{display:none;background-image:url(loading.gif), url(selection.png),
+ url(blueButton.png), url(listArrowSel.png), url(listGroup.png);}
+.state-color-queued{background:#EEEEEE;}
+.state-color-ok{background:#CCFFCC;}
+.state-color-error{background:#FFCCCC;}
+.state-color-running{background:#FFFFCC;}
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/layout_callout_top.png
Binary file static/june_2007_style/blue/layout_callout_top.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/library.css
--- a/static/june_2007_style/blue/library.css Fri Jul 24 15:13:11 2009 -0400
+++ b/static/june_2007_style/blue/library.css Fri Jul 24 16:14:46 2009 -0400
@@ -1,1 +1,15 @@
-.libraryRow{background-color:#d2c099;}.datasetHighlighted{background-color:#C1C9E5;}.libraryItemDeleted-True{font-style:italic;}div.historyItemBody{padding:4px 4px 2px 4px;}li.folderRow,li.datasetRow{border-top:solid 1px #ddd;}li.folderRow:hover,li.datasetRow:hover{background-color:#C1C9E5;}img.expanderIcon{padding-right:4px;}input.datasetCheckbox,li,ul{padding:0;margin:0;}.rowTitle{padding:2px;}ul{list-style:none;}.libraryTitle th{text-align:left;}pre.peek{background:white;color:black;width:100%;overflow:auto;}pre.peek th{color:white;background:#023858;}a.expandLink{text-decoration:none;}span.expandLink{width:100%;height:100%;display:block;}
\ No newline at end of file
+.libraryRow{background-color:#d2c099;}
+.datasetHighlighted{background-color:#C1C9E5;}
+.libraryItemDeleted-True{font-style:italic;}
+div.historyItemBody{padding:4px 4px 2px 4px;}
+li.folderRow,li.datasetRow{border-top:solid 1px #ddd;}
+li.folderRow:hover,li.datasetRow:hover{background-color:#C1C9E5;}
+img.expanderIcon{padding-right:4px;}
+input.datasetCheckbox,li,ul{padding:0;margin:0;}
+.rowTitle{padding:2px;}
+ul{list-style:none;}
+.libraryTitle th{text-align:left;}
+pre.peek{background:white;color:black;width:100%;overflow:auto;}
+pre.peek th{color:white;background:#023858;}
+a.expandLink{text-decoration:none;}
+span.expandLink{width:100%;height:100%;display:block;}
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/masthead.css
--- a/static/june_2007_style/blue/masthead.css Fri Jul 24 15:13:11 2009 -0400
+++ b/static/june_2007_style/blue/masthead.css Fri Jul 24 16:14:46 2009 -0400
@@ -1,1 +1,8 @@
-body{background:#2C3143 url(masthead_bg.png) bottom;color:#eee;padding:0;border:0;margin:3px;margin-right:5px;margin-left:5px;overflow:hidden;}div.pageTitle{font-size:175%;font-weight:bold;}div.pageTitle a:link,div.pageTitle a:visited,div.pageTitle a:active,div.pageTitle a:hover{text-decoration:none;}a:link,a:visited,a:active{color:#eee;}#tab-bar-bottom{z-index:-1;position:absolute;top:27px;left:0;width:100%;height:100%;background:#222532;}span.link-group{margin:0;padding:0;display:inline;padding-bottom:10px;margin-bottom:-10px;}span.link-group span{margin:0;padding:0;display:inline;}span.link-group span.active-link{background:#222532;padding-left:3px;padding-right:3px;margin-left:-3px;margin-right:-3px;padding-bottom:10px;margin-bottom:-10px;}
\ No newline at end of file
+body{background:#2C3143 url(masthead_bg.png) bottom;color:#eeeeee;padding:0;border:0;margin:3px;margin-right:5px;margin-left:5px;overflow:hidden;}
+div.pageTitle{font-size:175%;font-weight:bold;}
+div.pageTitle a:link,div.pageTitle a:visited,div.pageTitle a:active,div.pageTitle a:hover{text-decoration:none;}
+a:link,a:visited,a:active{color:#eeeeee;}
+#tab-bar-bottom{z-index:-1;position:absolute;top:27px;left:0;width:100%;height:100%;background:#222532;}
+span.link-group{margin:0;padding:0;display:inline;padding-bottom:10px;margin-bottom:-10px;}
+span.link-group span{margin:0;padding:0;display:inline;}
+span.link-group span.active-link{background:#222532;padding-left:3px;padding-right:3px;margin-left:-3px;margin-right:-3px;padding-bottom:10px;margin-bottom:-10px;}
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/masthead_bg.png
Binary file static/june_2007_style/blue/masthead_bg.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/ok_large.png
Binary file static/june_2007_style/blue/ok_large.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/ok_small.png
Binary file static/june_2007_style/blue/ok_small.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/panel_header_bg.png
Binary file static/june_2007_style/blue/panel_header_bg.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/panel_layout.css
--- a/static/june_2007_style/blue/panel_layout.css Fri Jul 24 15:13:11 2009 -0400
+++ b/static/june_2007_style/blue/panel_layout.css Fri Jul 24 16:14:46 2009 -0400
@@ -1,1 +1,50 @@
-body,html{overflow:hidden;margin:0;padding:0;width:100%;height:100%;}body{font:75% verdana,"Bitstream Vera Sans",geneva,arial,helvetica,helve,sans-serif;background:#eee;}#background{position:absolute;background:#eee;z-index:-1;top:0;left:0;margin:0;padding:0;width:100%;height:100%;}#messagebox{position:absolute;top:33px;left:0;width:100%;height:24px!important;overflow:hidden;border-bottom:solid #999 1px;font-size:90%;}#left,#left-border,#center,#right-border,#right{position:absolute;top:39px;bottom:0;overflow:hidden;background:#fff;}#left,#center,#right{border-top:solid #999 1px;}#left-border,#right-border{background:#eee;border-left:solid #999 1px;border-right:solid #999 1px;padding-right:1px;padding-left:1px;width:5px;z-index:10000;}#left-border div,#right-border div{width:100%;height:100%;background-repeat:no-repeat;background-position:center center;position:absolute;width:5px;height:100%;}#left-border div,#right-border.hidden div{background-image:url(tiny_arrow_left.png)
;cursor:w-resize;}#left-border.hidden div,#right-border div{background-image:url(tiny_arrow_right.png);cursor:e-resize;}#left-border.hover div,#right-border.hover div{background-color:#AAE;}#left{left:0;width:250px;z-index:200;}#left-border{left:250px;}#center{left:259px;right:259px;overflow:hidden;z-index:1;}#right-border{right:250px;}#right{width:250px;right:0;z-index:200;}.unified-panel-header{height:2em;z-index:1000;background:#ccc;background-image:url(panel_header_bg.png);background-position:top center;background-repeat:repeat-x;border-bottom:solid #999 1px;margin:0;padding:0;padding-right:10px;padding-left:10px;color:#333;font-weight:bold;}.unified-panel-header-inner{padding-top:.45em;}.menu-bg{background:#C1C9E5 url(menu_bg.png) top repeat-x;}div.unified-panel-body{position:absolute;top:2em;bottom:0;width:100%;margin-top:1px;}.panel-header-button{color:#333;text-decoration:none;display:inline-block;cursor:pointer;margin:-1px;padding:1px;border:0;padding-right:.5em;pad
ding-left:.5em;-moz-border-radius:.5em;-webkit-border-radius:.5em;border-radius:.5em;background:transparent;}.panel-header-button:hover{color:black;background:#aaa;}.panel-header-button:active{color:white;background:#aaa;}#overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:20000;}.dialog-box-container{position:relative;margin-top:80px;margin-right:auto;margin-left:auto;}.dialog-box-wrapper{position:relative;padding:1em;background-color:rgba(0,0,0,0.5);-moz-border-radius:1em;-webkit-border-radius:1em;}.dialog-box{border:solid #999 1px;background:white;min-width:230px;z-index:80000;}.dialog-box .body,.dialog-box .buttons{padding:5px;}.panel-error-message,.panel-warning-message,.panel-done-message,.panel-info-message{height:24px;line-height:24px;color:#303030;padding:0;padding-left:26px;background-color:#FCC;background-image:url(error_small.png);background-repeat:no-repeat;background-position:6px 50%;}.panel-warning-message{background-image:url(warn_small.png);b
ackground-color:#FFC;}.panel-done-message{background-image:url(done_small.png);background-color:#CFC;}.panel-info-message{background-image:url(info_small.png);background-color:#CCF;}#masthead{position:absolute;top:0;left:0;width:100%;height:32px;background:#2C3143;color:#fff;border-bottom:solid #444 1px;z-index:15000;padding:0;}#masthead a{color:#eee;}#masthead .title{padding:3px 10px;font-size:175%;font-weight:bold;}#masthead a{text-decoration:none;}#masthead a:hover{text-decoration:underline;}.tab-group{margin:0;padding:0 10px;height:100%;white-space:nowrap;cursor:default;user-select:none;-moz-user-select:none;-webkit-user-select:none;}.tab-group .tab{background:#2C3143;position:relative;float:left;margin:0;padding:0 1em;height:32px;line-height:32px;text-align:left;}.tab-group .tab:hover>a{color:gold!important;}.tab-group .active{background:#010101;}.tab-group .tab .submenu{display:none;position:absolute;z-index:16000;left:0;top:32px;padding:1em;margin:-1em;padding-top:0;m
argin-top:0;background-color:rgba(0,0,0,0.5);-moz-border-radius:0 0 1em 1em;-webkit-border-bottom-right-radius:1em;-webkit-border-bottom-left-radius:1em;}.tab-group .tab .submenu ul{display:block;margin:0;padding:0;list-style-type:none;background:#2C3143;}.tab-group .tab .submenu ul li{display:block;padding:0 1em;white-space:nowrap;}
\ No newline at end of file
+body{font:13px/1.231 verdana,arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}
+select,input,button,textarea,button{font:99% verdana,arial,helvetica,clean,sans-serif;}
+table{font-size:inherit;font:100%;}
+pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}
+body{font-size:75%;}
+body,html{overflow:hidden;margin:0;padding:0;width:100%;height:100%;}
+body{font:75% verdana, "Bitstream Vera Sans", geneva, arial, helvetica, helve, sans-serif;background:#eee;}
+.unselectable{user-select:none;-moz-user-select:none;-webkit-user-select:none;}
+#background{position:absolute;background:#eee;z-index:-1;top:0;left:0;margin:0;padding:0;width:100%;height:100%;}
+#messagebox{position:absolute;top:33px;left:0;width:100%;height:24px !important;overflow:hidden;border-bottom:solid #999 1px;font-size:90%;}
+#left,#left-border,#center,#right-border,#right{position:absolute;top:39px;bottom:0px;overflow:hidden;background:#fff;}
+#left,#center,#right{border-top:solid #999 1px;}
+#left-border,#right-border{background:#eeeeee;border-left:solid #999 1px;border-right:solid #999 1px;padding-right:1px;padding-left:1px;width:5px;z-index:10000;}
+#left-border div,#right-border div{width:100%;height:100%;background-repeat:no-repeat;background-position:center center;position:absolute;width:5px;height:100%;}
+#left-border div,#right-border.hidden div{background-image:url(tiny_arrow_left.png);cursor:w-resize;}
+#left-border.hidden div,#right-border div{background-image:url(tiny_arrow_right.png);cursor:e-resize;}
+#left-border.hover div,#right-border.hover div{background-color:#AAAAEE;}
+#left{left:0px;width:250px;z-index:200;}
+#left-border{left:250px;}
+#center{left:259px;right:259px;overflow:hidden;z-index:1;}
+#right-border{right:250px;}
+#right{width:250px;right:0px;z-index:200;}
+.unified-panel-header{height:2em;z-index:1000;background:#cccccc;background-image:url(panel_header_bg.png);background-position:top center;background-repeat:repeat-x;border-bottom:solid #999 1px;margin:0;padding:0;padding-right:10px;padding-left:10px;color:#333;font-weight:bold;}
+.unified-panel-header-inner{padding-top:0.45em;}
+.menu-bg{background:#C1C9E5 url(menu_bg.png) top repeat-x;}
+div.unified-panel-body{position:absolute;top:2em;bottom:0;width:100%;margin-top:1px;}
+.panel-header-button{color:#333;text-decoration:none;display:inline-block;cursor:pointer;margin:-1px;padding:1px;border:0px;padding-right:0.5em;padding-left:0.5em;-moz-border-radius:0.5em;-webkit-border-radius:0.5em;border-radius:0.5em;background:transparent;}
+.panel-header-button:hover{color:black;background:#aaaaaa;}
+.panel-header-button:active{color:white;background:#aaaaaa;}
+#overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:20000;}
+.dialog-box-container{position:relative;margin-top:80px;margin-right:auto;margin-left:auto;}
+.dialog-box-wrapper{position:relative;padding:1em;background-color:rgba(0,0,0,0.5);-moz-border-radius:1em;-webkit-border-radius:1em;}
+.dialog-box{border:solid #999 1px;background:white;min-width:230px;z-index:80000;}
+.dialog-box .body,.dialog-box .buttons{padding:5px;}
+.panel-error-message,.panel-warning-message,.panel-done-message,.panel-info-message{height:24px;line-height:24px;color:#303030;padding:0px;padding-left:26px;background-color:#FFCCCC;background-image:url(error_small.png);background-repeat:no-repeat;background-position:6px 50%;}
+.panel-warning-message{background-image:url(warn_small.png);background-color:#FFFFCC;}
+.panel-done-message{background-image:url(done_small.png);background-color:#CCFFCC;}
+.panel-info-message{background-image:url(info_small.png);background-color:#CCCCFF;}
+#masthead{position:absolute;top:0;left:0;width:100%;height:32px;background:#2C3143;color:#fff;border-bottom:solid #444 1px;z-index:15000;padding:0;}
+#masthead a{color:#eeeeee;}
+#masthead .title{padding:3px 10px;font-size:175%;font-weight:bold;}
+#masthead a{text-decoration:none;}
+#masthead a:hover{text-decoration:underline;}
+.tab-group{margin:0;padding:0 10px;height:100%;white-space:nowrap;cursor:default;background:transparent;}
+.tab-group .tab{background:#2C3143;position:relative;float:left;margin:0;padding:0 1em;height:32px;line-height:32px;text-align:left;}
+.tab-group .tab .submenu{display:none;position:absolute;z-index:16000;left:0;top:32px;padding:1em;margin:-1em;padding-top:0;margin-top:0;background-color:rgba(0,0,0,0.5);-moz-border-radius:0 0 1em 1em;-webkit-border-bottom-right-radius:1em;-webkit-border-bottom-left-radius:1em;}
+.tab-group .tab .submenu ul{display:block;margin:0;padding:0;list-style-type:none;background:#2C3143;}
+.tab-group .tab .submenu ul li{display:block;padding:0 1em;white-space:nowrap;}
+.tab-group .tab:hover > a{color:gold !important;}
+.tab-group .active{background:rgb(1,1,1);}
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/popupmenu_callout_top.png
Binary file static/june_2007_style/blue/popupmenu_callout_top.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/reset.css
--- a/static/june_2007_style/blue/reset.css Fri Jul 24 15:13:11 2009 -0400
+++ b/static/june_2007_style/blue/reset.css Fri Jul 24 16:14:46 2009 -0400
@@ -1,1 +1,4 @@
-body{font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}select,input,button,textarea{font:99% arial,helvetica,clean,sans-serif;}table{font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}
\ No newline at end of file
+body{font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}
+select,input,button,textarea{font:99% arial,helvetica,clean,sans-serif;}
+table{font-size:inherit;font:100%;}
+pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/tiny_arror_right.png
Binary file static/june_2007_style/blue/tiny_arror_right.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/tiny_arrow_left.png
Binary file static/june_2007_style/blue/tiny_arrow_left.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/tiny_arrow_right.png
Binary file static/june_2007_style/blue/tiny_arrow_right.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/tool_menu.css
--- a/static/june_2007_style/blue/tool_menu.css Fri Jul 24 15:13:11 2009 -0400
+++ b/static/june_2007_style/blue/tool_menu.css Fri Jul 24 16:14:46 2009 -0400
@@ -1,1 +1,9 @@
-body{background:white;color:#303030;background:#C1C9E5 url(menu_bg.png) top repeat-x;margin:5px;margin-right:10px;margin-left:10px;}hr{border:none;height:0;margin-top:0;}div.toolSectionPad{margin:0;padding:0;height:5px;font-size:0;}div.toolSectionDetailsInner{margin-left:5px;margin-right:5px;}div.toolSectionTitle{font-weight:bold;}div.toolPanelLabel{padding-top:10px;padding-bottom:5px;font-weight:bold;color:gray;text-transform:uppercase;}div.toolTitle{padding-top:5px;padding-bottom:5px;margin-left:16px;margin-right:10px;display:list-item;list-style:square outside;}div.toolSectionBody div.toolPanelLabel{padding-top:5px;padding-bottom:5px;margin-left:16px;margin-right:10px;display:list-item;list-style:none outside;}div.toolTitleNoSection{padding-bottom:0;}
\ No newline at end of file
+body{background:white;color:#303030;background:#C1C9E5 url(menu_bg.png) top repeat-x;margin:5px;margin-right:10px;margin-left:10px;}
+hr{border:none;height:0px;margin-top:0px;}
+div.toolSectionPad{margin:0;padding:0;height:5px;font-size:0px;}
+div.toolSectionDetailsInner{margin-left:5px;margin-right:5px;}
+div.toolSectionTitle{font-weight:bold;}
+div.toolPanelLabel{padding-top:10px;padding-bottom:5px;font-weight:bold;color:gray;text-transform:uppercase;}
+div.toolTitle{padding-top:5px;padding-bottom:5px;margin-left:16px;margin-right:10px;display:list-item;list-style:square outside;}
+div.toolSectionBody div.toolPanelLabel{padding-top:5px;padding-bottom:5px;margin-left:16px;margin-right:10px;display:list-item;list-style:none outside;}
+div.toolTitleNoSection{padding-bottom:0px;}
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/wait_large.png
Binary file static/june_2007_style/blue/wait_large.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/wait_small.png
Binary file static/june_2007_style/blue/wait_small.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/warn_large.png
Binary file static/june_2007_style/blue/warn_large.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/warn_message_icon.png
Binary file static/june_2007_style/blue/warn_message_icon.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/warn_small.png
Binary file static/june_2007_style/blue/warn_small.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/workflow_circle_drag.png
Binary file static/june_2007_style/blue/workflow_circle_drag.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/workflow_circle_green.png
Binary file static/june_2007_style/blue/workflow_circle_green.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/blue/workflow_circle_open.png
Binary file static/june_2007_style/blue/workflow_circle_open.png has changed
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/history.css.tmpl
--- a/static/june_2007_style/history.css.tmpl Fri Jul 24 15:13:11 2009 -0400
+++ b/static/june_2007_style/history.css.tmpl Fri Jul 24 16:14:46 2009 -0400
@@ -1,5 +1,4 @@
-body
-{
+body {
background: $menu_bg_over;
color: $base_text;
background-image: url(menu_bg.png);
@@ -10,108 +9,154 @@
padding: 0;
}
-a
-{
- color: #base_text;
+a {
+ color: $base_text;
}
-div.historyLinks
-{
+## Control links at top of history
+div.historyLinks {
padding: 5px;
- margin-top: 5px;
- margin-bottom: 5px;
- padding-right: 5px;
- padding-left: 5px;
- margin-bottom: 5px;
+ margin: 5px 0 5px 0;
}
-div.historyItem
-{
- margin-right: -5px;
- margin-top: 5px;
- margin-bottom: 5px;
- padding: 5px;
- padding-right: 11px;
-
+## Default history item appearend
+div.historyItem {
+ margin: 5px -5px 5px 0px;
+ padding: 5px 11px 5px 5px;
border: solid $history_queued_border 1px;
border-left: solid $history_queued_border 5px;
border-right: none;
background: $history_queued_bg;
- background-image: url(gray_bg.png);
- background-repeat: repeat-x;
- background-position: top;
+ div.historyItemTitleBar {
+ padding-left: 20px;
+ background-position: 0 1px;
+ background-repeat: no-repeat;
+ }
}
-div.historyItem div.historyItem
-{
+## Nested history items
+div.historyItem div.historyItem {
margin-right: -11px;
}
-div.historyItem-ok
-{
+## Change background/border color depending on state
+div.historyItem-ok {
border-color: $history_ok_border;
background: $history_ok_bg;
- /*
- background-image: url(ok_bg.png);
- background-repeat: repeat-x;
- background-position: top;
- */
+ div.historyItemTitleBar {
+ padding-left: 0;
+ }
+}
+div.historyItem-error {
+ border-color: $history_error_border;
+ background: $history_error_bg;
+ div.historyItemTitleBar {
+ -sprite-group: history-states;
+ -sprite-image: data_error.png;
+ }
}
-div.historyItem-error, div.historyItem-empty
-{
+div.historyItem-empty {
border-color: $history_error_border;
background: $history_error_bg;
- /*
- background-image: url(error_bg.png);
- background-repeat: repeat-x;
- background-position: top;
- */
+ div.historyItemTitleBar {
+ -sprite-group: history-states;
+ -sprite-image: data_empty.png;
+ }
}
-div.historyItem-running
-{
+div.historyItem-running {
border-color: $history_running_border;
background: $history_running_bg;
- /*
- background-image: url(warn_bg.png);
- background-repeat: repeat-x;
- background-position: top;
- */
+ div.historyItemTitleBar {
+ background-image: url(data_running.gif);
+ }
}
-div.historyItem-upload
-{
+div.historyItem-upload {
border-color: $history_upload_border;
background: $history_upload_bg;
+ div.historyItemTitleBar {
+ background-image: url(data_upload.gif);
+ }
}
-div.historyItem-noPermission
-{
+div.historyItem-queued {
+ background: $history_queued_bg;
+ div.historyItemTitleBar {
+ -sprite-group: history-states;
+ -sprite-image: data_queued.png;
+ }
+}
+
+div.historyItem-noPermission {
filter: alpha(opacity=60);
-moz-opacity: .60;
opacity: .60;
}
-div.historyItem-queued
-{
+## Special case for showing the spinner but not changing the background
+div.historyItemTitleBar.spinner {
+ background: url(data_running.gif) 0 1px no-repeat !important;
+ padding-left: 20px !important;
}
-div.historyItemBody div
-{
+## Buttons
+div.historyItemButtons {
+ float: right;
+}
+
+.icon-button {
+ width: 16px;
+ height: 16px;
+ display: block;
+ float: left;
+ margin-left: 2px;
+ ## Allow alt text for screen readers
+ text-indent: 20px;
+}
+
+.icon-button.display {
+ -sprite-group: history-buttons;
+ -sprite-image: eye_icon.png;
+}
+
+.icon-button.display:hover {
+ -sprite-group: history-buttons;
+ -sprite-image: eye_icon_dark.png;
+}
+
+.icon-button.edit {
+ -sprite-group: history-buttons;
+ -sprite-image: pencil_icon.png;
+}
+
+.icon-button.edit:hover {
+ -sprite-group: history-buttons;
+ -sprite-image: pencil_icon_dark.png;
+}
+
+.icon-button.delete {
+ -sprite-group: history-buttons;
+ -sprite-image: delete_icon.png;
+}
+
+.icon-button.delete:hover {
+ -sprite-group: history-buttons;
+ -sprite-image: delete_icon_dark.png;
+}
+
+div.historyItemBody div {
padding-top: 2px;
}
-pre.peek
-{
+pre.peek {
background: white;
color: black;
width: 100%;
overflow: auto;
+ th {
+ color: white;
+ background: $peek_table_header;
+ }
}
-
-pre.peek th
-{
- color: white;
- background: $peek_table_header;
-}
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/make_style.py
--- a/static/june_2007_style/make_style.py Fri Jul 24 15:13:11 2009 -0400
+++ b/static/june_2007_style/make_style.py Fri Jul 24 16:14:46 2009 -0400
@@ -57,33 +57,15 @@
# History icons
( "ok_small.png", "history_ok_bg", "data_ok.png" ),
( "error_small.png", "history_error_bg", "data_error.png" ),
- ( "wait_small.png", "history_queued_bg", "data_queued.png" ) ]
+ ( "wait_small.png", "history_queued_bg", "data_queued.png" ),
+]
vars, out_dir = sys.argv[1:]
-context = dict()
-for line in open( vars ):
- if line.startswith( '#' ):
- continue
- key, value = line.rstrip("\r\n").split( '=' )
- if value.startswith( '"' ) and value.endswith( '"' ):
- value = value[1:-1]
- context[key] = value
-
for input, output in templates:
print input ,"->", output
- out_fname = os.path.join( out_dir, output )
- temp_file = tempfile.NamedTemporaryFile()
- # Write processed template to temporary file
- print "Processing template..."
- temp_file.write( str( Template( file=input, searchList=[context] ) ) )
- temp_file.flush()
- # Compress CSS with YUI
- print "Compressing..."
- subprocess.call(
- "java -jar ../../scripts/yuicompressor.jar --type css %s -o %s" % ( temp_file.name, out_fname ),
- shell = True )
+ subprocess.call( "./process_css.py %s %s < %s > %s" % ( vars, out_dir, input, os.path.join( out_dir, output ) ), shell=True )
"""
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/panel_layout.css.tmpl
--- a/static/june_2007_style/panel_layout.css.tmpl Fri Jul 24 15:13:11 2009 -0400
+++ b/static/june_2007_style/panel_layout.css.tmpl Fri Jul 24 16:14:46 2009 -0400
@@ -1,26 +1,28 @@
-#set $unselectable = """
- user-select: none;
- -moz-user-select: none;
- -webkit-user-select: none;
-"""
+## Font settings from YUI + verdana
+body{font:13px/1.231 verdana,arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}select,input,button,textarea,button{font:99% verdana,arial,helvetica,clean,sans-serif;}table{font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}
+body{font-size:75%;}
-## Rules
-body, html
-{
+body, html {
overflow: hidden;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
-body
-{
+
+body {
font: 75% verdana, "Bitstream Vera Sans", geneva, arial, helvetica, helve, sans-serif;
background: ${layout_bg};
}
-#background
-{
+
+.unselectable {
+ user-select: none;
+ -moz-user-select: none;
+ -webkit-user-select: none;
+}
+
+#background {
position: absolute;
background: ${layout_bg};
z-index: -1;
@@ -32,8 +34,7 @@
height: 100%;
}
-#messagebox
-{
+#messagebox {
position:absolute;
top:33px;
left:0;
@@ -44,30 +45,25 @@
font-size: 90%;
}
-#left, #left-border, #center, #right-border, #right
-{
+#left, #left-border, #center, #right-border, #right {
position: absolute;
top: 39px;
bottom: 0px;
overflow: hidden;
background: #fff;
}
-#left, #center, #right
-{
+#left, #center, #right {
border-top: solid ${layout_border} 1px;
}
-#left-border, #right-border
-{
+#left-border, #right-border {
background: #eeeeee;
border-left: solid ${layout_border} 1px;
border-right: solid ${layout_border} 1px;
padding-right: 1px;
padding-left: 1px;
width: 5px;
- z-index: 10000;
-}
-#left-border div, #right-border div
-{
+ z-index: 10000; }
+#left-border div, #right-border div {
width: 100%;
height: 100%;
background-repeat: no-repeat;
@@ -76,43 +72,35 @@
width: 5px;
height: 100%;
}
-#left-border div, #right-border.hidden div
-{
+#left-border div, #right-border.hidden div {
background-image: url(tiny_arrow_left.png);
cursor: w-resize;
}
-#left-border.hidden div, #right-border div
-{
+#left-border.hidden div, #right-border div {
background-image: url(tiny_arrow_right.png);
cursor: e-resize;
}
-#left-border.hover div, #right-border.hover div
-{
+#left-border.hover div, #right-border.hover div {
background-color: ${layout_hover};
}
-#left
-{
+#left {
left: 0px;
width: 250px;
z-index: 200;
}
-#left-border
-{
+#left-border {
left: 250px;
}
-#center
-{
+#center {
left:259px;
right: 259px;
overflow: hidden;
z-index: 1;
}
-#right-border
-{
+#right-border {
right: 250px;
}
-#right
-{
+#right {
width: 250px;
right: 0px;
z-index: 200;
@@ -240,7 +228,7 @@
background-color: $info_message_bg;
}
-## ---- Masthead styles ----
+## Masthead
#masthead
{
@@ -280,66 +268,65 @@
## Tabs
-.tab-group
-{
+.tab-group {
+
margin: 0;
padding: 0 10px;
height: 100%;
white-space: nowrap;
cursor: default;
- ${unselectable}
+ background: transparent;
+
+ .tab {
+
+ background: ${masthead_bg};
+ position: relative;
+ float: left;
+ margin: 0;
+ padding: 0 1em;
+ height: 32px;
+ line-height: 32px;
+ text-align: left;
+
+ .submenu {
+
+ display: none;
+ position: absolute;
+ z-index: 16000;
+ left: 0;
+ top: 32px;
+ padding: 1em;
+ margin: -1em;
+ padding-top: 0;
+ margin-top: 0;
+ background-color: rgba(0,0,0,0.5);
+ -moz-border-radius: 0 0 1em 1em;
+ -webkit-border-bottom-right-radius: 1em;
+ -webkit-border-bottom-left-radius: 1em;
+
+ ul {
+
+ display: block;
+ margin: 0;
+ padding: 0;
+ list-style-type: none;
+ background: ${masthead_bg};
+
+ li {
+
+ display: block;
+ padding: 0 1em;
+ white-space: nowrap;
+ }
+ }
+ }
+ }
+
+ .tab:hover > a {
+ color: gold !important;
+ }
+
+ .active {
+ background: rgb(1,1,1);
+ }
}
-
-.tab-group .tab
-{
- background: ${masthead_bg};
- position: relative;
- float: left;
- margin: 0;
- padding: 0 1em;
- height: 32px;
- line-height: 32px;
- text-align: left;
-}
-
-.tab-group .tab:hover > a
-{
- color: gold !important;
-}
-
-.tab-group .active
-{
- background: rgb(1,1,1);
-}
-
-.tab-group .tab .submenu {
- display: none;
- position: absolute;
- z-index: 16000;
- left: 0;
- top: 32px;
- padding: 1em;
- margin: -1em;
- padding-top: 0;
- margin-top: 0;
- background-color: rgba(0,0,0,0.5);
- -moz-border-radius: 0 0 1em 1em;
- -webkit-border-bottom-right-radius: 1em;
- -webkit-border-bottom-left-radius: 1em;
-}
-
-.tab-group .tab .submenu ul
-{
- display: block;
- margin: 0;
- padding: 0;
- list-style-type: none;
- background: ${masthead_bg};
-}
-
-.tab-group .tab .submenu ul li
-{
- display: block;
- padding: 0 1em;
- white-space: nowrap;
-}
diff -r 0564441c5043 -r 3d4d44d7a275 static/june_2007_style/process_css.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/static/june_2007_style/process_css.py Fri Jul 24 16:14:46 2009 -0400
@@ -0,0 +1,236 @@
+#!/usr/bin/env python
+
+"""
+CSS processor for Galaxy style sheets. Supports the following features:
+
+- Nested rule definition
+- Mixins
+- Variable substitution in values
+
+"""
+
+import sys, string, os.path
+from pyparsing import *
+from galaxy.util.odict import odict
+import Image
+
+def cross_lists(*sets):
+ """
+ Return the cross product of the arguments
+ """
+ wheels = map(iter, sets)
+ digits = [it.next() for it in wheels]
+ while True:
+ yield digits[:]
+ for i in range(len(digits)-1, -1, -1):
+ try:
+ digits[i] = wheels[i].next()
+ break
+ except StopIteration:
+ wheels[i] = iter(sets[i])
+ digits[i] = wheels[i].next()
+ else:
+ break
+
+def build_stylesheet_parser():
+ """
+ Returns a PyParsing parser object for CSS
+ """
+
+ # Forward declerations for recursion
+ rule = Forward()
+
+ # Structural syntax, supressed from parser output
+ lbrace = Literal("{").suppress()
+ rbrace = Literal("}").suppress()
+ colon = Literal(":").suppress()
+ semi = Literal(";").suppress()
+
+ ident = Word( alphas + "_", alphanums + "_-" )
+
+ # Properties
+ prop_name = Word( alphas + "_-*", alphanums + "_-" )
+ prop_value = CharsNotIn( ";" ) # expand this as needed
+ property_def = Group( prop_name + colon + prop_value + semi ).setResultsName( "property_def" )
+
+ # Selectors
+ # Just match anything that looks like a selector, including element, class,
+ # id, attribute, and pseudoclass. Attributes are not handled properly (spaces,
+ # and even newlines in the quoted string are legal).
+ simple_selector = Word( alphanums + ".#*:()[]|=\"'_-" )
+ combinator = Literal( ">" ) | Literal( "+" )
+ selector = Group( simple_selector + ZeroOrMore( Optional( combinator ) + simple_selector ) )
+ selectors = Group( delimitedList( selector ) )
+
+ selector_mixin = Group( selector + semi ).setResultsName( "selector_mixin" )
+
+ # Rules
+ rule << Group( selectors +
+ lbrace +
+ Group( ZeroOrMore( property_def | rule | selector_mixin ) ) +
+ rbrace ).setResultsName( "rule" )
+
+ # A whole stylesheet
+ stylesheet = ZeroOrMore( rule )
+
+ # C-style comments should be ignored, as should "##" comments
+ stylesheet.ignore( cStyleComment )
+ stylesheet.ignore( "##" + restOfLine )
+
+ return stylesheet
+
+stylesheet_parser = build_stylesheet_parser()
+
+class CSSProcessor( object ):
+
+ def process( self, file, out, variables, image_dir ):
+ # Build parse tree
+ results = stylesheet_parser.parseFile( sys.stdin, parseAll=True )
+ # Expand rules (elimimate recursion and resolve mixins)
+ rules = self.expand_rules( results )
+ # Expand variables (inplace)
+ self.expand_variables( rules, variables )
+ # Do sprites
+ self.make_sprites( rules, image_dir )
+ # Print
+ self.print_rules( rules, out )
+
+ def expand_rules( self, parse_results ):
+ mixins = {}
+ rules = []
+ # Visitor for recursively expanding rules
+ def visitor( r, selector_prefixes ):
+ # Concatenate combinations and build list of expanded selectors
+ selectors = [ " ".join( s ) for s in r[0] ]
+ full_selector_list = selector_prefixes + [selectors]
+ full_selectors = []
+ for l in cross_lists( *full_selector_list ):
+ full_selectors.append( " ".join( l ) )
+ # Separate properties from recursively defined rules
+ properties = []
+ children = []
+ for dec in r[1]:
+ type = dec.getName()
+ if type == "property_def":
+ properties.append( dec )
+ elif type == "selector_mixin":
+ properties.extend( mixins[dec[0][0]] )
+ else:
+ children.append( dec )
+ rules.append( ( full_selectors, properties ) )
+ # Save by name for mixins (not smart enough to combine rules!)
+ for s in full_selectors:
+ mixins[ s ] = properties;
+ # Visit children
+ for child in children:
+ visitor( child, full_selector_list )
+ # Call at top level
+ for p in parse_results:
+ visitor( p, [] )
+ # Return the list of expanded rules
+ return rules
+
+ def expand_variables( self, rules, context ):
+ for selectors, properties in rules:
+ for p in properties:
+ p[1] = string.Template( p[1] ).substitute( context ).strip()
+
+ def make_sprites( self, rules, image_dir ):
+
+ pad = 10
+
+ class SpriteGroup():
+ def __init__( self, name ):
+ self.name = name
+ self.offset = 0
+ self.sprites = odict()
+ def add_or_get_sprite( self, fname ):
+ if fname in self.sprites:
+ return self.sprites[fname]
+ else:
+ sprite = self.sprites[fname] = Sprite( fname, self.offset )
+ self.offset += sprite.image.size[1] + pad
+ return sprite
+
+ class Sprite():
+ def __init__( self, fname, offset ):
+ self.fname = fname
+ self.image = Image.open( os.path.join( image_dir, fname ) )
+ self.offset = offset
+
+ sprite_groups = {}
+
+ for i in range( len( rules ) ):
+ properties = rules[i][1]
+ new_properties = []
+ # Find sprite properties (and remove them). Last takes precedence
+ sprite_group_name = None
+ sprite_filename = None
+ for name, value in properties:
+ if name == "-sprite-group":
+ sprite_group_name = value
+ elif name == "-sprite-image":
+ sprite_filename = value
+ else:
+ new_properties.append( ( name, value ) )
+ # If a sprite filename was found, deal with it...
+ if sprite_group_name and sprite_filename:
+ if sprite_group_name not in sprite_groups:
+ sprite_groups[sprite_group_name] = SpriteGroup( sprite_group_name )
+ sprite_group = sprite_groups[sprite_group_name]
+ sprite = sprite_group.add_or_get_sprite( sprite_filename )
+ new_properties.append( ( "background", "url(%s.png) no-repeat 0px -%dpx" % ( sprite_group.name, sprite.offset ) ) )
+ # Save changed properties
+ rules[i] = ( rules[i][0], new_properties )
+
+ # Generate new images
+ for group in sprite_groups.itervalues():
+ w = 0
+ h = 0
+ for sprite in group.sprites.itervalues():
+ sw, sh = sprite.image.size
+ w = max( w, sw )
+ h += sh + pad
+ master = Image.new( mode='RGBA', size=(w, h), color=(0,0,0,0) )
+ offset = 0
+ for sprite in group.sprites.itervalues():
+ master.paste( sprite.image, (0,offset) )
+ offset += sprite.image.size[1] + pad
+ master.save( os.path.join( image_dir, group.name + ".png" ) )
+
+ def print_rules( self, rules, file ):
+ for selectors, properties in rules:
+ file.write( ",".join( selectors ) )
+ file.write( "{" )
+ for name, value in properties:
+ file.write( "%s:%s;" % ( name, value ) )
+ file.write( "}\n" )
+
+def main():
+
+ # Read variable definitions from a (sorta) ini file
+ context = dict()
+ for line in open( sys.argv[1] ):
+ if line.startswith( '#' ):
+ continue
+ key, value = line.rstrip("\r\n").split( '=' )
+ if value.startswith( '"' ) and value.endswith( '"' ):
+ value = value[1:-1]
+ context[key] = value
+
+ image_dir = sys.argv[2]
+
+ try:
+
+ processor = CSSProcessor()
+ processor.process( sys.stdin, sys.stdout, context, image_dir )
+
+ except ParseException, e:
+
+ print >> sys.stderr, "Error:", e
+ print >> sys.stderr, e.markInputline()
+ sys.exit( 1 )
+
+
+if __name__ == "__main__":
+ main()
diff -r 0564441c5043 -r 3d4d44d7a275 templates/base_panels.mako
--- a/templates/base_panels.mako Fri Jul 24 15:13:11 2009 -0400
+++ b/templates/base_panels.mako Fri Jul 24 16:14:46 2009 -0400
@@ -20,7 +20,7 @@
## Default stylesheets
<%def name="stylesheets()">
- <link rel="stylesheet" type="text/css" href="${h.url_for('/static/style/reset.css')}" />
+ ## <link rel="stylesheet" type="text/css" href="${h.url_for('/static/style/reset.css')}" />
<link rel="stylesheet" type="text/css" href="${h.url_for('/static/style/panel_layout.css')}" />
<style type="text/css">
#center {
@@ -287,6 +287,7 @@
</head>
<body scroll="no" class="${self.body_class}">
+ <div id="everything" style="position: absolute; width: 100%; height: 100%; min-width: 960px; min-height: 400px;">
## Background displays first
<div id="background"></div>
## Layer iframes over backgrounds
@@ -316,6 +317,7 @@
${self.right_panel()}
</div>
%endif
+ </div>
## Allow other body level elements
</body>
## Scripts can be loaded later since they progressively add features to
diff -r 0564441c5043 -r 3d4d44d7a275 templates/root/history.mako
--- a/templates/root/history.mako Fri Jul 24 15:13:11 2009 -0400
+++ b/templates/root/history.mako Fri Jul 24 16:14:46 2009 -0400
@@ -13,17 +13,10 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Pragma" content="no-cache">
-<link href="${h.url_for('/static/style/base.css')}" rel="stylesheet" type="text/css" />
-<link href="${h.url_for('/static/style/history.css')}" rel="stylesheet" type="text/css" />
-## <!--[if lt IE 7]>
-## <script defer type="text/javascript" src="/static/scripts/ie_pngfix.js"></script>
-## <![endif]-->
-
-<script type="text/javascript" src="${h.url_for('/static/scripts/jquery.js')}"></script>
-<script type="text/javascript" src="${h.url_for('/static/scripts/jquery.cookie.js')}"></script>
-<script type="text/javascript" src="${h.url_for('/static/scripts/cookie_set.js')}"></script>
-
+${h.css( "base", "history" )}
+${h.js( "jquery", "jquery.cookie", "cookie_set" )}
+
<script type="text/javascript">
$( document ).ready( function() {
initShowHide();
@@ -86,7 +79,7 @@
//' Functionized so AJAX'd datasets can call them
// Get shown/hidden state from cookie
function initShowHide() {
- $( "div.historyItemBody" ).hide();
+ // $( "div.historyItemBody" ).hide();
// Load saved state and show as neccesary
var state = new CookieSet( "galaxy.history.expand_state" );
for ( id in state.store ) {
@@ -128,10 +121,10 @@
return false;
});
// Delete link
- $(this).find( "a.historyItemDelete" ).each( function() {
+ $(this).find( "div.historyItemButtons > .delete" ).each( function() {
var data_id = this.id.split( "-" )[1];
$(this).click( function() {
- $( '#progress-' + data_id ).show();
+ $( '#historyItem-' + data_id + "> div.historyItemTitleBar" ).addClass( "spinner" );
$.ajax({
url: "${h.url_for( action='delete_async', id='XXX' )}".replace( 'XXX', data_id ),
error: function() { alert( "Delete failed" ) },
@@ -157,7 +150,7 @@
$(this).find( "a.historyItemUndelete" ).each( function() {
var data_id = this.id.split( "-" )[1];
$(this).click( function() {
- $( '#progress-' + data_id ).show();
+ $( '#historyItem-' + data_id + " > div.historyItemTitleBar" ).addClass( "spinner" );
$.ajax({
url: "${h.url_for( controller='dataset', action='undelete_async', id='XXX' )}".replace( 'XXX', data_id ),
error: function() { alert( "Undelete failed" ) },
@@ -228,24 +221,19 @@
};
</script>
-<![if gte IE 7]>
-<script type="text/javascript">
- $( document ).ready( function() {
- // Add rollover effect to any image with a 'rollover' attribute
- preload_images = {}
- $( "img[rollover]" ).each( function() {
- var r = $(this).attr('rollover');
- var s = $(this).attr('src');
- preload_images[r] = true;
- $(this).hover(
- function() { $(this).attr( 'src', r ) },
- function() { $(this).attr( 'src', s ) }
- )
- })
- for ( r in preload_images ) { $( "<img>" ).attr( "src", r ) }
- })
-</script>
-<![endif]>
+<style>
+.historyItemBody {
+ display: none;
+}
+</style>
+
+<noscript>
+<style>
+.historyItemBody {
+ display: block;
+}
+</style>
+</noscript>
</head>
@@ -259,7 +247,7 @@
</div>
<div id="history-name-area" class="historyLinks" style="color: gray; font-weight: bold;">
- <div style="float: right"><a id="history-rename" target="galaxy_main" href="${h.url_for( controller='history', action='rename' )}"><img src="${h.url_for('/static/images/pencil_icon.png')}"></a></div>
+ <div style="float: right"><a id="history-rename" title="Rename" class="icon-button edit" target="galaxy_main" href="${h.url_for( controller='history', action='rename' )}"></a></div>
<div id="history-name">${history.name}</div>
</div>
diff -r 0564441c5043 -r 3d4d44d7a275 templates/root/history_common.mako
--- a/templates/root/history_common.mako Fri Jul 24 15:13:11 2009 -0400
+++ b/templates/root/history_common.mako Fri Jul 24 16:14:46 2009 -0400
@@ -18,29 +18,21 @@
<strong>This dataset has been deleted. Click <a href="${h.url_for( controller='dataset', action='undelete', id=data.id )}" class="historyItemUndelete" id="historyItemUndeleter-${data.id}" target="galaxy_history">here</a> to undelete.</strong>
</div>
%endif
+
## Header row for history items (name, state, action buttons)
- <div style="overflow: hidden;" class="historyItemTitleBar">
- <div style="float: left; padding-right: 3px;">
- <div style='display: none;' id="progress-${data.id}">
- <img src="${h.url_for('/static/style/data_running.gif')}" border="0" align="middle" >
- </div>
- %if data_state == 'running':
- <div><img src="${h.url_for('/static/style/data_running.gif')}" border="0" align="middle"></div>
- %elif data_state == 'upload':
- <div><img src="${h.url_for('/static/style/data_upload.gif')}" border="0" align="middle"></div>
- %elif data_state != 'ok':
- <div><img src="${h.url_for( "/static/style/data_%s.png" % data_state )}" border="0" align="middle"></div>
- %endif
- </div>
- <div style="float: right;">
+ <div style="overflow: hidden;" class="historyItemTitleBar">
+ <div class="historyItemButtons">
%if data_state == "upload":
- <img src="${h.url_for('/static/images/eye_icon_grey.png')}" width='16' height='16' alt='display data' title='display data' class='displayButton' border='0'>
- <img src="${h.url_for('/static/images/pencil_icon_grey.png')}" width='16' height='16' alt='edit attributes' title='edit attributes' class='editButton' border='0'>
+ ## TODO: Make these CSS, just adding a "disabled" class to the normal
+ ## links should be enough. However the number of datasets being uploaded
+ ## at a time is usually small so the impact of these images is also small.
+ <img src="${h.url_for('/static/images/eye_icon_grey.png')}" width='16' height='16' alt='display data' title='display data' class='button display' border='0'>
+ <img src="${h.url_for('/static/images/pencil_icon_grey.png')}" width='16' height='16' alt='edit attributes' title='edit attributes' class='button edit' border='0'>
%else:
- <a href="${h.url_for( controller='dataset', dataset_id=data.id, action='display', filename='index')}" target="galaxy_main"><img src="${h.url_for('/static/images/eye_icon.png')}" rollover="${h.url_for('/static/images/eye_icon_dark.png')}" width='16' height='16' alt='display data' title='display data' class='displayButton' border='0'></a>
- <a href="${h.url_for( controller='root', action='edit', id=data.id )}" target="galaxy_main"><img src="${h.url_for('/static/images/pencil_icon.png')}" rollover="${h.url_for('/static/images/pencil_icon_dark.png')}" width='16' height='16' alt='edit attributes' title='edit attributes' class='editButton' border='0'></a>
+ <a class="icon-button display" title="display data" href="${h.url_for( controller='dataset', dataset_id=data.id, action='display', filename='index')}" target="galaxy_main"></a>
+ <a class="icon-button edit" title="edit attributes" href="${h.url_for( controller='root', action='edit', id=data.id )}" target="galaxy_main"></a>
%endif
- <a href="${h.url_for( action='delete', id=data.id, show_deleted_on_refresh=show_deleted_on_refresh )}" class="historyItemDelete" id="historyItemDeleter-${data.id}"><img src="${h.url_for('/static/images/delete_icon.png')}" rollover="${h.url_for('/static/images/delete_icon_dark.png')}" width='16' height='16' alt='delete' class='deleteButton' border='0'></a>
+ <a class="icon-button delete" title="delete" href="${h.url_for( action='delete', id=data.id, show_deleted_on_refresh=show_deleted_on_refresh )}" id="historyItemDeleter-${data.id}"></a>
</div>
<span class="historyItemTitle"><b>${hid}: ${data.display_name()}</b></span>
</div>
1
0
details: http://www.bx.psu.edu/hg/galaxy/rev/643e3cd86e0b
changeset: 2498:643e3cd86e0b
user: rc
date: Fri Jul 24 12:16:32 2009 -0400
description:
LIMS Changes
- Unique sample names within a request is now enforced
- minor UI tweaks
- show/hide request details
11 file(s) affected in this change:
lib/galaxy/web/controllers/requests.py
lib/galaxy/web/controllers/requests_admin.py
templates/admin/index.mako
templates/admin/requests/grid.mako
templates/admin/requests/show_request.mako
templates/admin/samples/bar_codes.mako
templates/admin/samples/events.mako
templates/requests/new_request.mako
templates/requests/select_request_type.mako
templates/requests/show_request.mako
templates/sample/sample_events.mako
diffs (504 lines):
diff -r 4e0671e6eeaa -r 643e3cd86e0b lib/galaxy/web/controllers/requests.py
--- a/lib/galaxy/web/controllers/requests.py Fri Jul 24 11:22:31 2009 -0400
+++ b/lib/galaxy/web/controllers/requests.py Fri Jul 24 12:16:32 2009 -0400
@@ -97,17 +97,18 @@
for s in request.samples:
self.current_samples.append([s.name, s.values.content])
if add_sample:
- self.current_samples.append(['New Sample',['' for field in request.type.sample_form.fields]])
+ self.current_samples.append(['Sample_%i' % (len(self.current_samples)+1),['' for field in request.type.sample_form.fields]])
# selectfield of all samples
copy_list = SelectField('copy_sample')
copy_list.add_option('None', -1, selected=True)
for i, s in enumerate(self.current_samples):
- copy_list.add_option(i+1, i)
+ copy_list.add_option(i+1, i)
+ self.details_state = 'Show request details'
return trans.fill_template( '/requests/show_request.mako',
request=request,
request_details=self.request_details(trans, id),
current_samples = self.current_samples,
- sample_copy=copy_list)
+ sample_copy=copy_list, details_state=self.details_state)
def request_details(self, trans, id):
'''
Shows the request details
@@ -141,7 +142,20 @@
value=request.values.content[index],
helptext=field['helptext']+' ('+req+')'))
return request_details
-
+
+ def __update_samples(self, request, **kwd):
+ params = util.Params( kwd )
+ num_samples = len(self.current_samples)
+ self.current_samples = []
+ for s in request.samples:
+ self.current_samples.append([s.name, s.values.content])
+ for index in range(num_samples-len(request.samples)):
+ sample_index = index + len(request.samples)
+ sample_name = util.restore_text( params.get( 'sample_%i_name' % sample_index, '' ) )
+ sample_values = []
+ for field_index in range(len(request.type.sample_form.fields)):
+ sample_values.append(util.restore_text( params.get( 'sample_%i_field_%i' % (sample_index, field_index), '' ) ))
+ self.current_samples.append([sample_name, sample_values])
@web.expose
def show_request(self, trans, **kwd):
params = util.Params( kwd )
@@ -157,26 +171,17 @@
**kwd) )
if params.get('add_sample_button', False) == 'Add New':
# save the all (saved+unsaved) sample info in 'current_samples'
- num_samples = len(self.current_samples)
- self.current_samples = []
- for s in request.samples:
- self.current_samples.append([s.name, s.values.content])
- for index in range(num_samples-len(request.samples)):
- sample_index = index + len(request.samples)
- sample_name = util.restore_text( params.get( 'sample_%i_name' % sample_index, '' ) )
- sample_values = []
- for field_index in range(len(request.type.sample_form.fields)):
- sample_values.append(util.restore_text( params.get( 'sample_%i_field_%i' % (sample_index, field_index), '' ) ))
- self.current_samples.append([sample_name, sample_values])
+ self.__update_samples(request, **kwd)
# add an empty or filled sample
# if the user has selected a sample no. to copy then copy the contents
# of the src sample to the new sample else an empty sample
src_sample_index = int(params.get( 'copy_sample', -1 ))
if src_sample_index == -1:
# empty sample
- self.current_samples.append(['New Sample',['' for field in request.type.sample_form.fields]])
+ self.current_samples.append(['Sample_%i' % (len(self.current_samples)+1),['' for field in request.type.sample_form.fields]])
else:
- self.current_samples.append([self.current_samples[src_sample_index][0]+'_copy',[val for val in self.current_samples[src_sample_index][1]]])
+ self.current_samples.append([self.current_samples[src_sample_index][0]+'_%i' % (len(self.current_samples)+1),
+ [val for val in self.current_samples[src_sample_index][1]]])
# selectfield of all samples
copy_list = SelectField('copy_sample')
copy_list.add_option('None', -1, selected=True)
@@ -186,11 +191,38 @@
request=request,
request_details=self.request_details(trans, request.id),
current_samples = self.current_samples,
- sample_copy=copy_list)
+ sample_copy=copy_list, details_state=self.details_state)
if params.get('save_samples_button', False) == 'Save':
- num_samples = len(self.current_samples)
+ # update current_samples
+ self.__update_samples(request, **kwd)
+ # check for duplicate sample names
+ msg = ''
+ for index in range(len(self.current_samples)-len(request.samples)):
+ sample_index = index + len(request.samples)
+ sample_name = self.current_samples[sample_index][0]
+ if not sample_name.strip():
+ msg = 'Please enter the name of sample number %i' % sample_index
+ break
+ count = 0
+ for i in range(len(self.current_samples)):
+ if sample_name == self.current_samples[i][0]:
+ count = count + 1
+ if count > 1:
+ msg = "This request has <b>%i</b> samples with the name <b>%s</b>.\nSamples belonging to a request must have unique names." % (count, sample_name)
+ break
+ if msg:
+ copy_list = SelectField('copy_sample')
+ copy_list.add_option('None', -1, selected=True)
+ for i, s in enumerate(self.current_samples):
+ copy_list.add_option(i+1, i)
+ return trans.fill_template( '/requests/show_request.mako',
+ request=request,
+ request_details=self.request_details(trans, request.id),
+ current_samples = self.current_samples,
+ sample_copy=copy_list, details_state=self.details_state,
+ messagetype='error', msg=msg)
# save all the new/unsaved samples entered by the user
- for index in range(num_samples-len(request.samples)):
+ for index in range(len(self.current_samples)-len(request.samples)):
sample_index = index + len(request.samples)
sample_name = util.restore_text( params.get( 'sample_%i_name' % sample_index, '' ) )
sample_values = []
@@ -208,7 +240,6 @@
action='list',
operation='show_request',
id=trans.security.encode_id(request.id)) )
-
@web.expose
def delete_sample(self, trans, **kwd):
params = util.Params( kwd )
@@ -221,6 +252,7 @@
if s:
s.delete()
s.flush()
+ request.flush()
del self.current_samples[sample_index]
copy_list = SelectField('copy_sample')
copy_list.add_option('None', -1, selected=True)
@@ -230,7 +262,26 @@
request=request,
request_details=self.request_details(trans, request.id),
current_samples = self.current_samples,
- sample_copy=copy_list)
+ sample_copy=copy_list, details_state=self.details_state)
+ @web.expose
+ def toggle_request_details(self, trans, **kwd):
+ params = util.Params( kwd )
+ msg = util.restore_text( params.get( 'msg', '' ) )
+ messagetype = params.get( 'messagetype', 'done' )
+ request = trans.app.model.Request.get(int(params.get('request_id', 0)))
+ if self.details_state == 'Show request details':
+ self.details_state = 'Hide request details'
+ elif self.details_state == 'Hide request details':
+ self.details_state = 'Show request details'
+ copy_list = SelectField('copy_sample')
+ copy_list.add_option('None', -1, selected=True)
+ for i, s in enumerate(self.current_samples):
+ copy_list.add_option(i+1, i)
+ return trans.fill_template( '/requests/show_request.mako',
+ request=request,
+ request_details=self.request_details(trans, request.id),
+ current_samples = self.current_samples,
+ sample_copy=copy_list, details_state=self.details_state)
@web.expose
def new(self, trans, **kwd):
params = util.Params( kwd )
@@ -248,7 +299,7 @@
elif params.get('save', False) == 'True':
request_type = trans.app.model.RequestType.get(int(params.request_type_id))
msg = self.__validate(trans,
- [('name','Name'), ('library_id','Library')],
+ [('name','Name')],
request_type.request_form.fields,
**kwd)
if msg:
@@ -283,7 +334,7 @@
'''
params = util.Params( kwd )
for field, field_name in main_fields:
- if not util.restore_text(params.get(field, None)):
+ if not util.restore_text(params.get(field, '')):
return 'Please enter the <b>%s</b> of the request' % field_name
# check rest of the fields of the form
for index, field in enumerate(form_fields):
@@ -303,7 +354,15 @@
pass
name = util.restore_text(params.get('name', ''))
desc = util.restore_text(params.get('desc', ''))
- library_id = int(util.restore_text(params.get('library_id', 0)))
+ try:
+ library_id = int(util.restore_text(params.get('library_id', None)))
+ except:
+ msg = "Sequencing request could not be saved. Invalid library"
+ return trans.response.send_redirect( web.url_for( controller='requests',
+ action='list',
+ status='error',
+ message=msg,
+ **kwd) )
values = []
for index, field in enumerate(request_type.request_form.fields):
values.append(util.restore_text(params.get('field_%i' % index, '')))
diff -r 4e0671e6eeaa -r 643e3cd86e0b lib/galaxy/web/controllers/requests_admin.py
--- a/lib/galaxy/web/controllers/requests_admin.py Fri Jul 24 11:22:31 2009 -0400
+++ b/lib/galaxy/web/controllers/requests_admin.py Fri Jul 24 12:16:32 2009 -0400
@@ -92,10 +92,31 @@
self.current_samples = []
for s in request.samples:
self.current_samples.append([s.name, s.values.content])
+ self.details_state = 'Show request details'
return trans.fill_template( '/admin/requests/show_request.mako',
request=request,
request_details=self.request_details(trans, id),
- current_samples = self.current_samples)
+ current_samples = self.current_samples,
+ details_state=self.details_state)
+ @web.expose
+ def toggle_request_details(self, trans, **kwd):
+ params = util.Params( kwd )
+ msg = util.restore_text( params.get( 'msg', '' ) )
+ messagetype = params.get( 'messagetype', 'done' )
+ request = trans.app.model.Request.get(int(params.get('request_id', 0)))
+ if self.details_state == 'Show request details':
+ self.details_state = 'Hide request details'
+ elif self.details_state == 'Hide request details':
+ self.details_state = 'Show request details'
+ copy_list = SelectField('copy_sample')
+ copy_list.add_option('None', -1, selected=True)
+ for i, s in enumerate(self.current_samples):
+ copy_list.add_option(i+1, i)
+ return trans.fill_template( '/admin/requests/show_request.mako',
+ request=request,
+ request_details=self.request_details(trans, request.id),
+ current_samples = self.current_samples,
+ sample_copy=copy_list, details_state=self.details_state)
def request_details(self, trans, id):
'''
Shows the request details
diff -r 4e0671e6eeaa -r 643e3cd86e0b templates/admin/index.mako
--- a/templates/admin/index.mako Fri Jul 24 11:22:31 2009 -0400
+++ b/templates/admin/index.mako Fri Jul 24 12:16:32 2009 -0400
@@ -114,7 +114,7 @@
</div>
<div class="toolSectionPad"></div>
<div class="toolSectionTitle">
- <span>Requests</span>
+ <span>Sequencing Requests</span>
</div>
<div class="toolSectionBody">
<div class="toolSectionBg">
diff -r 4e0671e6eeaa -r 643e3cd86e0b templates/admin/requests/grid.mako
--- a/templates/admin/requests/grid.mako Fri Jul 24 11:22:31 2009 -0400
+++ b/templates/admin/requests/grid.mako Fri Jul 24 12:16:32 2009 -0400
@@ -76,9 +76,6 @@
<div class="grid-header">
<h2>${grid.title}</h2>
- %if len(query.all()):
- <h3>All Users</h3>
- %endif
## %if len(query.all()):
## <span class="title">Filter:</span>
## %for i, filter in enumerate( grid.standard_filters ):
diff -r 4e0671e6eeaa -r 643e3cd86e0b templates/admin/requests/show_request.mako
--- a/templates/admin/requests/show_request.mako Fri Jul 24 11:22:31 2009 -0400
+++ b/templates/admin/requests/show_request.mako Fri Jul 24 12:16:32 2009 -0400
@@ -8,7 +8,7 @@
<div class="grid-header">
- <h2>Request: ${request.name}</h2>
+ <h2>Sequencing Request "${request.name}"</h2>
</div>
<ul class="manage-table-actions">
@@ -38,21 +38,26 @@
<div class="toolForm">
##<div class="toolFormTitle">Request Details: '${request_details[0]['value']}'</div>
- %for index, rd in enumerate(request_details):
- <div class="form-row">
- <label>${rd['label']}</label>
- %if not rd['value']:
- <i>None</i>
- %else:
- %if rd['label'] == 'Library':
- <a href="${h.url_for( controller='admin', action='browse_library', id=request.library.id )}">${rd['value']}</a>
- %else:
- ${rd['value']}
+ <div class="form-row">
+ <a href="${h.url_for( controller='requests_admin', action='toggle_request_details', request_id=request.id )}">${details_state}</a>
+ </div>
+ %if details_state == "Hide request details":
+ %for index, rd in enumerate(request_details):
+ <div class="form-row">
+ <label>${rd['label']}</label>
+ %if not rd['value']:
+ <i>None</i>
+ %else:
+ %if rd['label'] == 'Library':
+ <a href="${h.url_for( controller='admin', action='browse_library', id=request.library.id )}">${rd['value']}</a>
+ %else:
+ ${rd['value']}
+ %endif
%endif
- %endif
- </div>
- <div style="clear: both"></div>
- %endfor
+ </div>
+ <div style="clear: both"></div>
+ %endfor
+ %endif
</div>
</div>
diff -r 4e0671e6eeaa -r 643e3cd86e0b templates/admin/samples/bar_codes.mako
--- a/templates/admin/samples/bar_codes.mako Fri Jul 24 11:22:31 2009 -0400
+++ b/templates/admin/samples/bar_codes.mako Fri Jul 24 12:16:32 2009 -0400
@@ -1,12 +1,19 @@
<%inherit file="/base.mako"/>
<%namespace file="/message.mako" import="render_msg" />
-<h2>Bar codes for Samples of Request: ${request.name}</h2>
+<h2>Bar codes for Samples of Request "${request.name}"</h2>
<h3>User: ${user.email}</h3>
%if msg:
${render_msg( msg, messagetype )}
%endif
+
+<ul class="manage-table-actions">
+ <li>
+ <a class="action-button" href="${h.url_for( controller='requests_admin', action='list', operation='show_request', id=trans.security.encode_id(request.id) )}">
+ <span>Browse this request</span></a>
+ </li>
+</ul>
<div class="toolForm">
<form name="bar_codes" action="${h.url_for( controller='requests_admin', action='save_bar_codes', request_id=request.id)}" method="post" >
diff -r 4e0671e6eeaa -r 643e3cd86e0b templates/admin/samples/events.mako
--- a/templates/admin/samples/events.mako Fri Jul 24 11:22:31 2009 -0400
+++ b/templates/admin/samples/events.mako Fri Jul 24 12:16:32 2009 -0400
@@ -3,7 +3,13 @@
<%def name="title()">Events for Sample ${sample.name}</%def>
-<h2>Events for Sample "${sample.name}" of Request: <a href="${h.url_for( controller='requests_admin', action='list', operation='show_request', id=trans.security.encode_id(sample.request.id))}">${sample.request.name}</a></h2>
+<h2>Events for Sample "${sample.name}"</h2>
+<ul class="manage-table-actions">
+ <li>
+ <a class="action-button" href="${h.url_for( controller='requests_admin', action='list', operation='show_request', id=trans.security.encode_id(sample.request.id) )}">
+ <span>Browse this request</span></a>
+ </li>
+</ul>
<h3>User: ${sample.request.user.email}</h3>
%if msg:
diff -r 4e0671e6eeaa -r 643e3cd86e0b templates/requests/new_request.mako
--- a/templates/requests/new_request.mako Fri Jul 24 11:22:31 2009 -0400
+++ b/templates/requests/new_request.mako Fri Jul 24 12:16:32 2009 -0400
@@ -5,6 +5,14 @@
%if msg:
${render_msg( msg, messagetype )}
%endif
+<br/>
+<br/>
+<ul class="manage-table-actions">
+ <li>
+ <a class="action-button" href="${h.url_for( controller='requests', action='list')}">
+ <span>Browse requests</span></a>
+ </li>
+</ul>
<div class="toolForm">
<div class="toolFormTitle">${title}</div>
diff -r 4e0671e6eeaa -r 643e3cd86e0b templates/requests/select_request_type.mako
--- a/templates/requests/select_request_type.mako Fri Jul 24 11:22:31 2009 -0400
+++ b/templates/requests/select_request_type.mako Fri Jul 24 12:16:32 2009 -0400
@@ -5,7 +5,14 @@
%if msg:
${render_msg( msg, messagetype )}
%endif
-
+<br/>
+<br/>
+<ul class="manage-table-actions">
+ <li>
+ <a class="action-button" href="${h.url_for( controller='requests', action='list')}">
+ <span>Browse requests</span></a>
+ </li>
+</ul>
<div class="toolForm">
<div class="toolFormTitle">Add a new request</div>
diff -r 4e0671e6eeaa -r 643e3cd86e0b templates/requests/show_request.mako
--- a/templates/requests/show_request.mako Fri Jul 24 11:22:31 2009 -0400
+++ b/templates/requests/show_request.mako Fri Jul 24 12:16:32 2009 -0400
@@ -8,17 +8,23 @@
<div class="grid-header">
- <h2>Request: ${request.name}</h2>
+ <h2>Sequencing Request "${request.name}"</h2>
</div>
-%if not request.submitted and request.samples:
+
<ul class="manage-table-actions">
+ %if not request.submitted and request.samples:
+ <li>
+ <a class="action-button" confirm="More samples cannot be added to this request once it is submitted. Click OK to submit." href="${h.url_for( controller='requests', action='submit_request', id=request.id)}">
+ <span>Submit request</span></a>
+ </li>
+ %endif
<li>
- <a class="action-button" confirm="More samples cannot be added to this request once it is submitted. Click OK to submit." href="${h.url_for( controller='requests', action='submit_request', id=request.id)}">
- <span>Submit request</span></a>
+ <a class="action-button" href="${h.url_for( controller='requests', action='list')}">
+ <span>Browse requests</span></a>
</li>
</ul>
-%endif
+
<%def name="render_sample_form( index, sample_name, sample_values )">
@@ -60,21 +66,26 @@
<div class="toolForm">
##<div class="toolFormTitle">Request Details: '${request_details[0]['value']}'</div>
- %for index, rd in enumerate(request_details):
- <div class="form-row">
- <label>${rd['label']}</label>
- %if not rd['value']:
- <i>None</i>
- %else:
- %if rd['label'] == 'Library':
- <a href="${h.url_for( controller='library', action='browse_library', id=request.library.id )}">${rd['value']}</a>
- %else:
- ${rd['value']}
+ <div class="form-row">
+ <a href="${h.url_for( controller='requests', action='toggle_request_details', request_id=request.id )}">${details_state}</a>
+ </div>
+ %if details_state == "Hide request details":
+ %for index, rd in enumerate(request_details):
+ <div class="form-row">
+ <label>${rd['label']}</label>
+ %if not rd['value']:
+ <i>None</i>
+ %else:
+ %if rd['label'] == 'Library':
+ <a href="${h.url_for( controller='library', action='browse_library', id=request.library.id )}">${rd['value']}</a>
+ %else:
+ ${rd['value']}
+ %endif
%endif
- %endif
- </div>
- <div style="clear: both"></div>
- %endfor
+ </div>
+ <div style="clear: both"></div>
+ %endfor
+ %endif
</div>
</div>
@@ -101,10 +112,13 @@
</tr>
<thead>
<tbody>
+ <%
+ request.refresh()
+ %>
%for sample_index, sample in enumerate(current_samples):
<tr>
<td>${sample_index+1}</td>
- %if sample[0] in [s.name for s in request.samples]:
+ %if sample_index in range(len(request.samples)):
${render_sample( sample_index, request.samples[sample_index] )}
%else:
${render_sample_form( sample_index, sample[0], sample[1])}
diff -r 4e0671e6eeaa -r 643e3cd86e0b templates/sample/sample_events.mako
--- a/templates/sample/sample_events.mako Fri Jul 24 11:22:31 2009 -0400
+++ b/templates/sample/sample_events.mako Fri Jul 24 12:16:32 2009 -0400
@@ -3,7 +3,19 @@
<%def name="title()">Events for Sample ${sample_name}</%def>
-<h2>Events for Sample "${sample_name}" of Request: <a href="${h.url_for( controller='requests', action='list', operation='show_request', id=trans.security.encode_id(request.id))}">${request.name}</a></h2>
+
+<h2>Events for Sample "${sample_name}"</h2>
+
+<ul class="manage-table-actions">
+ <li>
+ <a class="action-button" href="${h.url_for( controller='requests', action='list', operation='show_request', id=trans.security.encode_id(request.id) )}">
+ <span>Browse this request</span></a>
+ </li>
+ <li>
+ <a class="action-button" href="${h.url_for( controller='requests', action='list')}">
+ <span>Browse requests</span></a>
+ </li>
+</ul>
%if msg:
${render_msg( msg, messagetype )}
1
0
28 Jul '09
details: http://www.bx.psu.edu/hg/galaxy/rev/4e0671e6eeaa
changeset: 2497:4e0671e6eeaa
user: Greg Von Kuster <greg(a)bx.psu.edu>
date: Fri Jul 24 11:22:31 2009 -0400
description:
Remove restriction for displaying a dataset at UCSC if the dataset is not public - as long as you can access the dataset, you can send it outside of the Galaxy environment. Fix for sharing restricted histories - default the options for sharing, and some style fixes on a few library forms.
9 file(s) affected in this change:
lib/galaxy/datatypes/data.py
lib/galaxy/web/controllers/history.py
templates/admin/library/ldda_edit_info.mako
templates/admin/library/new_dataset.mako
templates/admin/library/new_folder.mako
templates/history/share.mako
templates/library/ldda_edit_info.mako
templates/library/new_dataset.mako
templates/library/new_folder.mako
diffs (215 lines):
diff -r 26b69d176146 -r 4e0671e6eeaa lib/galaxy/datatypes/data.py
--- a/lib/galaxy/datatypes/data.py Thu Jul 23 17:08:21 2009 -0400
+++ b/lib/galaxy/datatypes/data.py Fri Jul 24 11:22:31 2009 -0400
@@ -205,16 +205,17 @@
return "This display type (%s) is not implemented for this datatype (%s)." % ( type, dataset.ext)
def get_display_links(self, dataset, type, app, base_url, **kwd):
"""
- Returns a list of tuples of (name, link) for a particular display type
- as long as the dataset is not associated with a role restricting its access.
- We determine this by sending None as the user to the allow_action method.
+ Returns a list of tuples of (name, link) for a particular display type. No check on
+ 'access' permissions is done here - if you can view the dataset, you can also save it
+ or send it to a destination outside of Galaxy, so Galaxy security restrictions do not
+ apply anyway.
"""
- if app.security_agent.allow_action( None, dataset.permitted_actions.DATASET_ACCESS, dataset=dataset ):
- try:
- if type in self.get_display_types():
- return getattr (self, self.supported_display_apps[type]['links_function']) (dataset, type, app, base_url, **kwd)
- except:
- log.exception('Function %s is referred to in datatype %s for generating links for type %s, but is not accessible' % (self.supported_display_apps[type]['links_function'], self.__class__.__name__, type) )
+ try:
+ if type in self.get_display_types():
+ return getattr (self, self.supported_display_apps[type]['links_function']) (dataset, type, app, base_url, **kwd)
+ except:
+ log.exception( 'Function %s is referred to in datatype %s for generating links for type %s, but is not accessible' \
+ % ( self.supported_display_apps[type]['links_function'], self.__class__.__name__, type ) )
return []
def get_converter_types(self, original_dataset, datatypes_registry):
"""Returns available converters by type for this dataset"""
diff -r 26b69d176146 -r 4e0671e6eeaa lib/galaxy/web/controllers/history.py
--- a/lib/galaxy/web/controllers/history.py Thu Jul 23 17:08:21 2009 -0400
+++ b/lib/galaxy/web/controllers/history.py Fri Jul 24 11:22:31 2009 -0400
@@ -288,12 +288,16 @@
# in the cloned history
params = util.Params( kwd )
user = trans.get_user()
+ # TODO: we have too many error messages floating around in here - we need
+ # to incorporate the messaging system used by the libraries that will display
+ # a message on any page.
+ err_msg = util.restore_text( params.get( 'err_msg', '' ) )
if not email:
if not id:
# Default to the current history
id = trans.security.encode_id( trans.history.id )
id = util.listify( id )
- send_to_err = ""
+ send_to_err = err_msg
histories = []
for history_id in id:
histories.append( get_history( trans, history_id ) )
@@ -304,7 +308,7 @@
histories, send_to_users, send_to_err = self._get_histories_and_users( trans, user, id, email )
if not send_to_users:
if not send_to_err:
- send_to_err += "%s is not a valid Galaxy user. " % email
+ send_to_err += "%s is not a valid Galaxy user. %s" % ( email, err_msg )
return trans.fill_template( "/history/share.mako",
histories=histories,
email=email,
@@ -313,6 +317,7 @@
# The user has not yet made a choice about how to share, so dictionaries will be built for display
can_change, cannot_change, no_change_needed, unique_no_change_needed, send_to_err = \
self._populate_restricted( trans, user, histories, send_to_users, None, send_to_err, unique=True )
+ send_to_err += err_msg
if can_change or cannot_change:
return trans.fill_template( "/history/share.mako",
histories=histories,
@@ -330,7 +335,16 @@
@web.expose
@web.require_login( "share restricted histories with other users" )
def share_restricted( self, trans, id=None, email="", **kwd ):
- action = kwd[ 'action' ]
+ if 'action' in kwd:
+ action = kwd[ 'action' ]
+ else:
+ err_msg = "Select an action. "
+ return trans.response.send_redirect( url_for( controller='history',
+ action='share',
+ id=id,
+ email=email,
+ err_msg=err_msg,
+ share_button=True ) )
if action == "no_share":
trans.response.send_redirect( url_for( controller='root', action='history_options' ) )
user = trans.get_user()
diff -r 26b69d176146 -r 4e0671e6eeaa templates/admin/library/ldda_edit_info.mako
--- a/templates/admin/library/ldda_edit_info.mako Thu Jul 23 17:08:21 2009 -0400
+++ b/templates/admin/library/ldda_edit_info.mako Fri Jul 24 11:22:31 2009 -0400
@@ -83,12 +83,14 @@
</div>
</form>
<form name="auto_detect" action="${h.url_for( controller='admin', action='library_dataset_dataset_association', library_id=library_id, folder_id=ldda.library_dataset.folder.id, edit_info=True )}" method="post">
- <input type="hidden" name="id" value="${ldda.id}"/>
- <div style="float: left; width: 250px; margin-right: 10px;">
- <input type="submit" name="detect" value="Auto-detect"/>
- </div>
- <div class="toolParamHelp" style="clear: both;">
- This will inspect the dataset and attempt to correct the above column values if they are not accurate.
+ <div class="form-row">
+ <input type="hidden" name="id" value="${ldda.id}"/>
+ <div style="float: left; width: 250px; margin-right: 10px;">
+ <input type="submit" name="detect" value="Auto-detect"/>
+ </div>
+ <div class="toolParamHelp" style="clear: both;">
+ This will inspect the dataset and attempt to correct the above column values if they are not accurate.
+ </div>
</div>
</form>
</div>
diff -r 26b69d176146 -r 4e0671e6eeaa templates/admin/library/new_dataset.mako
--- a/templates/admin/library/new_dataset.mako Thu Jul 23 17:08:21 2009 -0400
+++ b/templates/admin/library/new_dataset.mako Fri Jul 24 11:22:31 2009 -0400
@@ -192,7 +192,9 @@
<input name="hda_ids" value="${hda.id}" type="checkbox"/>${hda.hid}: ${hda.name}
</div>
%endfor
- <input type="submit" name="add_history_datasets_to_library_button" value="Import to library"/>
+ <div class="form-row">
+ <input type="submit" name="add_history_datasets_to_library_button" value="Import to library"/>
+ </div>
</form>
%else:
<p/>
diff -r 26b69d176146 -r 4e0671e6eeaa templates/admin/library/new_folder.mako
--- a/templates/admin/library/new_folder.mako Thu Jul 23 17:08:21 2009 -0400
+++ b/templates/admin/library/new_folder.mako Fri Jul 24 11:22:31 2009 -0400
@@ -36,7 +36,9 @@
</div>
<div style="clear: both"></div>
</div>
- <input type="submit" name="new_folder_button" value="Create"/>
+ <div class="form-row">
+ <input type="submit" name="new_folder_button" value="Create"/>
+ </div>
</form>
</div>
</div>
diff -r 26b69d176146 -r 4e0671e6eeaa templates/history/share.mako
--- a/templates/history/share.mako Thu Jul 23 17:08:21 2009 -0400
+++ b/templates/history/share.mako Fri Jul 24 11:22:31 2009 -0400
@@ -58,6 +58,12 @@
%else:
## We are sharing restricted histories
<form name='share_restricted' id=share_restricted' action="${h.url_for( controller='history', action='share_restricted' )}" method="post">
+ %if send_to_err:
+ <div style="clear: both"></div>
+ <div class="form-row">
+ <div class="errormessage">${send_to_err}</div>
+ </div>
+ %endif
## Needed for rebuilding dicts
<input type="hidden" name="email" value="${email}" size="40">
%for history in histories:
@@ -173,7 +179,7 @@
%endif
</div>
<div class="form-row">
- <input type="radio" name="action" value="no_share"> Don't share
+ <input type="radio" name="action" value="no_share" checked> Don't share
</div>
<div class="form-row">
<input type="submit" name="share_restricted_button" value="Go"><br/>
diff -r 26b69d176146 -r 4e0671e6eeaa templates/library/ldda_edit_info.mako
--- a/templates/library/ldda_edit_info.mako Thu Jul 23 17:08:21 2009 -0400
+++ b/templates/library/ldda_edit_info.mako Fri Jul 24 11:22:31 2009 -0400
@@ -83,12 +83,14 @@
</div>
</form>
<form name="auto_detect" action="${h.url_for( controller='library', action='library_dataset_dataset_association', library_id=library_id, folder_id=ldda.library_dataset.folder.id, edit_info=True )}" method="post">
- <input type="hidden" name="id" value="${ldda.id}"/>
- <div style="float: left; width: 250px; margin-right: 10px;">
- <input type="submit" name="detect" value="Auto-detect"/>
- </div>
- <div class="toolParamHelp" style="clear: both;">
- This will inspect the dataset and attempt to correct the above column values if they are not accurate.
+ <div class="form-row">
+ <input type="hidden" name="id" value="${ldda.id}"/>
+ <div style="float: left; width: 250px; margin-right: 10px;">
+ <input type="submit" name="detect" value="Auto-detect"/>
+ </div>
+ <div class="toolParamHelp" style="clear: both;">
+ This will inspect the dataset and attempt to correct the above column values if they are not accurate.
+ </div>
</div>
</form>
</div>
diff -r 26b69d176146 -r 4e0671e6eeaa templates/library/new_dataset.mako
--- a/templates/library/new_dataset.mako Thu Jul 23 17:08:21 2009 -0400
+++ b/templates/library/new_dataset.mako Fri Jul 24 11:22:31 2009 -0400
@@ -201,7 +201,9 @@
<input name="hda_ids" value="${hda.id}" type="checkbox"/>${hda.hid}: ${hda.name}
</div>
%endfor
- <input type="submit" name="add_history_datasets_to_library_button" value="Import to library"/>
+ <div class="form-row">
+ <input type="submit" name="add_history_datasets_to_library_button" value="Import to library"/>
+ </div>
</form>
%else:
<p/>
diff -r 26b69d176146 -r 4e0671e6eeaa templates/library/new_folder.mako
--- a/templates/library/new_folder.mako Thu Jul 23 17:08:21 2009 -0400
+++ b/templates/library/new_folder.mako Fri Jul 24 11:22:31 2009 -0400
@@ -36,7 +36,9 @@
</div>
<div style="clear: both"></div>
</div>
- <input type="submit" name="new_folder_button" value="Create"/>
+ <div class="form-row">
+ <input type="submit" name="new_folder_button" value="Create"/>
+ </div>
</form>
</div>
</div>
1
0
details: http://www.bx.psu.edu/hg/galaxy/rev/26b69d176146
changeset: 2496:26b69d176146
user: rc
date: Thu Jul 23 17:08:21 2009 -0400
description:
More LIMS changes
- Request page now includes all its samples (both Admin & User perspective)
- Sample page removed and samples UI overhaul
- DB changes
- new 'submitted' column in request table
- new 'bar_code' column in sample table
- CSV importer to create forms
34 file(s) affected in this change:
lib/galaxy/model/__init__.py
lib/galaxy/model/mapping.py
lib/galaxy/model/migrate/versions/0009_request_table.py
lib/galaxy/web/controllers/admin.py
lib/galaxy/web/controllers/forms.py
lib/galaxy/web/controllers/requests.py
lib/galaxy/web/controllers/requests_admin.py
templates/admin/forms/create_form.mako
templates/admin/forms/edit_form.mako
templates/admin/requests/add_states.mako
templates/admin/requests/create_request_type.mako
templates/admin/requests/edit_request_type.mako
templates/admin/requests/grid.mako
templates/admin/requests/show_request.mako
templates/admin/requests/view_request.mako
templates/admin/requests/view_request_type.mako
templates/admin/samples/bar_codes.mako
templates/admin/samples/change_state.mako
templates/admin/samples/edit_sample.mako
templates/admin/samples/events.mako
templates/admin/samples/grid.mako
templates/admin/samples/view_sample.mako
templates/base.mako
templates/base_panels.mako
templates/requests/grid.mako
templates/requests/new_request.mako
templates/requests/show_request.mako
templates/requests/view_request.mako
templates/sample/browse_samples.mako
templates/sample/edit_sample.mako
templates/sample/grid.mako
templates/sample/new_sample.mako
templates/sample/sample_events.mako
templates/sample/view_sample.mako
diffs (2706 lines):
diff -r f75758b35e51 -r 26b69d176146 lib/galaxy/model/__init__.py
--- a/lib/galaxy/model/__init__.py Thu Jul 23 14:31:11 2009 -0400
+++ b/lib/galaxy/model/__init__.py Thu Jul 23 17:08:21 2009 -0400
@@ -1116,16 +1116,40 @@
class Request( object ):
def __init__(self, name=None, desc=None, request_type=None, user=None,
- form_values=None, library=None):
+ form_values=None, library=None, submitted=False):
self.name = name
self.desc = desc
self.type = request_type
self.values = form_values
self.user = user
self.library = library
+ self.submitted = submitted
+ self.samples_list = []
+ def add_sample(self, sample_name=None, sample_desc=None, sample_values=None):
+ # create a form_values row
+ values = trans.app.model.FormValues(self.type.sample_form, sample_values)
+ values.flush()
+ sample = Sample(sample_name, sample_desc, self, values)
+ sample.flush()
+ # set the initial state
+ state = self.type.states[0]
+ event = SampleEvent(sample, state)
+ event.flush()
+ # add this sample to the member array
+ self.samples_list.append(sample)
+ return sample
+ def delete_sample(self, sample_name):
+ pass
+ def has_sample(self, sample_name):
+ for s in self.samples:
+ if s.name == sample_name:
+ return s
+ return False
class RequestType( object ):
- def __init__(self, request_form=None, sample_form=None):
+ def __init__(self, name=None, desc=None, request_form=None, sample_form=None):
+ self.name = name
+ self.desc = desc
self.request_form = request_form
self.sample_form = sample_form
@@ -1135,9 +1159,10 @@
self.desc = desc
self.request = request
self.values = form_values
+
+ def current_state(self):
+ return self.events[0].state
-
-
class SampleState( object ):
def __init__(self, name=None, desc=None, request_type=None):
self.name = name
diff -r f75758b35e51 -r 26b69d176146 lib/galaxy/model/mapping.py
--- a/lib/galaxy/model/mapping.py Thu Jul 23 14:31:11 2009 -0400
+++ b/lib/galaxy/model/mapping.py Thu Jul 23 17:08:21 2009 -0400
@@ -569,6 +569,7 @@
Column( "request_type_id", Integer, ForeignKey( "request_type.id" ), index=True ),
Column( "user_id", Integer, ForeignKey( "galaxy_user.id" ), index=True ),
Column( "library_id", Integer, ForeignKey( "library.id" ), index=True ),
+ Column( "submitted", Boolean, index=True, default=False ),
Column( "deleted", Boolean, index=True, default=False ) )
Sample.table = Table('sample', metadata,
@@ -579,6 +580,7 @@
Column( "desc", TEXT ),
Column( "form_values_id", Integer, ForeignKey( "form_values.id" ), index=True ),
Column( "request_id", Integer, ForeignKey( "request.id" ), index=True ),
+ Column( "bar_code", TrimmedString( 255 ), index=True ),
Column( "deleted", Boolean, index=True, default=False ) )
# new table to store all the possible sample states and the sample type it
@@ -626,13 +628,17 @@
user=relation( User,
primaryjoin=( Request.table.c.user_id == User.table.c.id ),
backref="requests" ),
+ samples=relation( Sample,
+ primaryjoin=( Request.table.c.id == Sample.table.c.request_id ) ),
library=relation( Library,
primaryjoin=( Request.table.c.library_id == Library.table.c.id ) ),
) )
assign_mapper( context, RequestType, RequestType.table,
- properties=dict( states=relation( SampleState, backref="request_type",
- order_by=desc(SampleState.table.c.update_time) ),
+ properties=dict( states=relation( SampleState,
+ backref="request_type",
+ primaryjoin=( RequestType.table.c.id == SampleState.table.c.request_type_id ),
+ order_by=asc(SampleState.table.c.update_time) ),
request_form=relation( FormDefinition,
primaryjoin=( RequestType.table.c.request_form_id == FormDefinition.table.c.id ) ),
sample_form=relation( FormDefinition,
diff -r f75758b35e51 -r 26b69d176146 lib/galaxy/model/migrate/versions/0009_request_table.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/galaxy/model/migrate/versions/0009_request_table.py Thu Jul 23 17:08:21 2009 -0400
@@ -0,0 +1,52 @@
+from sqlalchemy import *
+from sqlalchemy.orm import *
+from migrate import *
+from migrate.changeset import *
+import sys, logging
+from galaxy.model.custom_types import *
+
+log = logging.getLogger( __name__ )
+log.setLevel(logging.DEBUG)
+handler = logging.StreamHandler( sys.stdout )
+format = "%(name)s %(levelname)s %(asctime)s %(message)s"
+formatter = logging.Formatter( format )
+handler.setFormatter( formatter )
+log.addHandler( handler )
+
+metadata = MetaData( migrate_engine )
+
+
+def upgrade():
+ # Load existing tables
+ metadata.reflect()
+
+ # Add 1 column to the request table
+ try:
+ Request_table = Table( "request", metadata, autoload=True )
+ except NoSuchTableError:
+ Request_table = None
+ log.debug( "Failed loading table request" )
+ if Request_table:
+ try:
+ col = Column( "submitted", Boolean, index=True, default=False )
+ col.create( Request_table )
+ assert col is Request_table.c.submitted
+ except Exception, e:
+ log.debug( "Adding column 'submitted' to submitted table failed: %s" % ( str( e ) ) )
+
+ # Add 1 column to the sample table
+ try:
+ Sample_table = Table( "sample", metadata, autoload=True )
+ except NoSuchTableError:
+ Sample_table = None
+ log.debug( "Failed loading table sample" )
+ if Sample_table:
+ try:
+ col = Column( "bar_code", TrimmedString( 255 ), index=True )
+ col.create( Sample_table )
+ assert col is Sample_table.c.bar_code
+ except Exception, e:
+ log.debug( "Adding column 'bar_code' to submitted table failed: %s" % ( str( e ) ) )
+
+def downgrade():
+ pass
\ No newline at end of file
diff -r f75758b35e51 -r 26b69d176146 lib/galaxy/web/controllers/admin.py
--- a/lib/galaxy/web/controllers/admin.py Thu Jul 23 14:31:11 2009 -0400
+++ b/lib/galaxy/web/controllers/admin.py Thu Jul 23 17:08:21 2009 -0400
@@ -2162,7 +2162,7 @@
elif params.get('edit', False) == 'True':
rt = trans.app.model.RequestType.get(int(util.restore_text( params.id )))
ss_list = trans.app.model.SampleState.filter(trans.app.model.SampleState.table.c.request_type_id == rt.id).all()
- return trans.fill_template( '/admin/requests/edit_request_type.mako',
+ return trans.fill_template( '/admin/requests/view_request_type.mako',
request_type=rt,
forms=self._get_all_forms(trans, all_versions=False),
states_list=ss_list,
@@ -2193,10 +2193,13 @@
for ss in ss_list:
ss.delete()
ss.flush()
+ # unsubmitted state
+ ss = trans.app.model.SampleState('Unsubmitted', 'Sample not yet submitted', rt)
+ ss.flush()
for i in range( num_states ):
name = util.restore_text( params.get( 'new_element_name_%i' % i, None ))
desc = util.restore_text( params.get( 'new_element_description_%i' % i, None ))
ss = trans.app.model.SampleState(name, desc, rt)
ss.flush()
- msg = "The new sample type named '%s' with %s state(s) has been created" % (rt.name, num_states)
+ msg = "The new request type named '%s' with %s state(s) has been created" % (rt.name, num_states)
return rt, msg
diff -r f75758b35e51 -r 26b69d176146 lib/galaxy/web/controllers/forms.py
--- a/lib/galaxy/web/controllers/forms.py Thu Jul 23 14:31:11 2009 -0400
+++ b/lib/galaxy/web/controllers/forms.py Thu Jul 23 17:08:21 2009 -0400
@@ -62,7 +62,8 @@
self.current_form['desc'] = ''
self.current_form['fields'] = []
inputs = [ ( 'Name', TextField('name', 40,self.current_form['name'] ) ),
- ( 'Description', TextField('description', 40, self.current_form['desc']) ) ]
+ ( 'Description', TextField('description', 40, self.current_form['desc']) ),
+ ( 'Import from csv file (Optional)', TextField('csv_file', 40, '') ) ]
return trans.fill_template( '/admin/forms/create_form.mako',
inputs=inputs,
msg=msg,
@@ -215,11 +216,16 @@
params = util.Params( kwd )
name = util.restore_text( params.name )
desc = util.restore_text( params.description ) or ""
- # set form fields
- fields = []
- for i in range( len(self.current_form['fields']) ):
- fields.append(self.__get_field(i, **kwd))
- fields = fields
+ if params.get( 'csv_file', None ):
+ csv_file = util.restore_text( params.get( 'csv_file', '' ) )
+ if csv_file:
+ fields = self.__import_fields(csv_file)
+ else:
+ # set form fields
+ fields = []
+ for i in range( len(self.current_form['fields']) ):
+ fields.append(self.__get_field(i, **kwd))
+ fields = fields
return name, desc, fields
def __update_current_form(self, **kwd):
name, desc, fields = self.__get_form(**kwd)
@@ -228,6 +234,24 @@
self.current_form['desc'] = desc
self.current_form['fields'] = fields
+ def __import_fields(self, csv_file):
+ '''
+ "company","name of the company", "True", "required", "TextField",,
+ "due date","turnaround time", "True", "optional", "SelectField","24 hours, 1 week, 1 month"
+ '''
+ import csv
+ fields = []
+ reader = csv.reader(open(csv_file))
+ for row in reader:
+ options = row[5].split(',')
+ fields.append({'label': row[0],
+ 'helptext': row[1],
+ 'visible': row[2],
+ 'required': row[3],
+ 'type': row[4],
+ 'selectlist': options})
+ return fields
+
def __save_form(self, trans, fdc_id=None, **kwd):
'''
This method saves the current form
@@ -271,8 +295,8 @@
for ft in BaseField.form_field_types():
self.fieldtype.add_option(ft, ft)
self.required = SelectField('field_required_'+str(index), display='radio')
- self.required.add_option('Required', 'true')
- self.required.add_option('Optional', 'true', selected=True)
+ self.required.add_option('Required', 'required')
+ self.required.add_option('Optional', 'optional', selected=True)
if field:
self.fill(field, field_type)
def fill(self, field, field_type=None):
@@ -296,10 +320,10 @@
else:
self.fieldtype.add_option(ft, ft)
# required/optional
- if field['required']:
- self.required = SelectField('required_'+str(self.index), display='radio')
- self.required.add_option('Required', 'true', selected=True)
- self.required.add_option('Optional', 'true')
+ if field['required'] == 'required':
+ self.required = SelectField('field_required_'+str(self.index), display='radio')
+ self.required.add_option('Required', 'required', selected=True)
+ self.required.add_option('Optional', 'optional')
def selectbox_ui(self, field):
self.selectbox_options = []
if field['selectlist']:
diff -r f75758b35e51 -r 26b69d176146 lib/galaxy/web/controllers/requests.py
--- a/lib/galaxy/web/controllers/requests.py Thu Jul 23 14:31:11 2009 -0400
+++ b/lib/galaxy/web/controllers/requests.py Thu Jul 23 17:08:21 2009 -0400
@@ -11,7 +11,7 @@
log = logging.getLogger( __name__ )
class RequestsListGrid( grids.Grid ):
- title = "Requests"
+ title = "Sequencing Requests"
model_class = model.Request
default_sort_key = "-create_time"
columns = [
@@ -20,13 +20,14 @@
attach_popup=True ),
grids.GridColumn( "Description", key='desc'),
grids.GridColumn( "Sample(s)", method='number_of_samples',
- link=( lambda item: iff( item.deleted, None, dict( operation="samples", id=item.id ) ) ), ),
+ link=( lambda item: iff( item.deleted, None, dict( operation="show_request", id=item.id ) ) ), ),
grids.GridColumn( "Type", key="request_type_id", method='get_request_type'),
- grids.GridColumn( "Last update", key="update_time", format=time_ago )
+ grids.GridColumn( "Last update", key="update_time", format=time_ago ),
+ grids.GridColumn( "Submitted", method='submitted'),
]
operations = [
# grids.GridOperation( "Edit", allow_multiple=False, condition=( lambda item: not item.deleted ) ),
- grids.GridOperation( "Samples", allow_multiple=False, condition=( lambda item: not item.deleted ) ),
+ grids.GridOperation( "Submit", allow_multiple=False, condition=( lambda item: not item.submitted ) )
# grids.GridOperation( "Delete", condition=( lambda item: not item.deleted ) ),
# grids.GridOperation( "Undelete", condition=( lambda item: item.deleted ) ),
]
@@ -43,45 +44,13 @@
def apply_default_filter( self, trans, query ):
return query.filter_by( user=trans.user )
def number_of_samples(self, trans, request):
- return str(len(trans.app.model.Sample.filter(trans.app.model.Sample.table.c.request_id==request.id).all()))
+ return str(len(request.samples))
+ def submitted(self, trans, request):
+ if request.submitted:
+ return 'Yes'
+ return 'No'
-class SamplesListGrid( grids.Grid ):
- model_class = model.Sample
- default_sort_key = "-create_time"
- columns = [
- grids.GridColumn( "Name", key="name",
- link=( lambda item: iff( item.deleted, None, dict( operation="show_sample", id=item.id ) ) ),
- attach_popup=True ),
- grids.GridColumn( "Description", key='desc' ),
- grids.GridColumn( "Status", method="get_status",
- link=( lambda item: iff( item.deleted, None, dict( operation="events", id=item.id ) ) )),
- grids.GridColumn( "Last update", key="update_time", format=time_ago )
-
- # Valid for filtering but invisible
- #grids.GridColumn( "Deleted", key="deleted", visible=False )
- ]
- operations = [
-# grids.GridOperation( "Edit", allow_multiple=False, condition=( lambda item: not item.deleted ) ),
-# grids.GridOperation( "Delete", condition=( lambda item: not item.deleted ) ),
-# grids.GridOperation( "Undelete", condition=( lambda item: item.deleted ) ),
-
- ]
- standard_filters = [
- grids.GridColumnFilter( "Active", args=dict( deleted=False ) ),
- grids.GridColumnFilter( "Deleted", args=dict( deleted=True ) ),
- grids.GridColumnFilter( "All", args=dict( deleted='All' ) )
- ]
- def __init__(self, request):
- self.request = request
- def get_current_item( self, trans ):
- return None
- def apply_default_filter( self, trans, query ):
- return query.filter_by( request_id=self.request.id )
- def get_status(self, trans, sample):
- all_states = trans.app.model.SampleEvent.filter(trans.app.model.SampleEvent.table.c.sample_id == sample.id).all()
- curr_state = all_states[len(all_states)-1].state
- return curr_state.name
class Requests( BaseController ):
request_grid = RequestsListGrid()
@@ -94,7 +63,8 @@
all_libraries = trans.app.model.Library.filter(trans.app.model.Library.table.c.deleted == False).order_by(trans.app.model.Library.name).all()
authorized_libraries = []
for library in all_libraries:
- if trans.app.security_agent.allow_action(trans.user, trans.app.security_agent.permitted_actions.LIBRARY_ADD, library_item=library) or trans.app.security_agent.allow_action(trans.user, trans.app.security_agent.permitted_actions.LIBRARY_MODIFY, library_item=library) or trans.app.security_agent.allow_action(trans.user, trans.app.security_agent.permitted_actions.LIBRARY_MANAGE, library_item=library) or trans.app.security_agent.check_folder_contents(trans.user, library) or trans.app.security_agent.show_library_item(trans.user, library):
+ if trans.app.security_agent.allow_action(trans.user, trans.app.security_agent.permitted_actions.LIBRARY_ADD, library_item=library) \
+ or trans.app.security_agent.allow_action(trans.user, trans.app.security_agent.permitted_actions.LIBRARY_MODIFY, library_item=library):
authorized_libraries.append(library)
return authorized_libraries
@web.expose
@@ -107,27 +77,38 @@
operation = kwargs['operation'].lower()
if operation == "show_request":
id = trans.security.decode_id(kwargs['id'])
- return self.show_read_only(trans, id)
- elif operation == "samples":
+ return self.__show_request(trans, id, kwargs.get('add_sample', False))
+ elif operation == "submit":
id = trans.security.decode_id(kwargs['id'])
- return self.show_samples(trans, id, kwargs)
- elif operation == "show_sample":
- id = trans.security.decode_id(kwargs['id'])
- return self.show_sample_read_only(trans, id)
- elif operation == "events":
- id = trans.security.decode_id(kwargs['id'])
- return self.show_events(trans, id)
+ return self.__submit(trans, id)
# Render the list view
- return self.request_grid( trans, status=status, message=message, template='/requests/grid.mako', **kwargs )
- def show_samples(self, trans, id, kwargs):
- '''
- Shows all the samples associated with this request
- '''
- status = message = None
- request = trans.app.model.Request.get(id)
- self.samples_grid = SamplesListGrid(request)
- return self.samples_grid( trans, status=status, message=message, template='/sample/grid.mako', **kwargs )
- def show_read_only(self, trans, id):
+ return self.request_grid( trans, template='/requests/grid.mako', **kwargs )
+
+ def __show_request(self, trans, id, add_sample=False):
+ try:
+ request = trans.app.model.Request.get(id)
+ except:
+ return trans.response.send_redirect( web.url_for( controller='requests',
+ action='list',
+ status='error',
+ message="Invalid request ID",
+ **kwd) )
+ self.current_samples = []
+ for s in request.samples:
+ self.current_samples.append([s.name, s.values.content])
+ if add_sample:
+ self.current_samples.append(['New Sample',['' for field in request.type.sample_form.fields]])
+ # selectfield of all samples
+ copy_list = SelectField('copy_sample')
+ copy_list.add_option('None', -1, selected=True)
+ for i, s in enumerate(self.current_samples):
+ copy_list.add_option(i+1, i)
+ return trans.fill_template( '/requests/show_request.mako',
+ request=request,
+ request_details=self.request_details(trans, id),
+ current_samples = self.current_samples,
+ sample_copy=copy_list)
+ def request_details(self, trans, id):
'''
Shows the request details
'''
@@ -136,9 +117,6 @@
# list of widgets to be rendered on the request form
request_details = []
# main details
- request_details.append(dict(label='Name',
- value=request.name,
- helptext=''))
request_details.append(dict(label='Description',
value=request.desc,
helptext=''))
@@ -147,12 +125,6 @@
helptext=''))
request_details.append(dict(label='Date created',
value=request.create_time,
- helptext=''))
- request_details.append(dict(label='Date updated',
- value=request.create_time,
- helptext=''))
- request_details.append(dict(label='User',
- value=str(request.user.email),
helptext=''))
# library associated
request_details.append(dict(label='Library',
@@ -168,10 +140,97 @@
request_details.append(dict(label=field['label'],
value=request.values.content[index],
helptext=field['helptext']+' ('+req+')'))
- return trans.fill_template( '/requests/view_request.mako',
- request_form_id=request.type.request_form.id,
- request_details=request_details,
- request_type=request.type)
+ return request_details
+
+ @web.expose
+ def show_request(self, trans, **kwd):
+ params = util.Params( kwd )
+ msg = util.restore_text( params.get( 'msg', '' ) )
+ messagetype = params.get( 'messagetype', 'done' )
+ try:
+ request = trans.app.model.Request.get(int(params.get('request_id', None)))
+ except:
+ return trans.response.send_redirect( web.url_for( controller='requests',
+ action='list',
+ status='error',
+ message="Invalid request ID",
+ **kwd) )
+ if params.get('add_sample_button', False) == 'Add New':
+ # save the all (saved+unsaved) sample info in 'current_samples'
+ num_samples = len(self.current_samples)
+ self.current_samples = []
+ for s in request.samples:
+ self.current_samples.append([s.name, s.values.content])
+ for index in range(num_samples-len(request.samples)):
+ sample_index = index + len(request.samples)
+ sample_name = util.restore_text( params.get( 'sample_%i_name' % sample_index, '' ) )
+ sample_values = []
+ for field_index in range(len(request.type.sample_form.fields)):
+ sample_values.append(util.restore_text( params.get( 'sample_%i_field_%i' % (sample_index, field_index), '' ) ))
+ self.current_samples.append([sample_name, sample_values])
+ # add an empty or filled sample
+ # if the user has selected a sample no. to copy then copy the contents
+ # of the src sample to the new sample else an empty sample
+ src_sample_index = int(params.get( 'copy_sample', -1 ))
+ if src_sample_index == -1:
+ # empty sample
+ self.current_samples.append(['New Sample',['' for field in request.type.sample_form.fields]])
+ else:
+ self.current_samples.append([self.current_samples[src_sample_index][0]+'_copy',[val for val in self.current_samples[src_sample_index][1]]])
+ # selectfield of all samples
+ copy_list = SelectField('copy_sample')
+ copy_list.add_option('None', -1, selected=True)
+ for i, s in enumerate(self.current_samples):
+ copy_list.add_option(i+1, i)
+ return trans.fill_template( '/requests/show_request.mako',
+ request=request,
+ request_details=self.request_details(trans, request.id),
+ current_samples = self.current_samples,
+ sample_copy=copy_list)
+ if params.get('save_samples_button', False) == 'Save':
+ num_samples = len(self.current_samples)
+ # save all the new/unsaved samples entered by the user
+ for index in range(num_samples-len(request.samples)):
+ sample_index = index + len(request.samples)
+ sample_name = util.restore_text( params.get( 'sample_%i_name' % sample_index, '' ) )
+ sample_values = []
+ for field_index in range(len(request.type.sample_form.fields)):
+ sample_values.append(util.restore_text( params.get( 'sample_%i_field_%i' % (sample_index, field_index), '' ) ))
+ form_values = trans.app.model.FormValues(request.type.sample_form, sample_values)
+ form_values.flush()
+ s = trans.app.model.Sample(sample_name, '', request, form_values)
+ s.flush()
+ # set the initial state
+ state = s.request.type.states[0]
+ event = trans.app.model.SampleEvent(s, state)
+ event.flush()
+ return trans.response.send_redirect( web.url_for( controller='requests',
+ action='list',
+ operation='show_request',
+ id=trans.security.encode_id(request.id)) )
+
+ @web.expose
+ def delete_sample(self, trans, **kwd):
+ params = util.Params( kwd )
+ msg = util.restore_text( params.get( 'msg', '' ) )
+ messagetype = params.get( 'messagetype', 'done' )
+ request = trans.app.model.Request.get(int(params.get('request_id', 0)))
+ sample_index = int(params.get('sample_id', 0))
+ sample_name = self.current_samples[sample_index][0]
+ s = request.has_sample(sample_name)
+ if s:
+ s.delete()
+ s.flush()
+ del self.current_samples[sample_index]
+ copy_list = SelectField('copy_sample')
+ copy_list.add_option('None', -1, selected=True)
+ for i, s in enumerate(self.current_samples):
+ copy_list.add_option(i+1, i)
+ return trans.fill_template( '/requests/show_request.mako',
+ request=request,
+ request_details=self.request_details(trans, request.id),
+ current_samples = self.current_samples,
+ sample_copy=copy_list)
@web.expose
def new(self, trans, **kwd):
params = util.Params( kwd )
@@ -202,10 +261,22 @@
request = self.__save_request(trans, None, **kwd)
msg = 'The new request named %s has been created' % request.name
request_type_id = int(util.restore_text( params.request_type_id ))
- return trans.response.send_redirect( web.url_for( controller='requests',
- action='list',
- msg=msg ,
- messagetype='done') )
+ if params.get('create_request_button', False) == 'Save':
+ return trans.response.send_redirect( web.url_for( controller='requests',
+ action='list',
+ msg=msg ,
+ messagetype='done') )
+ elif params.get('create_request_samples_button', False) == 'Add samples':
+ new_kwd = {}
+ new_kwd['id'] = trans.security.encode_id(request.id)
+ new_kwd['operation'] = 'show_request'
+ new_kwd['add_sample'] = True
+ return trans.response.send_redirect( web.url_for( controller='requests',
+ action='list',
+ msg=msg ,
+ messagetype='done',
+ **new_kwd) )
+
def __validate(self, trans, main_fields=[], form_fields=[], **kwd):
'''
Validates the request entered by the user
@@ -216,7 +287,8 @@
return 'Please enter the <b>%s</b> of the request' % field_name
# check rest of the fields of the form
for index, field in enumerate(form_fields):
- if not util.restore_text(params.get('field_%i' % index, None)) and field['required']:
+ if not util.restore_text(params.get('field_%i' % index, None)) \
+ and field['required'] == 'required':
return 'Please enter the <b>%s</b> field of the request' % field['label']
return None
def __save_request(self, trans, request_id=None, **kwd):
@@ -240,7 +312,8 @@
form_values.flush()
request = trans.app.model.Request(name, desc, request_type,
trans.user, form_values,
- trans.app.model.Library.get(library_id))
+ trans.app.model.Library.get(library_id),
+ submitted=False)
request.flush()
else:
# TODO editing
@@ -266,29 +339,103 @@
util.restore_text( params.get( 'desc', '' ) )),
helptext='(Optional)'))
# libraries selectbox
- value = int(params.get( 'library_id', 0 ))
libraries = self.get_authorized_libs(trans)
- lib_list = SelectField('library_id')
- for lib in libraries:
- if lib.id == value:
- lib_list.add_option(lib.name, lib.id, selected=True)
- else:
- lib_list.add_option(lib.name, lib.id)
- widgets.append(dict(label='Library',
- widget=lib_list,
- helptext='Associated library where the resultant \
- dataset will be stored'))
+ if libraries:
+ libui = self.__library_ui(libraries, **kwd)
+ widgets.append(libui)
widgets = self.__create_form(trans, request_type.request_form_id, widgets,
form_values, **kwd)
title = 'Add a new request of type: %s' % request_type.name
return trans.fill_template( '/requests/new_request.mako',
request_form_id=request_type.request_form_id,
- request_type=request_type,
+ request_type=request_type,
widgets=widgets,
title=title,
msg=msg,
messagetype=messagetype)
+ def __library_ui(self, libraries, **kwd):
+ params = util.Params( kwd )
+ create_lib_str = 'Create a new library'
+ value = int(params.get( 'library_id', 0 ))
+ if not value: # if no library previously selected
+ # show the selectbox with 'create a new library' option selected
+ lib_list = SelectField('library_id', refresh_on_change=True,
+ refresh_on_change_values=[create_lib_str])
+ #lib_list.add_option(create_lib_str, 0, selected=True)
+ for lib in libraries:
+ lib_list.add_option(lib.name, lib.id)
+ widget = dict(label='Library',
+ widget=lib_list,
+ helptext='Associated library where the resultant \
+ dataset will be stored.')
+ else: # if some library previously selected
+ # show the selectbox with some library selected
+ lib_list = SelectField('library_id', refresh_on_change=True,
+ refresh_on_change_values=[create_lib_str])
+ #lib_list.add_option(create_lib_str, 0)
+ for lib in libraries:
+ if value == lib.id:
+ lib_list.add_option(lib.name, lib.id, selected=True)
+ else:
+ lib_list.add_option(lib.name, lib.id)
+ widget = dict(label='Library',
+ widget=lib_list,
+ helptext='Associated library where the resultant \
+ dataset will be stored.')
+ return widget
+
+ def __submit(self, trans, id):
+ try:
+ request = trans.app.model.Request.get(id)
+ except:
+ msg = "Invalid request ID"
+ log.warn( msg )
+ return trans.response.send_redirect( web.url_for( controller='requests',
+ action='list',
+ status='error',
+ message=msg,
+ **kwd) )
+ # get the new state
+ new_state = request.type.states[1]
+ for s in request.samples:
+ event = trans.app.model.SampleEvent(s, new_state, 'Samples submitted to the system')
+ event.flush()
+ # change request's submitted field
+ request.submitted = True
+ request.flush()
+ kwd = {}
+ kwd['id'] = trans.security.encode_id(request.id)
+ return trans.response.send_redirect( web.url_for( controller='requests',
+ action='list',
+ **kwd) )
+ @web.expose
+ def submit_request(self, trans, **kwd):
+ params = util.Params( kwd )
+ try:
+ id = int(params.get('id', False))
+ request = trans.app.model.Request.get(id)
+ except:
+ msg = "Invalid request ID"
+ log.warn( msg )
+ return trans.response.send_redirect( web.url_for( controller='requests',
+ action='list',
+ status='error',
+ message=msg,
+ **kwd) )
+ # get the new state
+ new_state = request.type.states[1]
+ for s in request.samples:
+ event = trans.app.model.SampleEvent(s, new_state, 'Samples submitted to the system')
+ event.flush()
+ # change request's submitted field
+ request.submitted = True
+ request.flush()
+ ## TODO
+ kwd['id'] = trans.security.encode_id(request.id)
+ return trans.response.send_redirect( web.url_for( controller='requests',
+ action='list',
+ **kwd) )
def __create_form(self, trans, form_id, widgets=[], form_values=None, **kwd):
params = util.Params( kwd )
form = trans.app.model.FormDefinition.get(form_id)
@@ -316,7 +463,7 @@
elif field['type'] == 'CheckboxField':
fw.checked = value
# require/optional
- if field['required']:
+ if field['required'] == 'required':
req = 'Required'
else:
req = 'Optional'
@@ -325,140 +472,20 @@
helptext=field['helptext']+' ('+req+')'))
return widgets
@web.expose
- def add_sample(self, trans, **kwd):
+ def show_events(self, trans, **kwd):
params = util.Params( kwd )
- msg = util.restore_text( params.get( 'msg', '' ) )
- messagetype = params.get( 'messagetype', 'done' )
- return self.__show_sample_form(trans, sample=None, **kwd)
-
- def __show_sample_form(self, trans, sample=None, **kwd):
- params = util.Params( kwd )
- msg = util.restore_text( params.get( 'msg', '' ) )
- messagetype = params.get( 'messagetype', 'done' )
- request = trans.app.model.Request.get(int( params.request_id ))
- if sample:
- form_values = sample.values
- else:
- form_values = None
- # list of widgets to be rendered on the request form
- widgets = []
- widgets.append(dict(label='Name',
- widget=TextField('name', 40,
- util.restore_text( params.get( 'name', '' ) )),
- helptext='(Required)'))
- widgets.append(dict(label='Description',
- widget=TextField('desc', 40,
- util.restore_text( params.get( 'desc', '' ) )),
- helptext='(Optional)'))
- widgets = self.__create_form(trans, request.type.sample_form_id, widgets,
- form_values, **kwd)
- title = 'Add a new sample to request: %s of type: %s' % (request.name, request.type.name)
- return trans.fill_template( '/sample/new_sample.mako',
- sample_form_id=request.type.sample_form_id,
- request_id=request.id,
- widgets=widgets,
- title=title,
- msg=msg,
- messagetype=messagetype)
- @web.expose
- def samples(self, trans, **kwd):
- params = util.Params( kwd )
- if params.get('save', False) == 'True':
- request = trans.app.model.Request.get(int(params.request_id ))
- msg = self.__validate(trans,
- [('name','Name')],
- request.type.sample_form.fields,
- **kwd)
- if msg:
- return trans.response.send_redirect( web.url_for( controller='requests',
- action='add_sample',
- msg=msg,
- messagetype='error',
- **kwd) )
- sample = self.__save_sample(trans, sample_id=None, **kwd)
- msg = 'The new sample named %s has been created' % sample.name
+ try:
+ sample_id = int(params.get('sample_id', False))
+ sample = trans.app.model.Sample.get(sample_id)
+ except:
+ msg = "Invalid sample ID"
return trans.response.send_redirect( web.url_for( controller='requests',
action='list',
- operation='samples',
- id=trans.security.encode_id(sample.request_id),
+ status='error',
+ message=msg,
**kwd) )
- def __save_sample(self, trans, sample_id=None, **kwd):
- params = util.Params( kwd )
- if not sample_id:
- request = trans.app.model.Request.get(int(params.request_id))
- else:
- #TODO editing
- pass
- name = util.restore_text(params.get('name', ''))
- desc = util.restore_text(params.get('desc', ''))
- values = []
- for index, field in enumerate(request.type.sample_form.fields):
- values.append(util.restore_text(params.get('field_%i' % index, '')))
- if not sample_id:
- form_values = trans.app.model.FormValues(request.type.sample_form, values)
- form_values.flush()
- sample = trans.app.model.Sample(name, desc, request, form_values)
- sample.flush()
- # set the initial state
- state = trans.app.model.SampleState.filter(trans.app.model.SampleState.table.c.request_type_id == request.type.id).first()
- event = trans.app.model.SampleEvent(sample, state)
- event.flush()
- else:
- form_data.content = values
- form_data.flush()
- return sample
- def show_sample_read_only(self, trans, sample_id):
- '''
- Shows the sample details
- '''
- sample = trans.app.model.Sample.get(sample_id)
- request = sample.request
- request_type = sample.request.type
- sample_form = sample.request.type.sample_form
- sample_values = sample.values
- # list of widgets to be rendered on the request form
- sample_details = []
- # main details
- sample_details.append(dict(label='Name',
- value=sample.name,
- helptext=''))
- sample_details.append(dict(label='Description',
- value=sample.desc,
- helptext=''))
- sample_details.append(dict(label='Date created',
- value=sample.create_time,
- helptext=''))
- sample_details.append(dict(label='Date updated',
- value=sample.create_time,
- helptext=''))
- sample_details.append(dict(label='User',
- value=str(trans.user.email),
- helptext=''))
- sample_details.append(dict(label='Request',
- value=request.name,
- helptext='Name/ID of the request this sample belongs to.'))
- # get the current state of the sample
- all_states = trans.app.model.SampleEvent.filter(trans.app.model.SampleEvent.table.c.sample_id == sample_id).all()
- curr_state = all_states[len(all_states)-1].state
- sample_details.append(dict(label='State',
- value=curr_state.name,
- helptext=curr_state.desc))
- # form fields
- for index, field in enumerate(sample_form.fields):
- if field['required']:
- req = 'Required'
- else:
- req = 'Optional'
- sample_details.append(dict(label=field['label'],
- value=sample_values.content[index],
- helptext=field['helptext']+' ('+req+')'))
- return trans.fill_template( '/sample/view_sample.mako',
- sample_details=sample_details)
- def show_events(self, trans, sample_id):
- sample = trans.app.model.Sample.get(sample_id)
events_list = []
- all_events = trans.app.model.SampleEvent.filter(trans.app.model.SampleEvent.table.c.sample_id == sample_id).all()
- all_events.reverse()
+ all_events = sample.events
for event in all_events:
delta = datetime.utcnow() - event.update_time
if delta > timedelta( minutes=60 ):
@@ -469,7 +496,7 @@
return trans.fill_template( '/sample/sample_events.mako',
events_list=events_list,
sample_name=sample.name,
- request=sample.request.name)
+ request=sample.request)
diff -r f75758b35e51 -r 26b69d176146 lib/galaxy/web/controllers/requests_admin.py
--- a/lib/galaxy/web/controllers/requests_admin.py Thu Jul 23 14:31:11 2009 -0400
+++ b/lib/galaxy/web/controllers/requests_admin.py Thu Jul 23 17:08:21 2009 -0400
@@ -15,16 +15,15 @@
SUCCESS, INFO, WARNING, ERROR = "done", "info", "warning", "error"
class RequestsListGrid( grids.Grid ):
- title = "Requests"
+ title = "Sequencing Requests"
model_class = model.Request
default_sort_key = "-create_time"
columns = [
grids.GridColumn( "Name", key="name",
- link=( lambda item: iff( item.deleted, None, dict( operation="show_request", id=item.id ) ) ),
- attach_popup=True ),
+ link=( lambda item: iff( item.deleted, None, dict( operation="show_request", id=item.id ) ) )),
grids.GridColumn( "Description", key="desc"),
grids.GridColumn( "Sample(s)", method='number_of_samples',
- link=( lambda item: iff( item.deleted, None, dict( operation="samples", id=item.id ) ) ), ),
+ link=( lambda item: iff( item.deleted, None, dict( operation="show_request", id=item.id ) ) ), ),
grids.GridColumn( "Type", key="request_type_id", method='get_request_type'),
grids.GridColumn( "Last update", key="update_time", format=time_ago ),
grids.GridColumn( "User", key="user_id", method='get_user')
@@ -32,7 +31,7 @@
]
operations = [
# grids.GridOperation( "Edit", allow_multiple=False, condition=( lambda item: not item.deleted ) ),
- grids.GridOperation( "Samples", allow_multiple=False, condition=( lambda item: not item.deleted ) ),
+# grids.GridOperation( "Samples", allow_multiple=False, condition=( lambda item: not item.deleted ) ),
# grids.GridOperation( "Delete", condition=( lambda item: not item.deleted ) ),
# grids.GridOperation( "Undelete", condition=( lambda item: item.deleted ) ),
]
@@ -49,50 +48,10 @@
request_type = trans.app.model.RequestType.get(request.request_type_id)
return request_type.name
def apply_default_filter( self, trans, query ):
- return query
+ return query.filter_by(submitted=True)
def number_of_samples(self, trans, request):
- return str(len(trans.app.model.Sample.filter(trans.app.model.Sample.table.c.request_id==request.id).all()))
+ return str(len(request.samples))
-class SamplesListGrid( grids.Grid ):
- model_class = model.Sample
- default_sort_key = "-create_time"
- columns = [
- grids.GridColumn( "Name", key="name",
- link=( lambda item: iff( item.deleted, None, dict( operation="show_sample", id=item.id ) ) ),
- attach_popup=True ),
- grids.GridColumn( "Description", key='desc' ),
- grids.GridColumn( "Status", method="get_status",
- link=( lambda item: iff( item.deleted, None, dict( operation="events", id=item.id ) ) )),
-
- grids.GridColumn( "Last update", key="update_time", format=time_ago )
-
- # Valid for filtering but invisible
- #grids.GridColumn( "Deleted", key="deleted", visible=False )
- ]
- operations = [
-# grids.GridOperation( "Edit", allow_multiple=False, condition=( lambda item: not item.deleted ) ),
- grids.GridOperation( "Change state", condition=( lambda item: not item.deleted ) ),
-# grids.GridOperation( "Delete", condition=( lambda item: not item.deleted ) ),
-# grids.GridOperation( "Undelete", condition=( lambda item: item.deleted ) ),
-
- ]
- standard_filters = [
- grids.GridColumnFilter( "Active", args=dict( deleted=False ) ),
- grids.GridColumnFilter( "Deleted", args=dict( deleted=True ) ),
- grids.GridColumnFilter( "All", args=dict( deleted='All' ) )
- ]
- def __init__(self, request, user):
- self.request = request
- self.user = user
- def get_current_item( self, trans ):
- return None
- def apply_default_filter( self, trans, query ):
- return query.filter_by( request_id=self.request.id )
- def get_status(self, trans, sample):
- all_states = trans.app.model.SampleEvent.filter(trans.app.model.SampleEvent.table.c.sample_id == sample.id).all()
- curr_state = trans.app.model.SampleState.get(all_states[len(all_states)-1].sample_state_id)
- return curr_state.name
-
class Requests( BaseController ):
request_grid = RequestsListGrid()
@@ -118,30 +77,26 @@
operation = kwargs['operation'].lower()
if operation == "show_request":
id = trans.security.decode_id(kwargs['id'])
- return self.show_read_only(trans, id)
- elif operation == "samples":
- id = trans.security.decode_id(kwargs['id'])
- return self.show_samples(trans, id, kwargs)
- elif operation == "show_sample":
- id = trans.security.decode_id(kwargs['id'])
- return self.show_sample_read_only(trans, id)
- elif operation == "change state":
- id_list = [trans.security.decode_id(id) for id in util.listify(kwargs['id'])]
- return self.change_state(trans, id_list)
- elif operation == "events":
- id = trans.security.decode_id(kwargs['id'])
- return self.show_events(trans, id)
+ return self.__show_request(trans, id)
# Render the list view
- return self.request_grid( trans, status=status, message=message, template='/admin/requests/grid.mako', **kwargs )
- def show_samples(self, trans, id, kwargs):
- '''
- Shows all the samples associated with this request
- '''
- status = message = None
- request = trans.app.model.Request.get(id)
- self.samples_grid = SamplesListGrid(request, trans.app.model.User.get(request.user_id))
- return self.samples_grid( trans, status=status, message=message, template='/admin/samples/grid.mako', **kwargs )
- def show_read_only(self, trans, id):
+ return self.request_grid( trans, template='/admin/requests/grid.mako', **kwargs )
+ def __show_request(self, trans, id):
+ try:
+ request = trans.app.model.Request.get(id)
+ except:
+ return trans.response.send_redirect( web.url_for( controller='requests',
+ action='list',
+ status='error',
+ message="Invalid request ID",
+ **kwd) )
+ self.current_samples = []
+ for s in request.samples:
+ self.current_samples.append([s.name, s.values.content])
+ return trans.fill_template( '/admin/requests/show_request.mako',
+ request=request,
+ request_details=self.request_details(trans, id),
+ current_samples = self.current_samples)
+ def request_details(self, trans, id):
'''
Shows the request details
'''
@@ -150,9 +105,6 @@
# list of widgets to be rendered on the request form
request_details = []
# main details
- request_details.append(dict(label='Name',
- value=request.name,
- helptext=''))
request_details.append(dict(label='Description',
value=request.desc,
helptext=''))
@@ -182,120 +134,106 @@
request_details.append(dict(label=field['label'],
value=request.values.content[index],
helptext=field['helptext']+' ('+req+')'))
- return trans.fill_template( '/admin/requests/view_request.mako',
- request_form_id=request.type.request_form.id,
- request_details=request_details,
- request_type=request.type)
+ return request_details
+ @web.expose
+ @web.require_admin
+ def bar_codes(self, trans, **kwd):
+ params = util.Params( kwd )
+ request_id = params.get('request_id', None)
+ if request_id:
+ request_id = int(request_id)
+ request = trans.app.model.Request.get(request_id)
+ return trans.fill_template( '/admin/samples/bar_codes.mako',
+ samples_list=[s for s in request.samples],
+ user=request.user,
+ request=request)
@web.expose
@web.require_admin
- def samples(self, trans, **kwd):
+ def save_bar_codes(self, trans, **kwd):
params = util.Params( kwd )
- if params.get('save', False) == 'True':
- sample = self.__save_sample(trans, params)
- return self.show_samples(trans, sample.request_id, {})
- def show_sample_read_only(self, trans, sample_id):
- '''
- Shows the sample details
- '''
- sample = trans.app.model.Sample.get(sample_id)
- request = sample.request
- request_type = sample.request.type
- sample_form = sample.request.type.sample_form
- sample_values = sample.values
- # list of widgets to be rendered on the request form
- sample_details = []
- # main details
- sample_details.append(dict(label='Name',
- value=request.name,
- helptext=''))
- sample_details.append(dict(label='Description',
- value=request.desc,
- helptext=''))
- sample_details.append(dict(label='Date created',
- value=sample.create_time,
- helptext=''))
- sample_details.append(dict(label='Date updated',
- value=sample.create_time,
- helptext=''))
- sample_details.append(dict(label='User',
- value=str(trans.user.email),
- helptext=''))
- sample_details.append(dict(label='Request',
- value=request.name,
- helptext='Name/ID of the request this sample belongs to.'))
- # get the current state of the sample
- all_states = trans.app.model.SampleEvent.filter(trans.app.model.SampleEvent.table.c.sample_id == sample_id).all()
- curr_state = all_states[len(all_states)-1].state
- sample_details.append(dict(label='State',
- value=curr_state.name,
- helptext=curr_state.desc))
- # form fields
- for index, field in enumerate(sample_form.fields):
- if field['required']:
- req = 'Required'
+ request_id = params.get('request_id', None)
+ if request_id:
+ request_id = int(request_id)
+ request = trans.app.model.Request.get(request_id)
+ # validate
+ # bar codes need to be globally unique
+ unique = True
+ for index in range(len(request.samples)):
+ bar_code = util.restore_text(params.get('sample_%i_bar_code' % index, ''))
+ all_samples = trans.app.model.Sample.query.all()
+ for sample in all_samples:
+ if bar_code == sample.bar_code:
+ unique = False
+ if not unique:
+ return trans.fill_template( '/admin/samples/bar_codes.mako',
+ samples_list=[s for s in request.samples],
+ user=request.user,
+ request=request,
+ messagetype='error',
+ msg='Samples cannot have same bar code.')
+ for index, sample in enumerate(request.samples):
+ bar_code = util.restore_text(params.get('sample_%i_bar_code' % index, ''))
+ sample.bar_code = bar_code
+ sample.flush()
+ return trans.response.send_redirect( web.url_for( controller='requests_admin',
+ action='list',
+ operation='show_request',
+ id=trans.security.encode_id(request.id)) )
+ def change_state(self, trans, sample):
+ possible_states = sample.request.type.states
+ curr_state = sample.current_state()
+ states_input = SelectField('select_state')
+ for state in possible_states:
+ if curr_state.name == state.name:
+ states_input.add_option(state.name+' (Current)', state.id, selected=True)
else:
- req = 'Optional'
- sample_details.append(dict(label=field['label'],
- value=sample_values.content[index],
- helptext=field['helptext']+' ('+req+')'))
- return trans.fill_template( '/admin/samples/view_sample.mako',
- sample_details=sample_details)
- def __get_all_states(self, trans, sample):
- all_states = trans.app.model.SampleEvent.filter(trans.app.model.SampleEvent.table.c.sample_id == sample.id).all()
- curr_state = all_states[len(all_states)-1].state
- states_list = trans.app.model.SampleState.filter(trans.app.model.SampleState.table.c.request_type_id == sample.request.type.id)
- return states_list
- def __get_curr_state(self, trans, sample):
- all_states = trans.app.model.SampleEvent.filter(trans.app.model.SampleEvent.table.c.sample_id == sample.id).all()
- curr_state = all_states[len(all_states)-1].state
- return curr_state
- def change_state(self, trans, sample_id_list):
- sample = trans.app.model.Sample.get(sample_id_list[0])
- states_list = self.__get_all_states(trans, sample)
- curr_state = self.__get_curr_state(trans, sample)
- states_input = SelectField('select_state')
- for state in states_list:
- if len(sample_id_list) == 1:
- if curr_state.name == state.name:
- states_input.add_option(state.name+' (Current)', state.name, selected=True)
- else:
- states_input.add_option(state.name, state.name)
- else:
- states_input.add_option(state.name, state.name)
+ states_input.add_option(state.name, state.id)
widgets = []
- widgets.append(('Select the new state of the sample(s) from the list of possible state(s)',
+ widgets.append(('Select the new state of the sample from the list of possible state(s)',
states_input))
widgets.append(('Comments', TextArea('comment')))
- title = 'Change current state of sample: ' + sample.name
- return trans.fill_template( '/admin/samples/change_state.mako',
- widgets=widgets, title=title,
- sample_id_list=util.object_to_string(sample_id_list))
+ title = 'Change current state'
+ return widgets, title
@web.expose
@web.require_admin
def save_state(self, trans, **kwd):
params = util.Params( kwd )
- sample_id_list = util.string_to_object(util.restore_text( params.sample_id_list ))
+ try:
+ sample_id = int(params.get('sample_id', False))
+ sample = trans.app.model.Sample.get(sample_id)
+ except:
+ msg = "Invalid sample ID"
+ return trans.response.send_redirect( web.url_for( controller='requests_admin',
+ action='list',
+ status='error',
+ message=msg,
+ **kwd) )
comments = util.restore_text( params.comment )
- sample = trans.app.model.Sample.get(sample_id_list[0])
- selected_state = util.restore_text( params.select_state )
+ selected_state = int( params.select_state )
new_state = trans.app.model.SampleState.filter(trans.app.model.SampleState.table.c.request_type_id == sample.request.type.id
- and trans.app.model.SampleState.table.c.name == selected_state)[0]
- for id in sample_id_list:
- s = trans.app.model.Sample.get(id)
- event = trans.app.model.SampleEvent(s, new_state, comments)
- event.flush()
+ and trans.app.model.SampleState.table.c.id == selected_state)[0]
+ event = trans.app.model.SampleEvent(sample, new_state, comments)
+ event.flush()
return trans.response.send_redirect( web.url_for( controller='requests_admin',
- action='list',
- operation='samples',
- id=trans.security.encode_id(sample.request.id)) )
+ action='show_events',
+ sample_id=sample.id))
@web.expose
@web.require_admin
- def show_events(self, trans, sample_id):
- sample = trans.app.model.Sample.get(sample_id)
+ def show_events(self, trans, **kwd):
+ params = util.Params( kwd )
+ try:
+ sample_id = int(params.get('sample_id', False))
+ sample = trans.app.model.Sample.get(sample_id)
+ except:
+ msg = "Invalid sample ID"
+ return trans.response.send_redirect( web.url_for( controller='requests_admin',
+ action='list',
+ status='error',
+ message=msg,
+ **kwd) )
events_list = []
- all_events = trans.app.model.SampleEvent.filter(trans.app.model.SampleEvent.table.c.sample_id == sample_id).all()
- all_events.reverse()
+ all_events = sample.events
for event in all_events:
delta = datetime.utcnow() - event.update_time
if delta > timedelta( minutes=60 ):
@@ -303,8 +241,8 @@
else:
last_update = '%s minutes' % int( delta.seconds / 60 )
events_list.append((event.state.name, event.state.desc, last_update, event.comment))
+ widgets, title = self.change_state(trans, sample)
return trans.fill_template( '/admin/samples/events.mako',
events_list=events_list,
- sample_name=sample.name, user=sample.request.user,
- request=sample.request.name)
+ sample=sample, widgets=widgets, title=title)
\ No newline at end of file
diff -r f75758b35e51 -r 26b69d176146 templates/admin/forms/create_form.mako
--- a/templates/admin/forms/create_form.mako Thu Jul 23 14:31:11 2009 -0400
+++ b/templates/admin/forms/create_form.mako Thu Jul 23 17:08:21 2009 -0400
@@ -25,7 +25,9 @@
</div>
<div style="clear: both"></div>
</div>
- <input type="submit" name="save_form" value="Save"/>
+ <div class="form-row">
+ <input type="submit" name="save_form" value="Save"/>
+ </div>
</form>
</div>
</div>
diff -r f75758b35e51 -r 26b69d176146 templates/admin/forms/edit_form.mako
--- a/templates/admin/forms/edit_form.mako Thu Jul 23 14:31:11 2009 -0400
+++ b/templates/admin/forms/edit_form.mako Thu Jul 23 17:08:21 2009 -0400
@@ -37,20 +37,18 @@
%if field_attr[1].get_selected()[0] == 'SelectField':
<% options = field_attr[2] %>
<div class="repeat-group-item">
+ <div class="form-row">
<label> Options</label>
%for i, option in enumerate(options):
<b> ${i+1}</b>
- ${option[1].get_html()}
- ##<input type="submit" name="remove_option_${index}" value="Remove option ${i+1}"/><br>
+ ${option[1].get_html()}
<a class="action-button" href="${h.url_for( controller='forms', action='edit', form_id=form.id, select_box_options='remove', field_index=index, option_index=i )}">Remove</a><br>
%endfor
- </div>
+ </div>
+ </div>
<div class="form-row">
<a class="action-button" href="${h.url_for( controller='forms', action='edit', form_id=form.id, select_box_options='add', field_index=index )}">Add</a>
</div>
- ##<div class="form-row">
- ## <input type="submit" name="add_option_field_${index}" value="Add option"/>
- ##</div>
%endif
%endif
</%def>
@@ -99,7 +97,9 @@
</div>
<div style="clear: both"></div>
</div>
- <input type="submit" name="save_changes_button" value="Save"/>
+ <div class="form-row">
+ <input type="submit" name="save_changes_button" value="Save"/>
+ </div>
</form>
</div>
</div>
\ No newline at end of file
diff -r f75758b35e51 -r 26b69d176146 templates/admin/requests/add_states.mako
--- a/templates/admin/requests/add_states.mako Thu Jul 23 14:31:11 2009 -0400
+++ b/templates/admin/requests/add_states.mako Thu Jul 23 17:08:21 2009 -0400
@@ -6,7 +6,7 @@
%endif
<div class="toolForm">
- <div class="toolFormTitle">Create ${num_states} states for the '${sample_type_name}' sample type</div>
+ <div class="toolFormTitle">Create ${num_states} states for the '${sample_type_name}' request type</div>
<form name="new_form_fields" action="${h.url_for( controller='admin', action='request_type', save_new=True, create=False, edit=False, name=sample_type_name, description=desc, num_states=num_states, request_form_id=request_form_id, sample_form_id=sample_form_id)}" method="post" >
<div class="toolFormBody">
%for element_count in range( num_states ):
@@ -19,7 +19,7 @@
<div style="clear: both"></div>
%endfor
</div>
- <div class="toolFormBody">
+ <div class="form-row">
<input type="submit" name="save_new_sample_type" value="Save"/>
</div>
</form>
diff -r f75758b35e51 -r 26b69d176146 templates/admin/requests/create_request_type.mako
--- a/templates/admin/requests/create_request_type.mako Thu Jul 23 14:31:11 2009 -0400
+++ b/templates/admin/requests/create_request_type.mako Thu Jul 23 17:08:21 2009 -0400
@@ -59,7 +59,9 @@
</div>
<div style="clear: both"></div>
</div>
+ <div class="form-row">
<input type="submit" name="create_library_button" value="Define states"/>
+ </div>
</form>
</div>
%endif
diff -r f75758b35e51 -r 26b69d176146 templates/admin/requests/edit_request_type.mako
--- a/templates/admin/requests/edit_request_type.mako Thu Jul 23 14:31:11 2009 -0400
+++ b/templates/admin/requests/edit_request_type.mako Thu Jul 23 17:08:21 2009 -0400
@@ -71,8 +71,9 @@
</div>
<div style="clear: both"></div>
</div>
-
- <input type="submit" name="edit_request_type_button" value="Save"/>
+ <div class="form-row">
+ <input type="submit" name="edit_request_type_button" value="Save"/>
+ </div>
</form>
</div>
</div>
\ No newline at end of file
diff -r f75758b35e51 -r 26b69d176146 templates/admin/requests/grid.mako
--- a/templates/admin/requests/grid.mako Thu Jul 23 14:31:11 2009 -0400
+++ b/templates/admin/requests/grid.mako Thu Jul 23 17:08:21 2009 -0400
@@ -179,7 +179,11 @@
<div popupmenu="grid-${i}-popup">
%for operation in grid.operations:
%if operation.allowed( item ):
- <a class="action-button" href="${url( operation=operation.label, id=item.id )}">${operation.label}</a>
+ %if operation.label == 'Submit':
+ <a class="action-button" confirm="More samples cannot be added to this request once it is submitted. Click OK to submit." href="${url( operation=operation.label, id=item.id )}">${operation.label}</a>
+ %else:
+ <a class="action-button" href="${url( operation=operation.label, id=item.id )}">${operation.label}</a>
+ %endif
%endif
%endfor
</div>
diff -r f75758b35e51 -r 26b69d176146 templates/admin/requests/show_request.mako
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/admin/requests/show_request.mako Thu Jul 23 17:08:21 2009 -0400
@@ -0,0 +1,96 @@
+<%inherit file="/base.mako"/>
+<%namespace file="/message.mako" import="render_msg" />
+
+
+%if msg:
+ ${render_msg( msg, messagetype )}
+%endif
+
+
+<div class="grid-header">
+ <h2>Request: ${request.name}</h2>
+</div>
+
+<ul class="manage-table-actions">
+ <li>
+ <a class="action-button" href="${h.url_for( controller='requests_admin', action='bar_codes', request_id=request.id)}">
+ <span>Bar codes</span></a>
+ </li>
+</ul>
+
+<%def name="render_sample( index, sample )">
+ <td>
+ ${sample.name}
+ </td>
+ <td>
+ <a href="${h.url_for( controller='requests_admin', action='show_events', sample_id=sample.id)}">${sample.current_state().name}</a>
+ </td>
+ %for field_index, field in enumerate(request.type.sample_form.fields):
+ <td>
+ %if sample.values.content[field_index]:
+ ${sample.values.content[field_index]}
+ %else:
+ <i>None</i>
+ %endif
+ </td>
+ %endfor
+</%def>
+
+<div class="toolForm">
+ ##<div class="toolFormTitle">Request Details: '${request_details[0]['value']}'</div>
+ %for index, rd in enumerate(request_details):
+ <div class="form-row">
+ <label>${rd['label']}</label>
+ %if not rd['value']:
+ <i>None</i>
+ %else:
+ %if rd['label'] == 'Library':
+ <a href="${h.url_for( controller='admin', action='browse_library', id=request.library.id )}">${rd['value']}</a>
+ %else:
+ ${rd['value']}
+ %endif
+ %endif
+ </div>
+ <div style="clear: both"></div>
+ %endfor
+ </div>
+</div>
+
+<div class="toolForm">
+ ##<div class="toolFormTitle">Samples (${len(request.samples)})</div>
+ <form id="edit_form" name="edit_form" action="${h.url_for( controller='requests', action='show_request', request_id=request.id )}" method="post" >
+ <div class="form-row">
+ %if current_samples:
+ <table class="grid">
+ <thead>
+ <tr>
+ <th>No.</th>
+ <th>Sample Name</th>
+ <th>State</th>
+ %for field_index, field in enumerate(request.type.sample_form.fields):
+ <th>
+ ${field['label']}
+ <div class="toolParamHelp" style="clear: both;">
+ <i>${field['helptext']}</i>
+ </div>
+ </th>
+ %endfor
+ </tr>
+ <thead>
+ <tbody>
+ %for sample_index, sample in enumerate(current_samples):
+ <tr>
+ <td>${sample_index+1}</td>
+ ${render_sample( sample_index, request.samples[sample_index] )}
+ </tr>
+ %endfor
+ </tbody>
+ </table>
+ %else:
+ <label>There are no samples.</label>
+ %endif
+
+ </div>
+ ##</div>
+ </form>
+</div>
diff -r f75758b35e51 -r 26b69d176146 templates/admin/requests/view_request.mako
--- a/templates/admin/requests/view_request.mako Thu Jul 23 14:31:11 2009 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-<%inherit file="/base.mako"/>
-<%namespace file="/message.mako" import="render_msg" />
-
-
-%if msg:
- ${render_msg( msg, messagetype )}
-%endif
-
-<div class="toolForm">
- <div class="toolFormTitle">Request Details: '${request_details[0]['value']}'</div>
- %for index, rd in enumerate(request_details):
- <div class="form-row">
- <label>${rd['label']}</label>
- ##<i>${rd['helptext']}</i>
- ${rd['value']}
- </div>
- <div style="clear: both"></div>
- %endfor
- </div>
-</div>
\ No newline at end of file
diff -r f75758b35e51 -r 26b69d176146 templates/admin/requests/view_request_type.mako
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/admin/requests/view_request_type.mako Thu Jul 23 17:08:21 2009 -0400
@@ -0,0 +1,51 @@
+<%inherit file="/base.mako"/>
+<%namespace file="/message.mako" import="render_msg" />
+
+
+%if msg:
+ ${render_msg( msg, messagetype )}
+%endif
+
+<% num_states=len(states_list) %>
+
+<div class="toolForm">
+ <div class="toolFormTitle">View request type details</div>
+ <div class="toolFormBody">
+ <form name="library" action="${h.url_for( controller='admin', action='request_type', save_changes=True, create=False, id=request_type.id, num_states=num_states )}" method="post" >
+ <div class="form-row">
+ <label>Name</label>
+ ${request_type.name}
+ <div style="clear: both"></div>
+ </div>
+ <div class="form-row">
+ <label>Description</label>
+ ${request_type.desc}
+ <div style="clear: both"></div>
+ </div>
+ <div class="form-row">
+ <label>
+ Request Form definition
+ </label>
+ ${request_type.request_form.name}
+ </div>
+ <div class="form-row">
+ <label>
+ Sample Form definition
+ </label>
+ ${request_type.sample_form.name}
+ </div>
+ <div class="form-row">
+ <label>
+ Possible states
+ </label>
+ %for element_count, state in enumerate(states_list):
+ <div class="form-row">
+ <label>${1+element_count}. ${state.name}</label>
+ ${state.desc}
+ </div>
+ <div style="clear: both"></div>
+ %endfor
+ </div>
+ </form>
+ </div>
+</div>
\ No newline at end of file
diff -r f75758b35e51 -r 26b69d176146 templates/admin/samples/bar_codes.mako
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/admin/samples/bar_codes.mako Thu Jul 23 17:08:21 2009 -0400
@@ -0,0 +1,37 @@
+<%inherit file="/base.mako"/>
+<%namespace file="/message.mako" import="render_msg" />
+
+<h2>Bar codes for Samples of Request: ${request.name}</h2>
+<h3>User: ${user.email}</h3>
+
+%if msg:
+ ${render_msg( msg, messagetype )}
+%endif
+
+<div class="toolForm">
+ <form name="bar_codes" action="${h.url_for( controller='requests_admin', action='save_bar_codes', request_id=request.id)}" method="post" >
+ <table class="grid">
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Description</th>
+ <th>Bar code</th>
+ </tr>
+ </thead>
+ <tbody>
+ %for index, sample in enumerate(samples_list):
+ <tr class="libraryRow libraryOrFolderRow" id="libraryRow">
+ <td><b><a>${sample.name}</a></b></td>
+ <td><a>${sample.desc}</a></td>
+ <td>
+ <input type="text" name="sample_${index}_bar_code" value=${sample.bar_code} size="40"/>
+ </td>
+ </tr>
+ %endfor
+ </tbody>
+ </table>
+ <div class="form-row">
+ <input type="submit" name="save_new_sample_type" value="Save"/>
+ </div>
+ </form>
+</div>
\ No newline at end of file
diff -r f75758b35e51 -r 26b69d176146 templates/admin/samples/change_state.mako
--- a/templates/admin/samples/change_state.mako Thu Jul 23 14:31:11 2009 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-<%inherit file="/base.mako"/>
-<%namespace file="/message.mako" import="render_msg" />
-
-
-%if msg:
- ${render_msg( msg, messagetype )}
-%endif
-<div class="toolForm">
- <div class="toolFormTitle">${title}</div>
- <div class="toolFormBody">
- <form name="event" action="${h.url_for( controller='requests_admin', action='save_state', new=True, sample_id_list=sample_id_list)}" method="post" >
- %for w in widgets:
- <div class="form-row">
- <label>
- ${w[0]}
- </label>
- ${w[1].get_html()}
- %if w[0] == 'Comments':
- <div class="toolParamHelp" style="clear: both;">
- Optional
- </div>
- %endif
- </div>
- %endfor
- <div class="form-row">
- <input type="submit" name="add_event" value="Save"/>
- </div>
- </form>
- </div>
-</div>
\ No newline at end of file
diff -r f75758b35e51 -r 26b69d176146 templates/admin/samples/edit_sample.mako
--- a/templates/admin/samples/edit_sample.mako Thu Jul 23 14:31:11 2009 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-<%inherit file="/base.mako"/>
-<%namespace file="/message.mako" import="render_msg" />
-
-
-%if msg:
- ${render_msg( msg, messagetype )}
-%endif
-
-<div class="toolForm">
- <div class="toolFormTitle">Edit sample named: ${values.content['Name']}</div>
- <div class="toolFormBody">
- <form name="sample" action="${h.url_for( controller='sample', action='do', save_changes=True, sample_id=sample.id )}" method="post" >
- <div class="form-row">
- <label>
- Library:
- </label>
- <select name="library_id">
- %for library in libraries:
- <option value="${library.id}">${library.name}</option>
- %endfor
- </select>
- </div>
- %for i, field in enumerate(form.fields):
- <div class="form-row">
- <label>${field['label']}</label>
- %if field['type'] == 'TextField':
- <input type="text" name="${field['label']}" value="${values.content[field['label']]}" size="40"/>
- %elif field['type'] == 'TextArea':
- <textarea name="${field['label']}" rows="3" cols="35">${values.content[field['label']]}</textarea>
- %elif field['type'] == 'CheckBox':
- %if values.content[field['label']] == "true":
- <input type="checkbox" name="${field['label']}" value="true" checked>
- %else:
- <input type="checkbox" name="${field['label']}" value="true">
- %endif
- %elif field['type'] == 'SelectBox':
- <select name="${field['label']}">
- %for ft in field['selectlist']:
- %if ft == values.content[field['label']]:
- <option value="${ft}" selected>${ft}</option>
- %else:
- <option value="${ft}">${ft}</option>
- %endif
- %endfor
- </select>
- %endif
- <div class="toolParamHelp" style="clear: both;">
- ${field['helptext']}
- </div>
- <div style="clear: both"></div>
- </div>
- %endfor
- <div class="form-row">
- <div style="float: left; width: 250px; margin-right: 10px;">
- <input type="hidden" name="new" value="submitted" size="40"/>
- </div>
- <div style="clear: both"></div>
- </div>
- <div class="form-row">
- <input type="submit" name="create_library_button" value="Save"/>
- </div>
- </form>
- </div>
-</div>
-<div class="toolForm">
- <div class="toolFormBody">
- <form name="event" action="${h.url_for( controller='admin', action='event', new=True, sample_id=sample.id)}" method="post" >
- <div class="form-row">
- <label>
- Change sample state to:
- </label>
- <select name="state_id">
- %for state in states:
- <option value="${state.id}">${state.name}</option>
- %endfor
- </select>
- </div>
- <div class="form-row">
- <input type="submit" name="add_event" value="Save"/>
- </div>
- </form>
- </div>
-</div>
\ No newline at end of file
diff -r f75758b35e51 -r 26b69d176146 templates/admin/samples/events.mako
--- a/templates/admin/samples/events.mako Thu Jul 23 14:31:11 2009 -0400
+++ b/templates/admin/samples/events.mako Thu Jul 23 17:08:21 2009 -0400
@@ -1,33 +1,57 @@
<%inherit file="/base.mako"/>
<%namespace file="/message.mako" import="render_msg" />
-<%def name="title()">Events for Sample ${sample_name}</%def>
+<%def name="title()">Events for Sample ${sample.name}</%def>
-<h2>Events for Sample "${sample_name}" of Request: ${request}</h2>
-<h3>User: ${user.email}</h3>
+<h2>Events for Sample "${sample.name}" of Request: <a href="${h.url_for( controller='requests_admin', action='list', operation='show_request', id=trans.security.encode_id(sample.request.id))}">${sample.request.name}</a></h2>
+<h3>User: ${sample.request.user.email}</h3>
%if msg:
${render_msg( msg, messagetype )}
%endif
-
-<table class="grid">
- <thead>
- <tr>
- <th>State</th>
- <th>Description</th>
- <th>Last Update</th>
- <th>Comments</th>
- </tr>
- </thead>
- <tbody>
- %for state, desc, updated, comments in events_list:
- <tr class="libraryRow libraryOrFolderRow" id="libraryRow">
- <td><b><a>${state}</a></b></td>
- <td><a>${desc}</a></td>
- <td><a>${updated}</a></td>
- <td><a>${comments}</a></td>
- </tr>
- %endfor
- </tbody>
-</table>
\ No newline at end of file
+<div class="toolForm">
+ <table class="grid">
+ <thead>
+ <tr>
+ <th>State</th>
+ <th>Description</th>
+ <th>Last Update</th>
+ <th>Comments</th>
+ </tr>
+ </thead>
+ <tbody>
+ %for state, desc, updated, comments in events_list:
+ <tr class="libraryRow libraryOrFolderRow" id="libraryRow">
+ <td><b><a>${state}</a></b></td>
+ <td><a>${desc}</a></td>
+ <td><a>${updated}</a></td>
+ <td><a>${comments}</a></td>
+ </tr>
+ %endfor
+ </tbody>
+ </table>
+</div>
+<div class="toolForm">
+ <div class="toolFormTitle">Change current state</div>
+ <div class="toolFormBody">
+ <form name="event" action="${h.url_for( controller='requests_admin', action='save_state', new=True, sample_id=sample.id)}" method="post" >
+ %for w in widgets:
+ <div class="form-row">
+ <label>
+ ${w[0]}
+ </label>
+ ${w[1].get_html()}
+ %if w[0] == 'Comments':
+ <div class="toolParamHelp" style="clear: both;">
+ Optional
+ </div>
+ %endif
+ </div>
+ %endfor
+ <div class="form-row">
+ <input type="submit" name="add_event" value="Save"/>
+ </div>
+ </form>
+ </div>
+</div>
\ No newline at end of file
diff -r f75758b35e51 -r 26b69d176146 templates/admin/samples/grid.mako
--- a/templates/admin/samples/grid.mako Thu Jul 23 14:31:11 2009 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,203 +0,0 @@
-<%inherit file="/base.mako"/>
-<%namespace file="/message.mako" import="render_msg" />
-
-<%def name="title()">Browse Samples</%def>
-
-%if message:
- <p>
- <div class="${message_type}message transient-message">${message}</div>
- <div style="clear: both"></div>
- </p>
-%endif
-
-<%def name="javascripts()">
- ${parent.javascripts()}
- <script type="text/javascript">
- ## TODO: generalize and move into galaxy.base.js
- $(document).ready(function() {
- $(".grid").each( function() {
- var grid = this;
- var checkboxes = $(this).find("input.grid-row-select-checkbox");
- var update = $(this).find( "span.grid-selected-count" );
- $(checkboxes).each( function() {
- $(this).change( function() {
- var n = $(checkboxes).filter("[checked]").size();
- update.text( n );
- });
- })
- });
- });
- ## Can this be moved into base.mako?
- %if refresh_frames:
- %if 'masthead' in refresh_frames:
- ## Refresh masthead == user changes (backward compatibility)
- if ( parent.user_changed ) {
- %if trans.user:
- parent.user_changed( "${trans.user.email}", ${int( app.config.is_admin_user( trans.user ) )} );
- %else:
- parent.user_changed( null, false );
- %endif
- }
- %endif
- %if 'history' in refresh_frames:
- if ( parent.frames && parent.frames.galaxy_history ) {
- parent.frames.galaxy_history.location.href="${h.url_for( controller='root', action='history')}";
- if ( parent.force_right_panel ) {
- parent.force_right_panel( 'show' );
- }
- }
- %endif
- %if 'tools' in refresh_frames:
- if ( parent.frames && parent.frames.galaxy_tools ) {
- parent.frames.galaxy_tools.location.href="${h.url_for( controller='root', action='tool_menu')}";
- if ( parent.force_left_panel ) {
- parent.force_left_panel( 'show' );
- }
- }
- %endif
- %endif
- </script>
-</%def>
-
-<%def name="stylesheets()">
- <link href="${h.url_for('/static/style/base.css')}" rel="stylesheet" type="text/css" />
- <style>
- ## Not generic to all grids -- move to base?
- .count-box {
- min-width: 1.1em;
- padding: 5px;
- border-width: 1px;
- border-style: solid;
- text-align: center;
- display: inline-block;
- }
- </style>
-</%def>
-
-<div class="grid-header">
- <h2>Samples associated with request: ${grid.request.name}</h2>
- <h3>User: ${grid.user.email}</h3>
-## %if len(query.all()):
-## <span class="title">Filter:</span>
-## %for i, filter in enumerate( grid.standard_filters ):
-## %if i > 0:
-## <span>|</span>
-## %endif
-## <span class="filter"><a href="${url( filter.get_url_args() )}">${filter.label}</a></span>
-## %endfor
-## %endif
-</div>
-
-%if not len(query.all()):
- There are no sample(s).
-%else:
-<form name="history_actions" action="${url()}" method="post" >
- <table class="grid">
- <thead>
- <tr>
- <th></th>
- %for column in grid.columns:
- %if column.visible:
- <%
- href = ""
- extra = ""
- if column.sortable:
- if sort_key == column.key:
- if sort_order == "asc":
- href = url( sort=( "-" + column.key ) )
- extra = "↓"
- else:
- href = url( sort=( column.key ) )
- extra = "↑"
- else:
- href = url( sort=column.key )
- %>
- <th\
- %if column.ncells > 1:
- colspan="${column.ncells}"
- %endif
- >
- %if href:
- <a href="${href}">${column.label}</a>
- %else:
- ${column.label}
- %endif
- <span>${extra}</span>
- </th>
- %endif
- %endfor
- <th></th>
- </tr>
- </thead>
- <tbody>
- %for i, item in enumerate( query ):
- <tr \
- %if current_item == item:
- class="current" \
- %endif
- >
- ## Item selection column
- <td style="width: 1.5em;">
- <input type="checkbox" name="id" value=${trans.security.encode_id( item.id )} class="grid-row-select-checkbox" />
- </td>
- ## Data columns
- %for column in grid.columns:
- %if column.visible:
- <%
- # Link
- if column.link and column.link( item ):
- href = url( **column.link( item ) )
- else:
- href = None
- # Value (coerced to list so we can loop)
- value = column.get_value( trans, grid, item )
- if column.ncells == 1:
- value = [ value ]
- %>
- %for cellnum, v in enumerate( value ):
- <%
- # Attach popup menu?
- if column.attach_popup and cellnum == 0:
- extra = '<a id="grid-%d-popup" class="popup-arrow" style="display: none;">▼</a>' % i
- else:
- extra = ""
- %>
- %if href:
- <td><a href="${href}">${v}</a> ${extra}</td>
- %else:
- <td >${v}${extra}</td>
- %endif
- </td>
- %endfor
- %endif
- %endfor
- ## Actions column
- <td>
- <div popupmenu="grid-${i}-popup">
- %for operation in grid.operations:
- %if operation.allowed( item ):
- <a class="action-button" href="${url( operation=operation.label, id=item.id )}">${operation.label}</a>
- %endif
- %endfor
- </div>
- </td>
- </tr>
- %endfor
- </tbody>
- <tfoot>
- <tr>
- <td></td>
- <td colspan="100">
- For <span class="grid-selected-count"></span> selected requests:
- %for operation in grid.operations:
- %if operation.allow_multiple:
- <input type="submit" name="operation" value="${operation.label}" class="action-button">
- %endif
- %endfor
- </td>
- </tr>
- </tfoot>
- </table>
-</form>
-
-%endif
diff -r f75758b35e51 -r 26b69d176146 templates/admin/samples/view_sample.mako
--- a/templates/admin/samples/view_sample.mako Thu Jul 23 14:31:11 2009 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-<%inherit file="/base.mako"/>
-<%namespace file="/message.mako" import="render_msg" />
-
-
-%if msg:
- ${render_msg( msg, messagetype )}
-%endif
-
-<div class="toolForm">
- <div class="toolFormTitle">Sample Details: '${sample_details[0]['value']}'</div>
- %for index, rd in enumerate(sample_details):
- <div class="form-row">
- <label>${rd['label']}</label>
- ${rd['value']}
- </div>
- <div style="clear: both"></div>
- %endfor
- </div>
-</div>
diff -r f75758b35e51 -r 26b69d176146 templates/base.mako
--- a/templates/base.mako Thu Jul 23 14:31:11 2009 -0400
+++ b/templates/base.mako Thu Jul 23 17:08:21 2009 -0400
@@ -33,30 +33,3 @@
</%def>
-<script type="text/javascript">
-$( function() {
- $( "select[refresh_on_change='true']").change( function() {
- var refresh = false;
- var refresh_on_change_values = $( this )[0].attributes.getNamedItem( 'refresh_on_change_values' )
- if ( refresh_on_change_values ) {
- refresh_on_change_values = refresh_on_change_values.value.split( ',' );
- var last_selected_value = $( this )[0].attributes.getNamedItem( 'last_selected_value' );
- for( i= 0; i < refresh_on_change_values.length; i++ ) {
- if ( $( this )[0].value == refresh_on_change_values[i] || ( last_selected_value && last_selected_value.value == refresh_on_change_values[i] ) ){
- refresh = true;
- break;
- }
- }
- }
- else {
- refresh = true;
- }
- if ( refresh ){
- $( ':file' ).each( function() {
- var file_value = $( this )[0].value;
- } );
- $( "#edit_form" ).submit();
- }
- });
-});
-</script>
\ No newline at end of file
diff -r f75758b35e51 -r 26b69d176146 templates/base_panels.mako
--- a/templates/base_panels.mako Thu Jul 23 14:31:11 2009 -0400
+++ b/templates/base_panels.mako Thu Jul 23 17:08:21 2009 -0400
@@ -156,7 +156,14 @@
${tab( "libraries", "Libraries", h.url_for( controller='library', action='index' ))}
- ${tab( "requests", "Requests", h.url_for( controller='requests', action='index' ), visible = (trans.user and trans.request_types)) }
+ <td class="tab">
+ <a>Lab</a>
+ <div class="submenu">
+ <ul>
+ <li><a target="requests" href="${h.url_for( controller='requests', action='index' )}">Sequencing Requests</a></li>
+ </ul>
+ </div>
+ </td>
%if app.config.get_bool( 'enable_tracks', False ):
<td class="tab">
diff -r f75758b35e51 -r 26b69d176146 templates/requests/grid.mako
--- a/templates/requests/grid.mako Thu Jul 23 14:31:11 2009 -0400
+++ b/templates/requests/grid.mako Thu Jul 23 17:08:21 2009 -0400
@@ -184,7 +184,11 @@
<div popupmenu="grid-${i}-popup">
%for operation in grid.operations:
%if operation.allowed( item ):
- <a class="action-button" href="${url( operation=operation.label, id=item.id )}">${operation.label}</a>
+ %if operation.label == 'Submit':
+ <a class="action-button" confirm="More samples cannot be added to this request once it is submitted. Click OK to submit." href="${url( operation=operation.label, id=item.id)}">${operation.label}</a>
+ %else:
+ <a class="action-button" href="${url( operation=operation.label, id=item.id )}">${operation.label}</a>
+ %endif
%endif
%endfor
</div>
diff -r f75758b35e51 -r 26b69d176146 templates/requests/new_request.mako
--- a/templates/requests/new_request.mako Thu Jul 23 14:31:11 2009 -0400
+++ b/templates/requests/new_request.mako Thu Jul 23 17:08:21 2009 -0400
@@ -9,11 +9,14 @@
<div class="toolForm">
<div class="toolFormTitle">${title}</div>
<div class="toolFormBody">
- <form name="sample" action="${h.url_for( controller='requests', action='new', save=True, request_form_id=request_form_id, request_type_id=request_type.id )}" method="post" >
+ <form id="new_request" name="new_request" action="${h.url_for( controller='requests', action='new', save=True, request_form_id=request_form_id, request_type_id=request_type.id )}" method="post" >
%for i, field in enumerate(widgets):
<div class="form-row">
<label>${field['label']}</label>
${field['widget'].get_html()}
+ %if field['label'] == 'Library' and new_library:
+ ${new_library.get_html()}
+ %endif
<div class="toolParamHelp" style="clear: both;">
${field['helptext']}
</div>
@@ -26,7 +29,10 @@
</div>
<div style="clear: both"></div>
</div>
- <input type="submit" name="create_library_button" value="Save"/>
+ <div class="form-row">
+ <input type="submit" name="create_request_button" value="Save"/>
+ <input type="submit" name="create_request_samples_button" value="Add samples"/>
+ </div>
</form>
</div>
</div>
\ No newline at end of file
diff -r f75758b35e51 -r 26b69d176146 templates/requests/show_request.mako
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/requests/show_request.mako Thu Jul 23 17:08:21 2009 -0400
@@ -0,0 +1,157 @@
+<%inherit file="/base.mako"/>
+<%namespace file="/message.mako" import="render_msg" />
+
+
+%if msg:
+ ${render_msg( msg, messagetype )}
+%endif
+
+
+<div class="grid-header">
+ <h2>Request: ${request.name}</h2>
+</div>
+
+%if not request.submitted and request.samples:
+<ul class="manage-table-actions">
+ <li>
+ <a class="action-button" confirm="More samples cannot be added to this request once it is submitted. Click OK to submit." href="${h.url_for( controller='requests', action='submit_request', id=request.id)}">
+ <span>Submit request</span></a>
+ </li>
+</ul>
+%endif
+
+
+<%def name="render_sample_form( index, sample_name, sample_values )">
+ <td>
+ <input type="text" name=sample_${index}_name value="${sample_name}" size="15"/>
+ <div class="toolParamHelp" style="clear: both;">
+ <i>${' (required)' }</i>
+ </div>
+ </td>
+ <td>
+ </td>
+ %for field_index, field in enumerate(request.type.sample_form.fields):
+ <td>
+ <input type="text" name=sample_${index}_field_${field_index} value="${sample_values[field_index]}" size="15"/>
+ <div class="toolParamHelp" style="clear: both;">
+ <i>${'('+field['required']+')' }</i>
+ </div>
+ </td>
+ %endfor
+</%def>
+
+<%def name="render_sample( index, sample )">
+ <td>
+ ${sample.name}
+ </td>
+ <td>
+ <a href="${h.url_for( controller='requests', action='show_events', sample_id=sample.id)}">${sample.current_state().name}</a>
+ </td>
+ %for field_index, field in enumerate(request.type.sample_form.fields):
+ <td>
+ %if sample.values.content[field_index]:
+ ${sample.values.content[field_index]}
+ %else:
+ <i>None</i>
+ %endif
+ </td>
+ %endfor
+</%def>
+
+<div class="toolForm">
+ ##<div class="toolFormTitle">Request Details: '${request_details[0]['value']}'</div>
+ %for index, rd in enumerate(request_details):
+ <div class="form-row">
+ <label>${rd['label']}</label>
+ %if not rd['value']:
+ <i>None</i>
+ %else:
+ %if rd['label'] == 'Library':
+ <a href="${h.url_for( controller='library', action='browse_library', id=request.library.id )}">${rd['value']}</a>
+ %else:
+ ${rd['value']}
+ %endif
+ %endif
+ </div>
+ <div style="clear: both"></div>
+ %endfor
+ </div>
+</div>
+
+<div class="toolForm">
+ ##<div class="toolFormTitle">Samples (${len(request.samples)})</div>
+ <form id="edit_form" name="edit_form" action="${h.url_for( controller='requests', action='show_request', request_id=request.id )}" method="post" >
+ <div class="form-row">
+ %if current_samples:
+ <table class="grid">
+ <thead>
+ <tr>
+ <th>No.</th>
+ <th>Sample Name</th>
+ <th>State</th>
+ %for field_index, field in enumerate(request.type.sample_form.fields):
+ <th>
+ ${field['label']}
+ <div class="toolParamHelp" style="clear: both;">
+ <i>${field['helptext']}</i>
+ </div>
+ </th>
+ %endfor
+ <th></th>
+ </tr>
+ <thead>
+ <tbody>
+ %for sample_index, sample in enumerate(current_samples):
+ <tr>
+ <td>${sample_index+1}</td>
+ %if sample[0] in [s.name for s in request.samples]:
+ ${render_sample( sample_index, request.samples[sample_index] )}
+ %else:
+ ${render_sample_form( sample_index, sample[0], sample[1])}
+ %endif
+ <td>
+ %if not request.submitted:
+ <a class="action-button" href="${h.url_for( controller='requests', action='delete_sample', request_id=request.id, sample_id=sample_index)}">
+ <img src="${h.url_for('/static/images/delete_icon.png')}" />
+ <span></span></a>
+ %endif
+ </td>
+ </tr>
+ %endfor
+ </tbody>
+ </table>
+ %else:
+ <label>There are no samples.</label>
+ %endif
+
+ </div>
+ %if not request.submitted:
+ <br/>
+ <br/>
+ <div class="form-row">
+ <ul class="manage-table-actions">
+ <li>
+ %if current_samples:
+ <a>Copy from sample no. </a>
+ ${sample_copy.get_html()}
+ %endif
+ <input type="submit" name="add_sample_button" value="Add New"/>
+
+ </li>
+ </ul>
+ </div>
+ %endif
+ %if not request.submitted and (request.samples or current_samples):
+ <div class="form-row">
+ <div style="float: left; width: 250px; margin-right: 10px;">
+ <input type="hidden" name="refresh" value="true" size="40"/>
+ </div>
+ <div style="clear: both"></div>
+ </div>
+ <div class="form-row">
+ <input type="submit" name="save_samples_button" value="Save"/>
+ </div>
+ %endif
+ ##</div>
+ </form>
+</div>
diff -r f75758b35e51 -r 26b69d176146 templates/requests/view_request.mako
--- a/templates/requests/view_request.mako Thu Jul 23 14:31:11 2009 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-<%inherit file="/base.mako"/>
-<%namespace file="/message.mako" import="render_msg" />
-
-
-%if msg:
- ${render_msg( msg, messagetype )}
-%endif
-
-<div class="toolForm">
- <div class="toolFormTitle">Request Details: '${request_details[0]['value']}'</div>
- %for index, rd in enumerate(request_details):
- <div class="form-row">
- <label>${rd['label']}</label>
- ##<i>${rd['helptext']}</i>
- ${rd['value']}
- </div>
- <div style="clear: both"></div>
- %endfor
- </div>
-</div>
\ No newline at end of file
diff -r f75758b35e51 -r 26b69d176146 templates/sample/browse_samples.mako
--- a/templates/sample/browse_samples.mako Thu Jul 23 14:31:11 2009 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-<%inherit file="/base.mako"/>
-<%namespace file="/message.mako" import="render_msg" />
-
-<%def name="title()">Browse Samples</%def>
-
-<h2>Samples</h2>
-
-<ul class="manage-table-actions">
- %if not deleted:
- <li>
- <a class="action-button" href="${h.url_for( controller='sample', action='do', new=True )}"><span>Add Sample</span></a>
- </li>
- %endif
-</ul>
-
-%if msg:
- ${render_msg( msg, messagetype )}
-%endif
-
-%if not samples_list:
- You have no samples.
-%else:
- <table class="grid">
- <thead>
- <tr>
- <th>Name</th>
- <th>Description</th>
- <th>Type</th>
- <th>State</th>
- </tr>
- </thead>
- <tbody>
- %for id, name, desc, st, state in samples_list:
- <tr class="libraryRow libraryOrFolderRow" id="libraryRow">
- <td><b><a href="${h.url_for( controller='sample', action='do', sample_id=id, edit=True)}">${name}</a></b></td>
- <td><a>${desc}</a></td>
- <td><a>${st}</a></td>
- <td><a href="${h.url_for( controller='sample', action='events', sample_id=id)}">${state}</a></td>
- </tr>
- %endfor
- </tbody>
- </table>
-%endif
\ No newline at end of file
diff -r f75758b35e51 -r 26b69d176146 templates/sample/edit_sample.mako
--- a/templates/sample/edit_sample.mako Thu Jul 23 14:31:11 2009 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-<%inherit file="/base.mako"/>
-<%namespace file="/message.mako" import="render_msg" />
-
-
-%if msg:
- ${render_msg( msg, messagetype )}
-%endif
-
-<div class="toolForm">
- <div class="toolFormTitle">Edit sample named: ${values.content['Name']}</div>
- <div class="toolFormBody">
- <form name="sample" action="${h.url_for( controller='sample', action='do', save_changes=True, sample_id=sample.id )}" method="post" >
- <div class="form-row">
- <label>
- Library:
- </label>
- <select name="library_id">
- %for library in libraries:
- <option value="${library.id}">${library.name}</option>
- %endfor
- </select>
- </div>
- %for i, field in enumerate(form.fields):
- <div class="form-row">
- <label>${field['label']}</label>
- %if field['type'] == 'TextField':
- <input type="text" name="${field['label']}" value="${values.content[field['label']]}" size="40"/>
- %elif field['type'] == 'TextArea':
- <textarea name="${field['label']}" rows="3" cols="35">${values.content[field['label']]}</textarea>
- %elif field['type'] == 'CheckBox':
- %if values.content[field['label']] == "true":
- <input type="checkbox" name="${field['label']}" value="true" checked>
- %else:
- <input type="checkbox" name="${field['label']}" value="true">
- %endif
- %elif field['type'] == 'SelectBox':
- <select name="${field['label']}">
- %for ft in field['selectlist']:
- %if ft == values.content[field['label']]:
- <option value="${ft}" selected>${ft}</option>
- %else:
- <option value="${ft}">${ft}</option>
- %endif
- %endfor
- </select>
- %endif
- <div class="toolParamHelp" style="clear: both;">
- ${field['helptext']}
- </div>
- <div style="clear: both"></div>
- </div>
- %endfor
- <div class="form-row">
- <div style="float: left; width: 250px; margin-right: 10px;">
- <input type="hidden" name="new" value="submitted" size="40"/>
- </div>
- <div style="clear: both"></div>
- </div>
- <div class="form-row">
- <input type="submit" name="create_library_button" value="Save"/>
- </div>
- </form>
- </div>
-</div>
diff -r f75758b35e51 -r 26b69d176146 templates/sample/grid.mako
--- a/templates/sample/grid.mako Thu Jul 23 14:31:11 2009 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,210 +0,0 @@
-<%inherit file="/base.mako"/>
-<%namespace file="/message.mako" import="render_msg" />
-
-<%def name="title()">Browse Samples</%def>
-
-%if message:
- <p>
- <div class="${message_type}message transient-message">${message}</div>
- <div style="clear: both"></div>
- </p>
-%endif
-
-<%def name="javascripts()">
- ${parent.javascripts()}
- <script type="text/javascript">
- ## TODO: generalize and move into galaxy.base.js
- $(document).ready(function() {
- $(".grid").each( function() {
- var grid = this;
- var checkboxes = $(this).find("input.grid-row-select-checkbox");
- var update = $(this).find( "span.grid-selected-count" );
- $(checkboxes).each( function() {
- $(this).change( function() {
- var n = $(checkboxes).filter("[checked]").size();
- update.text( n );
- });
- })
- });
- });
- ## Can this be moved into base.mako?
- %if refresh_frames:
- %if 'masthead' in refresh_frames:
- ## Refresh masthead == user changes (backward compatibility)
- if ( parent.user_changed ) {
- %if trans.user:
- parent.user_changed( "${trans.user.email}", ${int( app.config.is_admin_user( trans.user ) )} );
- %else:
- parent.user_changed( null, false );
- %endif
- }
- %endif
- %if 'history' in refresh_frames:
- if ( parent.frames && parent.frames.galaxy_history ) {
- parent.frames.galaxy_history.location.href="${h.url_for( controller='root', action='history')}";
- if ( parent.force_right_panel ) {
- parent.force_right_panel( 'show' );
- }
- }
- %endif
- %if 'tools' in refresh_frames:
- if ( parent.frames && parent.frames.galaxy_tools ) {
- parent.frames.galaxy_tools.location.href="${h.url_for( controller='root', action='tool_menu')}";
- if ( parent.force_left_panel ) {
- parent.force_left_panel( 'show' );
- }
- }
- %endif
- %endif
- </script>
-</%def>
-
-<%def name="stylesheets()">
- <link href="${h.url_for('/static/style/base.css')}" rel="stylesheet" type="text/css" />
- <style>
- ## Not generic to all grids -- move to base?
- .count-box {
- min-width: 1.1em;
- padding: 5px;
- border-width: 1px;
- border-style: solid;
- text-align: center;
- display: inline-block;
- }
- </style>
-</%def>
-
-<div class="grid-header">
- <h2>Samples associated with request: ${grid.request.name}</h2>
-## %if len(query.all()):
-## <span class="title">Filter:</span>
-## %for i, filter in enumerate( grid.standard_filters ):
-## %if i > 0:
-## <span>|</span>
-## %endif
-## <span class="filter"><a href="${url( filter.get_url_args() )}">${filter.label}</a></span>
-## %endfor
-## %endif
-</div>
-
-<ul class="manage-table-actions">
- <li>
- <a class="action-button" href="${h.url_for( controller='requests', action='add_sample', request_id=grid.request.id)}">
- <img src="${h.url_for('/static/images/silk/add.png')}" />
- <span>Add sample</span></a>
- </li>
-</ul>
-
-%if not len(query.all()):
- There are no sample(s).
-%else:
-<form name="history_actions" action="${url()}" method="post" >
- <table class="grid">
- <thead>
- <tr>
- <th></th>
- %for column in grid.columns:
- %if column.visible:
- <%
- href = ""
- extra = ""
- if column.sortable:
- if sort_key == column.key:
- if sort_order == "asc":
- href = url( sort=( "-" + column.key ) )
- extra = "↓"
- else:
- href = url( sort=( column.key ) )
- extra = "↑"
- else:
- href = url( sort=column.key )
- %>
- <th\
- %if column.ncells > 1:
- colspan="${column.ncells}"
- %endif
- >
- %if href:
- <a href="${href}">${column.label}</a>
- %else:
- ${column.label}
- %endif
- <span>${extra}</span>
- </th>
- %endif
- %endfor
- <th></th>
- </tr>
- </thead>
- <tbody>
- %for i, item in enumerate( query ):
- <tr \
- %if current_item == item:
- class="current" \
- %endif
- >
- ## Item selection column
- <td style="width: 1.5em;">
- <input type="checkbox" name="id" value=${trans.security.encode_id( item.id )} class="grid-row-select-checkbox" />
- </td>
- ## Data columns
- %for column in grid.columns:
- %if column.visible:
- <%
- # Link
- if column.link and column.link( item ):
- href = url( **column.link( item ) )
- else:
- href = None
- # Value (coerced to list so we can loop)
- value = column.get_value( trans, grid, item )
- if column.ncells == 1:
- value = [ value ]
- %>
- %for cellnum, v in enumerate( value ):
- <%
- # Attach popup menu?
- if column.attach_popup and cellnum == 0:
- extra = '<a id="grid-%d-popup" class="popup-arrow" style="display: none;">▼</a>' % i
- else:
- extra = ""
- %>
- %if href:
- <td><a href="${href}">${v}</a> ${extra}</td>
- %else:
- <td >${v}${extra}</td>
- %endif
- </td>
- %endfor
- %endif
- %endfor
- ## Actions column
-## <td>
-## <div popupmenu="grid-${i}-popup">
-## %for operation in grid.operations:
-## %if operation.allowed( item ):
-## <a class="action-button" href="${url( operation=operation.label, id=trans.security.encode_id( item.id ) )}">${operation.label}</a>
-## %endif
-## %endfor
-## </div>
-## </td>
- </tr>
- %endfor
- </tbody>
-## <tfoot>
-## <tr>
-## <td></td>
-## <td colspan="100">
-## For <span class="grid-selected-count"></span> selected requests:
-## %for operation in grid.operations:
-## %if operation.allow_multiple:
-## <input type="submit" name="operation" value="${operation.label}" class="action-button">
-## %endif
-## %endfor
-## </td>
-## </tr>
-## </tfoot>
- </table>
-</form>
-
-%endif
diff -r f75758b35e51 -r 26b69d176146 templates/sample/new_sample.mako
--- a/templates/sample/new_sample.mako Thu Jul 23 14:31:11 2009 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-<%inherit file="/base.mako"/>
-<%namespace file="/message.mako" import="render_msg" />
-
-
-%if msg:
- ${render_msg( msg, messagetype )}
-%endif
-
-<div class="toolForm">
- <div class="toolFormTitle">${title}</div>
- <div class="toolFormBody">
- <form name="sample" action="${h.url_for( controller='requests', action='samples', save=True, sample_form_id=sample_form_id, request_id=request_id )}" method="post" >
- %for i, field in enumerate(widgets):
- <div class="form-row">
- <label>${field['label']}</label>
- ${field['widget'].get_html()}
- <div class="toolParamHelp" style="clear: both;">
- ${field['helptext']}
- </div>
- <div style="clear: both"></div>
- </div>
- %endfor
- <div class="form-row">
- <div style="float: left; width: 250px; margin-right: 10px;">
- <input type="hidden" name="new" value="submitted" size="40"/>
- </div>
- <div style="clear: both"></div>
- </div>
- <input type="submit" name="create_sample_button" value="Save"/>
- </form>
- </div>
-</div>
\ No newline at end of file
diff -r f75758b35e51 -r 26b69d176146 templates/sample/sample_events.mako
--- a/templates/sample/sample_events.mako Thu Jul 23 14:31:11 2009 -0400
+++ b/templates/sample/sample_events.mako Thu Jul 23 17:08:21 2009 -0400
@@ -3,7 +3,7 @@
<%def name="title()">Events for Sample ${sample_name}</%def>
-<h2>Events for Sample "${sample_name}" of Request: ${request}</h2>
+<h2>Events for Sample "${sample_name}" of Request: <a href="${h.url_for( controller='requests', action='list', operation='show_request', id=trans.security.encode_id(request.id))}">${request.name}</a></h2>
%if msg:
${render_msg( msg, messagetype )}
diff -r f75758b35e51 -r 26b69d176146 templates/sample/view_sample.mako
--- a/templates/sample/view_sample.mako Thu Jul 23 14:31:11 2009 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-<%inherit file="/base.mako"/>
-<%namespace file="/message.mako" import="render_msg" />
-
-
-%if msg:
- ${render_msg( msg, messagetype )}
-%endif
-
-<div class="toolForm">
- <div class="toolFormTitle">Sample Details: '${sample_details[0]['value']}'</div>
- %for index, rd in enumerate(sample_details):
- <div class="form-row">
- <label>${rd['label']}</label>
- ${rd['value']}
- </div>
- <div style="clear: both"></div>
- %endfor
- </div>
-</div>
1
0
Post-installation: AttributeError: 'builtin_function_or_method' object has no attribute 'body'
by Pedro Silva 28 Jul '09
by Pedro Silva 28 Jul '09
28 Jul '09
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi all,
I'm trying out Galaxy. Installation went fine, but most links other than
those under Tools (Workflow, Libraries, Help, User, etc.) return a
python traceback (included below) relating to AttributeError.
I'm pretty new to Python and the egg system, so I am having a hard time
figuring out the problem. I've tested this with the generic release
tarball, mercurial checkout, and latest 3851029eda94 revision.
I'm running this on Ubuntu 9.04 x86_64 with Python 2.6.2 (but already
tested with 2.4 and 2.5 as well -- both fail to start the server).
I've a server running at http://dzlab.pmb.berkeley.edu:8081/, in case it
helps.
Thanks for your help. The software looks pretty sweet in any case.
Pedro
Traceback:
- ---
URL: http://dzlab.pmb.berkeley.edu:8081/workflow/list
File
'/home/psilva/src/galaxy_dist/eggs/py2.6-noplatform/WebError-0.8a-py2.6.egg/weberror/evalexception/middleware.py',
line 364 in respond
File
'/home/psilva/src/galaxy_dist/eggs/py2.6-noplatform/Paste-1.5.1-py2.6.egg/paste/debug/prints.py',
line 98 in __call__
File
'/home/psilva/src/galaxy_dist/eggs/py2.6-noplatform/Paste-1.5.1-py2.6.egg/paste/wsgilib.py',
line 539 in intercept_output
File
'/home/psilva/src/galaxy_dist/eggs/py2.6-noplatform/Beaker-0.5-py2.6.egg/beaker/session.py',
line 103 in __call__
File
'/home/psilva/src/galaxy_dist/eggs/py2.6-noplatform/Paste-1.5.1-py2.6.egg/paste/recursive.py',
line 80 in __call__
File
'/home/psilva/src/galaxy_dist/eggs/py2.6-noplatform/Paste-1.5.1-py2.6.egg/paste/httpexceptions.py',
line 632 in __call__
File '/home/psilva/src/galaxy_dist/lib/galaxy/web/framework/base.py',
line 126 in __call__
body = method( trans, **kwargs )
File
'/home/psilva/src/galaxy_dist/lib/galaxy/web/framework/__init__.py',
line 74 in decorator
% ( url_for( controller='user', action='login' ), verb ) )
File
'/home/psilva/src/galaxy_dist/lib/galaxy/web/framework/__init__.py',
line 542 in show_error_message
return self.show_message( message, 'error', refresh_frames )
File
'/home/psilva/src/galaxy_dist/lib/galaxy/web/framework/__init__.py',
line 537 in show_message
return self.fill_template( "message.mako", message_type=type,
message=message, refresh_frames=refresh_frames, cont=cont )
File
'/home/psilva/src/galaxy_dist/lib/galaxy/web/framework/__init__.py',
line 567 in fill_template
return self.fill_template_mako( filename, **kwargs )
File
'/home/psilva/src/galaxy_dist/lib/galaxy/web/framework/__init__.py',
line 578 in fill_template_mako
return template.render( **data )
File
'/home/psilva/src/galaxy_dist/eggs/py2.6-noplatform/Mako-0.1.10-py2.6.egg/mako/template.py',
line 114 in render
File
'/home/psilva/src/galaxy_dist/eggs/py2.6-noplatform/Mako-0.1.10-py2.6.egg/mako/runtime.py',
line 287 in _render
File
'/home/psilva/src/galaxy_dist/eggs/py2.6-noplatform/Mako-0.1.10-py2.6.egg/mako/runtime.py',
line 304 in _render_context
File
'/home/psilva/src/galaxy_dist/eggs/py2.6-noplatform/Mako-0.1.10-py2.6.egg/mako/runtime.py',
line 337 in _exec_template
File
'/home/psilva/src/galaxy_dist/database/compiled_templates/base.mako.py',
line 33 in render_body
context.write(unicode(next.body()))
AttributeError: 'builtin_function_or_method' object has no attribute 'body'
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEAREIAAYFAkpn7yAACgkQvUI03qKHSRpiYwCggTcEcAeL29Qo/9old9OndGlk
Dh8AnA007bHeudf1YKBFpF3yfKRIfbhv
=tcaT
-----END PGP SIGNATURE-----
3
5
Pankaj,
Thanks for pointing this out. We'll let you know as soon as the problem
is corrected - it will be a few days.
Greg Von Kuster
Galaxy Development Team
Pankaj Narang wrote:
> Hello Greg,
>
> Thank you for your reply.
> Yes,Galaxy should work on 64 bit RHEL 5.0 system which I came to know
> while I was going through the documentation available for galaxy on
> website but it doesn't .It seems that it is not able to download the
> required eggs for 64 bit Linux.I am sending you the error which I get
> while running setup.sh.I get the same error when I run fetch_eggs.py
> in scripts/
> May be this will help you in fixing this problem while installation on
> my system.
>
> *Traceback (most recent call last):
> File "./scripts/fetch_eggs.py", line 34, in ?
> c.fetch( ignore=ignore )
> File
> "/home/pnarang/Desktop/galaxy-46bd94b12a0c/lib/galaxy/eggs/__init__.py",
> line 317, in fetch
> f = urllib2.urlopen( "%s/%s" % ( self.repo,
> self.platform['galaxy'] ) )
> File "/usr/local/lib/python2.4/urllib2.py", line 130, in urlopen
> return _opener.open(url, data)
> File "/usr/local/lib/python2.4/urllib2.py", line 358, in open
> response = self._open(req, data)
> File "/usr/local/lib/python2.4/urllib2.py", line 376, in _open
> '_open', req)
> File "/usr/local/lib/python2.4/urllib2.py", line 337, in _call_chain
> result = func(*args)
> File "/usr/local/lib/python2.4/urllib2.py", line 1021, in http_open
> return self.do_open(httplib.HTTPConnection, req)
> File "/usr/local/lib/python2.4/urllib2.py", line 996, in do_open
> raise URLError(err)
> urllib2.URLError: <urlopen error (-3, 'Temporary failure in name
> resolution')>
> *
> Pankaj Narang
> IGIB
> New Delhi,India
>
> On Tue, Jul 21, 2009 at 6:00 PM, Greg Von Kuster <ghv2(a)psu.edu
> <mailto:ghv2@psu.edu>> wrote:
>
> Hello Pankaj,
>
> Galaxy should run on 64 bit linux, could you send us the stack
> trace containing the error when you try starting the server?
>
> Greg Von Kuster
> Galaxy Development Team
>
>
> Pankaj Narang wrote:
>
>
> Dear Sir,
>
> I am installing Galaxy using setup.sh script on my 64 bit RED
> HAT Enterprises Linux system but it gives an error .
> I have Python 2.4.It <http://2.4.It> <http://2.4.It> works
> well on my other† 32 bit RHEL system in the same network.Could
> you please tell me whether current version of Galaxy is
> compatible with 64 bit linux system or not?
>
>
> Thanx in advance,
> --
> Regards,
> Pankaj Narang
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> galaxy-dev mailing list
> galaxy-dev(a)bx.psu.edu <mailto:galaxy-dev@bx.psu.edu>
> http://mail.bx.psu.edu/cgi-bin/mailman/listinfo/galaxy-dev
>
>
>
>
2
1
Hello,
this is a feature that some of my users requested: the ability to easily re-run a job (or at least see the parameters that were used to create a specific dataset).
This patch adds a 're-run' link (next to the 'save' link).
The link is encoded in a way to trick the 'tool_runner' controller into displaying the tool-form with the parameters already initialized.
The encoded URL looks like:
http://localhost:8080/tool_runner?tool_id=addValue&dbkey=%3F&exp=143&input=…
This is just a proof of concept, and there are many problems with it (one is that conditionals/grouping don't work) and many possible improvements.
The code itself is a hodge-podge of lines copied from different classes... (not be best example of python code).
I'm sure there's a better why to do it, because constructing a workflow from a history is basically the same thing, but I don't understand the galaxy code good enough for that.
Comments are welcomed,
-gordon.
2
4
23 Jul '09
details: http://www.bx.psu.edu/hg/galaxy/rev/f75758b35e51
changeset: 2495:f75758b35e51
user: Kelly Vincent <kpvincent(a)bx.psu.edu>
date: Thu Jul 23 14:31:11 2009 -0400
description:
Fixed for functional tests for new version of fasta_filter_by_length tool contributed by James Casbon.
2 file(s) affected in this change:
test-data/fasta_tool_filter_length_1.out
tools/fasta_tools/fasta_filter_by_length.xml
diffs (108 lines):
diff -r 3dae3393e275 -r f75758b35e51 test-data/fasta_tool_filter_length_1.out
--- a/test-data/fasta_tool_filter_length_1.out Thu Jul 23 12:38:11 2009 -0400
+++ b/test-data/fasta_tool_filter_length_1.out Thu Jul 23 14:31:11 2009 -0400
@@ -1,61 +1,52 @@
>EYKX4VC01B65GS length=54 xy=0784_1754 region=1 run=R_2007_11_07_16_15_57_
-CCGGTATCCGGGTGCCGTGATGAGCGCCACCGGAACGAATTCGACTATGC
-CGAA
+CCGGTATCCGGGTGCCGTGATGAGCGCCACCGGAACGAATTCGACTATGCCGAA
>EYKX4VC01BNCSP length=187 xy=0558_3831 region=1 run=R_2007_11_07_16_15_57_
-CTTACCGGTCACCACCGTGCCTTCAGGATTGATCGCCAGATCGGTCGGTG
-CGTCAGGCGGGGTGACATCGCCCACCACGGTACTCACTGGCTGGCTCTGG
-TTCCCGGCGGCATCGGAGGCCACCACGTTGAGGGTATTCCCCTCGGTTTG
-TGGCTCGGTGAGAACCACGTTGTAGTCGCCATTGGTC
+CTTACCGGTCACCACCGTGCCTTCAGGATTGATCGCCAGATCGGTCGGTGCGTCAGGCGG
+GGTGACATCGCCCACCACGGTACTCACTGGCTGGCTCTGGTTCCCGGCGGCATCGGAGGC
+CACCACGTTGAGGGTATTCCCCTCGGTTTGTGGCTCGGTGAGAACCACGTTGTAGTCGCC
+ATTGGTC
>EYKX4VC01CD9FT length=115 xy=0865_1719 region=1 run=R_2007_11_07_16_15_57_
-GGGGGCTTTGGCCTGTCGTCCGGCACCTCGCAAGAGCTACAGCAGGCGCG
-GCTGGCGATCATCGGCGGCACGCCGGCCTATATGTCGCCGGAACACACCA
-CCCGCACCCAACGCG
+GGGGGCTTTGGCCTGTCGTCCGGCACCTCGCAAGAGCTACAGCAGGCGCGGCTGGCGATC
+ATCGGCGGCACGCCGGCCTATATGTCGCCGGAACACACCACCCGCACCCAACGCG
>EYKX4VC01B8FW0 length=95 xy=0799_0514 region=1 run=R_2007_11_07_16_15_57_
-TAAATTTCAAGGAATGCAAATCAGGGTCGTGTGTTTAGACTTCGGCTTTA
-GAGACCTGAATACGTCAAAAACATAACTTCATGATATCTTGCAGT
+TAAATTTCAAGGAATGCAAATCAGGGTCGTGTGTTTAGACTTCGGCTTTAGAGACCTGAA
+TACGTCAAAAACATAACTTCATGATATCTTGCAGT
>EYKX4VC01BCGYW length=115 xy=0434_3926 region=1 run=R_2007_11_07_16_15_57_
-GGCCAGCCGGGACAGCGTTGTTGGGCTGCATGGCGACGAGCTAAAAGTCG
-CCATCACCGCCCCGCCGGTTGATGGGCAGGCTAATGCCCATCTGGTAAAA
-ACTTTCTCGCCAAAC
+GGCCAGCCGGGACAGCGTTGTTGGGCTGCATGGCGACGAGCTAAAAGTCGCCATCACCGC
+CCCGCCGGTTGATGGGCAGGCTAATGCCCATCTGGTAAAAACTTTCTCGCCAAAC
>EYKX4VC01AZXC6 length=116 xy=0292_0280 region=1 run=R_2007_11_07_16_15_57_
-GGGGGCGTTTGGCCTGTCGTCCGGCACCTCGCAAGAGCTACAGCAGGCGC
-GGCTGGCGATCATCGGCGGCACGCCGGCCTATATGTCGCCGGAACACACC
-ACCCGCACCCAACGCG
+GGGGGCGTTTGGCCTGTCGTCCGGCACCTCGCAAGAGCTACAGCAGGCGCGGCTGGCGAT
+CATCGGCGGCACGCCGGCCTATATGTCGCCGGAACACACCACCCGCACCCAACGCG
>EYKX4VC01CATH5 length=82 xy=0826_0843 region=1 run=R_2007_11_07_16_15_57_
-CGAAATTGCACATTCTCGGCCATATCTCTGGACCTACATGACCGATTTGA
-TCATCTTCGAACTTAGCCTTCCTTTNTTAACG
+CGAAATTGCACATTCTCGGCCATATCTCTGGACCTACATGACCGATTTGATCATCTTCGA
+ACTTAGCCTTCCTTTNTTAACG
>EYKX4VC01BCEIV length=47 xy=0434_0757 region=1 run=R_2007_11_07_16_15_57_
TGACGTCGTGCCGAGCTACGACAATGCCGACATGGTGATCGTTAACA
>EYKX4VC01BWERM length=83 xy=0662_0304 region=1 run=R_2007_11_07_16_15_57_
-CGGTCGGCCTCACCATGGAGAAGATCCCGCCCCGGCCGAGGTCATGGTGG
-ATCTCGGCCAGGGCGTGCTGATGAAGTTCAAAT
+CGGTCGGCCTCACCATGGAGAAGATCCCGCCCCGGCCGAGGTCATGGTGGATCTCGGCCA
+GGGCGTGCTGATGAAGTTCAAAT
>EYKX4VC01BT2O7 length=69 xy=0635_1945 region=1 run=R_2007_11_07_16_15_57_
-AGCGTTTCTCCAGCCGGTCGGCTACGCCGTTTGCCCCTGAAAGACGCTGT
-TCAGACCGAACGCGGTAAA
+AGCGTTTCTCCAGCCGGTCGGCTACGCCGTTTGCCCCTGAAAGACGCTGTTCAGACCGAA
+CGCGGTAAA
>EYKX4VC01BO0UO length=222 xy=0577_3838 region=1 run=R_2007_11_07_16_15_57_
-AGACCTGGGACAGCGGCGGGCTGCTGAAGCCGCAGGCGATAGAGGACAAA
-CTGCAGTACCGCTTCTGGCTGCACTATGCCGAAGGCTCGCTGATGCCGCT
-GCTGTTAATGAAGCTGGTGTTCGCCAGCCTGGGTAAACCCCCTGTGCCCT
-TTGGCGTCCGCTCGCTGGGCGCCCTGCTGGGCAAGGGCATTCAGAAAGCG
-TGGCTGGATCCCCAGCTGGCCA
+AGACCTGGGACAGCGGCGGGCTGCTGAAGCCGCAGGCGATAGAGGACAAACTGCAGTACC
+GCTTCTGGCTGCACTATGCCGAAGGCTCGCTGATGCCGCTGCTGTTAATGAAGCTGGTGT
+TCGCCAGCCTGGGTAAACCCCCTGTGCCCTTTGGCGTCCGCTCGCTGGGCGCCCTGCTGG
+GCAAGGGCATTCAGAAAGCGTGGCTGGATCCCCAGCTGGCCA
>EYKX4VC01CBCPK length=83 xy=0832_1158 region=1 run=R_2007_11_07_16_15_57_
-CGGTCGGCCTCACCATGGAGAAGATCCCGCCCCGGCCGAGGTCATGGTGG
-ATCTCGGCCAGGGCGTGCTGATGAAGTTCAAAT
+CGGTCGGCCTCACCATGGAGAAGATCCCGCCCCGGCCGAGGTCATGGTGGATCTCGGCCA
+GGGCGTGCTGATGAAGTTCAAAT
>EYKX4VC01B474S length=54 xy=0762_2010 region=1 run=R_2007_11_07_16_15_57_
-AGCAGTTTTCCAGCGCTTTCGAAGAGCGCTGGCGCGCGCGGGCTTCCAGC
-ATAT
+AGCAGTTTTCCAGCGCTTTCGAAGAGCGCTGGCGCGCGCGGGCTTCCAGCATAT
>EYKX4VC01BB4QL length=57 xy=0431_0363 region=1 run=R_2007_11_07_16_15_57_
-GGGGAGGAGCTAATAATATGCTCTTGGGGAGGAGCTAATTATATGCTCTT
-GGGGAGG
+GGGGAGGAGCTAATAATATGCTCTTGGGGAGGAGCTAATTATATGCTCTTGGGGAGG
>EYKX4VC01BJ37M length=64 xy=0522_0192 region=1 run=R_2007_11_07_16_15_57_
-TCGAGTATGTATCAAGGACTACATACAAATTTGCCAAAAGAGATTATGCA
-CTATCCCGACTTCC
+TCGAGTATGTATCAAGGACTACATACAAATTTGCCAAAAGAGATTATGCACTATCCCGAC
+TTCC
>EYKX4VC01BV9R8 length=54 xy=0660_2038 region=1 run=R_2007_11_07_16_15_57_
-AAAACTCGGAGAAACTATTCAGCAGCACTGCGTTTCGCTGAATTTTAGAC
-CGTT
+AAAACTCGGAGAAACTATTCAGCAGCACTGCGTTTCGCTGAATTTTAGACCGTT
>EYKX4VC01CEPP8 length=60 xy=0870_2350 region=1 run=R_2007_11_07_16_15_57_
-CTGGGTGGGTGCACTACAGGAACGTCATTTGTTCAATCCTCACGTTGTTG
-TTAGTGTCAG
+CTGGGTGGGTGCACTACAGGAACGTCATTTGTTCAATCCTCACGTTGTTGTTAGTGTCAG
>EYKX4VC01BTLME length=78 xy=0630_0292 region=1 run=R_2007_11_07_16_15_57_
-TTATCCACACGCTGTCCGGATCCAGCGCCAGGCGCCGACGCTGGACTTCC
-GCCGCCTGCGCCCAGTTGCCCTGACTTC
+TTATCCACACGCTGTCCGGATCCAGCGCCAGGCGCCGACGCTGGACTTCCGCCGCCTGCG
+CCCAGTTGCCCTGACTTC
\ No newline at end of file
diff -r 3dae3393e275 -r f75758b35e51 tools/fasta_tools/fasta_filter_by_length.xml
--- a/tools/fasta_tools/fasta_filter_by_length.xml Thu Jul 23 12:38:11 2009 -0400
+++ b/tools/fasta_tools/fasta_filter_by_length.xml Thu Jul 23 14:31:11 2009 -0400
@@ -1,4 +1,4 @@
-<tool id="fasta_filter_by_length" name="Filter sequences by length">
+<tool id="fasta_filter_by_length" name="Filter sequences by length" version="1.1">
<description></description>
<command interpreter="python">fasta_filter_by_length.py $input $min_length $max_length $output </command>
<inputs>
1
0