github.com/outbrain/consul@v1.4.5/ui-v2/app/templates/dc/services/index.hbs (about)

     1  {{#app-view class="service list"}}
     2      {{!TODO: Look at the item passed through to figure what partial to show, also move into its own service partial, for the moment keeping here for visibility}}
     3      {{#block-slot 'notification' as |status type|}}
     4        {{partial 'dc/acls/notifications'}}
     5      {{/block-slot}}
     6      {{#block-slot 'header'}}
     7          <h1>
     8              Services
     9          </h1>
    10          <label for="toolbar-toggle"></label>
    11      {{/block-slot}}
    12      {{#block-slot 'toolbar'}}
    13  {{#if (gt items.length 0) }}
    14          {{catalog-filter filters=healthFilters search=filters.s status=filters.status onchange=(action 'filter')}}
    15  {{/if}}
    16      {{/block-slot}}
    17      {{#block-slot 'content'}}
    18  {{#if (gt filtered.length 0) }}
    19          {{#tabular-collection
    20              route='dc.services.show'
    21              key='Name'
    22              items=filtered as |item index|
    23          }}
    24              {{#block-slot 'header'}}
    25                  <th style={{remainingWidth}}>Service</th>
    26                  <th style={{totalWidth}}>Health Checks<span><em>The number of health checks for the service on all nodes</em></span></th>
    27                  <th style={{remainingWidth}}>Tags</th>
    28              {{/block-slot}}
    29              {{#block-slot 'row'}}
    30  
    31                  <td data-test-service="{{item.Name}}" style={{remainingWidth}}>
    32                    <a href={{href-to 'dc.services.show' item.Name}}>
    33                      <span data-test-external-source="{{service/external-source item}}" style={{{ concat 'background-image: ' (css-var (concat '--' (service/external-source item) '-color-svg') 'none')}}}></span>
    34                      {{item.Name}}
    35                    </a>
    36                  </td>
    37                  <td style={{totalWidth}}>
    38  {{#if (and (lt item.ChecksPassing 1) (lt item.ChecksWarning 1) (lt item.ChecksCritical 1) )}}
    39                      <span title="No Healthchecks" class="zero">0</span>
    40  {{else}}
    41                      <dl>
    42                          <dt title="Passing" class="passing{{if (lt item.ChecksPassing 1) ' zero'}}">Healthchecks Passing</dt>
    43                          <dd title="Passing" class={{if (lt item.ChecksPassing 1) 'zero'}} style={{passingWidth}}>{{format-number item.ChecksPassing}}</dd>
    44                          <dt title="Warning" class="warning{{if (lt item.ChecksWarning 1) ' zero'}}">Healthchecks Warning</dt>
    45                          <dd title="Warning" class={{if (lt item.ChecksWarning 1) 'zero'}} style={{warningWidth}}>{{format-number item.ChecksWarning}}</dd>
    46                          <dt title="Critical" class="critical{{if (lt item.ChecksCritical 1) ' zero'}}">Healthchecks Critical</dt>
    47                          <dd title="Critical" class={{if (lt item.ChecksCritical 1) 'zero'}} style={{criticalWidth}}>{{format-number item.ChecksCritical}}</dd>
    48                      </dl>
    49  {{/if}}
    50                  </td>
    51                  <td class="tags" style={{remainingWidth}}>
    52                  {{#if (gt item.Tags.length 0)}}
    53                    {{#each item.Tags as |item|}}
    54                      <span>{{item}}</span>
    55                    {{/each}}
    56                  {{/if}}
    57                  </td>
    58              {{/block-slot}}
    59          {{/tabular-collection}}
    60  {{else}}
    61          <p>
    62              There are no services.
    63          </p>
    64  {{/if}}
    65      {{/block-slot}}
    66  {{/app-view}}
    67