
<div class="stats-container">
  <ng-container *ngIf="stats.length > 0; else emptyTpl">
    <nz-table #basicTable [nzData]="stats">
      <thead>
        <tr>
          <th>Metric</th>
          <th>Value</th>
        </tr>
      </thead>
      <tbody>
        <tr *ngFor="let stat of basicTable.data">
          <td>{{stat.desc}}</td>
          <td>{{stat.value}}</td>
        </tr>
      </tbody>
    </nz-table>

    <div class="action-buttons">
      <button nz-button nzType="default" (click)="loader?.load()">
        <i nz-icon nzType="reload"></i>
        Refresh
      </button>
    </div>
  </ng-container>
</div>

<ng-template #emptyTpl>
  <nz-empty
    [nzNotFoundContent]="'No statistics available'"
    [nzNotFoundFooter]="footerTpl">
  </nz-empty>
  <ng-template #footerTpl>
    <button nz-button nzType="primary" (click)="loader?.load()">
      <i nz-icon nzType="reload"></i>
      Refresh
    </button>
  </ng-template>
</ng-template>