Node js runtime adds logs as an array of arrays, whilst python stores it as an array. Adjust logs template to handle both
This commit is contained in:
@@ -60,9 +60,13 @@ history_url=url_for('http.history', function_id=function_id)) }}
|
||||
|
||||
<!-- Logs -->
|
||||
<div class="bg-gray-50 rounded-lg p-3 overflow-auto max-h-40">
|
||||
{% for log in invocation.logs %}
|
||||
<div class="text-sm font-mono text-gray-600 py-0.5">{{ log[0] }}</div>
|
||||
{% endfor %}
|
||||
<pre class="text-sm font-mono text-gray-600 whitespace-pre-wrap">{% if invocation.logs and invocation.logs[0] is iterable and invocation.logs[0] is not string -%}
|
||||
{{- invocation.logs | map('join', ' ') | join('\n') -}}
|
||||
{%- elif invocation.logs is iterable and invocation.logs is not string -%}
|
||||
{{- invocation.logs | join('\n') -}}
|
||||
{%- else -%}
|
||||
{{- invocation.logs | string -}}
|
||||
{%- endif -%}</pre>
|
||||
{% if not invocation.logs %}
|
||||
<div class="text-sm text-gray-400 italic">No logs available</div>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user