1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-05 05:45:22 +02:00

feat(edgejobs): support edge groups when using edge jobs EE-3873 (#8099)

This commit is contained in:
matias-portainer 2022-12-19 18:54:51 -03:00 committed by GitHub
parent 9732d1b5d8
commit e1b474d04f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 544 additions and 83 deletions

View file

@ -8,6 +8,7 @@
model="$ctrl.model"
groups="$ctrl.groups"
tags="$ctrl.tags"
edge-groups="$ctrl.edgeGroups"
form-action="$ctrl.create"
form-action-label="Create edge job"
action-in-progress="$ctrl.state.actionInProgress"

View file

@ -13,6 +13,7 @@ export class CreateEdgeJobViewController {
Endpoints: [],
FileContent: '',
File: null,
EdgeGroups: [],
};
this.$async = $async;

View file

@ -16,6 +16,7 @@
endpoints="endpoints"
groups="$ctrl.groups"
tags="$ctrl.tags"
edge-groups="$ctrl.edgeGroups"
form-action="$ctrl.update"
form-action-label="Update Edge job"
action-in-progress="$ctrl.state.actionInProgress"

View file

@ -153,6 +153,8 @@ export class EdgeJobController {
this.groups = groups;
this.tags = tags;
this.edgeJob.EdgeGroups = this.edgeJob.EdgeGroups ? this.edgeJob.EdgeGroups : [];
if (results.length > 0) {
const endpointIds = _.map(results, (result) => result.EndpointId);
const endpoints = await getEnvironments({ query: { endpointIds } });