This repository has been archived by the owner on May 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructure the environments tree to have individual entries
- Loading branch information
Showing
14 changed files
with
241 additions
and
82 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{{ define "landscapes_row" }} | ||
{{- $EnvName := .Name }} | ||
{{- range .Landscapes }} | ||
<tr class='clickable' onclick="window.location='/landscapes/{{ .Name }}?environment={{ $EnvName }}'"> | ||
<td>{{ .Name }}</td> | ||
<td><a href="/environment/{{ $EnvName }}">{{ $EnvName }}</a></td> | ||
{{- $SAPSystemNumber := 0 }} | ||
{{- $HostsNumber := 0 }} | ||
{{- $SAPSystemNumber = sum $SAPSystemNumber (len .SAPSystems) }} | ||
{{- range .SAPSystems }} | ||
{{- $HostsNumber = sum $HostsNumber (len .Hosts) }} | ||
{{- end }} | ||
<td>{{ $SAPSystemNumber }}</td> | ||
<td>{{ $HostsNumber }}</td> | ||
<td> | ||
{{- $Health := .Health }} | ||
{{- /* It would be nice to show the summary of the the health as tooltip. How many passing, critical and warning in a nice an visual way */ -}} | ||
<span class='badge badge-pill badge-{{ if eq $Health.Health "passing" }}primary{{ else if eq $Health.Health "warning" }}warning{{ else }}danger{{ end }}'>{{ $Health.Health }}</span> | ||
</td> | ||
</tr> | ||
{{- end }} | ||
{{ end }} |
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,24 @@ | ||
{{ define "landscapes_table" }} | ||
<table class='table eos-table'> | ||
<thead> | ||
<tr> | ||
<th scope='col'>Landscape</th> | ||
<th scope='col'>Environment</th> | ||
<th scope='col'>SAP systems number</th> | ||
<th scope='col'>Hosts number</th> | ||
<th scope='col'>Status</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{{- if .EnvName }} | ||
{{ $EnvName := .EnvName }} | ||
{{ $Env := index .Environments .EnvName }} | ||
{{ template "landscapes_row" $Env }} | ||
{{- else }} | ||
{{- range .Environments }} | ||
{{ template "landscapes_row" . }} | ||
{{- end }} | ||
{{- end }} | ||
</tbody> | ||
</table> | ||
{{ end }} |
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,56 @@ | ||
{{ define "sapsystems_table" }} | ||
<div class='table-responsive'> | ||
<table class='table eos-table'> | ||
<thead> | ||
<tr> | ||
<th scope='col'>SAP System</th> | ||
<th scope='col'>Environment</th> | ||
<th scope='col'>Landscape</th> | ||
<th scope='col'>Hosts number</th> | ||
<th scope='col'>Status</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{{- if .EnvName }} | ||
{{ $EnvName := .EnvName }} | ||
{{ $LandName := .LandName }} | ||
{{ $Env := index .Environments .EnvName }} | ||
{{ $Land := index $Env.Landscapes .LandName }} | ||
{{- range $Land.SAPSystems }} | ||
<tr class='clickable' onclick="window.location='/sapsystems/{{ .Name }}?environment={{ $EnvName }}&landscape={{ $LandName }}'"> | ||
<td>{{ .Name }}</td> | ||
<td><a href="/landscapes?/environment={{ $EnvName }}">{{ $EnvName }}</a></td> | ||
<td><a href="/sapsystems?landscape={{ $LandName }}">{{ $EnvName }}</a></td> | ||
<td>{{ len .Hosts }}</td> | ||
<td> | ||
{{- $Health := .Health }} | ||
{{- /* It would be nice to show the summary of the the health as tooltip. How many passing, critical and warning in a nice an visual way */ -}} | ||
<span class='badge badge-pill badge-{{ if eq $Health.Health "passing" }}primary{{ else if eq $Health.Health "warning" }}warning{{ else }}danger{{ end }}'>{{ $Health.Health }}</span> | ||
</td> | ||
</tr> | ||
{{- end }} | ||
{{- else }} | ||
{{- range .Environments }} | ||
{{- $EnvName := .Name }} | ||
{{- range .Landscapes }} | ||
{{- $LandName := .Name }} | ||
{{- range .SAPSystems }} | ||
<tr class='clickable' onclick="window.location='/sapsystems/{{ .Name }}?environment={{ $EnvName }}&landscape={{ $LandName }}'"> | ||
<td>{{ .Name }}</td> | ||
<td><a href="/landscapes?/environment={{ $EnvName }}">{{ $EnvName }}</a></td> | ||
<td><a href="/sapsystems?landscape={{ $LandName }}">{{ $LandName }}</a></td> | ||
<td>{{ len .Hosts }}</td> | ||
<td> | ||
{{- $Health := .Health }} | ||
{{- /* It would be nice to show the summary of the the health as tooltip. How many passing, critical and warning in a nice an visual way */ -}} | ||
<span class='badge badge-pill badge-{{ if eq $Health.Health "passing" }}primary{{ else if eq $Health.Health "warning" }}warning{{ else }}danger{{ end }}'>{{ $Health.Health }}</span> | ||
</td> | ||
</tr> | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
</tbody> | ||
</table> | ||
</div> | ||
{{ end }} |
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,15 @@ | ||
{{ define "content" }} | ||
<div class="col"> | ||
<h6><a href="/environments">Environments</a><h6> | ||
<h1>Environment details</h1> | ||
<dl class="inline"> | ||
<dt class="inline">Name</dt> | ||
<dd class="inline">{{ .EnvName }}</dd> | ||
</dl> | ||
<hr/> | ||
<p class='clearfix'/> | ||
<h1>Landscapes</h1> | ||
{{ template "landscapes_table" . }} | ||
</div> | ||
</div> | ||
{{ end }} |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{{ define "content" }} | ||
<div class="col"> | ||
<h6><a href="/environments">Environments</a> > <a href="/environments/{{ .EnvName }}">{{ .EnvName }}</a><h6> | ||
<h1>Landscape details</h1> | ||
<dl class="inline"> | ||
<dt class="inline">Name</dt> | ||
<dd class="inline">{{ .LandName }}</dd> | ||
</dl> | ||
<hr/> | ||
<h1>SAP Systems</h1> | ||
{{ template "sapsystems_table" . }} | ||
</div> | ||
{{ end }} |
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,40 +1,6 @@ | ||
{{ define "content" }} | ||
<div class="col"> | ||
<h6><a href="/environments">Environments</a> > {{ .EnvName }}</h6> | ||
<h1>Landscapes</h1> | ||
<div class='table-responsive'> | ||
<table class='table eos-table'> | ||
<thead> | ||
<tr> | ||
<th scope='col'>Landscape</th> | ||
<th scope='col'>SAP systems number</th> | ||
<th scope='col'>Hosts number</th> | ||
<th scope='col'>Status</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{{ $EnvName := .EnvName }} | ||
{{ $Env := index .Environments .EnvName }} | ||
{{- range $Env.Landscapes }} | ||
<tr class='clickable' onclick="window.location='/environments/{{ $EnvName }}/landscapes/{{ .Name }}'"> | ||
<td>{{ .Name }}</td> | ||
{{- $SAPSystemNumber := 0 }} | ||
{{- $HostsNumber := 0 }} | ||
{{- $SAPSystemNumber = sum $SAPSystemNumber (len .SAPSystems) }} | ||
{{- range .SAPSystems }} | ||
{{- $HostsNumber = sum $HostsNumber (len .Hosts) }} | ||
{{- end }} | ||
<td>{{ $SAPSystemNumber }}</td> | ||
<td>{{ $HostsNumber }}</td> | ||
<td> | ||
{{- $Health := .Health }} | ||
{{- /* It would be nice to show the summary of the the health as tooltip. How many passing, critical and warning in a nice an visual way */ -}} | ||
<span class='badge badge-pill badge-{{ if eq $Health.Health "passing" }}primary{{ else if eq $Health.Health "warning" }}warning{{ else }}danger{{ end }}'>{{ $Health.Health }}</span> | ||
</td> | ||
</tr> | ||
{{- end }} | ||
</tbody> | ||
</table> | ||
</div> | ||
{{ template "landscapes_table" . }} | ||
</div> | ||
{{ end }} |
Oops, something went wrong.