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:
parent
9732d1b5d8
commit
e1b474d04f
29 changed files with 544 additions and 83 deletions
|
@ -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"
|
||||
|
|
|
@ -13,6 +13,7 @@ export class CreateEdgeJobViewController {
|
|||
Endpoints: [],
|
||||
FileContent: '',
|
||||
File: null,
|
||||
EdgeGroups: [],
|
||||
};
|
||||
|
||||
this.$async = $async;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 } });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue