Amend tag info page, change logging.

* Amend representation of the tag info page
* Change logging library, add "-log-level" argument and put most of the logging into DEBUG mode
This commit is contained in:
Roman Vynar
2020-02-18 23:31:56 +02:00
parent dc7b2e42fc
commit 67d82c7d59
11 changed files with 199 additions and 134 deletions

View File

@@ -11,36 +11,45 @@
<li><a href="{{ basePath }}/{{ namespace }}/{{ repo }}">{{ repo|url_decode }}</a></li>
<li class="active">{{ tag }}</li>
</ol>
<h4>Image Details</h4>
<table class="table table-striped table-bordered">
<thead bgcolor="#ddd">
<tr>
<th colspan="2">Image Details</th>
<th colspan="2">Summary</th>
</tr>
</thead>
<tr>
<td width="20%">Image</td><td>{{ registryHost }}/{{ repoPath }}:{{ tag }}</td>
<td width="20%"><b>Image URL</b></td><td>{{ registryHost }}/{{ repoPath }}{{if isDigest}}@{{else}}:{{end}}{{ tag }}</td>
</tr>
{{if not isListOnly}}
<tr>
<td>sha256</td><td>{{ sha256 }}</td>
<td><b>Digest</b></td><td>sha256:{{ sha256 }}</td>
</tr>
{{if not isDigest}}
<tr>
<td>Created On</td><td>{{ created|pretty_time }}</td>
<td><b>Created On</b></td><td>{{ created|pretty_time }}</td>
</tr>
{{end}}
{{if not digestList}}
<tr>
<td><b>Image Size</b></td><td>{{ imageSize|pretty_size }}</td>
</tr>
<tr>
<td><b>Layer Count</b></td><td>{{ layersCount }}</td>
</tr>
{{end}}
<tr>
<td>Image Size</td><td>{{ imageSize|pretty_size }}</td>
<td><b>Manifest Formats</b></td>
<td>{{if not isDigest}}Manifest v2 schema 1{{else}}<font color="#c2c2c2">Manifest v2 schema 1</font>{{end}} |
{{if not digestList && layersV2}}Manifest v2 schema 2{{else}}<font color="#c2c2c2">Manifest v2 schema 2</font>{{end}} |
{{if digestList}}Manifest List v2 schema 2{{else}}<font color="#c2c2c2">Manifest List v2 schema 2</font>{{end}}
</td>
</tr>
<tr>
<td>Layer Count</td><td>{{ layersCount }}</td>
</tr>
{{end}}
</table>
{{if digests}}
<h4>Manifest List v2</h4>
{{range index, manifest := digests}}
{{if digestList}}
<h4>Multi-arch Sub-images <!-- Manifest List v2 schema 2 --></h4>
{{range index, manifest := digestList}}
<table class="table table-striped table-bordered">
<thead bgcolor="#ddd">
<tr>
@@ -60,11 +69,7 @@
{{else if key == "size"}}
<td>{{ manifest[key]|pretty_size }}</td>
{{else if key == "digest"}}
{{if not isListOnly}}
<td><a href='{{ basePath }}/{{ namespace }}/{{ repo }}/{{ manifest["digest"] }}'>{{ manifest["digest"] }}</a></td>
{{else}}
<td>{{ manifest["digest"] }}</td>
{{end}}
<td><a href="{{ basePath }}/{{ namespace }}/{{ repo }}/{{ manifest["digest"] }}">{{ manifest["digest"] }}</a></td>
{{else}}
<td>{{ manifest[key] }}</td>
{{end}}
@@ -73,7 +78,7 @@
</table>
{{end}}
{{else if layersV2}}
<h4>Manifest v2</h4>
<h4>Blobs <!-- Manifest v2 schema 2--></h4>
<table class="table table-striped table-bordered">
<thead bgcolor="#ddd">
<tr>
@@ -92,8 +97,8 @@
</table>
{{end}}
{{if not isListOnly && not isDigest}}
<h4>Manifest v1</h4>
{{if not isDigest}}
<h4>Image History <!-- Manifest v2 schema 1--></h4>
{{range index, layer := layersV1}}
<table class="table table-striped table-bordered">
<thead bgcolor="#ddd">