Make logs table more responsive (Still needs alot of work - probably need to make accordion)
This commit is contained in:
@@ -7,41 +7,41 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid grid-cols-4 gap-4 p-4">
|
<div class="block md:grid md:grid-cols-4 md:gap-4 p-4">
|
||||||
<!-- Headers -->
|
<!-- Headers -->
|
||||||
<div class="font-medium text-muted-foreground">Timestamp</div>
|
<div class="font-medium text-muted-foreground md:block hidden">Timestamp</div>
|
||||||
<div class="font-medium text-muted-foreground">Request</div>
|
<div class="font-medium text-muted-foreground md:block hidden">Request</div>
|
||||||
<div class="font-medium text-muted-foreground">Response</div>
|
<div class="font-medium text-muted-foreground md:block hidden">Response</div>
|
||||||
<div class="font-medium text-muted-foreground">Logs</div>
|
<div class="font-medium text-muted-foreground md:block hidden">Logs</div>
|
||||||
|
|
||||||
<!-- Data Rows -->
|
<!-- Data Rows -->
|
||||||
{% for invocation in http_function_invocations %}
|
{% for invocation in http_function_invocations %}
|
||||||
<!-- Timestamp and Status -->
|
<!-- Timestamp and Status for Mobile and Desktop -->
|
||||||
<div class="flex items-center space-x-2">
|
<div class="flex items-center md:col-span-1 py-2 border-b">
|
||||||
<span>{{ invocation.invocation_time.strftime('%Y-%m-%d %H:%M:%S') }}</span>
|
|
||||||
<button
|
<button
|
||||||
class="{{ 'bg-green-400' if invocation.status == 'SUCCESS' else 'bg-red-400' }} hover:bg-opacity-75 text-white font-bold rounded-full h-fit p-2">
|
class="{{ 'bg-green-400' if invocation.status == 'SUCCESS' else 'bg-red-400' }} hover:bg-opacity-75 text-white font-bold rounded-full h-fit p-2 mr-2">
|
||||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||||
d="{{ 'M5 13l4 4L19 7' if invocation.status == 'SUCCESS' else 'M6 18L18 6M6 6l12 12' }}"></path>
|
d="{{ 'M5 13l4 4L19 7' if invocation.status == 'SUCCESS' else 'M6 18L18 6M6 6l12 12' }}"></path>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
|
<span>{{ invocation.invocation_time.strftime('%Y-%m-%d %H:%M:%S') }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Request Data -->
|
<!-- Request Data for Mobile and Desktop -->
|
||||||
<div class="font-mono text-gray-400 overflow-auto">
|
<div class="font-mono text-gray-400 overflow-auto md:col-span-1 py-2 border-b">
|
||||||
{{ invocation.request_data }}
|
{{ invocation.request_data }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Response Data -->
|
<!-- Response Data for Mobile and Desktop -->
|
||||||
<div class="font-mono text-gray-400 overflow-auto">
|
<div class="font-mono text-gray-400 overflow-auto md:col-span-1 py-2 border-b">
|
||||||
{{ invocation.response_data }}
|
{{ invocation.response_data }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Logs -->
|
<!-- Logs for Mobile and Desktop -->
|
||||||
<div class="space-y-1">
|
<div class="space-y-1 md:col-span-1 py-2 border-b">
|
||||||
{% for log in invocation.logs %}
|
{% for log in invocation.logs %}
|
||||||
<div class="font-mono text-gray-400">{{ log }}</div>
|
<div class="font-mono text-gray-400">{{ log[0] }}</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
Reference in New Issue
Block a user