diff --git a/.github/ISSUE_TEMPLATE/custom.md b/.github/ISSUE_TEMPLATE/custom.md deleted file mode 100644 index 48d5f81..0000000 --- a/.github/ISSUE_TEMPLATE/custom.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -name: Custom issue template -about: Describe this issue template's purpose here. -title: '' -labels: '' -assignees: '' - ---- - - diff --git a/README.md b/README.md index b45953b..a712d6f 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,9 @@ ## Overview -This project aims to provide a simple and complete user interface for your private docker registry. You can customize the interface with various options. The major option is `SINGLE_REGISTRY` which allows you to disable the dynamic selection of docker registeries (same behavior as the old **static** tag). +This project aims to provide a simple and complete user interface for your private docker registry. You can customize the interface with various options. The major option is `SINGLE_REGISTRY` which allows you to disable the dynamic selection of docker registries (same behavior as the old **static** tag). -You may need the [migration guide from 1.x to 2.x](https://github.com/Joxit/docker-registry-ui/wiki/Migrating-from-1.x-to-2.x) or [the 1.x readme](https://github.com/Joxit/docker-registry-ui/blob/8fe3adf12540d1316cb57628ebe86a392a703d90/README.md) +You may need the [migration guide from 1.x to 2.x](https://github.com/Joxit/docker-registry-ui/wiki/Migrating-from-1.x-to-2.x) or [the 1.x readme](https://github.com/Joxit/docker-registry-ui/blob/8fe3adf12540d1316cb57628ebe86a392a703d90/README.md). The project support both [docker registry v2](https://github.com/distribution/distribution/releases/tag/v2.0.0) and [docker registry v3](https://github.com/distribution/distribution/releases/tag/v3.0.0). This web user interface uses [Riot](https://github.com/Riot/riot) the react-like user interface micro-library and [riot-mui](https://github.com/kysonic/riot-mui) components. @@ -67,12 +67,12 @@ Checkout all options in [Available options](#available-options) section. - This means you are using a UI with HTTPS and your registry is using HTTP (unsecured). When you are on a HTTPS site, you can't get HTTP content. Upgrade you registry with a HTTPS connection. - Why the default nginx `Host` is set to `$http_host` ? - This fixes the issue [#88](https://github.com/Joxit/docker-registry-ui/issues/88). More about this in [#113](https://github.com/Joxit/docker-registry-ui/issues/113). -- Why OPTIONS (aka preflight requests) and DELETE fails with 401 status code (using Basic Auth) ? - - This is caused by a bug in docker registry, it returns 401 status requests on preflight requests, this breaks [W3C preflight-request specification](https://www.w3.org/TR/cors/#preflight-request). I suggest to have your UI on the same domain than your registry e.g. registry.example.com/ui/ **or** use `NGINX_PROXY_PASS_URL` **or** configure a nginx/apache/haproxy in front of your registry that returns 200 on each OPTIONS requests. (see [#104](https://github.com/Joxit/docker-registry-ui/issues/104), [#204](https://github.com/Joxit/docker-registry-ui/issues/204), [#207](https://github.com/Joxit/docker-registry-ui/issues/207), [#214](https://github.com/Joxit/docker-registry-ui/issues/214), [#266](https://github.com/Joxit/docker-registry-ui/issues/266)). +- Why OPTIONS (aka preflight requests) and DELETE fails with 401 status code (using Basic Auth) or why the UI says to check my `Access-Control-Allow-Origin` ? + - This is caused by a bug in docker registry, it returns 401 status requests on preflight requests, this breaks [W3C preflight-request specification](https://www.w3.org/TR/cors/#preflight-request). I contacted docker registry maintainers and this will never be fixed ([distribution/distribution#4458](https://github.com/distribution/distribution/issues/4458)). I suggest to have your UI on the same domain than your registry e.g. registry.example.com/ui/ **or** use `NGINX_PROXY_PASS_URL` **or** configure a nginx/apache/haproxy in front of your registry that returns 200 on each OPTIONS requests. (see [#104](https://github.com/Joxit/docker-registry-ui/issues/104), [#204](https://github.com/Joxit/docker-registry-ui/issues/204), [#207](https://github.com/Joxit/docker-registry-ui/issues/207), [#214](https://github.com/Joxit/docker-registry-ui/issues/214), [#266](https://github.com/Joxit/docker-registry-ui/issues/266), [#278](https://github.com/Joxit/docker-registry-ui/issues/278)). - Can I use the docker registry ui as a standalone application (with Electron) ? - Yes, check out the example [here](https://github.com/Joxit/docker-registry-ui/tree/main/examples/electron). (see [#129](https://github.com/Joxit/docker-registry-ui/pull/129)) - I deleted images through the UI, but they are still present on the server. How can I delete them? - - When you delete an image with the UI, only the reference is deleted and not the content. To remove dangling images, you need to run the garbage collector of the registry with the command `registry garbage-collect config.yml` or `docker exec registry registry garbage-collect config.yml`. (see [#77](https://github.com/Joxit/docker-registry-ui/issues/77) [#147](https://github.com/Joxit/docker-registry-ui/issues/147)) + - When you delete an image with the UI, only the reference is deleted and not the content. To remove dangling images, you need to run the garbage collector of the registry with the command `registry garbage-collect config.yml` or `docker exec registry registry garbage-collect config.yml`. (see [#77](https://github.com/Joxit/docker-registry-ui/issues/77), [#147](https://github.com/Joxit/docker-registry-ui/issues/147)) - Why when I delete one tag, all tags with the same SHA are deleted ? - This a docker registry API limitation, there is only one way to [delete images with tag](https://docs.docker.com/registry/spec/api/#deleting-an-image), it's by its `name` and its `manifest` (it's a sha of the content). So when you delete a tag, this will delete all tags of this image with the same SHA/manifest. - Can I run the container with an unprivileged user ? @@ -119,7 +119,7 @@ Some env options are available for use this interface for **only one server** (w - `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 - `TAGLIST_PAGE_SIZE`: Set the number of tags to display in one page. (default: `100`). Since 2.5.0 - `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 - +- `SHOW_TAG_HISTORY`: Whether to show the tag history feature or not. Allows to simplify the user interface by hiding it form the tag list if set to `false`. (default: `true`). 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/). ### Theme options @@ -128,16 +128,17 @@ This featureswas added to version 2.4.0. See more about this in [#283](https://g | Environment variable | light theme value | dark theme value | | --- | --- | --- | -| `THEME_PRIMARY_TEXT` | `#25313b` | `#8A9EBA` | -| `THEME_NEUTRAL_TEXT` | `#777777` | `#36527A` | +| `THEME_PRIMARY_TEXT` | `#25313b` | `#98a8bd` | +| `THEME_NEUTRAL_TEXT` | `#777777` | `#6d7fab` | | `THEME_BACKGROUND` | `#ffffff` | `#22272e` | -| `THEME_HOVER_BACKGROUND` | `#eeeeee` | `#30404D` | -| `THEME_ACCENT_TEXT` | `#6680a1` | `#5684FF` | +| `THEME_HOVER_BACKGROUND` | `#eeeeee` | `#343a4b` | +| `THEME_ACCENT_TEXT` | `#5f7796` | `#5c88ff` | | `THEME_HEADER_TEXT` | `#ffffff` | `#ffffff` | -| `THEME_HEADER_BACKGROUND` | `#25313b` | `#333A45` | +| `THEME_HEADER_ACCENT_TEXT` | `#7b9ac2` | `#7ea1ff` | +| `THEME_HEADER_BACKGROUND` | `#25313b` | `#333a45` | | `THEME_FOOTER_TEXT` | `#ffffff` | `#ffffff` | -| `THEME_FOOTER_NEUTRAL_TEXT` | `#999999` | `#999999` | -| `THEME_FOOTER_BACKGROUND` | `#555555` | `#555555` | +| `THEME_FOOTER_NEUTRAL_TEXT` | `#adbacd` | `#98afcf` | +| `THEME_FOOTER_BACKGROUND` | `#344251` | `#344251` | ## Recommended Docker Registry Usage @@ -170,7 +171,7 @@ services: image: registry:2.8.2 restart: always environment: - REGISTRY_HTTP_HEADERS_Access-Control-Allow-Origin: '[http://registry.example.com]' + REGISTRY_HTTP_HEADERS_Access-Control-Allow-Origin: '[http://registry-ui.example.com]' REGISTRY_HTTP_HEADERS_Access-Control-Allow-Methods: '[HEAD,GET,OPTIONS,DELETE]' REGISTRY_HTTP_HEADERS_Access-Control-Allow-Credentials: '[true]' REGISTRY_HTTP_HEADERS_Access-Control-Allow-Headers: '[Authorization,Accept,Cache-Control]' @@ -183,18 +184,26 @@ services: ## Using CORS -Your server should be configured to accept CORS. +:warning: Before posting issues about CORS, please read the and all created issues. -If your docker registry does not need credentials, you will need to send this HEADER: +:warning: If you **are using credentials** and your registry is on a different host than your UI, please read the [FAQ about OPTIONS](https://github.com/Joxit/docker-registry-ui#:~:text=Why%20OPTIONS%20(aka%20preflight%20requests)), all the linked issues and [distribution/distribution#4458](https://github.com/distribution/distribution/issues/4458) first. The best way for the UI to work is using `NGINX_PROXY_PASS_URL` or configure your own proxy (nginx, haproxy...) that will be on top of your **docker registry** (and not the UI!) to override OPTIONS requests. +If your docker registry **does not need credentials**, you will need to send this HEADER: + +```yml +http: + headers: Access-Control-Allow-Origin: ['*'] + Access-Control-Allow-Headers: ['Accept', 'Cache-Control'] + Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS'] # Optional +``` If your docker registry need credentials, you will need to send these HEADERS (you must add the protocol `http`/`https` and the port when not default `80`/`443`): ```yml http: headers: - Access-Control-Allow-Origin: ['http://registry.example.com'] + Access-Control-Allow-Origin: ['http://registry-ui.example.com'] Access-Control-Allow-Credentials: [true] Access-Control-Allow-Headers: ['Authorization', 'Accept', 'Cache-Control'] Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS'] # Optional @@ -202,8 +211,6 @@ http: An alternative for CORS issues is a plugin on your browser, more info [here](https://github.com/Joxit/docker-registry-ui/issues/25#issuecomment-621104846) (thank you [xmontero](https://github.com/xmontero)). -:warning: If you are using credential and still having issues, please read the the line about preflight requests and the bug in docker registry server in the [FAQ](#faq) before posting any issues. - ## Using delete For deleting images, you need to activate the delete feature in the UI with `DELETE_IMAGES=true` and in your registry: diff --git a/bin/90-docker-registry-ui.sh b/bin/90-docker-registry-ui.sh index 2083784..4efbdc3 100755 --- a/bin/90-docker-registry-ui.sh +++ b/bin/90-docker-registry-ui.sh @@ -6,6 +6,7 @@ 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~\${SHOW_TAG_HISTORY}~${SHOW_TAG_HISTORY}~" index.html sed -i "s~\${DEFAULT_REGISTRIES}~${DEFAULT_REGISTRIES}~" index.html sed -i "s~\${READ_ONLY_REGISTRIES}~${READ_ONLY_REGISTRIES}~" index.html sed -i "s~\${SHOW_CATALOG_NB_TAGS}~${SHOW_CATALOG_NB_TAGS}~" index.html diff --git a/dist/docker-registry-ui.js b/dist/docker-registry-ui.js index e31d528..61ff5b7 100644 --- a/dist/docker-registry-ui.js +++ b/dist/docker-registry-ui.js @@ -37,5 +37,5 @@ function dt(e,t){(function(e){return it(e,n)||e.tagName.toLowerCase()})(e)!==t&& /* Riot v7.1.0, @license MIT */function bt(e,r){var a=r.css,n=r.template,o=r.exports;return t.has(e)&&N('The component "'.concat(e,'" was already registered')),t.set(e,xt({name:e,css:a,template:n,exports:o})),t} /* Riot WIP, @license MIT */ /* Riot v7.1.0, @license MIT */ -var Tt={cssManager:pt,DOMBindings:{template:Ye,createBinding:qe,createExpression:Ge,bindingTypes:xe,expressionTypes:k},globals:{DOM_COMPONENT_INSTANCE_PROPERTY:r,PARENT_KEY_SYMBOL:T}},At=function(e){V(r,e);var t=W(r);function r(e,a,n){var o;return M(this,r),o=t.call(this),e||console.error("You should set container to the wave!"),o.container=e,o.maxOpacity=a.opacity||.6,o.duration=a.duration||750,o.color=a.color||"#fff",o.center=a.center||!1,o.event=n,o.containerBound=o.receiveBound(),o.maxScale=o.containerBound.size/100*10,o.created=Date.now(),o.start={},o.createNode(),o.waveIn(),o}return P(r,[{key:"createNode",value:function(){this.wave=document.createElement("div"),this.wave.classList.add("wave"),this.container.appendChild(this.wave)}},{key:"waveIn",value:function(){var e=this;this.center&&!this.event&&console.error("Setup at least mouse event... Or just set center attribute"),this.start.x=this.center?this.containerBound.height/2:this.event.pageY-this.containerBound.offsetTop,this.start.y=this.center?this.containerBound.width/2:this.event.pageX-this.containerBound.offsetLeft;var t=-1!==window.navigator.userAgent.indexOf("Trident");setTimeout((function(){return e.setStyles(e.maxOpacity)}),t?50:0)}},{key:"waveOut",value:function(e){var t=this,r=Date.now()-this.created,a=Math.round(this.duration/2)-r;setTimeout((function(){t.setStyles(0),setTimeout((function(){t.wave.parentNode===t.container&&(t.container.removeChild(t.wave),e())}),t.duration)}),a>0?a:0)}},{key:"setStyles",value:function(e){this.wave.setAttribute("style",this.convertStyle({top:"".concat(this.start.x,"px"),left:"".concat(this.start.y,"px"),transform:"scale(".concat(this.maxScale,")"),"transition-duration":"".concat(this.duration,"ms"),"transition-timing-function":"cubic-bezier(0.250, 0.460, 0.450, 0.940)",background:this.color,opacity:e}))}},{key:"convertStyle",value:function(e){var t="";return Object.keys(e).forEach((function(r){e.hasOwnProperty(r)&&(t+=r+":"+e[r]+";")})),t}}]),r}(function(){function e(){M(this,e)}return P(e,[{key:"receiveBound",value:function(){var e;this.container||console.error("Yor class must contain a container. It is DOM Element. Define please this.container property.");var t=this.container&&this.container.ownerDocument,r=t.documentElement;"undefined"!==L(this.container.getBoundingClientRect)&&(e=this.container.getBoundingClientRect());var a=this.getWindow(t);return this.mix(e,{size:Math.max(e.width,e.height),offsetTop:e.top+a.pageYOffset-r.clientTop,offsetLeft:e.left+a.pageXOffset-r.clientLeft})}},{key:"isWindow",value:function(e){return null!==e&&e===e.window}},{key:"getWindow",value:function(e){return this.isWindow(e)?e:9===e.nodeType&&e.defaultView}},{key:"mix",value:function(e,t){for(var r in e)r in t||(t[r]=e[r]);return t}}]),e}()),Et={css:null,exports:{onMounted(){this._waves=[],this._events=[]},launch(e){var t=new At(this.$("#waves"),this.props,e);this._waves.push(t),this.props.onWaveStart&&this.props.onWaveStart(t),this._events.length||(this._events.push(e.target.addEventListener("mouseup",(()=>this.hold()))),this._events.push(e.target.addEventListener("mouseleave",(()=>this.hold()))))},hold(){this._waves[this._waves.length-1]&&this._waves[this._waves.length-1].waveOut(this.waveOut),this._waves[this._waves.length-1]&&this._waves.slice(this._waves.length-1,1)},waveOut(){this.props.onWaveEnd&&this.props.onWaveEnd()}},template:(e,t,r,a)=>e('
',[{redundantAttribute:"expr170",selector:"[expr170]",expressions:[{type:t.EVENT,name:"onmousedown",evaluate:e=>e.launch}]}]),name:"material-waves"},wt=function(e){return""===e||"true"===e},Ct=function(e){if("function"==typeof e){var t=$(Array,Array.prototype.slice.call(arguments)).slice(1);e.apply(void 0,J(t))}},It={array:function(e){if(!e)return[];for(var t=[],r=0;r\n Creation date\n | \n Size\n | \n Tag\n | Arch | History | ||
---|---|---|---|---|---|---|
We received a 404 status code from your registry.
\n This may be caused by a misconfiguration of Docker Registry UI. Check the\n FAQ and\n Available options
',[{redundantAttribute:"expr23",selector:"[expr23]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.props.url},{type:t.ATTRIBUTE,name:"href",evaluate:e=>e.props.url}]}])},{type:r.IF,evaluate:e=>"MIXED_CONTENT"===e.props.code,redundantAttribute:"expr24",selector:"[expr24]",template:e('Mixed Content: The page at ` `\n was loaded over HTTPS, but requested an insecure server endpoint ` `.\n
This request may has been blocked; the content must be served over HTTPS.
\n You may unset the option `REGISTRY_URL` and set the registry server container URL in\n `NGINX_PROXY_PASS_URL`. It\'s usually the name of your container, and it should be on the shame\n network as the UI.\n
You can check the issue #277.
',[{redundantAttribute:"expr25",selector:"[expr25]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>window.location.origin},{type:t.ATTRIBUTE,name:"href",evaluate:e=>window.location.origin}]},{redundantAttribute:"expr26",selector:"[expr26]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>new e.URL(e.props.url).origin},{type:t.ATTRIBUTE,name:"href",evaluate:e=>new e.URL(e.props.url).origin}]}])},{type:r.IF,evaluate:e=>"INCORRECT_URL"===e.props.code,redundantAttribute:"expr27",selector:"[expr27]",template:e('',[{redundantAttribute:"expr28",selector:"[expr28]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>["`",e.props.url,"` does not seems to be a correct URL, should starts with http:// or https://."].join("")}]}])},{type:r.IF,evaluate:e=>"PAGINATION_NUMBER_INVALID"===e.props.code,redundantAttribute:"expr29",selector:"[expr29]",template:e('
\n A default limit of 1000
images in catalog has been added in docker registry server\n v2.8.2 (May 11, 2023) and we\n cannot exceed this value without configuration.\n
\n The new default value for the UI is 1000
since\n 2.5.0 and was 100000
from\n 0.3.6.\n
\n You can update the environment variable\n
of your\n docker registry server or you can update your\n /etc/docker/registry/config.yml
configuration of your docker registry server and add\n those lines:\n
\ncatalog:\n maxentries: \n
\n If you don\'t need that many images, you can reduce the number of elements fetch by the\n docker registry UI with the environment variable CATALOG_ELEMENTS_LIMIT=1000
.\n
\n More about this issue:\n Joxit/docker-registry-ui#306.\n
',[{redundantAttribute:"expr30",selector:"[expr30]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>["REGISTRY_CATALOG_MAXENTRIES=",e.props.detail?.n||1e5].join("")}]},{redundantAttribute:"expr31",selector:"[expr31]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.props.detail?.n||1e5}]}])},{type:r.IF,evaluate:e=>"CATALOG_BRANCHING_CONFIGURATION"===e.props.code,redundantAttribute:"expr32",selector:"[expr32]",template:e('
Configuration environment variables are : CATALOG_MIN_BRANCH and CATALOG_MAX_BRANCH
',[{redundantAttribute:"expr33",selector:"[expr33]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>["Wrong configuration for the branching feature: ",e.props.message].join("")}]}])}]),name:"error-page"};const An="version-notification:latest",En="version-notification:expiration-date";var wn,Cn={css:'version-notification,[is="version-notification"]{ display: inline; } version-notification svg,[is="version-notification"] svg{ margin-left: 10px; cursor: pointer; } version-notification material-popup material-button > a:first-child,[is="version-notification"] material-popup material-button > a:first-child{ display: flex; align-items: center; } version-notification material-popup .material-popup-content code,[is="version-notification"] material-popup .material-popup-content code{ background-color: var(--hover-background); padding: 0 5px; border-radius: 4px; line-height: 1.5em; } version-notification material-popup .material-popup-content b,[is="version-notification"] material-popup .material-popup-content b{ color: var(--accent-text); }',exports:{onMounted(e,t){const r=la(localStorage.getItem(An)),a=parseInt(localStorage.getItem(En));r&&r.tag_name&&this.update({tag_name:r.tag_name,latest:r}),(!r||isNaN(a)||(new Date).getTime()>a)&&this.checkForUpdates(e,t)},onUpdated(e,t){const r=this.$("span");r&&(r.innerHTML=(new DOMParser).parseFromString('\n',"image/svg+xml").firstElementChild.outerHTML)},onClose(){this.update({open:!1})},onClick(){this.update({open:!0})},checkForUpdates(e,t){const r=new va,a=this;r.addEventListener("load",(function(){if(200===this.status){const t=la(this.responseText);t&&a.tag_name!==t.tag_name&&!sa(e.version,t.tag_name)&&e.onNotify("A new version of Docker Registry UI is available!"),localStorage.setItem(An,this.responseText),localStorage.setItem(En,(new Date).getTime()+864e5),a.update({tag_name:t.tag_name,latest:t})}else e.onNotify("Cannot check for new updates. See the browser console."),console.error(`Got status code ${this.status} from Github API with response ${this.responseText}`)})),r.open("GET","https://api.github.com/repos/joxit/docker-registry-ui/releases/latest"),r.send()},isNewestVersion:sa},template:(e,t,r,a)=>e('The version of Docker Registry UI now available.
You can download the lastest version with docker.
\n Creation date\n | \n Size\n | \n Tag\n | Arch | History | ||
---|---|---|---|---|---|---|
We received a 404 status code from your registry.
\n This may be caused by a misconfiguration of Docker Registry UI. Check the\n FAQ and\n Available options
',[{redundantAttribute:"expr23",selector:"[expr23]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.props.url},{type:t.ATTRIBUTE,name:"href",evaluate:e=>e.props.url}]}])},{type:r.IF,evaluate:e=>"MIXED_CONTENT"===e.props.code,redundantAttribute:"expr24",selector:"[expr24]",template:e('Mixed Content: The page at ` `\n was loaded over HTTPS, but requested an insecure server endpoint ` `.\n
This request may has been blocked; the content must be served over HTTPS.
\n You may unset the option `REGISTRY_URL` and set the registry server container URL in\n `NGINX_PROXY_PASS_URL`. It\'s usually the name of your container, and it should be on the shame\n network as the UI.\n
You can check the issue #277.
',[{redundantAttribute:"expr25",selector:"[expr25]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>window.location.origin},{type:t.ATTRIBUTE,name:"href",evaluate:e=>window.location.origin}]},{redundantAttribute:"expr26",selector:"[expr26]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>new e.URL(e.props.url).origin},{type:t.ATTRIBUTE,name:"href",evaluate:e=>new e.URL(e.props.url).origin}]}])},{type:r.IF,evaluate:e=>"INCORRECT_URL"===e.props.code,redundantAttribute:"expr27",selector:"[expr27]",template:e('',[{redundantAttribute:"expr28",selector:"[expr28]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>["`",e.props.url,"` does not seems to be a correct URL, should starts with http:// or https://."].join("")}]}])},{type:r.IF,evaluate:e=>"PAGINATION_NUMBER_INVALID"===e.props.code,redundantAttribute:"expr29",selector:"[expr29]",template:e('
\n A default limit of 1000
images in catalog has been added in docker registry server\n v2.8.2 (May 11, 2023) and we\n cannot exceed this value without configuration.\n
\n The new default value for the UI is 1000
since\n 2.5.0 and was 100000
from\n 0.3.6.\n
\n You can update the environment variable\n
of your\n docker registry server or you can update your\n /etc/docker/registry/config.yml
configuration of your docker registry server and add\n those lines:\n
\ncatalog:\n maxentries: \n
\n If you don\'t need that many images, you can reduce the number of elements fetch by the\n docker registry UI with the environment variable CATALOG_ELEMENTS_LIMIT=1000
.\n
\n More about this issue:\n Joxit/docker-registry-ui#306.\n
',[{redundantAttribute:"expr30",selector:"[expr30]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>["REGISTRY_CATALOG_MAXENTRIES=",e.props.detail?.n||1e5].join("")}]},{redundantAttribute:"expr31",selector:"[expr31]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.props.detail?.n||1e5}]}])},{type:r.IF,evaluate:e=>"CATALOG_BRANCHING_CONFIGURATION"===e.props.code,redundantAttribute:"expr32",selector:"[expr32]",template:e('
Configuration environment variables are : CATALOG_MIN_BRANCH and CATALOG_MAX_BRANCH
',[{redundantAttribute:"expr33",selector:"[expr33]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>["Wrong configuration for the branching feature: ",e.props.message].join("")}]}])}]),name:"error-page"};const An="version-notification:latest",En="version-notification:expiration-date";var wn,Cn={css:'version-notification,[is="version-notification"]{ display: inline; } version-notification svg,[is="version-notification"] svg{ margin-left: 10px; cursor: pointer; } version-notification material-popup material-button > a:first-child,[is="version-notification"] material-popup material-button > a:first-child{ display: flex; align-items: center; } version-notification material-popup .material-popup-content code,[is="version-notification"] material-popup .material-popup-content code{ background-color: var(--hover-background); padding: 0 5px; border-radius: 4px; line-height: 1.5em; } version-notification material-popup .material-popup-content b,[is="version-notification"] material-popup .material-popup-content b{ color: var(--accent-text); }',exports:{onMounted(e,t){const r=la(localStorage.getItem(An)),a=parseInt(localStorage.getItem(En));r&&r.tag_name&&this.update({tag_name:r.tag_name,latest:r}),(isNaN(a)||(new Date).getTime()>a)&&this.checkForUpdates(e,t)},onUpdated(e,t){const r=this.$("span");r&&(r.innerHTML=(new DOMParser).parseFromString('\n',"image/svg+xml").firstElementChild.outerHTML)},onClose(){this.update({open:!1})},onClick(){this.update({open:!0})},checkForUpdates(e,t){const r=new va,a=this;r.addEventListener("load",(function(){if(localStorage.setItem(En,(new Date).getTime()+864e5),200===this.status){const t=la(this.responseText);t&&a.tag_name!==t.tag_name&&!sa(e.version,t.tag_name)&&e.onNotify("A new version of Docker Registry UI is available!"),localStorage.setItem(An,this.responseText),a.update({tag_name:t.tag_name,latest:t})}else 404!==this.status&&(e.onNotify("Cannot check for new updates. Will try again in 24 hours. See the browser console."),console.error("Cannot check for new Docker Registry UI updates. This is most likely a GitHub issue. You don't need to worry about it."),console.error(`Got status code ${this.status} from Github API with response ${this.responseText}`))})),r.open("GET","https://api.github.com/repos/joxit/docker-registry-ui/releases/latest"),r.send()},isNewestVersion:sa},template:(e,t,r,a)=>e('The version of Docker Registry UI now available.
You can download the lastest version with docker.
This request may has been blocked; the content must be served over HTTPS.
You may unset the option `REGISTRY_URL` and set the registry server container URL in - `NGINX_PROXY_PASS_URL`. It's usually the name of your container, and it should be on the shame + `NGINX_PROXY_PASS_URL`. It's usually the name of your container, and it should be on the same network as the UI.
You can check the issue #277.
diff --git a/src/components/search-bar.riot b/src/components/search-bar.riot index 4b4691b..9a17883 100644 --- a/src/components/search-bar.riot +++ b/src/components/search-bar.riot @@ -2,8 +2,8 @@