Add version to UI

This commit is contained in:
Roman Vynar 2018-08-14 15:37:21 +03:00
parent 80bdad8c91
commit 7a752d3f8d
3 changed files with 6 additions and 2 deletions

View File

@ -39,6 +39,7 @@ func setupRenderer(debug bool, registryHost, basePath string) *Template {
view := jet.NewHTMLSet("templates")
view.SetDevelopmentMode(debug)
view.AddGlobal("version", version)
view.AddGlobal("basePath", basePath)
view.AddGlobal("registryHost", registryHost)
view.AddGlobal("pretty_size", func(size interface{}) string {

View File

@ -22,8 +22,8 @@
{{yield body()}}
<div style="padding: 10px 0; margin-bottom: 20px">
<div style="float: left">
&copy; 2017-2018 <a href="https://goquiq.com">Quiq Inc.</a>
<div style="text-align: center; color:darkgrey">
Docker Registry UI v{{version}} &copy; 2017-2018 <a href="https://goquiq.com">Quiq Inc.</a>
</div>
</div>
</div>

3
version.go Normal file
View File

@ -0,0 +1,3 @@
package main
const version = "0.7.3"