feat: Hide SHA-Hash column

closes #126
This commit is contained in:
Joxit 2020-05-02 11:03:18 +02:00
parent 6e7fc1508e
commit 00fe443a7c
No known key found for this signature in database
GPG key ID: F526592B8E012263
5 changed files with 20 additions and 6 deletions

View file

@ -8,6 +8,10 @@ if [ -z "${DELETE_IMAGES}" ] || [ "${DELETE_IMAGES}" = false ] ; then
sed -i -r "s/(isImageRemoveActivated[:=])[^,;]*/\1false/" scripts/docker-registry-ui.js
fi
if [ "${SHOW_CONTENT_DIGEST}" = false ] ; then
sed -i -r "s/(showContentDigest[:=])[^,;]*/\1false/" scripts/docker-registry-ui.js
fi
get_nginx_proxy_headers() {
(
env &&

View file

@ -17,6 +17,7 @@
var registryUI = {}
registryUI.URL_QUERY_PARAM_REGEX = /[&?]url=/;
registryUI.URL_PARAM_REGEX = /^url=/;
registryUI.showContentDigest = true;
registryUI.url = function(byPassQueryParam) {
if (!registryUI._url) {

View file

@ -33,6 +33,7 @@ registryUI.name = function() {
};
registryUI.pullUrl = '${PULL_URL}';
registryUI.isImageRemoveActivated = true;
registryUI.showContentDigest = true;
registryUI.catalog = {};
registryUI.taglist = {};
registryUI.taghistory = {};

View file

@ -446,6 +446,14 @@ image-content-digest {
padding: 7px 5px;
}
taglist .creation-date {
width: 10em;
}
taglist .image-size {
width: 7em;
}
catalog material-card,
tag-history material-card {
min-height: auto;

View file

@ -41,9 +41,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<table show="{ registryUI.taglist.loadend }" style="border: none;">
<thead>
<tr>
<th>Creation date</th>
<th>Size</th>
<th id="image-content-digest-header">Content Digest</th>
<th class="creation-date">Creation date</th>
<th class="image-size">Size</th>
<th id="image-content-digest-header" if="{ registryUI.showContentDigest }">Content Digest</th>
<th
id="image-tag-header"
@ -60,13 +60,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</thead>
<tbody>
<tr each="{ image in this.opts.tags }">
<td>
<td class="creation-date">
<image-date image="{ image }"/>
</td>
<td>
<td class="image-size">
<image-size image="{ image }"/>
</td>
<td>
<td if="{ registryUI.showContentDigest }">
<image-content-digest image="{ image }"/>
<copy-to-clipboard target="digest" image={ image }/>
</td>