<dl>
   {$report_decoded = $body.data.report_decoded}

   {foreach $report_decoded as $key => $report}
   {$report = (object) $report}
   {if $key != 'last_generated_feed'}
   <div class="row">
         <div class="col-xs-12">
            <div class="wpj-main-panel-title">
               <h4>{$key}</h4>
            </div>
         </div>
      </div>
   {/if}
   {if isset($report->validCount, $report->count)}
      <dt>{'report_processed_count'|translate}</dt>{* all processed products / valid (without errors) *}
      <dd>{$report->validCount} / {$report->count}</dd>
   {/if}
   {if isset($report->validInStoreCount, $report->validCount)}
      <dt>{'report_validInStore_count'|translate}</dt>{* valid in store / valid out of stock *}
      <dd>{$report->validInStoreCount} /
         {$report->validCount - $report->validInStoreCount}</dd>
   {/if}
   {if $report->peak_memory}
      <dt>{'peak_memory_usage'|translate}</dt>
      <dd>{$report->peak_memory / (1024*1024)}&nbsp;MB</dd>
   {/if}
   {if isset($report->time_generate)}
      <dt>{'report_time_generate'|translate}</dt>
      <dd>{$report->time_generate}&nbsp;s</dd>
   {/if}
   <dt>{'generated'|translate}</dt>
   <dd>{$body.data.regenerated|default:'--'}</dd>
   <dt title="{'last_download_title'|translate}">{'last_download'|translate}</dt>
   <dd>{$body.data.last_download|default:'--'}</dd>
</dl>
{if count((array)$report->errors) > 0}
   <h4>{'report_first_x_errors'|translate}
      {if isset($report->validCount, $report->count)} <span>({'report_total_errors'|translate}
         : {$report->count - $report->validCount})</span>{/if}
   </h4>
   <dl>
      {if $body.feedService->getObjectType() === 'product'}
         {foreach $report->errors as $productID => $errorMsg}
            <dt>{if $productID !== 'Script error'}{'report_product'|translate} <a href="javascript:nw('product', {$productID});"
                                                                                  title="{'report_product_detail'|translate}">{$productID}</a>{else}{$productID}{/if}
            </dt>
            <dd>{$errorMsg}</dd>
         {/foreach}
      {else}
         {foreach $report->errors as $itemID => $errorMsg}
            <dt>{'report_item'|translate} {$itemID}</dt>
            <dd>{$errorMsg}</dd>
         {/foreach}
      {/if}
   </dl>
{else}
   <p>{'report_no_errors'|translate}</p>
{/if}
{if $report->reportCounters}
   <h4>{'report_counters'|translate}</h4>
   <dl>
      {foreach $report->reportCounters as $counterName => $counterValue}
         <dt>{$counterName}</dt>
         <dd>{$counterValue}</dd>
      {/foreach}
   </dl>
{/if}
{/foreach}
