mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2025-04-26 23:19:54 +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">
|
||||
<h2>
|
||||
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>
|
||||
</div>
|
||||
</material-card>
|
||||
|
@ -90,7 +90,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
oReq.addEventListener('loadend', function () {
|
||||
self.update({
|
||||
repositories,
|
||||
length: repositories.length,
|
||||
nRepositories: repositories.length,
|
||||
nImages: repositories.reduce((acc, e) => acc + (e.images && e.images.length || 1), 0),
|
||||
loadend: true
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue