Skip to content

Commit

Permalink
Fix: dont show a service as healthy when its parent alloc is not running
Browse files Browse the repository at this point in the history
  • Loading branch information
philrenaud committed Jun 9, 2023
1 parent ceb3b4c commit aef1776
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ui/app/components/allocation-service-sidebar.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
{{#if (eq this.aggregateStatus 'Unhealthy')}}
<FlightIcon @name="x-square-fill" @color="#c84034" />
Unhealthy
{{else if (eq this.aggregateStatus 'Unknown')}}
<Tooltip @text="The parent allocation for this service is not running" @isFullText={{true}}>
<FlightIcon @name="help" @color="#999999" />
Health Unknown
</Tooltip>
{{else}}
<FlightIcon @name="check-square-fill" @color="#25ba81" />
Healthy
Expand Down
1 change: 1 addition & 0 deletions ui/app/components/allocation-service-sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export default class AllocationServiceSidebarComponent extends Component {
}

get aggregateStatus() {
if (this.args.allocation?.clientStatus != -'running') return 'Unknown';
return this.checks.any((check) => check.Status === 'failure')
? 'Unhealthy'
: 'Healthy';
Expand Down

0 comments on commit aef1776

Please sign in to comment.