mirror of https://github.com/portainer/portainer
fix(endpoints): load endpoints and tags together (#4230)
parent
35fa9d6981
commit
7b77a92a2d
|
@ -97,20 +97,18 @@ angular
|
|||
$scope.motd = data;
|
||||
});
|
||||
|
||||
getPaginatedEndpoints(0, 100).then((data) => {
|
||||
const totalCount = data.totalCount;
|
||||
try {
|
||||
const [{ totalCount, endpoints }, tags] = await Promise.all([getPaginatedEndpoints(0, 100), TagService.tags()]);
|
||||
$scope.tags = tags;
|
||||
|
||||
$scope.totalCount = totalCount;
|
||||
if (totalCount > 100) {
|
||||
$scope.endpoints = [];
|
||||
} else {
|
||||
$scope.endpoints = data.endpoints;
|
||||
$scope.endpoints = endpoints;
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
$scope.tags = await TagService.tags();
|
||||
} catch (e) {
|
||||
Notifications.error('Failed loading tags', e);
|
||||
} catch (err) {
|
||||
Notifications.error('Failed loading page data', err);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue