history panel and api: if hda.peek is 'no peek' do not send peek through api and do not render peek in expanded hda

This commit is contained in:
Carl Eberhard
2013-03-06 10:02:24 -05:00
parent de3cff9379
commit ac34fddc56
3 changed files with 6 additions and 4 deletions
@@ -221,7 +221,8 @@ def get_hda_dict( trans, history, hda, for_editing ):
hda_dict[ 'display_types' ] = get_old_display_applications( trans, hda )
hda_dict[ 'visualizations' ] = hda.get_visualizations()
hda_dict[ 'peek' ] = to_unicode( hda.display_peek() )
if hda.peek and hda.peek != 'no peek':
hda_dict[ 'peek' ] = to_unicode( hda.display_peek() )
if hda.creating_job and hda.creating_job.tool_id:
tool_used = trans.app.toolbox.get_tool( hda.creating_job.tool_id )
+3 -2
View File
@@ -319,12 +319,13 @@ var HDABaseView = BaseView.extend( LoggableMixin ).extend(
*/
//TODO: curr. pre-formatted into table on the server side - may not be ideal/flexible
_render_peek : function(){
if( !this.model.get( 'peek' ) ){ return null; }
var peek = this.model.get( 'peek' );
if( !peek ){ return null; }
return $( '<div/>' ).append(
$( '<pre/>' )
.attr( 'id', 'peek' + this.model.get( 'id' ) )
.addClass( 'peek' )
.append( this.model.get( 'peek' ) )
.append( peek )
);
},
File diff suppressed because one or more lines are too long