Skip to content

Commit bd84d74

Browse files
committed
feature: allow to hide tag history to simplify the user interface
I would like to use docker-registry-ui to inform users about the available tags for our images. The users of this interface are not interested in the technical backgrounds how it works and I worry that it would confuse them. Note: One needs to be aware, that this is data is available nonetheless. This is only a user interface switch for hiding the button.
1 parent 6c3c27e commit bd84d74

File tree

6 files changed

+8
-2
lines changed

6 files changed

+8
-2
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ Some env options are available for use this interface for **only one server** (w
119119
- `CATALOG_MAX_BRANCHES`: Set the maximum repository/namespace to expand (e.g. `joxit/docker-registry-ui` `joxit/` is the repository/namespace). Can be 0 to disable branching. (see [#319](https://github.com/Joxit/docker-registry-ui/pull/319)). (default: `1`). Since 2.5.0
120120
- `TAGLIST_PAGE_SIZE`: Set the number of tags to display in one page. (default: `100`). Since 2.5.0
121121
- `REGISTRY_SECURED`: By default, the UI will check on every requests if your registry is secured or not (you will see `401` responses in your console). Set to `true` if your registry uses Basic Authentication and divide by two the number of call to your registry. (default `false`). Since 2.5.0
122+
- `HIDE_TAG_HISTORY`: Allows to disable the tag history feature to simplify the user interface. (default `false`).
122123

123124
There are some examples with [docker-compose](https://docs.docker.com/compose/) and docker-registry-ui as proxy [here](https://github.com/Joxit/docker-registry-ui/tree/main/examples/ui-as-proxy/) or docker-registry-ui as standalone [here](https://github.com/Joxit/docker-registry-ui/tree/main/examples/ui-as-standalone/).
124125

bin/90-docker-registry-ui.sh

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ sed -i "s~\${PULL_URL}~${PULL_URL}~" index.html
66
sed -i "s~\${SINGLE_REGISTRY}~${SINGLE_REGISTRY}~" index.html
77
sed -i "s~\${CATALOG_ELEMENTS_LIMIT}~${CATALOG_ELEMENTS_LIMIT}~" index.html
88
sed -i "s~\${SHOW_CONTENT_DIGEST}~${SHOW_CONTENT_DIGEST}~" index.html
9+
sed -i "s~\${HIDE_TAG_HISTORY}~${HIDE_TAG_HISTORY}~" index.html
910
sed -i "s~\${DEFAULT_REGISTRIES}~${DEFAULT_REGISTRIES}~" index.html
1011
sed -i "s~\${READ_ONLY_REGISTRIES}~${READ_ONLY_REGISTRIES}~" index.html
1112
sed -i "s~\${SHOW_CATALOG_NB_TAGS}~${SHOW_CATALOG_NB_TAGS}~" index.html

src/components/docker-registry-ui.riot

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
7272
pull-url="{ state.pullUrl }"
7373
image="{ router.getTagListImage() }"
7474
show-content-digest="{ truthy(props.showContentDigest) }"
75+
hide-tag-history="{ truthy(props.hideTagHistory) }"
7576
is-image-remove-activated="{ truthy(props.isImageRemoveActivated) }"
7677
on-notify="{ notifySnackbar }"
7778
filter-results="{ state.filter }"

src/components/tag-list/tag-list.riot

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
5050
asc="{state.asc}"
5151
page="{ state.page }"
5252
show-content-digest="{props.showContentDigest}"
53+
hide-tag-history="{props.hideTagHistory}"
5354
is-image-remove-activated="{props.isImageRemoveActivated}"
5455
onReverseOrder="{ onReverseOrder }"
5556
registry-url="{ props.registryUrl }"

src/components/tag-list/tag-table.riot

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
5252
Tag
5353
</th>
5454
<th class="architectures">Arch</th>
55-
<th class="show-tag-history">History</th>
55+
<th class="show-tag-history" if="{ !props.hideTagHistory }">History</th>
5656
<th
5757
class="remove-tag { state.toDelete.size > 0 && !state.singleDeleteAction ? 'delete' : '' }"
5858
if="{ props.isImageRemoveActivated }"
@@ -109,7 +109,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
109109
<td class="architectures">
110110
<architectures image="{ image }"></architectures>
111111
</td>
112-
<td class="show-tag-history">
112+
<td class="show-tag-history" if="{ !props.hideTagHistory }">
113113
<tag-history-button image="{ image }"></tag-history-button>
114114
</td>
115115
<td if="{ props.isImageRemoveActivated }" class="remove-tag">

src/index.html

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
name="${REGISTRY_TITLE}"
4040
pull-url="${PULL_URL}"
4141
show-content-digest="${SHOW_CONTENT_DIGEST}"
42+
hide-tag-history="${HIDE_TAG_HISTORY}"
4243
is-image-remove-activated="${DELETE_IMAGES}"
4344
catalog-elements-limit="${CATALOG_ELEMENTS_LIMIT}"
4445
single-registry="${SINGLE_REGISTRY}"
@@ -73,6 +74,7 @@
7374
name="Developement Registry"
7475
pull-url=""
7576
show-content-digest="true"
77+
hide-tag-history="false"
7678
is-image-remove-activated="true"
7779
catalog-elements-limit="1000"
7880
single-registry="false"

0 commit comments

Comments
 (0)