diff --git a/lib/galaxy/web/controllers/root.py b/lib/galaxy/web/controllers/root.py index ca29fd0574a..60f4fa2c0b0 100644 --- a/lib/galaxy/web/controllers/root.py +++ b/lib/galaxy/web/controllers/root.py @@ -406,6 +406,29 @@ class Universe( BaseController ): return trans.fill_template("history_imported.tmpl", history=new_history) return trans.fill_template("history_import.tmpl", history=import_history) + @web.expose + def dataset_state ( self, trans, id=None ): + if id is not None: + try: + data = self.app.model.Dataset.get( id ) + except: + return trans.show_error_message( "Unable to check dataset $id.") + else: + return trans.show_error_message( "Must specify a dataset id.") + trans.response.headers['X-Dataset-State'] = data.state + return data.state + + @web.expose + def dataset_code( self, trans, id=None, hid=None ): + if id is not None: + try: + data = self.app.model.Dataset.get( id ) + except: + return trans.show_error_message( "Unable to check dataset $id.") + else: + return trans.show_error_message( "Must specify a dataset id.") + return trans.fill_template("dataset_code.tmpl", data=data, hid=hid) + @web.expose def history_switch( self, trans, id=None ): if not id: diff --git a/static/june_2007_style/blue/history.css b/static/june_2007_style/blue/history.css index 3a2243bf20d..9cd4f94a3d9 100644 --- a/static/june_2007_style/blue/history.css +++ b/static/june_2007_style/blue/history.css @@ -89,6 +89,13 @@ div.historyItemBody div padding-top: 2px; } +div.historyItemContainer +{ + margin: 0; + padding: 0; + border: 0; +} + pre.peek { background: white; @@ -101,4 +108,4 @@ pre.peek th { color: white; background: #023858; -} \ No newline at end of file +} diff --git a/static/scripts/prototype.js b/static/scripts/prototype.js new file mode 100644 index 00000000000..979f3b329bc --- /dev/null +++ b/static/scripts/prototype.js @@ -0,0 +1,3277 @@ +/* Prototype JavaScript framework, version 1.5.1.1 + * (c) 2005-2007 Sam Stephenson + * + * Prototype is freely distributable under the terms of an MIT-style license. + * For details, see the Prototype web site: http://www.prototypejs.org/ + * +/*--------------------------------------------------------------------------*/ + +var Prototype = { + Version: '1.5.1.1', + + Browser: { + IE: !!(window.attachEvent && !window.opera), + Opera: !!window.opera, + WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1, + Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1 + }, + + BrowserFeatures: { + XPath: !!document.evaluate, + ElementExtensions: !!window.HTMLElement, + SpecificElementExtensions: + (document.createElement('div').__proto__ !== + document.createElement('form').__proto__) + }, + + ScriptFragment: ' + +#end def + +#def render_dataset( $data, $hid ) + + #if $data.state in ["no state","",None]: + #set $data_state = "queued" + #else + #set $data_state = $data.state + #end if + +
+ +#end def + +## this is necessary because this dataset remains in history.active_datasets +## after deletion, until the history is reloaded +## FIXME: still necessary now that we don't re-pull finished datasets? test. +#if $data.deleted is not True + $render_script( $data ) + $render_dataset( $data, $hid ) +#end if diff --git a/templates/dataset_state.tmpl b/templates/dataset_state.tmpl new file mode 100644 index 00000000000..a6baf439a07 --- /dev/null +++ b/templates/dataset_state.tmpl @@ -0,0 +1 @@ +$data.state diff --git a/templates/history.tmpl b/templates/history.tmpl index d795c5d3fcf..88d12d3bfd4 100644 --- a/templates/history.tmpl +++ b/templates/history.tmpl @@ -1,14 +1,13 @@ -#set $refresh = bool ( [ data for data in $history.active_datasets if data.state in ['running', 'queued', '', None ] ] ) -