|
191 | 191 | return new Date(timestamp).toLocaleString(); |
192 | 192 | } |
193 | 193 |
|
194 | | - // Format duration |
| 194 | + // Format duration - always in seconds |
195 | 195 | function formatDuration(startedAt: string, completedAt?: string): string { |
196 | 196 | if (!completedAt) { |
197 | | - return 'In progress'; |
| 197 | + return '-'; |
198 | 198 | } |
199 | 199 |
|
200 | 200 | const start = new Date(startedAt).getTime(); |
201 | 201 | const end = new Date(completedAt).getTime(); |
202 | 202 | const durationMs = end - start; |
| 203 | + const durationSeconds = (durationMs / 1000).toFixed(1); |
203 | 204 |
|
204 | | - if (durationMs < 1000) { |
205 | | - return `${durationMs}ms`; |
206 | | - } else if (durationMs < 60000) { |
207 | | - return `${(durationMs / 1000).toFixed(1)}s`; |
208 | | - } else { |
209 | | - return `${(durationMs / 60000).toFixed(1)}m`; |
210 | | - } |
| 205 | + return `${durationSeconds}s`; |
211 | 206 | } |
212 | 207 |
|
213 | 208 | // Get type badge color |
|
504 | 499 | <th scope="col" class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400"> |
505 | 500 | Started |
506 | 501 | </th> |
507 | | - <th scope="col" class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400"> |
| 502 | + <th scope="col" class="px-6 py-3 text-right text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400"> |
508 | 503 | Duration |
509 | 504 | </th> |
510 | 505 | </tr> |
|
529 | 524 | Live |
530 | 525 | </span> |
531 | 526 | {/if} |
532 | | - {#if execution.expertMode} |
533 | | - <span class="inline-flex items-center rounded-full bg-amber-100 px-2 py-1 text-xs font-medium text-amber-800 dark:bg-amber-900/20 dark:text-amber-400" title="Expert mode was enabled"> |
534 | | - <svg class="mr-1 h-3 w-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
535 | | - <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z" /> |
536 | | - </svg> |
537 | | - Expert |
538 | | - </span> |
539 | | - {/if} |
540 | 527 | </div> |
541 | 528 | </td> |
542 | 529 | <td class="px-6 py-4 text-sm text-gray-900 dark:text-white"> |
|
571 | 558 | <td class="whitespace-nowrap px-6 py-4 text-sm text-gray-600 dark:text-gray-400"> |
572 | 559 | {formatTimestamp(execution.startedAt)} |
573 | 560 | </td> |
574 | | - <td class="whitespace-nowrap px-6 py-4 text-sm text-gray-600 dark:text-gray-400"> |
| 561 | + <td class="whitespace-nowrap px-6 py-4 text-right text-sm text-gray-600 dark:text-gray-400"> |
575 | 562 | {formatDuration(execution.startedAt, execution.completedAt)} |
576 | 563 | </td> |
577 | 564 | </tr> |
|
0 commit comments