2022-03-08 17:28:36 +00:00
|
|
|
{{! Job heading }}
|
|
|
|
{{! template-lint-disable simple-unless }}
|
2018-01-08 21:08:14 +00:00
|
|
|
<div
|
|
|
|
data-test-diff-section-label="job"
|
2020-07-09 20:19:07 +00:00
|
|
|
data-test-diff-field="{{lowercase this.diff.Type}}"
|
2022-03-08 17:28:36 +00:00
|
|
|
class="{{if
|
|
|
|
this.diff.Type
|
|
|
|
(concat 'diff-section-label is-' (lowercase this.diff.Type))
|
|
|
|
}}"
|
|
|
|
>
|
|
|
|
<span class="marker {{concat 'is-' (lowercase this.diff.Type)}}">
|
2020-07-09 20:19:07 +00:00
|
|
|
{{#if (eq (lowercase this.diff.Type) "added")}}
|
2017-09-19 14:47:10 +00:00
|
|
|
+
|
2020-07-09 20:19:07 +00:00
|
|
|
{{else if (eq (lowercase this.diff.Type) "deleted")}}
|
2017-09-19 14:47:10 +00:00
|
|
|
-
|
2020-07-09 20:19:07 +00:00
|
|
|
{{else if (eq (lowercase this.diff.Type) "edited")}}
|
2017-09-19 14:47:10 +00:00
|
|
|
+/-
|
|
|
|
{{/if}}
|
|
|
|
</span>
|
2020-07-09 20:19:07 +00:00
|
|
|
<span class="diff-section-bold">Job: "{{this.diff.ID}}"</span>
|
2017-09-19 14:47:10 +00:00
|
|
|
</div>
|
|
|
|
|
2022-03-08 17:28:36 +00:00
|
|
|
{{! Show job field and object diffs if the job is edited }}
|
2020-07-09 20:19:07 +00:00
|
|
|
{{#if (or this.verbose (eq (lowercase this.diff.Type) "edited"))}}
|
2018-01-08 21:08:14 +00:00
|
|
|
<div data-test-diff-section-label="job-diff" class="diff-section-label">
|
2022-03-08 17:28:36 +00:00
|
|
|
<JobDiffFieldsAndObjects
|
|
|
|
@fields={{this.diff.Fields}}
|
|
|
|
@objects={{this.diff.Objects}}
|
|
|
|
/>
|
2017-09-19 14:47:10 +00:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
|
2022-03-08 17:28:36 +00:00
|
|
|
{{! Each task group }}
|
2020-07-09 20:19:07 +00:00
|
|
|
{{#each this.diff.TaskGroups as |group|}}
|
2022-03-08 17:28:36 +00:00
|
|
|
<div
|
|
|
|
data-test-diff-section-label="task-group"
|
|
|
|
class="{{if
|
|
|
|
group.Type
|
|
|
|
(concat 'diff-section-label is-' (lowercase group.Type))
|
|
|
|
}}"
|
|
|
|
>
|
|
|
|
<span class="marker {{concat 'is-' (lowercase group.Type)}}">
|
2017-09-19 14:47:10 +00:00
|
|
|
{{#if (eq (lowercase group.Type) "added")}}
|
|
|
|
+
|
|
|
|
{{else if (eq (lowercase group.Type) "deleted")}}
|
|
|
|
-
|
|
|
|
{{else if (eq (lowercase group.Type) "edited")}}
|
|
|
|
+/-
|
|
|
|
{{/if}}
|
|
|
|
</span>
|
|
|
|
<span class="diff-section-bold">Task Group: "{{group.Name}}"</span>
|
|
|
|
{{#if group.Updates}}
|
|
|
|
({{#each-in group.Updates as |updateType count|}}
|
2022-03-08 17:28:36 +00:00
|
|
|
<span class="job-diff-update-count {{css-class updateType}}">{{count}}
|
|
|
|
{{updateType}}</span>
|
2017-09-19 14:47:10 +00:00
|
|
|
{{/each-in}})
|
|
|
|
{{/if}}
|
|
|
|
|
2022-03-08 17:28:36 +00:00
|
|
|
{{! Show task group field and object diffs if the task group is edited }}
|
2020-07-09 20:19:07 +00:00
|
|
|
{{#if (or (eq (lowercase group.Type) "edited") this.verbose)}}
|
2022-03-08 17:28:36 +00:00
|
|
|
<div
|
|
|
|
data-test-diff-section-label="task-group-diff"
|
|
|
|
class="diff-section-label"
|
|
|
|
>
|
|
|
|
<JobDiffFieldsAndObjects
|
|
|
|
@fields={{group.Fields}}
|
|
|
|
@objects={{group.Objects}}
|
|
|
|
/>
|
2017-09-19 14:47:10 +00:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
|
2022-03-08 17:28:36 +00:00
|
|
|
{{! Each task }}
|
2017-09-19 14:47:10 +00:00
|
|
|
{{#each group.Tasks as |task|}}
|
2018-01-08 21:08:14 +00:00
|
|
|
<div
|
|
|
|
data-test-diff-section-label="task"
|
|
|
|
data-test-diff-field="{{lowercase task.Type}}"
|
2022-03-08 17:28:36 +00:00
|
|
|
class="{{if
|
|
|
|
task.Type
|
|
|
|
(concat 'diff-section-label is-' (lowercase task.Type))
|
|
|
|
}}"
|
|
|
|
>
|
|
|
|
<span class="marker {{concat 'is-' (lowercase task.Type)}}">
|
|
|
|
{{#if (eq (lowercase task.Type) "added")}}
|
|
|
|
+
|
|
|
|
{{else if (eq (lowercase task.Type) "deleted")}}
|
|
|
|
-
|
|
|
|
{{else if (eq (lowercase task.Type) "edited")}}
|
|
|
|
+/-
|
|
|
|
{{/if}}
|
|
|
|
</span>
|
|
|
|
Task: "{{task.Name}}"
|
2017-09-19 14:47:10 +00:00
|
|
|
{{#if task.Annotations}}
|
2018-08-17 17:31:23 +00:00
|
|
|
({{~#each task.Annotations as |annotation index|}}
|
2017-09-19 14:47:10 +00:00
|
|
|
<span class="{{css-class annotation}}">{{annotation}}</span>
|
2018-08-17 17:31:23 +00:00
|
|
|
{{#unless (eq index (dec task.Annotations.length))}},{{/unless}}
|
|
|
|
{{/each~}})
|
2017-09-19 14:47:10 +00:00
|
|
|
{{/if}}
|
2020-07-09 20:19:07 +00:00
|
|
|
{{#if (or this.verbose (eq (lowercase task.Type) "edited"))}}
|
2022-03-08 17:28:36 +00:00
|
|
|
<JobDiffFieldsAndObjects
|
|
|
|
@fields={{task.Fields}}
|
|
|
|
@objects={{task.Objects}}
|
|
|
|
/>
|
2017-09-19 14:47:10 +00:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
{{/each}}
|
|
|
|
</div>
|
|
|
|
{{/each}}
|