<table class="admin-table" *ngIf="credentials?.length">
  <thead>
    <tr>
      <th>Label</th>
      <th>Key</th>
      <th>Last used</th>
      <th>Worker/IP</th>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <tr *ngFor="let credential of credentials">
      <td> <span class="label ellipsis" [smTooltip]="credential.label" smShowTooltipIfEllipsis>{{credential.label}}</span></td>
      <td>{{credential.access_key}}</td>
      <td [smTooltip]="credential?.last_used | date : timeFormatString">{{credential?.last_used ? (credential.last_used |  timeAgo): 'Never'}}</td>
      <td>{{credential?.last_used_from ? credential?.last_used_from : 'Not available'}}</td>
      <td class="actions">
        <div class="action-button">
          <i class="al-icon sm-md pointer" [ngClass]="icons.EDIT" (click)="editLabel(credential)" smTooltip="Edit label"></i>
          <i class="al-icon sm-md pointer" [ngClass]="icons.REMOVE" (click)="confirmPopUp(credential)" smTooltip="Revoke"></i>
        </div>
      </td>
    </tr>
  </tbody>
</table>

