From 5316cca3de2d740c60a28140f4dd00c03ad6c301 Mon Sep 17 00:00:00 2001 From: cong meng Date: Tue, 21 Sep 2021 17:41:27 +1200 Subject: [PATCH] fix(edge) EE-1733 cant edit edge groups (#5689) * fix(edge) EE-1733 cant edit edge groups * fix(edge) EE-1733 correct json names of a few edge objects Co-authored-by: Simon Meng --- api/portainer.go | 6 +++--- .../editEdgeGroupView/editEdgeGroupViewController.js | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/api/portainer.go b/api/portainer.go index 9ebc4d7d7..f9f0652ce 100644 --- a/api/portainer.go +++ b/api/portainer.go @@ -148,7 +148,7 @@ type ( Name string `json:"Name"` Dynamic bool `json:"Dynamic"` TagIDs []TagID `json:"TagIds"` - Endpoints []EndpointID `json:"Environments"` + Endpoints []EndpointID `json:"Endpoints"` PartialMatch bool `json:"PartialMatch"` } @@ -161,7 +161,7 @@ type ( ID EdgeJobID `json:"Id" example:"1"` Created int64 `json:"Created"` CronExpression string `json:"CronExpression"` - Endpoints map[EndpointID]EdgeJobEndpointMeta `json:"Environments"` + Endpoints map[EndpointID]EdgeJobEndpointMeta `json:"Endpoints"` Name string `json:"Name"` ScriptPath string `json:"ScriptPath"` Recurring bool `json:"Recurring"` @@ -188,7 +188,7 @@ type ( CronExpression string `json:"CronExpression"` Script string `json:"Script"` Version int `json:"Version"` - Endpoints []EndpointID `json:"Environments"` + Endpoints []EndpointID `json:"Endpoints"` } //EdgeStack represents an edge stack diff --git a/app/edge/views/edge-groups/editEdgeGroupView/editEdgeGroupViewController.js b/app/edge/views/edge-groups/editEdgeGroupView/editEdgeGroupViewController.js index 49c7c05fc..d2c910c31 100644 --- a/app/edge/views/edge-groups/editEdgeGroupView/editEdgeGroupViewController.js +++ b/app/edge/views/edge-groups/editEdgeGroupView/editEdgeGroupViewController.js @@ -8,6 +8,11 @@ export class EditEdgeGroupController { this.$state = $state; this.$async = $async; + this.state = { + actionInProgress: false, + loaded: false, + }; + this.updateGroup = this.updateGroup.bind(this); this.updateGroupAsync = this.updateGroupAsync.bind(this); }