Skip to content

Commit

Permalink
Beginnings of a legend
Browse files Browse the repository at this point in the history
  • Loading branch information
philrenaud committed Feb 16, 2023
1 parent 0466c49 commit 9f4ca0b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 6 deletions.
16 changes: 13 additions & 3 deletions ui/app/components/job-status/panel.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,19 @@
<div class="boxed-section-body">
{{#if (eq this.mode "current")}}
<h3 class="title is-4 running-allocs-title"><strong>{{@job.runningAllocs}}/{{this.totalAllocs}}</strong> Allocations Running</h3>
<JobStatus::AllocationRow @totalAllocs={{this.totalAllocs}}
@allocBlocks={{this.allocBlocks}}
/>

<JobStatus::AllocationRow @totalAllocs={{this.totalAllocs}}
@allocBlocks={{this.allocBlocks}}
/>

<legend>
{{#each this.allocTypes as |type|}}
<span class="legend-item">
<span class="represented-allocation {{type.label}}"></span>
{{capitalize type.label}}
</span>
{{/each}}
</legend>
{{/if}}
{{#if (eq this.mode "historical")}}
But what about before?
Expand Down
4 changes: 2 additions & 2 deletions ui/app/components/job-status/panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ export default class JobStatusPanelComponent extends Component {

allocTypes = [
"running",
"failed",
// "failed",
"unknown",
// "queued",
"complete",
// "starting",
"lost"
// "lost"
].map((type) => {
return {
label: type,
Expand Down
17 changes: 16 additions & 1 deletion ui/app/styles/components/job-status-panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
.alloc-status-summaries {
display: flex;
height: 32px;
gap: 0.5rem;
gap: 1.5rem;

.allocation-status-block {
display: grid;
Expand Down Expand Up @@ -117,6 +117,21 @@

}

legend {
padding: 2rem 0;
display: grid;
grid-template-columns: repeat(2, 1fr);
.legend-item {
display: grid;
gap: 0.5rem;
grid-template-columns: auto 1fr;
.represented-allocation {
width: 20px;
height: 20px;
}
}
}

}

.fake-box-for-manipulating-allocs {
Expand Down

0 comments on commit 9f4ca0b

Please sign in to comment.