1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

feat(ui):rename endpoint(s) to environment(s) EE-1206 (#5588)

* rename endpoints to environments EE-1206
This commit is contained in:
Richard Wei 2021-09-08 20:42:17 +12:00 committed by GitHub
parent 1543ad4c42
commit 9f179fe3ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
151 changed files with 474 additions and 474 deletions

View file

@ -66,7 +66,7 @@ func (payload *edgeJobCreateFromFileContentPayload) Validate(r *http.Request) er
}
if payload.Endpoints == nil || len(payload.Endpoints) == 0 {
return errors.New("Invalid endpoints payload")
return errors.New("Invalid environment payload")
}
if govalidator.IsNull(payload.FileContent) {
@ -119,9 +119,9 @@ func (payload *edgeJobCreateFromFilePayload) Validate(r *http.Request) error {
payload.CronExpression = cronExpression
var endpoints []portainer.EndpointID
err = request.RetrieveMultiPartFormJSONValue(r, "Endpoints", &endpoints, false)
err = request.RetrieveMultiPartFormJSONValue(r, "Environments", &endpoints, false)
if err != nil {
return errors.New("Invalid endpoints")
return errors.New("Invalid environments")
}
payload.Endpoints = endpoints
@ -206,7 +206,7 @@ func (handler *Handler) addAndPersistEdgeJob(edgeJob *portainer.EdgeJob, file []
}
if len(edgeJob.Endpoints) == 0 {
return errors.New("Endpoints are mandatory for an Edge job")
return errors.New("Environments are mandatory for an Edge job")
}
scriptPath, err := handler.FileService.StoreEdgeJobFileFromBytes(strconv.Itoa(int(edgeJob.ID)), file)