2022-03-08 17:28:36 +00:00
|
|
|
{{! template-lint-disable no-duplicate-landmark-elements}}
|
2020-10-29 12:46:42 +00:00
|
|
|
{{#if this.interstitialComponent}}
|
|
|
|
<section class="das-interstitial" style={{this.interstitialStyle}}>
|
2022-03-08 17:28:36 +00:00
|
|
|
{{component
|
|
|
|
(concat "das/" this.interstitialComponent)
|
|
|
|
proceed=this.proceedPromiseResolve
|
|
|
|
error=this.error
|
|
|
|
}}
|
2020-10-29 12:46:42 +00:00
|
|
|
</section>
|
2020-11-04 18:22:24 +00:00
|
|
|
{{else if @summary.taskGroup}}
|
2020-10-29 12:46:42 +00:00
|
|
|
<section
|
|
|
|
...attributes
|
|
|
|
data-test-task-group-recommendations
|
2022-03-08 17:28:36 +00:00
|
|
|
class="recommendation-card"
|
2021-03-01 15:46:22 +00:00
|
|
|
{{did-insert this.cardInserted}}
|
2020-10-29 12:46:42 +00:00
|
|
|
>
|
|
|
|
|
|
|
|
<h2 class="top overview inner-container">Resource Recommendation</h2>
|
|
|
|
|
|
|
|
<header class="overview inner-container">
|
|
|
|
<h3 class="slug">
|
2022-03-08 17:28:36 +00:00
|
|
|
<span
|
|
|
|
class="job"
|
|
|
|
data-test-job-name
|
|
|
|
>{{@summary.taskGroup.job.name}}</span>
|
|
|
|
<span
|
|
|
|
class="group"
|
|
|
|
data-test-task-group-name
|
|
|
|
>{{@summary.taskGroup.name}}</span>
|
2020-10-29 12:46:42 +00:00
|
|
|
</h3>
|
|
|
|
<h4 class="namespace">
|
2022-03-08 17:28:36 +00:00
|
|
|
<span class="namespace-label">Namespace:</span>
|
|
|
|
<span data-test-namespace>{{@summary.jobNamespace}}</span>
|
2020-10-29 12:46:42 +00:00
|
|
|
</h4>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<section class="diffs overview inner-container">
|
|
|
|
<Das::DiffsTable
|
|
|
|
data-test-group-totals
|
|
|
|
@model={{@summary.taskGroup}}
|
|
|
|
@recommendations={{@summary.recommendations}}
|
|
|
|
@excludedRecommendations={{@summary.excludedRecommendations}}
|
|
|
|
/>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="narrative overview inner-container">
|
|
|
|
<p data-test-narrative>{{this.narrative}}</p>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="main overview inner-container task-toggles">
|
|
|
|
<table data-test-toggles-table>
|
|
|
|
<thead data-test-tasks-head>
|
|
|
|
<tr>
|
|
|
|
{{#if this.showToggleAllToggles}}
|
|
|
|
<th>Task</th>
|
|
|
|
<th class="toggle-all">Toggle All</th>
|
|
|
|
<th class="toggle-cell">
|
|
|
|
<Toggle
|
|
|
|
data-test-cpu-toggle
|
2022-03-08 17:28:36 +00:00
|
|
|
@isActive={{and
|
|
|
|
this.allCpuToggleActive
|
|
|
|
(not this.allCpuToggleDisabled)
|
|
|
|
}}
|
2020-10-29 12:46:42 +00:00
|
|
|
@isDisabled={{this.allCpuToggleDisabled}}
|
2022-03-08 17:28:36 +00:00
|
|
|
@onToggle={{action
|
|
|
|
this.toggleAllRecommendationsForResource
|
|
|
|
"CPU"
|
|
|
|
}}
|
|
|
|
title="Toggle CPU recommendations for all tasks"
|
2020-10-29 12:46:42 +00:00
|
|
|
>
|
|
|
|
<div class="label-wrapper">CPU</div>
|
|
|
|
</Toggle>
|
|
|
|
</th>
|
|
|
|
<th class="toggle-cell">
|
|
|
|
<Toggle
|
|
|
|
data-test-memory-toggle
|
2022-03-08 17:28:36 +00:00
|
|
|
@isActive={{and
|
|
|
|
this.allMemoryToggleActive
|
|
|
|
(not this.allMemoryToggleDisabled)
|
|
|
|
}}
|
2020-10-29 12:46:42 +00:00
|
|
|
@isDisabled={{this.allMemoryToggleDisabled}}
|
2022-03-08 17:28:36 +00:00
|
|
|
@onToggle={{action
|
|
|
|
this.toggleAllRecommendationsForResource
|
|
|
|
"MemoryMB"
|
|
|
|
}}
|
|
|
|
title="Toggle memory recommendations for all tasks"
|
2020-10-29 12:46:42 +00:00
|
|
|
>
|
|
|
|
<div class="label-wrapper">Mem</div>
|
|
|
|
</Toggle>
|
|
|
|
</th>
|
|
|
|
{{else}}
|
|
|
|
<th colspan="2">Task</th>
|
|
|
|
<th class="toggle-cell">CPU</th>
|
|
|
|
<th class="toggle-cell">Mem</th>
|
|
|
|
{{/if}}
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{#each this.taskToggleRows key="task.name" as |taskToggleRow index|}}
|
|
|
|
<Das::TaskRow
|
|
|
|
@task={{taskToggleRow.task}}
|
|
|
|
@active={{eq this.activeTaskToggleRowIndex index}}
|
|
|
|
@cpu={{taskToggleRow.cpu}}
|
|
|
|
@memory={{taskToggleRow.memory}}
|
|
|
|
@onClick={{action (mut this.activeTaskToggleRowIndex) index}}
|
|
|
|
@toggleRecommendation={{@summary.toggleRecommendation}}
|
|
|
|
/>
|
|
|
|
{{/each}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="actions overview inner-container">
|
2022-03-08 17:28:36 +00:00
|
|
|
<button
|
|
|
|
class="button is-primary"
|
|
|
|
type="button"
|
|
|
|
disabled={{this.cannotAccept}}
|
|
|
|
data-test-accept
|
|
|
|
{{on "click" this.accept}}
|
|
|
|
>Accept</button>
|
|
|
|
<button
|
|
|
|
class="button is-light"
|
|
|
|
type="button"
|
|
|
|
data-test-dismiss
|
|
|
|
{{on "click" this.dismiss}}
|
|
|
|
>Dismiss</button>
|
2020-10-29 12:46:42 +00:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="active-task-group" data-test-active-task>
|
2020-11-04 18:22:24 +00:00
|
|
|
<section class="top active-task inner-container">
|
2022-03-08 17:28:36 +00:00
|
|
|
<CopyButton
|
|
|
|
data-test-copy-button
|
|
|
|
@clipboardText={{this.copyButtonLink}}
|
|
|
|
>
|
2020-11-04 18:22:24 +00:00
|
|
|
{{@summary.taskGroup.job.name}}
|
|
|
|
/
|
|
|
|
{{@summary.taskGroup.name}}
|
|
|
|
</CopyButton>
|
|
|
|
|
|
|
|
{{#if @onCollapse}}
|
2020-10-29 12:46:42 +00:00
|
|
|
<button
|
|
|
|
data-test-accordion-toggle
|
|
|
|
class="button is-light is-compact pull-right accordion-toggle"
|
|
|
|
{{on "click" @onCollapse}}
|
2022-03-08 17:28:36 +00:00
|
|
|
type="button"
|
|
|
|
>
|
2020-10-29 12:46:42 +00:00
|
|
|
Collapse
|
|
|
|
</button>
|
2020-11-04 18:22:24 +00:00
|
|
|
{{/if}}
|
|
|
|
</section>
|
2020-10-29 12:46:42 +00:00
|
|
|
|
|
|
|
<header class="active-task inner-container">
|
|
|
|
<h3 data-test-task-name>{{this.activeTask.name}} task</h3>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<section class="diffs active-task inner-container">
|
|
|
|
<Das::DiffsTable
|
|
|
|
@model={{this.activeTask}}
|
|
|
|
@recommendations={{this.activeTaskToggleRow.recommendations}}
|
|
|
|
@excludedRecommendations={{@summary.excludedRecommendations}}
|
|
|
|
/>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<ul class="main active-task inner-container">
|
|
|
|
{{#each this.activeTaskToggleRow.recommendations as |recommendation|}}
|
|
|
|
<li data-test-recommendation>
|
|
|
|
<Das::RecommendationChart
|
|
|
|
data-test-chart-for={{recommendation.resource}}
|
|
|
|
@resource={{recommendation.resource}}
|
|
|
|
@currentValue={{recommendation.currentValue}}
|
|
|
|
@recommendedValue={{recommendation.value}}
|
|
|
|
@stats={{recommendation.stats}}
|
2022-03-08 17:28:36 +00:00
|
|
|
@disabled={{includes
|
|
|
|
recommendation
|
|
|
|
@summary.excludedRecommendations
|
|
|
|
}}
|
2020-10-29 12:46:42 +00:00
|
|
|
/>
|
|
|
|
</li>
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
</section>
|
|
|
|
{{/if}}
|