Skip to content

Commit

Permalink
Failed or lost cell condensed
Browse files Browse the repository at this point in the history
  • Loading branch information
philrenaud committed May 23, 2023
1 parent 881083e commit f8a3089
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 44 deletions.
53 changes: 29 additions & 24 deletions ui/app/components/job-status/failed-or-lost.hbs
Original file line number Diff line number Diff line change
@@ -1,36 +1,41 @@
<section class="failed-or-lost">
<h4>
{{@title}}
<span
class="tooltip multiline text-center"
role="tooltip"
aria-label={{@description}}
>
<FlightIcon @name="info" />
</span>
</h4>
{{#if (eq @title "Rescheduled")}}
<h4>Replaced Allocations</h4>
{{#if @supportsRescheduling}}
<ConditionalLinkTo
@condition={{this.shouldLinkToAllocations}}
@condition={{@rescheduledAllocs.length}}
@route="jobs.job.allocations"
@model={{@job}}
@query={{hash scheduling='["has-been-rescheduled"]' version=(concat '[' @job.latestDeployment.versionNumber ']')}}
@label="View Allocations"
@class="failed-or-lost-link"
>
{{@allocs.length}}
<span
class="tooltip multiline text-center"
role="tooltip"
aria-label="Allocations that have been rescheduled, on another node if possible, due to failure"
>
<FlightIcon @name="info" />
</span>
{{@rescheduledAllocs.length}} Rescheduled
</ConditionalLinkTo>
{{/if}}
{{#if (eq @title "Restarted")}}
<ConditionalLinkTo
@condition={{this.shouldLinkToAllocations}}
@route="jobs.job.allocations"
@model={{@job}}
@query={{hash scheduling='["has-been-restarted"]' version=(concat '[' @job.latestDeployment.versionNumber ']')}}
@label="View Allocations"
@class="failed-or-lost-link"

<ConditionalLinkTo
@condition={{@restartedAllocs.length}}
@route="jobs.job.allocations"
@model={{@job}}
@query={{hash scheduling='["has-been-restarted"]' version=(concat '[' @job.latestDeployment.versionNumber ']')}}
@label="View Allocations"
@class="failed-or-lost-link"
>
<span
class="tooltip multiline text-center"
role="tooltip"
aria-label="Allocations that have been restarted in-place due to a task failure"
>
{{@allocs.length}}
</ConditionalLinkTo>
{{/if}}
<FlightIcon @name="info" />
</span>
{{@restartedAllocs.length}} Restarted
</ConditionalLinkTo>

</section>
7 changes: 0 additions & 7 deletions ui/app/components/job-status/failed-or-lost.js

This file was deleted.

14 changes: 3 additions & 11 deletions ui/app/components/job-status/panel/steady.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,12 @@
{{/each}}
</legend>

{{#if this.supportsRescheduling}}
<JobStatus::FailedOrLost
@allocs={{this.rescheduledAllocs}}
@job={{@job}}
@title="Rescheduled"
@description="Allocations that have been rescheduled, on another node if possible, due to failure"
/>
{{/if}}

<JobStatus::FailedOrLost
@allocs={{this.restartedAllocs}}
@rescheduledAllocs={{this.rescheduledAllocs}}
@restartedAllocs={{this.restartedAllocs}}
@job={{@job}}
@title="Restarted"
@description="Allocations that have been restarted in-place due to a task failure"
@supportsRescheduling={{this.supportsRescheduling}}
/>

<section class="versions">
Expand Down
4 changes: 2 additions & 2 deletions ui/app/styles/components/job-status-panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@
.failed-or-lost {
.failed-or-lost-link {
display: block;
font-size: 1.5rem;
font-weight: bold;
// font-size: 1.5rem;
// font-weight: bold;
}
}
}
Expand Down

0 comments on commit f8a3089

Please sign in to comment.