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

     1  {{#app-view class="intention list"}}
     2      {{#block-slot 'notification' as |status type|}}
     3        {{partial 'dc/intentions/notifications'}}
     4      {{/block-slot}}
     5      {{#block-slot 'header'}}
     6          <h1>
     7              Intentions
     8          </h1>
     9          <label for="toolbar-toggle"></label>
    10      {{/block-slot}}
    11      {{#block-slot 'actions'}}
    12          <a data-test-create href="{{href-to 'dc.intentions.create'}}" class="type-create">Create</a>
    13      {{/block-slot}}
    14      {{#block-slot 'toolbar'}}
    15  {{#if (gt items.length 0) }}
    16          {{intention-filter filters=actionFilters search=filters.s type=filters.action onchange=(action 'filter')}}
    17  {{/if}}
    18      {{/block-slot}}
    19      {{#block-slot 'content'}}
    20  {{#if (gt filtered.length 0) }}
    21          {{#tabular-collection
    22              route='dc.intentions.edit'
    23              key='SourceName'
    24              items=filtered as |item index|
    25          }}
    26              {{#block-slot 'header'}}
    27                  <th>Source</th>
    28                  <th>&nbsp;</th>
    29                  <th>Destination</th>
    30                  <th>Precedence</th>
    31              {{/block-slot}}
    32              {{#block-slot 'row'}}
    33                  <td class="source" data-test-intention="{{item.ID}}">
    34                    <a href={{href-to 'dc.intentions.edit' item.ID}} data-test-intention-source="{{item.SourceName}}">
    35                      {{#if (eq item.SourceName '*') }}
    36                        All Services (*)
    37                      {{else}}
    38                        {{item.SourceName}}
    39                      {{/if}}
    40                    </a>
    41                  </td>
    42                  <td class="intent-{{item.Action}}" data-test-intention-action="{{item.Action}}">
    43                      <strong>{{item.Action}}</strong>
    44                  </td>
    45                  <td class="destination" data-test-intention-destination="{{item.DestinationName}}">
    46                      {{#if (eq item.DestinationName '*') }}
    47                        All Services (*)
    48                      {{else}}
    49                        {{item.DestinationName}}
    50                      {{/if}}
    51                  </td>
    52                  <td class="precedence">
    53                      {{item.Precedence}}
    54                  </td>
    55              {{/block-slot}}
    56              {{#block-slot 'actions' as |index change checked|}}
    57                  {{#confirmation-dialog confirming=false index=index message='Are you sure you want to delete this intention?'}}
    58                      {{#block-slot 'action' as |confirm|}}
    59                          {{#action-group index=index onchange=(action change) checked=(if (eq checked index) 'checked')}}
    60                              <ul>
    61                                  <li>
    62                                      <a href={{href-to 'dc.intentions.edit' item.ID}}>Edit</a>
    63                                  </li>
    64                                  <li>
    65                                      <a data-test-delete onclick={{action confirm 'delete' item}}>Delete</a>
    66                                  </li>
    67                              </ul>
    68                          {{/action-group}}
    69                      {{/block-slot}}
    70                      {{#block-slot 'dialog' as |execute cancel message|}}
    71                        {{delete-confirmation message=message execute=execute cancel=cancel}}
    72                      {{/block-slot}}
    73                  {{/confirmation-dialog}}
    74              {{/block-slot}}
    75          {{/tabular-collection}}
    76  {{else}}
    77          <p>
    78              There are no intentions.
    79          </p>
    80  {{/if}}
    81      {{/block-slot}}
    82  {{/app-view}}