File

device-grid/columns/alarms.cell-renderer.component.ts

Metadata

Index

Properties

Constructor

constructor(context: CellRendererContext, columnUtilService: ColumnUtilService)
Parameters :
Name Type Optional
context CellRendererContext No
columnUtilService ColumnUtilService No

Properties

Public columnUtilService
Type : ColumnUtilService
Public context
Type : CellRendererContext
Readonly linkAriaLabel
Default value : gettext('See alarms for device "{{ name }}"')
<a
  class="d-flex a-i-center flex-wrap gap-4 no-decoration"
  [href]="columnUtilService.getAlarmsHref(context.item)"
  [attr.aria-label]="
    linkAriaLabel | translate: { name: columnUtilService.getProperName(context.item) }
  "
  *ngIf="
    context.item.c8y_ActiveAlarmsStatus?.critical ||
    context.item.c8y_ActiveAlarmsStatus?.major ||
    context.item.c8y_ActiveAlarmsStatus?.minor ||
    context.item.c8y_ActiveAlarmsStatus?.warning
  "
>
  <span
    class="c8y-icon-badge"
    data-cy="alarms.cell-renderer--critical-alarm-badge"
    title="{{ context.item.c8y_ActiveAlarmsStatus?.critical }} {{ 'Critical alarms' | translate }}"
    *ngIf="context.item.c8y_ActiveAlarmsStatus?.critical"
  >
    <i [c8yIcon]="'exclamation-circle'" class="status critical stroked-icon" data-cy="alarms.cell-renderer--critical-alarm-icon"></i>
    <span class="badge badge-info">{{ context.item.c8y_ActiveAlarmsStatus?.critical }}</span>
  </span>
  <span
    class="c8y-icon-badge"
    title="{{ context.item.c8y_ActiveAlarmsStatus?.major }} {{ 'Major alarms' | translate }}"
    *ngIf="context.item.c8y_ActiveAlarmsStatus?.major"
  >
    <i [c8yIcon]="'warning'" class="status major stroked-icon"></i>
    <span class="badge badge-info">{{ context.item.c8y_ActiveAlarmsStatus?.major }}</span>
  </span>
  <span
    class="c8y-icon-badge"
    title="{{ context.item.c8y_ActiveAlarmsStatus?.minor }} {{ 'Minor alarms' | translate }}"
    *ngIf="context.item.c8y_ActiveAlarmsStatus?.minor"
  >
    <i [c8yIcon]="'high-priority'" class="status minor stroked-icon"></i>
    <span class="badge badge-info">{{ context.item.c8y_ActiveAlarmsStatus?.minor }}</span>
  </span>
  <span
    class="c8y-icon-badge"
    title="{{ context.item.c8y_ActiveAlarmsStatus?.warning }} {{ 'Warning alarms' | translate }}"
    *ngIf="context.item.c8y_ActiveAlarmsStatus?.warning"
  >
    <i [c8yIcon]="'info-circle'" class="status warning stroked-icon"></i>
    <span class="badge badge-info">{{ context.item.c8y_ActiveAlarmsStatus?.warning }}</span>
  </span>
</a>

results matching ""

    No results matching ""