Skip to content

Commit

Permalink
feat: add content element limit
Browse files Browse the repository at this point in the history
closes: #127
  • Loading branch information
Joxit committed May 3, 2020
1 parent 6e7fc15 commit eb18083
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
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 [ -n "${CATALOG_ELEMENTS_LIMIT}" ] ; then
sed -i -r "s/(catalogElementsLimit[:=])[^,;]*/\1${CATALOG_ELEMENTS_LIMIT}/" 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.catalogElementsLimit = 100000;

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.catalogElementsLimit = 100000;
registryUI.catalog = {};
registryUI.taglist = {};
registryUI.taghistory = {};
Expand Down
2 changes: 1 addition & 1 deletion src/tags/catalog.tag
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
registryUI.catalog.loadend = true;
registryUI.catalog.instance.update();
});
oReq.open('GET', registryUI.url() + '/v2/_catalog?n=100000');
oReq.open('GET', registryUI.url() + '/v2/_catalog?n=' + registryUI.catalogElementsLimit);
oReq.send();
};
registryUI.catalog.display();
Expand Down

0 comments on commit eb18083

Please sign in to comment.