Show next_try only for the deferred worker job.
authorÉibhear Ó hAnluain <eibhear.geo@gmail.com>
Fri, 29 Mar 2024 16:44:12 +0000 (16:44 +0000)
committerÉibhear Ó hAnluain <eibhear.geo@gmail.com>
Fri, 29 Mar 2024 20:27:10 +0000 (20:27 +0000)
src/Module/Admin/Queue.php
view/templates/admin/queue.tpl
view/theme/frio/templates/admin/queue.tpl

index e309bfc..dafa278 100644 (file)
@@ -80,6 +80,7 @@ class Queue extends BaseAdmin
                        '$next_try_header' => DI::l10n()->t('Next Try'),
                        '$prio_header' => DI::l10n()->t('Priority'),
                        '$info' => $info,
+                       '$status' => $status,
                        '$entries' => $r,
                ]);
        }
index c34f92f..5ac3849 100644 (file)
@@ -8,7 +8,7 @@
                        <th>{{$command_header}}</th>
                        <th>{{$param_header}}</th>
                        <th>{{$created_header}}</th>
-                       <th>{{$next_try_header}}</th>
+                       {{if ($status==='deferred') }}<th>{{$next_try_header}}</th>{{/if}}
                        <th>{{$prio_header}}</th>
                </tr>
                {{foreach $entries as $e}}
@@ -17,7 +17,7 @@
                        <td>{{$e.command}}</td>
                        <td>{{$e.parameter}}</td>
                        <td>{{$e.created}}</td>
-                       <td>{{$e.next_try}}</td>
+                       {{if ($status==='deferred') }}<td>{{$e.next_try}}</td>{{/if}}
                        <td>{{$e.priority}}</td>
                </tr>
                {{/foreach}}
index 8abc63d..f9aaaa0 100644 (file)
@@ -8,7 +8,7 @@
                        <th>{{$command_header}}</th>
                        <th>{{$param_header}}</th>
                        <th>{{$created_header}}</th>
-                       <th>{{$next_try_header}}</th>
+                       {{if ($status==='deferred') }}<th>{{$next_try_header}}</th>{{/if}}
                        <th>{{$prio_header}}</th>
                </tr>
                {{foreach $entries as $e}}
@@ -17,7 +17,7 @@
                        <td>{{$e.command}}</td>
                        <td>{{$e.parameter}}</td>
                        <td>{{$e.created}}</td>
-                       <td>{{$e.next_try}}</td>
+                       {{if ($status==='deferred') }}<td>{{$e.next_try}}</td>{{/if}}
                        <td>{{$e.priority}}</td>
                </tr>
                {{/foreach}}