diff --git a/api/http/handler/endpoints/endpoint_create.go b/api/http/handler/endpoints/endpoint_create.go index 4aac20039..5362d596b 100644 --- a/api/http/handler/endpoints/endpoint_create.go +++ b/api/http/handler/endpoints/endpoint_create.go @@ -43,7 +43,7 @@ func (payload *endpointCreatePayload) Validate(r *http.Request) error { endpointType, err := request.RetrieveNumericMultiPartFormValue(r, "EndpointType", false) if err != nil || endpointType == 0 { - return portainer.Error("Invalid endpoint type value. Value must be one of: 1 (Docker environment), 2 (Agent environment), 3 (Azure environment) or 4 (Agent Edge environment)") + return portainer.Error("Invalid endpoint type value. Value must be one of: 1 (Docker environment), 2 (Agent environment), 3 (Azure environment) or 4 (Edge Agent environment)") } payload.EndpointType = endpointType @@ -151,8 +151,8 @@ func (handler *Handler) endpointCreate(w http.ResponseWriter, r *http.Request) * func (handler *Handler) createEndpoint(payload *endpointCreatePayload) (*portainer.Endpoint, *httperror.HandlerError) { if portainer.EndpointType(payload.EndpointType) == portainer.AzureEnvironment { return handler.createAzureEndpoint(payload) - } else if portainer.EndpointType(payload.EndpointType) == portainer.AgentEdgeEnvironment { - return handler.createAgentEdgeEndpoint(payload) + } else if portainer.EndpointType(payload.EndpointType) == portainer.EdgeAgentEnvironment { + return handler.createEdgeAgentEndpoint(payload) } if payload.TLS { @@ -199,8 +199,8 @@ func (handler *Handler) createAzureEndpoint(payload *endpointCreatePayload) (*po return endpoint, nil } -func (handler *Handler) createAgentEdgeEndpoint(payload *endpointCreatePayload) (*portainer.Endpoint, *httperror.HandlerError) { - endpointType := portainer.AgentEdgeEnvironment +func (handler *Handler) createEdgeAgentEndpoint(payload *endpointCreatePayload) (*portainer.Endpoint, *httperror.HandlerError) { + endpointType := portainer.EdgeAgentEnvironment endpointID := handler.EndpointService.GetNextIdentifier() edgeKey := base64.RawStdEncoding.EncodeToString([]byte(strings.TrimPrefix(payload.URL, "tcp://") + ":9999:7777:random_secret")) diff --git a/api/http/handler/websocket/exec.go b/api/http/handler/websocket/exec.go index 09eb235b6..8916d57a7 100644 --- a/api/http/handler/websocket/exec.go +++ b/api/http/handler/websocket/exec.go @@ -68,7 +68,7 @@ func (handler *Handler) websocketExec(w http.ResponseWriter, r *http.Request) *h func (handler *Handler) handleExecRequest(w http.ResponseWriter, r *http.Request, params *webSocketRequestParams) error { r.Header.Del("Origin") - if params.nodeName != "" || (params.endpoint.Type == portainer.AgentOnDockerEnvironment || params.endpoint.Type == portainer.AgentEdgeEnvironment) { + if params.nodeName != "" || (params.endpoint.Type == portainer.AgentOnDockerEnvironment || params.endpoint.Type == portainer.EdgeAgentEnvironment) { return handler.proxyWebsocketRequest(w, r, params) } diff --git a/api/portainer.go b/api/portainer.go index 6f780a92e..347aaa612 100644 --- a/api/portainer.go +++ b/api/portainer.go @@ -894,8 +894,8 @@ const ( AgentOnDockerEnvironment // AzureEnvironment represents an endpoint connected to an Azure environment AzureEnvironment - // AgentEdgeEnvironment represents an endpoint connected to an Edge agent - AgentEdgeEnvironment + // EdgeAgentEnvironment represents an endpoint connected to an Edge agent + EdgeAgentEnvironment ) const ( diff --git a/app/portainer/filters/filters.js b/app/portainer/filters/filters.js index db35252c7..cfe6f5e1a 100644 --- a/app/portainer/filters/filters.js +++ b/app/portainer/filters/filters.js @@ -125,7 +125,7 @@ angular.module('portainer.app') } else if (type === 3) { return 'Azure ACI'; } else if (type === 4) { - return 'Agent Edge'; + return 'Edge Agent'; } return ''; }; diff --git a/app/portainer/views/endpoints/create/createEndpointController.js b/app/portainer/views/endpoints/create/createEndpointController.js index b465022dd..9803ea3f5 100644 --- a/app/portainer/views/endpoints/create/createEndpointController.js +++ b/app/portainer/views/endpoints/create/createEndpointController.js @@ -56,7 +56,7 @@ function ($q, $scope, $state, $filter, clipboard, EndpointService, GroupService, addEndpoint(name, 2, URL, publicURL, groupId, tags, true, true, true, null, null, null); }; - $scope.addAgentEdgeEndpoint = function() { + $scope.addEdgeAgentEndpoint = function() { var name = $scope.formValues.Name; var groupId = $scope.formValues.GroupId; var tags = $scope.formValues.Tags; diff --git a/app/portainer/views/endpoints/create/createendpoint.html b/app/portainer/views/endpoints/create/createendpoint.html index e82370b9f..d9a5340bd 100644 --- a/app/portainer/views/endpoints/create/createendpoint.html +++ b/app/portainer/views/endpoints/create/createendpoint.html @@ -37,13 +37,13 @@