mirror of
https://github.com/status-im/consul.git
synced 2025-01-12 23:05:28 +00:00
99c51c9f86
Various ember addons produced deprecation messages, some in the browser console and some in terminal. Upgrading and replacing some of these has reduced this. Upgrades: - ember-collection - ember-computed-style Replacements: - ember-pluralize replaced with ember-inflector - ember-cli-format-number replaced with custom helper using standard `toLocaleString` Removing ember-cli-format-number also meant some further changes related to decimal places in the tomography graph, done using `toFixed` The ExternalSources background-images have also now been escaped correctly preventing in-development `console` warnings. The only deprecation warnings are now from ember-block-slots, only in terminal, making for a better development experience overall, especially now we have an empty browser console Also adds a `callIfType` 'helper util' which is a util specifically for helpers (it conforms to a helper argument signature) to be expanded upon later.
41 lines
1.5 KiB
Handlebars
41 lines
1.5 KiB
Handlebars
{{#if (gt items.length 0) }}
|
|
<input type="checkbox" id="toolbar-toggle" />
|
|
<form class="filter-bar">
|
|
{{freetext-filter onchange=(action 'filter') value=filter.s placeholder="Search by name/port"}}
|
|
</form>
|
|
{{/if}}
|
|
{{#if (gt filtered.length 0)}}
|
|
{{#tabular-collection
|
|
data-test-services
|
|
items=filtered as |item index|
|
|
}}
|
|
{{#block-slot 'header'}}
|
|
<th>Service</th>
|
|
<th>Port</th>
|
|
<th>Tags</th>
|
|
{{/block-slot}}
|
|
{{#block-slot 'row'}}
|
|
<td data-test-service-name="{{item.Service}}">
|
|
<a href={{href-to 'dc.services.show' item.Service}}>
|
|
<span data-test-external-source="{{service/external-source item}}" style={{{ concat 'background-image: ' (css-var (concat '--' (service/external-source item) '-color-svg') 'none')}}}></span>
|
|
{{item.Service}}{{#if (not-eq item.ID item.Service) }}<em data-test-service-id="{{item.ID}}">({{item.ID}})</em>{{/if}}
|
|
</a>
|
|
</td>
|
|
<td data-test-service-port="{{item.Port}}" class="port">
|
|
{{item.Port}}
|
|
</td>
|
|
<td data-test-service-tags class="tags">
|
|
{{#if (gt item.Tags.length 0)}}
|
|
{{#each item.Tags as |item|}}
|
|
<span>{{item}}</span>
|
|
{{/each}}
|
|
{{/if}}
|
|
</td>
|
|
{{/block-slot}}
|
|
{{/tabular-collection}}
|
|
{{else}}
|
|
<p>
|
|
There are no services.
|
|
</p>
|
|
{{/if}}
|