Allow jobs to show parameters in the UI (#601)
* Allow jobs to show parameters in the UI This is very useful when starting the same job multiple times with different configurations. This PR allows to show parameters as arbitrary data since jobs might use any kind of data. * Use same method of pretty printing everywhere
This commit is contained in:
@@ -2006,6 +2006,7 @@ tiles/{{{}}}/{{{}}}/{{{}}}/{{{}}}?f=mvt'
|
||||
'status': job_['status'],
|
||||
'message': job_['message'],
|
||||
'progress': job_['progress'],
|
||||
'parameters': job_.get('parameters'),
|
||||
'job_start_datetime': job_['job_start_datetime'],
|
||||
'job_end_datetime': job_['job_end_datetime']
|
||||
}
|
||||
|
||||
@@ -23,6 +23,15 @@
|
||||
<h3>Message</h3>
|
||||
<p>{{ data['jobs']['message'] }}</p>
|
||||
</div>
|
||||
{% if data['jobs']['parameters'] %}
|
||||
<div class="message">
|
||||
<h3>Parameters</h3>
|
||||
<pre id="job-parameters"></pre>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById('job-parameters').innerHTML = JSON.stringify({{ data['jobs']['parameters']}}, undefined, 2);
|
||||
</script>
|
||||
{% endif %}
|
||||
<div class="duration">
|
||||
<h4><label for="progress">Progress</label></h4>
|
||||
<progress id="progress" class="inline" value="{{ data['jobs']['progress']|int*10 }}" max="1000"></progress>
|
||||
|
||||
Reference in New Issue
Block a user