-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make summary elements more accessible (#530)
* Make namespace filter links unique * Clean up HTML semantics * Move HTML classes to updated containers * Move verticalRhythm classes to new containers * Use default arrow for API entry summary element * Fix Recommended Settings headings * Use default arrow for Cost Settings summary element * Use default arrow for email entry summary element * Remove CSS for headings and custom markers in details * Remove extraneous whitespace
- Loading branch information
1 parent
b5b7f56
commit d0f9655
Showing
6 changed files
with
48 additions
and
96 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
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
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
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 |
---|---|---|
@@ -1,69 +1,62 @@ | ||
{{define "namespace"}} | ||
{{ $foundFirstWorkload := false }} | ||
|
||
<article data-filter="{{ $.Namespace }}"> | ||
<details class="detailInfo --namespace verticalRhythm" open> | ||
<summary class="--hideMarker"> | ||
<h2> | ||
<span aria-label="Namespace:" class="badge detailBadge --namespace" | ||
>Namespace</span | ||
> | ||
{{ $.Namespace }} | ||
<i aria-hidden="true" class="fas fa-fw fa-angle-down --showWhenClosed"></i | ||
><i aria-hidden="true" class="fas fa-fw fa-angle-up --showWhenOpen"></i> | ||
</h2> | ||
<p> | ||
<a | ||
class="detailLink --namespace" | ||
href="{{ $.BasePath }}dashboard/{{ $.Namespace }}" | ||
>Limit results to the {{ $.Namespace }} namespace</a> | ||
</p> | ||
</summary> | ||
<article class="detailInfo --namespace verticalRhythm" data-filter="{{ $.Namespace }}"> | ||
<h2> | ||
<span class="badge detailBadge --namespace">Namespace</span> | ||
{{ $.Namespace }} | ||
</h2> | ||
|
||
<a | ||
class="detailLink --namespace" | ||
href="{{ $.BasePath }}dashboard/{{ $.Namespace }}" | ||
>Limit results to the {{ $.Namespace }} namespace</a> | ||
|
||
<details open> | ||
<summary>Workloads</summary> | ||
|
||
{{ if lt (len $.Workloads) 1 }} | ||
<section class="detailInfo --empty"> | ||
<p>No workloads found in this namespace.</p> | ||
</section> | ||
<p class="detailInfo --empty">No workloads found in this namespace.</p> | ||
|
||
{{ else }} | ||
{{ range $workload := $.Workloads }} | ||
<details class="detailInfo --deployment verticalRhythm" | ||
{{ if not $foundFirstWorkload }} | ||
{{ $foundFirstWorkload = true }} open | ||
{{ end }}> | ||
<summary class="--hideMarker"> | ||
<h3> | ||
<span aria-label="Workload:" class="badge detailBadge --deployment" | ||
>{{ $workload.ControllerType }}</span | ||
> | ||
{{ $workload.ControllerName }} | ||
<i aria-hidden="true" class="fas fa-fw fa-angle-down --showWhenClosed"></i | ||
><i aria-hidden="true" class="fas fa-fw fa-angle-up --showWhenOpen"></i> | ||
</h3> | ||
</summary> | ||
|
||
{{ range $cName, $cSummary := $workload.Containers }} | ||
<details class="detailInfo --container verticalRhythm" open> | ||
<summary class="--hideMarker"> | ||
<div class="detailInfo --deployment verticalRhythm"> | ||
<h3> | ||
<span class="badge detailBadge --deployment">{{ $workload.ControllerType }}</span> | ||
{{ $workload.ControllerName }} | ||
</h3> | ||
|
||
<details | ||
{{ if not $foundFirstWorkload }} | ||
{{ $foundFirstWorkload = true }} open | ||
{{ end }}> | ||
<summary>Containers</summary> | ||
|
||
{{ range $cName, $cSummary := $workload.Containers }} | ||
<div class="detailInfo --container verticalRhythm"> | ||
<h4> | ||
<span aria-label="Container:" class="badge detailBadge --container" | ||
>Container</span | ||
> | ||
{{ $cName }} {{ if gt $cSummary.ContainerCostInt 0 }} <span class="top-number">${{ $cSummary.ContainerCost }}/hour</span> {{ end }} | ||
<i aria-hidden="true" class="fas fa-fw fa-angle-down --showWhenClosed"></i | ||
><i aria-hidden="true" class="fas fa-fw fa-angle-up --showWhenOpen"></i> | ||
<span class="badge detailBadge --container">Container</span> | ||
{{ $cName }} | ||
</h4> | ||
</summary> | ||
|
||
<div class="layoutLineup"> | ||
{{ template "container" $cSummary }} | ||
{{ if gt $cSummary.ContainerCostInt 0 }} | ||
<span class="top-number">${{ $cSummary.ContainerCost }}/hour</span> | ||
{{ end }} | ||
|
||
<details open> | ||
<summary>Details</summary> | ||
|
||
<div class="layoutLineup"> | ||
{{ template "container" $cSummary }} | ||
</div> | ||
</details> | ||
</div> | ||
{{ end }} | ||
</details> | ||
{{ end }} | ||
</details> | ||
</div> | ||
{{ end }} | ||
{{ end }} | ||
|
||
</details> | ||
</article> | ||
{{end}} |