Skip to content

Commit

Permalink
feat: Hide SHA-Hash column
Browse files Browse the repository at this point in the history
closes #126
  • Loading branch information
Joxit committed May 2, 2020
1 parent 6e7fc15 commit 4717a21
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
4 changes: 4 additions & 0 deletions bin/entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down
1 change: 1 addition & 0 deletions src/scripts/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions src/scripts/static.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ registryUI.name = function() {
};
registryUI.pullUrl = '${PULL_URL}';
registryUI.isImageRemoveActivated = true;
registryUI.showContentDigest = true;
registryUI.catalog = {};
registryUI.taglist = {};
registryUI.taghistory = {};
Expand Down
8 changes: 8 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
12 changes: 6 additions & 6 deletions src/tags/taglist.tag
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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>
Expand Down

0 comments on commit 4717a21

Please sign in to comment.