mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
fix(registry): Performance issues with Registry Manager (#2648)
* fix(registry): fetch datatable details on page/filter/order state change instead of fetching all data on first load * fix(registry): fetch tags datatable details on state change instead of fetching all data on first load * fix(registry): add pagination support for tags + loading display on data load * fix(registry): debounce on text filter to avoid querying transient matching values * refactor(registry): rebase on latest develop * feat(registries): background tags and optimisation -- need code cleanup and for-await-of to cancel on page leave * refactor(registry-management): code cleanup * feat(registry): most optimized version -- need fix for add/retag * fix(registry): addTag working without page reload * fix(registry): retag working without reload * fix(registry): remove tag working without reload * fix(registry): remove repository working with latest changes * fix(registry): disable cache on firefox * feat(registry): use jquery for all 'most used' manifests requests * feat(registry): retag with progression + rewrite manifest REST service to jquery * fix(registry): remove forgotten DI * fix(registry): pagination on repository details * refactor(registry): info message + hidding images count until fetch has been done * fix(registry): fix selection reset deleting selectAll function and not resetting status * fix(registry): resetSelection was trying to set value on a getter * fix(registry): tags were dropped when too much tags were impacted by a tag removal * fix(registry): firefox add tag + progression * refactor(registry): rewording of elements * style(registry): add space between buttons and texts in status elements * fix(registry): cancelling a retag/delete action was not removing the status panel * fix(registry): tags count of empty repositories * feat(registry): reload page on action cancel to avoid desync * feat(registry): uncancellable modal on long operations * feat(registry): modal now closes on error + modal message improvement * feat(registries): remove empty repositories from the list * fix(registry): various bugfixes * feat(registry): independant timer on async actions + modal fix
This commit is contained in:
parent
8a8cef9b20
commit
2445a5aed5
31 changed files with 1372 additions and 421 deletions
|
@ -7,12 +7,7 @@ angular.module('portainer.extensions.registrymanagement')
|
|||
var helper = {};
|
||||
|
||||
function historyRawToParsed(rawHistory) {
|
||||
var history = [];
|
||||
for (var i = 0; i < rawHistory.length; i++) {
|
||||
var item = rawHistory[i];
|
||||
history.push(angular.fromJson(item.v1Compatibility));
|
||||
}
|
||||
return history;
|
||||
return angular.fromJson(rawHistory[0].v1Compatibility);
|
||||
}
|
||||
|
||||
helper.manifestsToTag = function (manifests) {
|
||||
|
@ -20,20 +15,18 @@ angular.module('portainer.extensions.registrymanagement')
|
|||
var v2 = manifests.v2;
|
||||
|
||||
var history = historyRawToParsed(v1.history);
|
||||
var imageId = history[0].id;
|
||||
var name = v1.tag;
|
||||
var os = history[0].os;
|
||||
var os = history.os;
|
||||
var arch = v1.architecture;
|
||||
var size = v2.layers.reduce(function (a, b) {
|
||||
return {
|
||||
size: a.size + b.size
|
||||
};
|
||||
}).size;
|
||||
var digest = v2.digest;
|
||||
var repositoryName = v1.name;
|
||||
var fsLayers = v1.fsLayers;
|
||||
var imageId = v2.config.digest;
|
||||
var imageDigest = v2.digest;
|
||||
|
||||
return new RepositoryTagViewModel(name, imageId, os, arch, size, digest, repositoryName, fsLayers, history, v2);
|
||||
return new RepositoryTagViewModel(name, os, arch, size, imageDigest, imageId, v2);
|
||||
};
|
||||
|
||||
return helper;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue