DodoApp: Implement commit status page
Render used volume, postgresql and ingress resource details.
Change-Id: I87f34fd19d0d0d31ec495d2798c9f5ce99c0fd43
diff --git a/core/installer/welcome/dodo-app-tmpl/app_status.html b/core/installer/welcome/dodo-app-tmpl/app_status.html
index efe74a1..eabc5b2 100644
--- a/core/installer/welcome/dodo-app-tmpl/app_status.html
+++ b/core/installer/welcome/dodo-app-tmpl/app_status.html
@@ -2,10 +2,9 @@
dodo app: {{ .Name }}
{{ end }}
{{- define "content" -}}
-<a href="/">Home</a><br/><br/>
{{ .GitCloneCommand }}
<hr class="divider">
{{- range .Commits -}}
-{{if eq .Status "OK" }}<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="black" d="M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59z"/></svg>{{ else }}<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 48 48"><path fill="black" fill-rule="evenodd" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M6 11L11 6L24 19L37 6L42 11L29 24L42 37L37 42L24 29L11 42L6 37L19 24L6 11Z" clip-rule="evenodd"/></svg>{{ end }} {{ .Hash }} {{ .Message }}<br/>
+{{if eq .Status "OK" }}<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="black" d="M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59z"/></svg>{{ else }}<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 48 48"><path fill="black" fill-rule="evenodd" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M6 11L11 6L24 19L37 6L42 11L29 24L42 37L37 42L24 29L11 42L6 37L19 24L6 11Z" clip-rule="evenodd"/></svg>{{ end }} <a href="/{{ $.Name }}/{{ .Hash }}">{{ .Hash }}</a> {{ .Message }}<br/>
{{- end -}}
{{- end -}}
diff --git a/core/installer/welcome/dodo-app-tmpl/base.html b/core/installer/welcome/dodo-app-tmpl/base.html
index b0251cd..6334f41 100644
--- a/core/installer/welcome/dodo-app-tmpl/base.html
+++ b/core/installer/welcome/dodo-app-tmpl/base.html
@@ -8,6 +8,13 @@
<link rel="stylesheet" href="/stat/dodo_app.css?v=0.0.8">
</head>
<body class="container">
+ <nav aria-label="breadcrumb">
+ <ul>
+ {{- range $i := .Navigation }}
+ <li><a href="{{ $i.Address }}">{{- $i.Name -}}</a></li>
+ {{- end }}
+ </ul>
+ </nav>
{{- block "content" . }}
{{- end }}
</body>
diff --git a/core/installer/welcome/dodo-app-tmpl/commit_status.html b/core/installer/welcome/dodo-app-tmpl/commit_status.html
new file mode 100644
index 0000000..8616545
--- /dev/null
+++ b/core/installer/welcome/dodo-app-tmpl/commit_status.html
@@ -0,0 +1,32 @@
+{{ define "title" }}
+dodo app: {{ .AppName }}
+{{ end }}
+{{- define "content" -}}
+{{ if ne .Commit.Error "" }}
+{{ .CommitError }}
+{{ end }}
+{{- if gt (len .Resources.Volume) 0 -}}
+<h2>Volumes</h2>
+{{- range $v := .Resources.Volume -}}
+Name: {{ $v.Name }}<br/>
+Size: {{ $v.Size }}<br/>
+<br/>
+{{- end -}}
+{{- end -}}
+{{- if gt (len .Resources.PostgreSQL) 0 -}}
+<h2>PostgreSQL</h2>
+{{- range $p := .Resources.PostgreSQL -}}
+Name: {{ $p.Name }}<br/>
+Version: {{ $p.Version }}<br/>
+Volume: {{ $p.Volume }}<br/>
+<br/>
+{{- end -}}
+{{- end -}}
+{{- if gt (len .Resources.Ingress) 0 -}}
+<h2>Ingress</h2>
+{{- range $i := .Resources.Ingress -}}
+Host: {{ $i.Host }}<br/>
+<br/>
+{{- end -}}
+{{- end -}}
+{{- end -}}