From 497875c3a5487ee406ffed4029c71f01f57c3ba4 Mon Sep 17 00:00:00 2001 From: totycro Date: Tue, 5 Jan 2021 16:32:51 +0100 Subject: [PATCH] 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 --- pygeoapi/api.py | 1 + pygeoapi/templates/processes/jobs/job.html | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/pygeoapi/api.py b/pygeoapi/api.py index 4c9545b..09280b2 100644 --- a/pygeoapi/api.py +++ b/pygeoapi/api.py @@ -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'] } diff --git a/pygeoapi/templates/processes/jobs/job.html b/pygeoapi/templates/processes/jobs/job.html index 4efd06b..14fbfda 100644 --- a/pygeoapi/templates/processes/jobs/job.html +++ b/pygeoapi/templates/processes/jobs/job.html @@ -23,6 +23,15 @@

Message

{{ data['jobs']['message'] }}

+ {% if data['jobs']['parameters'] %} +
+

Parameters

+

+              
+ + {% endif %}