All files / src/app/components/device-card-logic device-card-logic.component.html

70% Statements 21/30
85.71% Branches 6/7
100% Functions 0/0
78.94% Lines 15/19

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35264x   4x 528x   345x 345x 1x     4x 4x 532x 4x     264x 532x 4x         4x   4x                  
@if (device && device.status === 'up' && places.length > 0) {
  <div class="card">
    <div class="rows card-content">
      @if (displayDeviceInfo) {
        <div class="has-text-left">
          <h1 class="title">{{device.name}}</h1>
          <h2 class="subtitle is-5">device #{{device.device_id.slice(8)}}</h2>
        </div>
      }
      <div>
        <h3 class="subtitle is-5 has-text-left">Active Process Logic Places:</h3>
        <div class="tags places">
          @for (place of places; track place) {
            <span class="tag is-medium"
              [class.is-warning-dark]="place.toLowerCase().includes('warning')"
              [class.is-info]="place.toLowerCase().includes('info')"
              [class.is-danger]="place.toLowerCase().includes('error')">
              {{ place }}
            </span>
          }
        </div>
      </div>
    </div>
  </div>
}
@else if (device && device.status !== 'up' && displayDeviceInfo) {
  <div class="card">
      <div class="card-content has-text-left">
        <h1 class="title">{{device.name}}</h1>
        <h2 class="subtitle is-5">device #{{device.device_id.slice(8)}}</h2>
        <h3>Device is down.</h3>
      </div>
  </div>
}