[jb] Avoid page freeze if the counters call returns zero results
@@ -1307,7 +1307,12 @@ ${ commonheader("Job Browser", "jobbrowser", user, request) | n,unicode }
</script>
<script type="text/html" id="render-page-counters${ SUFFIX }">
- <!-- ko hueSpinner: { spin: !$data.counterGroup, center: true, size: 'xlarge' } --><!-- /ko -->
+ <!-- ko hueSpinner: { spin: !$data.id, center: true, size: 'xlarge' } --><!-- /ko -->
+
+ <!-- ko if: $data.id -->
+ <!-- ko ifnot: $data.counterGroup -->
+ <span class="muted">${ _('There are currently no counters to be displayed.') }</span>
+ <!-- /ko -->
<!-- ko if: $data.counterGroup -->
<!-- ko foreach: $data.counterGroup -->
<h3 data-bind="text: counterGroupName"></h3>
@@ -1331,10 +1336,16 @@ ${ commonheader("Job Browser", "jobbrowser", user, request) | n,unicode }
</table>
<!-- /ko -->
<!-- /ko -->
+ <!-- /ko -->
</script>
<script type="text/html" id="render-task-counters${ SUFFIX }">
- <!-- ko hueSpinner: { spin: !$data.taskCounterGroup, center: true, size: 'xlarge' } --><!-- /ko -->
+ <!-- ko hueSpinner: { spin: !$data.id, center: true, size: 'xlarge' } --><!-- /ko -->
+
+ <!-- ko if: $data.id -->
+ <!-- ko ifnot: $data.taskCounterGroup -->
+ <span class="muted">${ _('There are currently no counters to be displayed.') }</span>
+ <!-- /ko -->
<!-- ko if: $data.taskCounterGroup -->
<!-- ko foreach: $data.taskCounterGroup -->
<h3 data-bind="text: counterGroupName"></h3>
@@ -1354,10 +1365,16 @@ ${ commonheader("Job Browser", "jobbrowser", user, request) | n,unicode }
</table>
<!-- /ko -->
<!-- /ko -->
+ <!-- /ko -->
</script>
<script type="text/html" id="render-attempt-counters${ SUFFIX }">
- <!-- ko hueSpinner: { spin: !$data.taskAttemptCounterGroup, center: true, size: 'xlarge' } --><!-- /ko -->
+ <!-- ko hueSpinner: { spin: !$data.id, center: true, size: 'xlarge' } --><!-- /ko -->
+
+ <!-- ko if: $data.id -->
+ <!-- ko ifnot: $data.taskAttemptCounterGroup -->
+ <span class="muted">${ _('There are currently no counters to be displayed.') }</span>
+ <!-- /ko -->
<!-- ko if: $data.taskAttemptCounterGroup -->
<!-- ko foreach: $data.taskAttemptCounterGroup -->
<h3 data-bind="text: counterGroupName"></h3>
@@ -1377,6 +1394,7 @@ ${ commonheader("Job Browser", "jobbrowser", user, request) | n,unicode }
</table>
<!-- /ko -->
<!-- /ko -->
+ <!-- /ko -->
</script>
<script type="text/html" id="render-metadata${ SUFFIX }">
