<cd-iscsi-tabs></cd-iscsi-tabs>

<legend i18n>Gateways</legend>
<div>
  <cd-table [data]="gateways"
            (fetchData)="refresh()"
            [columns]="gatewaysColumns">
  </cd-table>
</div>

<legend i18n>Images</legend>
<div>
  <cd-table [data]="images"
            [columns]="imagesColumns">
  </cd-table>
</div>

<ng-template #iscsiSparklineTpl
             let-row="data.row"
             let-value="data.value">
  <span *ngIf="row.backstore === 'user:rbd'">
    <cd-sparkline [data]="value"
                  [isBinary]="row.cdIsBinary"></cd-sparkline>
  </span>
  <span *ngIf="row.backstore !== 'user:rbd'"
        class="text-muted">
    n/a
  </span>
</ng-template>

<ng-template #iscsiPerSecondTpl
             let-row="data.row"
             let-value="data.value">
  <span *ngIf="row.backstore === 'user:rbd'">
    {{ value }} /s
  </span>
  <span *ngIf="row.backstore !== 'user:rbd'"
        class="text-muted">
    n/a
  </span>
</ng-template>

<ng-template #iscsiRelativeDateTpl
             let-row="data.row"
             let-value="data.value">
  <span *ngIf="row.backstore === 'user:rbd'">
    {{ value | relativeDate | notAvailable }}
  </span>
  <span *ngIf="row.backstore !== 'user:rbd'"
        class="text-muted">
    n/a
  </span>
</ng-template>
