|
@@ -1,4 +1,4 @@
|
|
|
-import { useState, Fragment } from 'react'
|
|
|
|
|
|
|
+import { useState } from 'react'
|
|
|
import { useNavigate } from 'react-router-dom'
|
|
import { useNavigate } from 'react-router-dom'
|
|
|
import { useQuery } from '@tanstack/react-query'
|
|
import { useQuery } from '@tanstack/react-query'
|
|
|
import { executionsApi } from '../api/workflows'
|
|
import { executionsApi } from '../api/workflows'
|
|
@@ -124,13 +124,13 @@ export default function ExecutionsPage() {
|
|
|
</thead>
|
|
</thead>
|
|
|
<tbody className="divide-y divide-gray-200 dark:divide-slate-700">
|
|
<tbody className="divide-y divide-gray-200 dark:divide-slate-700">
|
|
|
{executions.map((execution: any) => (
|
|
{executions.map((execution: any) => (
|
|
|
- <Fragment key={execution.id}>
|
|
|
|
|
<tr
|
|
<tr
|
|
|
|
|
+ key={execution.id}
|
|
|
onClick={() => openExecution(execution)}
|
|
onClick={() => openExecution(execution)}
|
|
|
title="Open this execution in the workflow editor"
|
|
title="Open this execution in the workflow editor"
|
|
|
className="hover:bg-gray-50 dark:hover:bg-slate-700/50 cursor-pointer"
|
|
className="hover:bg-gray-50 dark:hover:bg-slate-700/50 cursor-pointer"
|
|
|
>
|
|
>
|
|
|
- <td className="px-4 py-3">
|
|
|
|
|
|
|
+ <td className="px-4 py-3 align-top">
|
|
|
<div className="flex items-center gap-2">
|
|
<div className="flex items-center gap-2">
|
|
|
{getStatusIcon(execution.status)}
|
|
{getStatusIcon(execution.status)}
|
|
|
<span
|
|
<span
|
|
@@ -143,18 +143,29 @@ export default function ExecutionsPage() {
|
|
|
</span>
|
|
</span>
|
|
|
</div>
|
|
</div>
|
|
|
</td>
|
|
</td>
|
|
|
- <td className="px-4 py-3">
|
|
|
|
|
- <span className="font-medium text-gray-900 dark:text-gray-100">{execution.workflowName || execution.workflowId}</span>
|
|
|
|
|
|
|
+ <td className="px-4 py-3 align-top">
|
|
|
|
|
+ <span className="font-medium text-gray-900 dark:text-gray-100">
|
|
|
|
|
+ {execution.workflowName || execution.workflowId}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ {execution.error && (
|
|
|
|
|
+ <div
|
|
|
|
|
+ className="mt-1 flex items-start gap-1.5 text-red-600 dark:text-red-400 text-xs max-w-xl"
|
|
|
|
|
+ title={execution.error}
|
|
|
|
|
+ >
|
|
|
|
|
+ <AlertCircle className="w-3.5 h-3.5 shrink-0 mt-0.5" />
|
|
|
|
|
+ <span className="break-words">{execution.error}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ )}
|
|
|
</td>
|
|
</td>
|
|
|
- <td className="px-4 py-3 text-gray-600 dark:text-gray-400">
|
|
|
|
|
|
|
+ <td className="px-4 py-3 align-top text-gray-600 dark:text-gray-400">
|
|
|
{execution.triggerType}
|
|
{execution.triggerType}
|
|
|
</td>
|
|
</td>
|
|
|
- <td className="px-4 py-3 text-gray-500 dark:text-gray-400 text-sm">
|
|
|
|
|
|
|
+ <td className="px-4 py-3 align-top text-gray-500 dark:text-gray-400 text-sm">
|
|
|
{execution.startedAt
|
|
{execution.startedAt
|
|
|
? safeFormatDistanceToNow(execution.startedAt)
|
|
? safeFormatDistanceToNow(execution.startedAt)
|
|
|
: '-'}
|
|
: '-'}
|
|
|
</td>
|
|
</td>
|
|
|
- <td className="px-4 py-3 text-gray-500 dark:text-gray-400 text-sm">
|
|
|
|
|
|
|
+ <td className="px-4 py-3 align-top text-gray-500 dark:text-gray-400 text-sm">
|
|
|
{execution.finishedAt && execution.startedAt
|
|
{execution.finishedAt && execution.startedAt
|
|
|
? `${((execution.finishedAt - execution.startedAt) / 1000).toFixed(2)}s`
|
|
? `${((execution.finishedAt - execution.startedAt) / 1000).toFixed(2)}s`
|
|
|
: execution.status === 'running'
|
|
: execution.status === 'running'
|
|
@@ -162,20 +173,6 @@ export default function ExecutionsPage() {
|
|
|
: '-'}
|
|
: '-'}
|
|
|
</td>
|
|
</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
- {execution.error && (
|
|
|
|
|
- <tr
|
|
|
|
|
- onClick={() => openExecution(execution)}
|
|
|
|
|
- className="cursor-pointer hover:bg-gray-50 dark:hover:bg-slate-700/50"
|
|
|
|
|
- >
|
|
|
|
|
- <td colSpan={5} className="px-4 pb-3 pt-0">
|
|
|
|
|
- <div className="flex items-start gap-1.5 text-red-600 dark:text-red-400 text-xs">
|
|
|
|
|
- <AlertCircle className="w-3.5 h-3.5 shrink-0 mt-0.5" />
|
|
|
|
|
- <span className="break-all">{execution.error}</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- )}
|
|
|
|
|
- </Fragment>
|
|
|
|
|
))}
|
|
))}
|
|
|
</tbody>
|
|
</tbody>
|
|
|
</table>
|
|
</table>
|