mirror of https://github.com/portainer/portainer
fix(edgegroups): allow edge groups with no environments or tags EE-4927 (#8439)
parent
0c5a0eb3a0
commit
c90a1be0e5
|
@ -32,10 +32,6 @@ func (payload *edgeGroupUpdatePayload) Validate(r *http.Request) error {
|
||||||
return errors.New("tagIDs is mandatory for a dynamic Edge group")
|
return errors.New("tagIDs is mandatory for a dynamic Edge group")
|
||||||
}
|
}
|
||||||
|
|
||||||
if !payload.Dynamic && len(payload.Endpoints) == 0 {
|
|
||||||
return errors.New("environments is mandatory for a static Edge group")
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
class="btn btn-primary btn-sm"
|
class="btn btn-primary btn-sm"
|
||||||
ng-disabled="$ctrl.actionInProgress || !EdgeGroupForm.$valid || (!$ctrl.model.Dynamic && !$ctrl.model.Endpoints.length) || ($ctrl.model.Dynamic && !$ctrl.model.TagIds.length)"
|
ng-disabled="$ctrl.actionInProgress || !EdgeGroupForm.$valid"
|
||||||
button-spinner="$ctrl.actionInProgress"
|
button-spinner="$ctrl.actionInProgress"
|
||||||
data-cy="edgeGroupCreate-addGroupButton"
|
data-cy="edgeGroupCreate-addGroupButton"
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in New Issue