Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
146f459
commit a1ebf53
Showing
6 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<div class="job-status-panel boxed-section"> | ||
<div class="boxed-section-head"> | ||
<h2>Status</h2> | ||
<div class="select-mode"> | ||
<button type="button" | ||
class="button is-small is-borderless {{if (eq this.mode "current") "is-active"}}" | ||
{{on "click" (action (mut this.mode) "current")}} | ||
> | ||
Current | ||
</button> | ||
<button type="button" | ||
class="button is-small is-borderless {{if (eq this.mode "historical") "is-active"}}" | ||
{{on "click" (action (mut this.mode) "historical")}}> | ||
Historical | ||
</button> | ||
</div> | ||
</div> | ||
<div class="boxed-section-body"> | ||
{{#if (eq this.mode "current")}} | ||
<h3 class="title is-4 running-allocs-title"><strong>{{@job.latestDeployment.placedAllocs}}/{{@job.latestDeployment.desiredTotal}}</strong> Allocations Running</h3> | ||
<div class="alloc-representation"> | ||
{{#each (range 0 @job.latestDeployment.desiredTotal) as |alloc|}} | ||
<span class="represented-allocation"></span> | ||
{{/each}} | ||
</div> | ||
{{/if}} | ||
{{#if (eq this.mode "historical")}} | ||
But what about before? | ||
{{/if}} | ||
{{log @job}} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// @ts-check | ||
import Component from '@glimmer/component'; | ||
import { tracked } from '@glimmer/tracking'; | ||
|
||
|
||
export default class JobPagePartsJobStatusPanelComponent extends Component { | ||
/** | ||
* @type {('current'|'historical')} | ||
*/ | ||
@tracked mode = "current" // can be either "current" or "historical" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
.job-status-panel { | ||
.select-mode { | ||
border: 1px solid $grey-blue; | ||
background: rgba(0,0,0,0.05); | ||
border-radius: 2px; | ||
display: grid; | ||
gap: 0.5rem; | ||
grid-template-columns: 1fr 1fr; | ||
padding: 0.25rem 0.5rem; | ||
margin-left: 1rem; | ||
|
||
button { | ||
height: auto; | ||
padding: 0 0.5rem; | ||
background: transparent; | ||
transition: 0.1s; | ||
|
||
&:hover { | ||
background: rgba(255,255,255,0.5); | ||
} | ||
|
||
&.is-active { | ||
background: $white; | ||
} | ||
} | ||
} | ||
|
||
.running-allocs-title { | ||
strong { | ||
font-weight: 800; | ||
} | ||
} | ||
|
||
.alloc-representation { | ||
display: grid; | ||
gap: 0.5rem; | ||
grid-template-columns: repeat( auto-fit, minmax(auto, 20px) ); | ||
.represented-allocation { | ||
background: $green; | ||
width: 20px; | ||
height: 20px; | ||
border-radius: 4px; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters