Skip to content

Commit

Permalink
Expose job metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
hexylena committed Dec 20, 2016
1 parent a5af4d1 commit 83d9ddd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
7 changes: 7 additions & 0 deletions config/galaxy.ini.sample
Original file line number Diff line number Diff line change
Expand Up @@ -1113,6 +1113,13 @@ use_interactive = True
# Details" option in the history. Administrators can always see this.
#expose_dataset_path = False

# This option allows users to see the job metrics (except for environment
# variables).
#expose_job_metrics = False

# This option allows users to see the built command line.
#expose_job_command_line = False

# Data manager configuration options
# Allow non-admin users to view available Data Manager options.
#enable_data_manager_user_view = False
Expand Down
2 changes: 2 additions & 0 deletions lib/galaxy/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ def __init__( self, **kwargs ):
self.track_jobs_in_database = string_as_bool( kwargs.get( 'track_jobs_in_database', 'True') )
self.start_job_runners = listify(kwargs.get( 'start_job_runners', '' ))
self.expose_dataset_path = string_as_bool( kwargs.get( 'expose_dataset_path', 'False' ) )
self.expose_job_metrics = string_as_bool( kwargs.get( 'expose_job_metrics', 'False' ) )
self.expose_job_command_line = string_as_bool( kwargs.get( 'expose_job_command_line', 'False' ) )
self.enable_communication_server = string_as_bool( kwargs.get( 'enable_communication_server', 'False' ) )
self.communication_server_host = kwargs.get( 'communication_server_host', 'http://localhost' )
self.communication_server_port = int( kwargs.get( 'communication_server_port', '7070' ) )
Expand Down
6 changes: 4 additions & 2 deletions templates/show_params.mako
Original file line number Diff line number Diff line change
Expand Up @@ -230,17 +230,18 @@



%if job and job.command_line and trans.user_is_admin():
%if job and job.command_line and (trans.user_is_admin() or trans.app.config.expose_job_command_line):
<h3>Command Line</h3>
<pre class="code">
${ job.command_line | h }</pre>
%endif

%if job and trans.user_is_admin():
%if job and (trans.user_is_admin() or trans.app.config.expose_job_metrics):
<h3>Job Metrics</h3>
<% job_metrics = trans.app.job_metrics %>
<% plugins = set([metric.plugin for metric in job.metrics]) %>
%for plugin in sorted(plugins):
%if trans.user_is_admin() or plugin != 'env':
<h4>${ plugin | h }</h4>
<table class="tabletip info_data_table">
<tbody>
Expand All @@ -254,6 +255,7 @@ ${ job.command_line | h }</pre>
%endfor
</tbody>
</table>
%endif
%endfor
%endif

Expand Down

0 comments on commit 83d9ddd

Please sign in to comment.