diff options
-rw-r--r-- | lorrycontroller/showlorry.py | 5 | ||||
-rw-r--r-- | templates/lorry.tpl | 12 |
2 files changed, 15 insertions, 2 deletions
diff --git a/lorrycontroller/showlorry.py b/lorrycontroller/showlorry.py index b553b9c..ca0ac59 100644 --- a/lorrycontroller/showlorry.py +++ b/lorrycontroller/showlorry.py @@ -66,7 +66,10 @@ class ShowLorryHTML(ShowLorryBase, lorrycontroller.LorryControllerRoute): shower = lorrycontroller.JobShower() lorry_obj = list(json.loads(lorry_info['text']).values())[0] - lorry_info['url'] = lorry_obj['url'] + if "url" in lorry_obj: + lorry_info['url'] = lorry_obj['url'] + elif "urls" in lorry_obj: + lorry_info['urls'] = lorry_obj['urls'] lorry_info['interval_nice'] = renderer.format_secs_nicely( lorry_info['interval']) diff --git a/templates/lorry.tpl b/templates/lorry.tpl index 22760d4..b9b74fa 100644 --- a/templates/lorry.tpl +++ b/templates/lorry.tpl @@ -13,7 +13,17 @@ <tr> <th>Path</th> <td><a href="{{http_server_root}}/cgi-bin/cgit.cgi/{{lorry['path']}}.git/">{{lorry['path']}}</a></td> </tr> -<tr> <th>URL</th> <td>{{lorry['url']}}</td> </tr> +<tr> + % if "url" in lorry: + <th>URL</th> <td>{{lorry['url']}}</td> + % elif "urls" in lorry: + <th>URLs</th> <td> + % for url in lorry['urls'].values(): + {{url}}<BR> + % end + </td> + % end +</tr> <tr> <th>Interval</th> <td>{{lorry['interval_nice']}} ({{lorry['interval']}} s)</td> </tr> <tr> <th>Last run</th> <td>{{lorry['last_run_nice']}}</td> </tr> <tr> <th>Due</th> <td>{{lorry['due_nice']}}</td> </tr> |