mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2025-04-28 07:59:55 +03:00
feat: show the number of images and repositories in catalog
This commit is contained in:
parent
7a35d61359
commit
7eed05ae50
1 changed files with 3 additions and 2 deletions
|
@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
<div class="material-card-title-action">
|
<div class="material-card-title-action">
|
||||||
<h2>
|
<h2>
|
||||||
Repositories of { state.registryName }
|
Repositories of { state.registryName }
|
||||||
<div class="item-count">{ state.length } images</div>
|
<div class="item-count">{ state.nImages } images in { state.nRepositories } repositories</div>
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
</material-card>
|
</material-card>
|
||||||
|
@ -90,7 +90,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
oReq.addEventListener('loadend', function () {
|
oReq.addEventListener('loadend', function () {
|
||||||
self.update({
|
self.update({
|
||||||
repositories,
|
repositories,
|
||||||
length: repositories.length,
|
nRepositories: repositories.length,
|
||||||
|
nImages: repositories.reduce((acc, e) => acc + (e.images && e.images.length || 1), 0),
|
||||||
loadend: true
|
loadend: true
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue