diff --git a/src/components/catalog/catalog.riot b/src/components/catalog/catalog.riot index 4d051846..9861ba1d 100644 --- a/src/components/catalog/catalog.riot +++ b/src/components/catalog/catalog.riot @@ -69,6 +69,7 @@ along with this program. If not, see . state.registryUrl = props.registryUrl; let repositories = []; const self = this; + const catalogUrl = `${props.registryUrl}/v2/_catalog?n=${state.catalogElementsLimit}`; const oReq = new Http({ onAuthentication: this.props.onAuthentication, }); @@ -93,7 +94,7 @@ along with this program. If not, see . return acc; }, []); } else if (this.status === 404) { - self.props.onNotify('Server not found', true); + self.props.onNotify({ code: 'CATALOG_NOT_FOUND', url: catalogUrl }, true); } else { self.props.onNotify(this.responseText); } @@ -109,7 +110,7 @@ along with this program. If not, see . loadend: true, }); }); - oReq.open('GET', `${props.registryUrl}/v2/_catalog?n=${state.catalogElementsLimit}`); + oReq.open('GET', catalogUrl); oReq.send(); }, }; diff --git a/src/components/dialogs/confirm-delete-image.riot b/src/components/dialogs/confirm-delete-image.riot index 4aaa57ec..06410302 100644 --- a/src/components/dialogs/confirm-delete-image.riot +++ b/src/components/dialogs/confirm-delete-image.riot @@ -109,9 +109,13 @@ 'application/vnd.docker.distribution.manifest.v2+json, application/vnd.oci.image.manifest.v1+json' ); oReq.addEventListener('error', function () { + const credMsg = this.withCredentials + ? ' When you use credentials on a different hostname, the registry server may fail preflight requests. Check FAQ and issue #104.' + : ''; onNotify({ message: - "An error occurred when deleting image. Check if your server accept DELETE methods Access-Control-Allow-Methods: ['DELETE'].", + "An error occurred when deleting image. Check if your server accept DELETE methods Access-Control-Allow-Methods: ['DELETE']." + + credMsg, isError: true, }); }); diff --git a/src/components/docker-registry-ui.riot b/src/components/docker-registry-ui.riot index a84b786f..bee1f7b5 100644 --- a/src/components/docker-registry-ui.riot +++ b/src/components/docker-registry-ui.riot @@ -80,6 +80,13 @@ along with this program. If not, see . on-authenticated="{ state.onAuthenticated }" opened="{ state.authenticationDialogOpened }" > +