open-nomad/ui/app/templates/components/job-page/parts/stats-box.hbs
Phil Renaud 29af6c6ea0
13553 secure vars linked from jobs (#13708)
* Vars from job prototype

* singular linked variable from job

* Links from task groups and tasks to their variables incl periodic and parameterized

* Lintfix

* Make sure they can list em before we list em

* Tests from job/group/task to var
2022-07-13 11:40:13 -04:00

61 lines
2.1 KiB
Handlebars

{{! template-lint-disable no-inline-styles }}
<div class="boxed-section is-small">
<div class="boxed-section-body inline-definitions">
<span class="label" style="width: 6.125rem;">Job Details</span>
<span class="pair" data-test-job-stat="type">
<span class="term">Type</span>
{{@job.type}}
</span>
<span class="pair" data-test-job-stat="priority">
<span class="term">Priority</span>
{{@job.priority}}
</span>
<span class="pair" data-test-job-stat="version">
<span class="term">Version</span>
{{@job.version}}
</span>
{{#if (and (can "list variables") @job.pathLinkedVariable)}}
<span class="pair" data-test-job-stat="variables">
<LinkTo @route="variables.variable" @model={{@job.pathLinkedVariable.id}}>Variables</LinkTo>
</span>
{{/if}}
{{yield to="before-namespace"}}
{{#if (and @job.namespace this.system.shouldShowNamespaces)}}
<span class="pair" data-test-job-stat="namespace">
<span class="term">Namespace</span>
{{@job.namespace.name}}
</span>
{{/if}}
{{yield to="after-namespace"}}
</div>
{{#if @job.meta.structured.pack.name}}
<div class="boxed-section-body inline-definitions">
<span class="label" style="width: 6.125rem;">Pack Details</span>
<span class="pair" data-test-pack-stat="name">
<span class="term">Name</span>
{{@job.meta.structured.pack.name}}
</span>
{{#if @job.meta.structured.pack.registry}}
<span class="pair" data-test-pack-stat="registry">
<span class="term">Registry</span>
{{@job.meta.structured.pack.registry}}
</span>
{{/if}}
{{#if @job.meta.structured.pack.version}}
<span class="pair" data-test-pack-stat="version">
<span class="term">Version</span>
{{@job.meta.structured.pack.version}}
</span>
{{/if}}
{{#if @job.meta.structured.pack.revision}}
<span class="pair" data-test-pack-stat="revision">
<span class="term">Revision</span>
{{@job.meta.structured.pack.revision}}
</span>
{{/if}}
{{yield to="pack"}}
</div>
{{/if}}
</div>