open-nomad/ui/app/components/das/recommendation-accordion.hbs
Phil Renaud 99185e2d8f
[ui, compliance] Remove the newline after .hbs copyright headers (#16861)
* Remove the newline after .hbs copyright headers

* Trying with the whitespace control char
2023-04-14 13:08:13 -04:00

52 lines
1.5 KiB
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: MPL-2.0
~}}
{{#if this.show}}
<ListAccordion
data-test-recommendation-accordion
class="recommendation-accordion boxed-section {{if this.closing 'closing'}}"
@source={{array @summary}}
@key="id"
{{did-insert this.inserted}}
as |a|
>
{{#if a.isOpen}}
<div class="animation-container" style={{this.animationContainerStyle}}>
<Das::RecommendationCard
@summary={{@summary}}
@proceed={{this.proceed}}
@onCollapse={{a.close}}
@skipReset={{true}}
/>
</div>
{{else}}
<a.head @buttonLabel={{unless a.isOpen "Show"}}>
<section class="left">
{{x-icon "info-circle-fill"}}
<span>Resource Recommendation</span>
<span data-test-group class="group">{{@summary.taskGroup.name}}</span>
</section>
<section class="diffs">
{{#if this.diffs.cpu.delta}}
<section>
<span class="resource">CPU</span>
{{this.diffs.cpu.signedDiff}}
<span class="percent">{{this.diffs.cpu.percentDiff}}</span>
</section>
{{/if}}
{{#if this.diffs.memory.delta}}
<section>
<span class="resource">Mem</span>
{{this.diffs.memory.signedDiff}}
<span class="percent">{{this.diffs.memory.percentDiff}}</span>
</section>
{{/if}}
</section>
</a.head>
{{/if}}
</ListAccordion>
{{/if}}