Skip to content

Commit

Permalink
Display total number of roles and cookbooks (#43)
Browse files Browse the repository at this point in the history
* display number of roles

* display number of cookbooks

* add counts to other pages and minor style tweak
  • Loading branch information
drewhammond authored Oct 18, 2022
1 parent bdb83b7 commit cb9a23c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion internal/app/ui/templates/cookbooks.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
cookbooks
{{end}}
{{define "content"}}
<h2>Cookbooks</h2>
<h2>Cookbooks <small class="text-muted">({{ len .cookbooks }})</small></h2>
<ul id="cookbook-list" class="list-unstyled">
{{range $index, $versions := .cookbooks}}
<li>
Expand Down
2 changes: 1 addition & 1 deletion internal/app/ui/templates/databags.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{define "content"}}
<h2>Data Bags</h2>
<h2>Data Bags <small class="text-muted">({{ len .databags }})</small></h2>
<ul id="databag-list" class="list-unstyled">
{{range $name, $url := .databags}}
<li><a href="/ui/databags/{{$name}}">{{$name}}</a></li>
Expand Down
2 changes: 1 addition & 1 deletion internal/app/ui/templates/environments.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{define "content"}}
<h2>Environments</h2>
<h2>Environments <small class="text-muted">({{ len .environments }})</small></h2>
<ul id="environment-list" class="list-unstyled">
{{range $name, $url := .environments }}
<li><a href="/ui/environments/{{$name}}">{{$name}}</a></li>
Expand Down
12 changes: 6 additions & 6 deletions internal/app/ui/templates/nodes.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{define "content"}}
<h2>Nodes ({{ len .nodes }})</h2>
<ul id="node-list" class="list-unstyled">
{{range .nodes}}
<li><a href="/ui/nodes/{{.}}">{{.}}</a></li>
{{end}}
</ul>
<h2>Nodes <small class="text-muted">({{ len .nodes }})</small></h2>
<ul id="node-list" class="list-unstyled">
{{range .nodes}}
<li><a href="/ui/nodes/{{.}}">{{.}}</a></li>
{{end}}
</ul>
{{end}}
2 changes: 1 addition & 1 deletion internal/app/ui/templates/roles.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{define "content"}}
<h2>Roles</h2>
<h2>Roles <small class="text-muted">({{ len .roles }})</small></h2>
<ul id="role-list" class="list-unstyled">
{{range .roles}}
<li><a href="/ui/roles/{{.}}">{{.}}</a></li>
Expand Down

0 comments on commit cb9a23c

Please sign in to comment.