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 sed -i -r "s/(isImageRemoveActivated[:=])[^,;]*/\1false/" scripts/docker-registry-ui.js
fi fi
if [ "${SHOW_CONTENT_DIGEST}" = false ] ; then
sed -i -r "s/(showContentDigest[:=])[^,;]*/\1false/" scripts/docker-registry-ui.js
fi
get_nginx_proxy_headers() { get_nginx_proxy_headers() {
( (
env && env &&

View file

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

View file

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

View file

@ -446,6 +446,14 @@ image-content-digest {
padding: 7px 5px; padding: 7px 5px;
} }
taglist .creation-date {
width: 10em;
}
taglist .image-size {
width: 7em;
}
catalog material-card, catalog material-card,
tag-history material-card { tag-history material-card {
min-height: auto; 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;"> <table show="{ registryUI.taglist.loadend }" style="border: none;">
<thead> <thead>
<tr> <tr>
<th>Creation date</th> <th class="creation-date">Creation date</th>
<th>Size</th> <th class="image-size">Size</th>
<th id="image-content-digest-header">Content Digest</th> <th id="image-content-digest-header" if="{ registryUI.showContentDigest }">Content Digest</th>
<th <th
id="image-tag-header" id="image-tag-header"
@ -60,13 +60,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</thead> </thead>
<tbody> <tbody>
<tr each="{ image in this.opts.tags }"> <tr each="{ image in this.opts.tags }">
<td> <td class="creation-date">
<image-date image="{ image }"/> <image-date image="{ image }"/>
</td> </td>
<td> <td class="image-size">
<image-size image="{ image }"/> <image-size image="{ image }"/>
</td> </td>
<td> <td if="{ registryUI.showContentDigest }">
<image-content-digest image="{ image }"/> <image-content-digest image="{ image }"/>
<copy-to-clipboard target="digest" image={ image }/> <copy-to-clipboard target="digest" image={ image }/>
</td> </td>