github.com/hernad/nomad@v1.6.112/ui/app/templates/components/exec/task-group-parent.hbs (about)

     1  {{!
     2    Copyright (c) HashiCorp, Inc.
     3    SPDX-License-Identifier: MPL-2.0
     4  ~}}
     5  
     6  <button {{action "toggleOpen"}} class="toggle-button {{if this.hasPendingAllocations "is-loading"}}" data-test-task-group-name type="button">
     7    {{x-icon (if this.isOpen "chevron-down" "chevron-right")}}
     8    {{this.taskGroup.name}}
     9  </button>
    10  {{#if this.isOpen}}
    11    <ul class="task-list">
    12      {{#each this.sortedTasks as |task|}}
    13        {{#if this.shouldOpenInNewWindow}}
    14          <a {{on "click" (action "openInNewWindow" this.taskGroup.job this.taskGroup task)}} href="#" class="task-item" data-test-task>
    15            <Exec::TaskContents
    16              @task={{task}}
    17              @active={{and this.currentRouteIsThisTaskGroup (eq task.name this.activeTaskName)}}
    18              @shouldOpenInNewWindow={{this.shouldOpenInNewWindow}} />
    19          </a>
    20        {{else}}
    21          <LinkTo @route="exec.task-group.task" @models={{array this.taskGroup.job.plainId this.taskGroup.name task.name}} class="task-item" data-test-task={{true}}>
    22            <Exec::TaskContents
    23              @task={{task}}
    24              @active={{and this.currentRouteIsThisTaskGroup (eq task.name this.activeTaskName)}}
    25              @shouldOpenInNewWindow={{this.shouldOpenInNewWindow}} />
    26          </LinkTo>
    27        {{/if}}
    28      {{/each}}
    29    </ul>
    30  {{/if}}