diff --git a/bin/entrypoint b/bin/entrypoint
index 13eb78d..ba00391 100755
--- a/bin/entrypoint
+++ b/bin/entrypoint
@@ -6,6 +6,8 @@ sed -i "s,\${PULL_URL},${PULL_URL}," index.html
sed -i "s,\${SINGLE_REGISTRY},${SINGLE_REGISTRY}," index.html
sed -i "s/\${CATALOG_ELEMENTS_LIMIT}/${CATALOG_ELEMENTS_LIMIT}/" index.html
sed -i "s/\${SHOW_CONTENT_DIGEST}/${SHOW_CONTENT_DIGEST}/" index.html
+sed -i "s/\${DEFAULT_REGISTRIES}/${DEFAULT_REGISTRIES}/" index.html
+sed -i "s/\${READ_ONLY_REGISTRIES}/${READ_ONLY_REGISTRIES}/" index.html
if [ -z "${DELETE_IMAGES}" ] || [ "${DELETE_IMAGES}" = false ] ; then
sed -i "s/\${DELETE_IMAGES}/false/" index.html
diff --git a/src/components/dialogs/dialogs-menu.riot b/src/components/dialogs/dialogs-menu.riot
index ffbc6dd..c560f54 100644
--- a/src/components/dialogs/dialogs-menu.riot
+++ b/src/components/dialogs/dialogs-menu.riot
@@ -15,17 +15,17 @@
along with this program. If not, see .
-->
-
-
more_vert
-
@@ -42,13 +42,16 @@
},
dropdownItems: [{
title: 'Add URL',
- name: 'add-registry-url'
+ name: 'add-registry-url',
+ ro: false
}, {
title: 'Change URL',
- name: 'change-registry-url'
+ name: 'change-registry-url',
+ ro: true
}, {
title: 'Remove URL',
- name: 'remove-registry-url'
+ name: 'remove-registry-url',
+ ro: false
}],
onDropdownSelect(key, item) {
this.update({
diff --git a/src/components/docker-registry-ui.riot b/src/components/docker-registry-ui.riot
index c191d09..66da81c 100644
--- a/src/components/docker-registry-ui.riot
+++ b/src/components/docker-registry-ui.riot
@@ -20,7 +20,8 @@ along with this program. If not, see .
Docker Registry UI
+ on-server-change="{ onServerChange }" default-registries="{ props.defaultRegistries }"
+ read-only-registries="{ truthy(props.readOnlyRegistries) }">
@@ -97,7 +98,8 @@ along with this program. If not, see .
state.snackbarMessage = undefined;
},
onBeforeMount(props) {
- if (props.defaultRegistries && props.defaultRegistries.length > 0 && getRegistryServers().length === 0) {
+ if ((props.defaultRegistries && props.defaultRegistries.length > 0 && getRegistryServers().length === 0) ||
+ truthy(props.readOnlyRegistries)) {
setRegistryServers(props.defaultRegistries);
}
diff --git a/src/index.html b/src/index.html
index 0ceff62..e647d12 100644
--- a/src/index.html
+++ b/src/index.html
@@ -38,7 +38,7 @@
+ default-registries="${DEFAULT_REGISTRIES}" read-only-registries="${READ_ONLY_REGISTRIES}">