mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 15:29:42 +02:00
feat(edge): EE-4570 allow pre-pull images with edge stack deployment (#8210)
Co-authored-by: Matt Hook <hookenz@gmail.com>
This commit is contained in:
parent
7fe0712b61
commit
919a854d93
22 changed files with 234 additions and 53 deletions
|
@ -38,9 +38,25 @@ export class EdgeStacksViewController {
|
|||
this.$state.reload();
|
||||
}
|
||||
|
||||
aggregateStatus() {
|
||||
if (this.stacks) {
|
||||
this.stacks.forEach((stack) => {
|
||||
const aggregateStatus = { ok: 0, error: 0, acknowledged: 0 };
|
||||
for (let endpointId in stack.Status) {
|
||||
const { Details } = stack.Status[endpointId];
|
||||
aggregateStatus.ok += Number(Details.Ok);
|
||||
aggregateStatus.error += Number(Details.Error);
|
||||
aggregateStatus.acknowledged += Number(Details.Acknowledged);
|
||||
}
|
||||
stack.aggregateStatus = aggregateStatus;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
async getStacks() {
|
||||
try {
|
||||
this.stacks = await this.EdgeStackService.stacks();
|
||||
this.aggregateStatus();
|
||||
} catch (err) {
|
||||
this.stacks = [];
|
||||
this.Notifications.error('Failure', err, 'Unable to retrieve stacks');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue