{{! Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0 }}

{{t 'resources.worker.title_plural'}}

{{#if (can 'create worker led worker' this.scope collection='workers')}} {{#if @model}} {{t 'titles.new' }} {{/if}} {{/if}} {{#if @model}} {{#let (resource-filter 'scopes.scope.workers.index' 'tags') as |filter| }} {{#if filter.allowedValues}} {{#each-in (group-by 'key' filter.allowedValues) as |key tags| }} {{/each-in}} {{/if}} {{/let}} {{#if (has-resource-filter-selections 'scopes.scope.workers.index' 'tags' ) }} {{t 'actions.clear-all-filters'}} {{/if}} <:body as |B|> {{#if (and (can 'read worker' B.data) B.data.isPki)}} {{B.data.displayName}} {{else}} {{B.data.displayName}} {{/if}} {{#if B.data.description}}

{{B.data.description}}

{{/if}}
{{#if B.data.tagCount}} {{/if}} {{B.data.active_connection_count}} {{B.data.release_version}} {{B.data.address}}
{{else}} {{#if (can 'list worker' this.scope collection='workers')}} {{! can list (at least): show default welcome message}} {{t 'resources.worker.description'}} {{else if (can 'create worker led worker' this.scope collection='workers') }} {{! can create (only): show create-but-not-list welcome message}} {{t 'descriptions.create-but-not-list' resource=(t 'resources.worker.title_plural') }} {{else}} {{! can neither list nor create }} {{t 'descriptions.neither-list-nor-create' resource=(t 'resources.worker.title_plural') }} {{/if}} {{#if (can 'create worker led worker' this.scope collection='workers') }} {{t 'titles.new'}} {{/if}} {{/if}}