Revert breaking change to http client
This commit is contained in:
@@ -16,54 +16,6 @@ history_url=url_for('http.history', function_id=function_id)) }}
|
||||
<div class="mx-auto w-full pt-4" id="client-u{{ user_id }}-f{{ function_id }}">
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function formatTime(milliseconds) {
|
||||
if (milliseconds < 1000) {
|
||||
return `${milliseconds.toFixed(2)} ms`; // Display milliseconds directly if less than 1 second
|
||||
}
|
||||
|
||||
const seconds = milliseconds / 1000;
|
||||
if (seconds < 60) {
|
||||
return `${seconds.toFixed(2)} s`; // Display seconds if less than 1 minute
|
||||
}
|
||||
|
||||
const minutes = seconds / 60;
|
||||
if (minutes < 60) {
|
||||
return `${minutes.toFixed(2)} min`; // Display minutes if less than 1 hour
|
||||
}
|
||||
|
||||
const hours = minutes / 60;
|
||||
return `${hours.toFixed(2)} h`; // Display hours for longer durations
|
||||
}
|
||||
|
||||
function formatSize(bytes) {
|
||||
if (bytes < 1024) {
|
||||
return `${bytes} bytes`;
|
||||
} else if (bytes < 1024 * 1024) {
|
||||
return `${(bytes / 1024).toFixed(2)} KB`;
|
||||
} else if (bytes < 1024 * 1024 * 1024) {
|
||||
{% extends 'dashboard.html' %}
|
||||
|
||||
{% block page %}
|
||||
|
||||
{
|
||||
{
|
||||
render_partial('dashboard/http_functions/header.html', user_id = user_id, function_id = function_id,
|
||||
active_tab = 'client',
|
||||
show_edit_form = True,
|
||||
show_logs = True,
|
||||
show_client = True,
|
||||
show_history = True,
|
||||
edit_url = url_for('http.editor', function_id = function_id),
|
||||
cancel_url = url_for('http.overview'),
|
||||
logs_url = url_for('http.logs', function_id = function_id),
|
||||
history_url = url_for('http.history', function_id = function_id))
|
||||
}
|
||||
}
|
||||
|
||||
<div class="mx-auto w-full pt-4" id="client-u{{ user_id }}-f{{ function_id }}">
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function formatTime(milliseconds) {
|
||||
if (milliseconds < 1000) {
|
||||
|
||||
Reference in New Issue
Block a user