mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #3344 from erasche/expose-metrics
Expose metrics to non-admins
This commit is contained in:
@@ -1110,9 +1110,14 @@ use_interactive = True
|
||||
#enable_quotas = False
|
||||
|
||||
# This option allows users to see the full path of datasets via the "View
|
||||
# Details" option in the history. Administrators can always see this.
|
||||
# Details" option in the history. This option also exposes the command line to
|
||||
# non-administrative users. Administrators can always see dataset paths.
|
||||
#expose_dataset_path = False
|
||||
|
||||
# This option allows users to see the job metrics (except for environment
|
||||
# variables).
|
||||
#expose_potentially_sensitive_job_metrics = False
|
||||
|
||||
# Data manager configuration options
|
||||
# Allow non-admin users to view available Data Manager options.
|
||||
#enable_data_manager_user_view = False
|
||||
|
||||
@@ -217,6 +217,7 @@ class Configuration( object ):
|
||||
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_potentially_sensitive_job_metrics = string_as_bool( kwargs.get( 'expose_potentially_sensitive_job_metrics', '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' ) )
|
||||
|
||||
@@ -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_dataset_path):
|
||||
<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_potentially_sensitive_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>
|
||||
@@ -254,6 +255,7 @@ ${ job.command_line | h }</pre>
|
||||
%endfor
|
||||
</tbody>
|
||||
</table>
|
||||
%endif
|
||||
%endfor
|
||||
%endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user