add last updated to tags page as well

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
Jess Frazelle 2018-01-01 12:25:52 -05:00
parent d57e019b47
commit ad6b4d161b
No known key found for this signature in database
GPG key ID: 18F3685C0022BFF3
3 changed files with 9 additions and 5 deletions

View file

@ -26,7 +26,7 @@ GO_LDFLAGS_STATIC=-ldflags "-w $(CTIMEVAR) -extldflags -static"
# List the GOOS and GOARCH to build
GOOSARCHES = darwin/amd64 darwin/386 linux/arm linux/arm64 linux/amd64 linux/386 windows/amd64 windows/386
all: clean build fmt lint test staticcheck vet install ## Runs a clean, build, fmt, lint, test, vet and install
all: clean build fmt lint test staticcheck vet install ## Runs a clean, build, fmt, lint, test, staticcheck, vet and install
.PHONY: build
build: $(NAME) ## Builds a dynamic executable or package
@ -173,7 +173,7 @@ dtest: ## Run the tests in a docker container
-e DOCKER_HOST=tcp://127.0.0.1:2375 \
-e DOCKER_TLS_VERIFY=true \
-e DOCKER_CERT_PATH=/etc/docker/ssl \
-e DOCKER_API_VERSION=1.34 \
-e DOCKER_API_VERSION \
$(DOCKER_IMAGE) \
make test

View file

@ -118,9 +118,12 @@ func (rc *registryController) tagsHandler(w http.ResponseWriter, r *http.Request
return
}
result := AnalysisResult{}
result.RegistryDomain = rc.reg.Domain
result.Name = repo
result := AnalysisResult{
RegistryDomain: rc.reg.Domain,
LastUpdated: time.Now().Local().Format(time.RFC1123),
Name: repo,
}
for _, tag := range tags {
// get the manifest
m1, err := rc.reg.ManifestV1(repo, tag)

View file

@ -49,6 +49,7 @@
<div class="footer">
<a href="https://twitter.com/jessfraz">@jessfraz</a>
<p>Last Updated: {{ .LastUpdated }}</p>
</div><!--/.footer-->
<script src="/static/js/scripts.js"></script>
<script type="text/javascript">