72 lines
6.0 KiB
HTML
72 lines
6.0 KiB
HTML
<div class="flex items-center" data-id="51">
|
|
<h1 class="font-semibold text-lg md:text-2xl" data-id="52">HTTP functions</h1>
|
|
<button
|
|
class="inline-flex items-center justify-center text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground hover:bg-primary/90 h-9 rounded-md px-3 ml-auto"
|
|
hx-get="{{ url_for('get_http_function_add_form') }}" hx-target="#container" hx-swap="innerHTML">
|
|
Add Function
|
|
</button>
|
|
</div>
|
|
<div class="border shadow-sm rounded-lg" data-id="54">
|
|
<div class="relative w-full overflow-auto">
|
|
<table class="w-full caption-bottom text-sm" data-id="55">
|
|
<thead class="[&_tr]:border-b" data-id="56">
|
|
<tr class="border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted" data-id="57">
|
|
<th class="h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 max-w-[150px]"
|
|
data-id="59">Name</th>
|
|
<th class="h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 hidden md:table-cell"
|
|
data-id="60">URL</th>
|
|
<th class="h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 hidden md:table-cell"
|
|
data-id="61">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="[&_tr:last-child]:border-0" data-id="62">
|
|
{% for function in http_functions %}
|
|
<tr class="border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted" data-id="63">
|
|
<td class="p-4 align-middle [&:has([role=checkbox])]:pr-0 font-medium cursor-pointer"
|
|
data-id="66">{{ function.name }}
|
|
<span
|
|
class="inline-flex items-center justify-center w-4 h-4 ms-2 text-xs font-semibold text-blue-800 bg-blue-200 rounded-full">
|
|
{{ function.invoked_count }}
|
|
</span>
|
|
</td>
|
|
<td class="p-4 align-middle [&:has([role=checkbox])]:pr-0 hidden md:table-cell" data-id="67">
|
|
<a href="{{ function.url }}">{{ function.url }}</a>
|
|
<button
|
|
class="inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground px-4 text-gray-600 dark:text-gray-400"
|
|
data-id="24"><span class="sr-only" data-id="25">Add Link</span><svg
|
|
xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
|
|
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
|
|
stroke-linejoin="round" class="w-4 h-4" data-id="26" data-darkreader-inline-stroke=""
|
|
style="--darkreader-inline-stroke: currentColor;">
|
|
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71">
|
|
</path>
|
|
<path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71">
|
|
</path>
|
|
</svg></button>
|
|
</td>
|
|
<td class="p-4 align-middle [&:has([role=checkbox])]:pr-0 hidden md:table-cell" data-id="68">
|
|
<button
|
|
class="inline-flex items-center justify-center text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-9 rounded-md px-3"
|
|
data-id="69" hx-get="{{ url_for('get_http_function_logs', name=function.name) }}"
|
|
hx-target="#container" hx-swap="innerHTML">
|
|
Logs
|
|
</button>
|
|
<button
|
|
class="inline-flex items-center justify-center text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-9 rounded-md px-3"
|
|
data-id="69" hx-get="{{ url_for('get_http_function_edit_form', name=function.name) }}"
|
|
hx-target="#container" hx-swap="innerHTML">
|
|
Edit
|
|
</button>
|
|
<button
|
|
class="inline-flex items-center justify-center text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-9 rounded-md px-3"
|
|
data-id="69" hx-get="{{ url_for('client', function=function.name) }}" hx-target="#container"
|
|
hx-swap="innerHTML">
|
|
Try
|
|
</button>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div> |