diff --git a/api/bolt/init.go b/api/bolt/init.go index 1c997087e..4df6b327b 100644 --- a/api/bolt/init.go +++ b/api/bolt/init.go @@ -80,7 +80,7 @@ func (store *Store) Init() error { if len(groups) == 0 { unassignedGroup := &portainer.EndpointGroup{ Name: "Unassigned", - Description: "Unassigned endpoints", + Description: "Unassigned environments", Labels: []portainer.Pair{}, UserAccessPolicies: portainer.UserAccessPolicies{}, TeamAccessPolicies: portainer.TeamAccessPolicies{}, diff --git a/api/bolt/migrator/migrate_dbversion31.go b/api/bolt/migrator/migrate_dbversion31.go index 6c9f7f00b..e9a242f70 100644 --- a/api/bolt/migrator/migrate_dbversion31.go +++ b/api/bolt/migrator/migrate_dbversion31.go @@ -138,7 +138,7 @@ func (m *Migrator) updateDockerhubToDB32() error { func (m *Migrator) updateVolumeResourceControlToDB32() error { endpoints, err := m.endpointService.Endpoints() if err != nil { - return fmt.Errorf("failed fetching endpoints: %w", err) + return fmt.Errorf("failed fetching environments: %w", err) } resourceControls, err := m.resourceControlService.ResourceControls() @@ -170,7 +170,7 @@ func (m *Migrator) updateVolumeResourceControlToDB32() error { endpointDockerID, err := snapshotutils.FetchDockerID(snapshot) if err != nil { - return fmt.Errorf("failed fetching endpoint docker id: %w", err) + return fmt.Errorf("failed fetching environment docker id: %w", err) } if volumesData, done := snapshot.SnapshotRaw.Volumes.(map[string]interface{}); done { diff --git a/api/chisel/service.go b/api/chisel/service.go index d5787d9e5..9af0f4866 100644 --- a/api/chisel/service.go +++ b/api/chisel/service.go @@ -141,7 +141,7 @@ func (service *Service) checkTunnels() { } elapsed := time.Since(tunnel.LastActivity) - log.Printf("[DEBUG] [chisel,monitoring] [endpoint_id: %s] [status: %s] [status_time_seconds: %f] [message: endpoint tunnel monitoring]", item.Key, tunnel.Status, elapsed.Seconds()) + log.Printf("[DEBUG] [chisel,monitoring] [endpoint_id: %s] [status: %s] [status_time_seconds: %f] [message: environment tunnel monitoring]", item.Key, tunnel.Status, elapsed.Seconds()) if tunnel.Status == portainer.EdgeAgentManagementRequired && elapsed.Seconds() < requiredTimeout.Seconds() { continue @@ -156,19 +156,19 @@ func (service *Service) checkTunnels() { endpointID, err := strconv.Atoi(item.Key) if err != nil { - log.Printf("[ERROR] [chisel,snapshot,conversion] Invalid endpoint identifier (id: %s): %s", item.Key, err) + log.Printf("[ERROR] [chisel,snapshot,conversion] Invalid environment identifier (id: %s): %s", item.Key, err) } err = service.snapshotEnvironment(portainer.EndpointID(endpointID), tunnel.Port) if err != nil { - log.Printf("[ERROR] [snapshot] Unable to snapshot Edge endpoint (id: %s): %s", item.Key, err) + log.Printf("[ERROR] [snapshot] Unable to snapshot Edge environment (id: %s): %s", item.Key, err) } } if len(tunnel.Jobs) > 0 { endpointID, err := strconv.Atoi(item.Key) if err != nil { - log.Printf("[ERROR] [chisel,conversion] Invalid endpoint identifier (id: %s): %s", item.Key, err) + log.Printf("[ERROR] [chisel,conversion] Invalid environment identifier (id: %s): %s", item.Key, err) continue } diff --git a/api/cli/cli.go b/api/cli/cli.go index 1da82bf63..e5c984807 100644 --- a/api/cli/cli.go +++ b/api/cli/cli.go @@ -18,7 +18,7 @@ import ( type Service struct{} var ( - errInvalidEndpointProtocol = errors.New("Invalid endpoint protocol: Portainer only supports unix://, npipe:// or tcp://") + errInvalidEndpointProtocol = errors.New("Invalid environment protocol: Portainer only supports unix://, npipe:// or tcp://") errSocketOrNamedPipeNotFound = errors.New("Unable to locate Unix socket or named pipe") errInvalidSnapshotInterval = errors.New("Invalid snapshot interval") errAdminPassExcludeAdminPassFile = errors.New("Cannot use --admin-password with --admin-password-file") @@ -35,7 +35,7 @@ func (*Service) ParseFlags(version string) (*portainer.CLIFlags, error) { TunnelPort: kingpin.Flag("tunnel-port", "Port to serve the tunnel server").Default(defaultTunnelServerPort).String(), Assets: kingpin.Flag("assets", "Path to the assets").Default(defaultAssetsDirectory).Short('a').String(), Data: kingpin.Flag("data", "Path to the folder where the data is stored").Default(defaultDataDirectory).Short('d').String(), - EndpointURL: kingpin.Flag("host", "Endpoint URL").Short('H').String(), + EndpointURL: kingpin.Flag("host", "Environment URL").Short('H').String(), EnableEdgeComputeFeatures: kingpin.Flag("edge-compute", "Enable Edge Compute features").Bool(), NoAnalytics: kingpin.Flag("no-analytics", "Disable Analytics in app (deprecated)").Bool(), TLS: kingpin.Flag("tlsverify", "TLS support").Default(defaultTLS).Bool(), @@ -47,7 +47,7 @@ func (*Service) ParseFlags(version string) (*portainer.CLIFlags, error) { SSL: kingpin.Flag("ssl", "Secure Portainer instance using SSL (deprecated)").Default(defaultSSL).Bool(), SSLCert: kingpin.Flag("sslcert", "Path to the SSL certificate used to secure the Portainer instance").String(), SSLKey: kingpin.Flag("sslkey", "Path to the SSL key used to secure the Portainer instance").String(), - SnapshotInterval: kingpin.Flag("snapshot-interval", "Duration between each endpoint snapshot job").Default(defaultSnapshotInterval).String(), + SnapshotInterval: kingpin.Flag("snapshot-interval", "Duration between each environment snapshot job").Default(defaultSnapshotInterval).String(), AdminPassword: kingpin.Flag("admin-password", "Hashed admin password").String(), AdminPasswordFile: kingpin.Flag("admin-password-file", "Path to the file containing the password for the admin user").String(), Labels: pairs(kingpin.Flag("hide-label", "Hide containers with a specific label in the UI").Short('l')), diff --git a/api/cmd/portainer/main.go b/api/cmd/portainer/main.go index a6070ad25..00080dade 100644 --- a/api/cmd/portainer/main.go +++ b/api/cmd/portainer/main.go @@ -316,7 +316,7 @@ func createTLSSecuredEndpoint(flags *portainer.CLIFlags, dataStore portainer.Dat err := snapshotService.SnapshotEndpoint(endpoint) if err != nil { - log.Printf("http error: endpoint snapshot error (endpoint=%s, URL=%s) (err=%s)\n", endpoint.Name, endpoint.URL, err) + log.Printf("http error: environment snapshot error (environment=%s, URL=%s) (err=%s)\n", endpoint.Name, endpoint.URL, err) } return dataStore.Endpoint().CreateEndpoint(endpoint) @@ -362,7 +362,7 @@ func createUnsecuredEndpoint(endpointURL string, dataStore portainer.DataStore, err := snapshotService.SnapshotEndpoint(endpoint) if err != nil { - log.Printf("http error: endpoint snapshot error (endpoint=%s, URL=%s) (err=%s)\n", endpoint.Name, endpoint.URL, err) + log.Printf("http error: environment snapshot error (environment=%s, URL=%s) (err=%s)\n", endpoint.Name, endpoint.URL, err) } return dataStore.Endpoint().CreateEndpoint(endpoint) @@ -379,7 +379,7 @@ func initEndpoint(flags *portainer.CLIFlags, dataStore portainer.DataStore, snap } if len(endpoints) > 0 { - log.Println("Instance already has defined endpoints. Skipping the endpoint defined via CLI.") + log.Println("Instance already has defined environments. Skipping the environment defined via CLI.") return nil } @@ -474,7 +474,7 @@ func buildServer(flags *portainer.CLIFlags) portainer.Server { err = initEndpoint(flags, dataStore, snapshotService) if err != nil { - log.Fatalf("failed initializing endpoint: %v", err) + log.Fatalf("failed initializing environment: %v", err) } adminPasswordHash := "" diff --git a/api/docker/errors.go b/api/docker/errors.go index 80611c8b4..04e415934 100644 --- a/api/docker/errors.go +++ b/api/docker/errors.go @@ -4,5 +4,5 @@ import "errors" // Docker errors var ( - ErrUnableToPingEndpoint = errors.New("Unable to communicate with the endpoint") + ErrUnableToPingEndpoint = errors.New("Unable to communicate with the environment") ) diff --git a/api/docker/snapshot.go b/api/docker/snapshot.go index f3e96ff7e..5283acf1b 100644 --- a/api/docker/snapshot.go +++ b/api/docker/snapshot.go @@ -47,44 +47,44 @@ func snapshot(cli *client.Client, endpoint *portainer.Endpoint) (*portainer.Dock err = snapshotInfo(snapshot, cli) if err != nil { - log.Printf("[WARN] [docker,snapshot] [message: unable to snapshot engine information] [endpoint: %s] [err: %s]", endpoint.Name, err) + log.Printf("[WARN] [docker,snapshot] [message: unable to snapshot engine information] [environment: %s] [err: %s]", endpoint.Name, err) } if snapshot.Swarm { err = snapshotSwarmServices(snapshot, cli) if err != nil { - log.Printf("[WARN] [docker,snapshot] [message: unable to snapshot Swarm services] [endpoint: %s] [err: %s]", endpoint.Name, err) + log.Printf("[WARN] [docker,snapshot] [message: unable to snapshot Swarm services] [environment: %s] [err: %s]", endpoint.Name, err) } err = snapshotNodes(snapshot, cli) if err != nil { - log.Printf("[WARN] [docker,snapshot] [message: unable to snapshot Swarm nodes] [endpoint: %s] [err: %s]", endpoint.Name, err) + log.Printf("[WARN] [docker,snapshot] [message: unable to snapshot Swarm nodes] [environment: %s] [err: %s]", endpoint.Name, err) } } err = snapshotContainers(snapshot, cli) if err != nil { - log.Printf("[WARN] [docker,snapshot] [message: unable to snapshot containers] [endpoint: %s] [err: %s]", endpoint.Name, err) + log.Printf("[WARN] [docker,snapshot] [message: unable to snapshot containers] [environment: %s] [err: %s]", endpoint.Name, err) } err = snapshotImages(snapshot, cli) if err != nil { - log.Printf("[WARN] [docker,snapshot] [message: unable to snapshot images] [endpoint: %s] [err: %s]", endpoint.Name, err) + log.Printf("[WARN] [docker,snapshot] [message: unable to snapshot images] [environment: %s] [err: %s]", endpoint.Name, err) } err = snapshotVolumes(snapshot, cli) if err != nil { - log.Printf("[WARN] [docker,snapshot] [message: unable to snapshot volumes] [endpoint: %s] [err: %s]", endpoint.Name, err) + log.Printf("[WARN] [docker,snapshot] [message: unable to snapshot volumes] [environment: %s] [err: %s]", endpoint.Name, err) } err = snapshotNetworks(snapshot, cli) if err != nil { - log.Printf("[WARN] [docker,snapshot] [message: unable to snapshot networks] [endpoint: %s] [err: %s]", endpoint.Name, err) + log.Printf("[WARN] [docker,snapshot] [message: unable to snapshot networks] [environment: %s] [err: %s]", endpoint.Name, err) } err = snapshotVersion(snapshot, cli) if err != nil { - log.Printf("[WARN] [docker,snapshot] [message: unable to snapshot engine version] [endpoint: %s] [err: %s]", endpoint.Name, err) + log.Printf("[WARN] [docker,snapshot] [message: unable to snapshot engine version] [environment: %s] [err: %s]", endpoint.Name, err) } snapshot.Time = time.Now().Unix() diff --git a/api/exec/compose_stack.go b/api/exec/compose_stack.go index 94df99a65..087274fe9 100644 --- a/api/exec/compose_stack.go +++ b/api/exec/compose_stack.go @@ -46,7 +46,7 @@ func (manager *ComposeStackManager) ComposeSyntaxMaxVersion() string { func (manager *ComposeStackManager) Up(ctx context.Context, stack *portainer.Stack, endpoint *portainer.Endpoint) error { url, proxy, err := manager.fetchEndpointProxy(endpoint) if err != nil { - return errors.Wrap(err, "failed to featch endpoint proxy") + return errors.Wrap(err, "failed to featch environment proxy") } if proxy != nil { diff --git a/api/http/errors/errors.go b/api/http/errors/errors.go index 2e6aeceb5..ef0abcfee 100644 --- a/api/http/errors/errors.go +++ b/api/http/errors/errors.go @@ -4,7 +4,7 @@ import "errors" var ( // ErrEndpointAccessDenied Access denied to endpoint error - ErrEndpointAccessDenied = errors.New("Access denied to endpoint") + ErrEndpointAccessDenied = errors.New("Access denied to environment") // ErrUnauthorized Unauthorized error ErrUnauthorized = errors.New("Unauthorized") // ErrResourceAccessDenied Access denied to resource error diff --git a/api/http/handler/edgegroups/edgegroup_create.go b/api/http/handler/edgegroups/edgegroup_create.go index 81f832bb2..c461de77f 100644 --- a/api/http/handler/edgegroups/edgegroup_create.go +++ b/api/http/handler/edgegroups/edgegroup_create.go @@ -27,7 +27,7 @@ func (payload *edgeGroupCreatePayload) Validate(r *http.Request) error { return errors.New("TagIDs is mandatory for a dynamic Edge group") } if !payload.Dynamic && (payload.Endpoints == nil || len(payload.Endpoints) == 0) { - return errors.New("Endpoints is mandatory for a static Edge group") + return errors.New("Environment is mandatory for a static Edge group") } return nil } @@ -77,7 +77,7 @@ func (handler *Handler) edgeGroupCreate(w http.ResponseWriter, r *http.Request) for _, endpointID := range payload.Endpoints { endpoint, err := handler.DataStore.Endpoint().Endpoint(endpointID) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve endpoint from the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve environment from the database", err} } if endpoint.Type == portainer.EdgeAgentOnDockerEnvironment || endpoint.Type == portainer.EdgeAgentOnKubernetesEnvironment { diff --git a/api/http/handler/edgegroups/edgegroup_inspect.go b/api/http/handler/edgegroups/edgegroup_inspect.go index 938624c29..e40d3989d 100644 --- a/api/http/handler/edgegroups/edgegroup_inspect.go +++ b/api/http/handler/edgegroups/edgegroup_inspect.go @@ -38,7 +38,7 @@ func (handler *Handler) edgeGroupInspect(w http.ResponseWriter, r *http.Request) if edgeGroup.Dynamic { endpoints, err := handler.getEndpointsByTags(edgeGroup.TagIDs, edgeGroup.PartialMatch) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve endpoints and endpoint groups for Edge group", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve environments and environment groups for Edge group", err} } edgeGroup.Endpoints = endpoints diff --git a/api/http/handler/edgegroups/edgegroup_list.go b/api/http/handler/edgegroups/edgegroup_list.go index 5e56a35b7..efaf7dd85 100644 --- a/api/http/handler/edgegroups/edgegroup_list.go +++ b/api/http/handler/edgegroups/edgegroup_list.go @@ -51,7 +51,7 @@ func (handler *Handler) edgeGroupList(w http.ResponseWriter, r *http.Request) *h if edgeGroup.Dynamic { endpoints, err := handler.getEndpointsByTags(edgeGroup.TagIDs, edgeGroup.PartialMatch) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve endpoints and endpoint groups for Edge group", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve environments and environment groups for Edge group", err} } edgeGroup.Endpoints = endpoints diff --git a/api/http/handler/edgegroups/edgegroup_update.go b/api/http/handler/edgegroups/edgegroup_update.go index 2a5105d70..f034325c6 100644 --- a/api/http/handler/edgegroups/edgegroup_update.go +++ b/api/http/handler/edgegroups/edgegroup_update.go @@ -29,7 +29,7 @@ func (payload *edgeGroupUpdatePayload) Validate(r *http.Request) error { return errors.New("TagIDs is mandatory for a dynamic Edge group") } if !payload.Dynamic && (payload.Endpoints == nil || len(payload.Endpoints) == 0) { - return errors.New("Endpoints is mandatory for a static Edge group") + return errors.New("Environments is mandatory for a static Edge group") } return nil } @@ -81,12 +81,12 @@ func (handler *Handler) edgeGroupUpdate(w http.ResponseWriter, r *http.Request) } endpoints, err := handler.DataStore.Endpoint().Endpoints() if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve endpoints from database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve environments from database", err} } endpointGroups, err := handler.DataStore.EndpointGroup().EndpointGroups() if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve endpoint groups from database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve environment groups from database", err} } oldRelatedEndpoints := edge.EdgeGroupRelatedEndpoints(edgeGroup, endpoints, endpointGroups) @@ -99,7 +99,7 @@ func (handler *Handler) edgeGroupUpdate(w http.ResponseWriter, r *http.Request) for _, endpointID := range payload.Endpoints { endpoint, err := handler.DataStore.Endpoint().Endpoint(endpointID) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve endpoint from the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve environment from the database", err} } if endpoint.Type == portainer.EdgeAgentOnDockerEnvironment || endpoint.Type == portainer.EdgeAgentOnKubernetesEnvironment { @@ -124,7 +124,7 @@ func (handler *Handler) edgeGroupUpdate(w http.ResponseWriter, r *http.Request) for _, endpointID := range endpointsToUpdate { err = handler.updateEndpoint(endpointID) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist Endpoint relation changes inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist Environment relation changes inside the database", err} } } diff --git a/api/http/handler/edgejobs/edgejob_create.go b/api/http/handler/edgejobs/edgejob_create.go index 3e78914d5..efb826e66 100644 --- a/api/http/handler/edgejobs/edgejob_create.go +++ b/api/http/handler/edgejobs/edgejob_create.go @@ -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) diff --git a/api/http/handler/edgestacks/edgestack_create.go b/api/http/handler/edgestacks/edgestack_create.go index 06edc2278..80e838827 100644 --- a/api/http/handler/edgestacks/edgestack_create.go +++ b/api/http/handler/edgestacks/edgestack_create.go @@ -44,12 +44,12 @@ func (handler *Handler) edgeStackCreate(w http.ResponseWriter, r *http.Request) endpoints, err := handler.DataStore.Endpoint().Endpoints() if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve endpoints from database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve environments from database", err} } endpointGroups, err := handler.DataStore.EndpointGroup().EndpointGroups() if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve endpoint groups from database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve environment groups from database", err} } edgeGroups, err := handler.DataStore.EdgeGroup().EdgeGroups() @@ -62,14 +62,14 @@ func (handler *Handler) edgeStackCreate(w http.ResponseWriter, r *http.Request) for _, endpointID := range relatedEndpoints { relation, err := handler.DataStore.EndpointRelation().EndpointRelation(endpointID) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find endpoint relation in database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find environment relation in database", err} } relation.EdgeStacks[edgeStack.ID] = true err = handler.DataStore.EndpointRelation().UpdateEndpointRelation(endpointID, relation) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist endpoint relation in database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist environment relation in database", err} } } diff --git a/api/http/handler/edgestacks/edgestack_delete.go b/api/http/handler/edgestacks/edgestack_delete.go index a1937e03f..7ff0ee1cd 100644 --- a/api/http/handler/edgestacks/edgestack_delete.go +++ b/api/http/handler/edgestacks/edgestack_delete.go @@ -44,12 +44,12 @@ func (handler *Handler) edgeStackDelete(w http.ResponseWriter, r *http.Request) endpoints, err := handler.DataStore.Endpoint().Endpoints() if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve endpoints from database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve environments from database", err} } endpointGroups, err := handler.DataStore.EndpointGroup().EndpointGroups() if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve endpoint groups from database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve environment groups from database", err} } edgeGroups, err := handler.DataStore.EdgeGroup().EdgeGroups() @@ -62,14 +62,14 @@ func (handler *Handler) edgeStackDelete(w http.ResponseWriter, r *http.Request) for _, endpointID := range relatedEndpoints { relation, err := handler.DataStore.EndpointRelation().EndpointRelation(endpointID) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find endpoint relation in database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find environment relation in database", err} } delete(relation.EdgeStacks, edgeStack.ID) err = handler.DataStore.EndpointRelation().UpdateEndpointRelation(endpointID, relation) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist endpoint relation in database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist environment relation in database", err} } } diff --git a/api/http/handler/edgestacks/edgestack_status_update.go b/api/http/handler/edgestacks/edgestack_status_update.go index 3eaea47b7..0ac60b981 100644 --- a/api/http/handler/edgestacks/edgestack_status_update.go +++ b/api/http/handler/edgestacks/edgestack_status_update.go @@ -23,7 +23,7 @@ func (payload *updateStatusPayload) Validate(r *http.Request) error { return errors.New("Invalid status") } if payload.EndpointID == nil { - return errors.New("Invalid EndpointID") + return errors.New("Invalid EnvironmentID") } if *payload.Status == portainer.StatusError && govalidator.IsNull(payload.Error) { return errors.New("Error message is mandatory when status is error") @@ -65,14 +65,14 @@ func (handler *Handler) edgeStackStatusUpdate(w http.ResponseWriter, r *http.Req endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(*payload.EndpointID)) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } err = handler.requestBouncer.AuthorizedEdgeEndpointOperation(r, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access endpoint", err} + return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access environment", err} } stack.Status[*payload.EndpointID] = portainer.EdgeStackStatus{ diff --git a/api/http/handler/edgestacks/edgestack_update.go b/api/http/handler/edgestacks/edgestack_update.go index 695106bf6..e81fe5579 100644 --- a/api/http/handler/edgestacks/edgestack_update.go +++ b/api/http/handler/edgestacks/edgestack_update.go @@ -67,12 +67,12 @@ func (handler *Handler) edgeStackUpdate(w http.ResponseWriter, r *http.Request) if payload.EdgeGroups != nil { endpoints, err := handler.DataStore.Endpoint().Endpoints() if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve endpoints from database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve environments from database", err} } endpointGroups, err := handler.DataStore.EndpointGroup().EndpointGroups() if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve endpoint groups from database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve environment groups from database", err} } edgeGroups, err := handler.DataStore.EdgeGroup().EdgeGroups() @@ -82,12 +82,12 @@ func (handler *Handler) edgeStackUpdate(w http.ResponseWriter, r *http.Request) oldRelated, err := edge.EdgeStackRelatedEndpoints(stack.EdgeGroups, endpoints, endpointGroups, edgeGroups) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve edge stack related endpoints from database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve edge stack related environments from database", err} } newRelated, err := edge.EdgeStackRelatedEndpoints(payload.EdgeGroups, endpoints, endpointGroups, edgeGroups) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve edge stack related endpoints from database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve edge stack related environments from database", err} } oldRelatedSet := EndpointSet(oldRelated) @@ -103,14 +103,14 @@ func (handler *Handler) edgeStackUpdate(w http.ResponseWriter, r *http.Request) for endpointID := range endpointsToRemove { relation, err := handler.DataStore.EndpointRelation().EndpointRelation(endpointID) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find endpoint relation in database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find environment relation in database", err} } delete(relation.EdgeStacks, stack.ID) err = handler.DataStore.EndpointRelation().UpdateEndpointRelation(endpointID, relation) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist endpoint relation in database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist environment relation in database", err} } } @@ -124,14 +124,14 @@ func (handler *Handler) edgeStackUpdate(w http.ResponseWriter, r *http.Request) for endpointID := range endpointsToAdd { relation, err := handler.DataStore.EndpointRelation().EndpointRelation(endpointID) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find endpoint relation in database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find environment relation in database", err} } relation.EdgeStacks[stack.ID] = true err = handler.DataStore.EndpointRelation().UpdateEndpointRelation(endpointID, relation) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist endpoint relation in database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist environment relation in database", err} } } diff --git a/api/http/handler/endpointedge/endpoint_edgejob_logs.go b/api/http/handler/endpointedge/endpoint_edgejob_logs.go index 59f55298d..9626a7a3e 100644 --- a/api/http/handler/endpointedge/endpoint_edgejob_logs.go +++ b/api/http/handler/endpointedge/endpoint_edgejob_logs.go @@ -34,19 +34,19 @@ func (payload *logsPayload) Validate(r *http.Request) error { func (handler *Handler) endpointEdgeJobsLogs(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpointID, err := request.RetrieveNumericRouteVariableValue(r, "id") if err != nil { - return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint identifier route variable", err} + return &httperror.HandlerError{http.StatusBadRequest, "Invalid environment identifier route variable", err} } endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } err = handler.requestBouncer.AuthorizedEdgeEndpointOperation(r, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access endpoint", err} + return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access environment", err} } edgeJobID, err := request.RetrieveNumericRouteVariableValue(r, "jobID") diff --git a/api/http/handler/endpointedge/endpoint_edgestack_inspect.go b/api/http/handler/endpointedge/endpoint_edgestack_inspect.go index 9e1057b20..823f21c98 100644 --- a/api/http/handler/endpointedge/endpoint_edgestack_inspect.go +++ b/api/http/handler/endpointedge/endpoint_edgestack_inspect.go @@ -32,19 +32,19 @@ type configResponse struct { func (handler *Handler) endpointEdgeStackInspect(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpointID, err := request.RetrieveNumericRouteVariableValue(r, "id") if err != nil { - return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint identifier route variable", err} + return &httperror.HandlerError{http.StatusBadRequest, "Invalid environment identifier route variable", err} } endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == errors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } err = handler.requestBouncer.AuthorizedEdgeEndpointOperation(r, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access endpoint", err} + return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access environment", err} } edgeStackID, err := request.RetrieveNumericRouteVariableValue(r, "stackId") diff --git a/api/http/handler/endpointgroups/endpointgroup_create.go b/api/http/handler/endpointgroups/endpointgroup_create.go index eb19b9d9e..46879b694 100644 --- a/api/http/handler/endpointgroups/endpointgroup_create.go +++ b/api/http/handler/endpointgroups/endpointgroup_create.go @@ -24,7 +24,7 @@ type endpointGroupCreatePayload struct { func (payload *endpointGroupCreatePayload) Validate(r *http.Request) error { if govalidator.IsNull(payload.Name) { - return errors.New("Invalid endpoint group name") + return errors.New("Invalid environment group name") } if payload.TagIDs == nil { payload.TagIDs = []portainer.TagID{} @@ -61,12 +61,12 @@ func (handler *Handler) endpointGroupCreate(w http.ResponseWriter, r *http.Reque err = handler.DataStore.EndpointGroup().CreateEndpointGroup(endpointGroup) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist the endpoint group inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist the environment group inside the database", err} } endpoints, err := handler.DataStore.Endpoint().Endpoints() if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve endpoints from the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve environments from the database", err} } for _, id := range payload.AssociatedEndpoints { @@ -76,12 +76,12 @@ func (handler *Handler) endpointGroupCreate(w http.ResponseWriter, r *http.Reque err := handler.DataStore.Endpoint().UpdateEndpoint(endpoint.ID, &endpoint) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to update endpoint", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to update environment", err} } err = handler.updateEndpointRelations(&endpoint, endpointGroup) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist endpoint relations changes inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist environment relations changes inside the database", err} } break diff --git a/api/http/handler/endpointgroups/endpointgroup_delete.go b/api/http/handler/endpointgroups/endpointgroup_delete.go index 4edf260a3..baa58f307 100644 --- a/api/http/handler/endpointgroups/endpointgroup_delete.go +++ b/api/http/handler/endpointgroups/endpointgroup_delete.go @@ -28,28 +28,28 @@ import ( func (handler *Handler) endpointGroupDelete(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpointGroupID, err := request.RetrieveNumericRouteVariableValue(r, "id") if err != nil { - return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint group identifier route variable", err} + return &httperror.HandlerError{http.StatusBadRequest, "Invalid environment group identifier route variable", err} } if endpointGroupID == 1 { - return &httperror.HandlerError{http.StatusForbidden, "Unable to remove the default 'Unassigned' group", errors.New("Cannot remove the default endpoint group")} + return &httperror.HandlerError{http.StatusForbidden, "Unable to remove the default 'Unassigned' group", errors.New("Cannot remove the default environment group")} } endpointGroup, err := handler.DataStore.EndpointGroup().EndpointGroup(portainer.EndpointGroupID(endpointGroupID)) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint group with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment group with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint group with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment group with the specified identifier inside the database", err} } err = handler.DataStore.EndpointGroup().DeleteEndpointGroup(portainer.EndpointGroupID(endpointGroupID)) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to remove the endpoint group from the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to remove the environment group from the database", err} } endpoints, err := handler.DataStore.Endpoint().Endpoints() if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve endpoints from the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve environment from the database", err} } for _, endpoint := range endpoints { @@ -57,12 +57,12 @@ func (handler *Handler) endpointGroupDelete(w http.ResponseWriter, r *http.Reque endpoint.GroupID = portainer.EndpointGroupID(1) err = handler.DataStore.Endpoint().UpdateEndpoint(endpoint.ID, &endpoint) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to update endpoint", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to update environment", err} } err = handler.updateEndpointRelations(&endpoint, nil) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist endpoint relations changes inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist environment relations changes inside the database", err} } } } diff --git a/api/http/handler/endpointgroups/endpointgroup_endpoint_add.go b/api/http/handler/endpointgroups/endpointgroup_endpoint_add.go index b28370827..fb0759e7e 100644 --- a/api/http/handler/endpointgroups/endpointgroup_endpoint_add.go +++ b/api/http/handler/endpointgroups/endpointgroup_endpoint_add.go @@ -26,38 +26,38 @@ import ( func (handler *Handler) endpointGroupAddEndpoint(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpointGroupID, err := request.RetrieveNumericRouteVariableValue(r, "id") if err != nil { - return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint group identifier route variable", err} + return &httperror.HandlerError{http.StatusBadRequest, "Invalid environment group identifier route variable", err} } endpointID, err := request.RetrieveNumericRouteVariableValue(r, "endpointId") if err != nil { - return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint identifier route variable", err} + return &httperror.HandlerError{http.StatusBadRequest, "Invalid environment identifier route variable", err} } endpointGroup, err := handler.DataStore.EndpointGroup().EndpointGroup(portainer.EndpointGroupID(endpointGroupID)) if err == errors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint group with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment group with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint group with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment group with the specified identifier inside the database", err} } endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == errors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } endpoint.GroupID = endpointGroup.ID err = handler.DataStore.Endpoint().UpdateEndpoint(endpoint.ID, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist endpoint changes inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist environment changes inside the database", err} } err = handler.updateEndpointRelations(endpoint, endpointGroup) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist endpoint relations changes inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist environment relations changes inside the database", err} } return response.Empty(w) diff --git a/api/http/handler/endpointgroups/endpointgroup_endpoint_delete.go b/api/http/handler/endpointgroups/endpointgroup_endpoint_delete.go index ecba9adaa..4963af012 100644 --- a/api/http/handler/endpointgroups/endpointgroup_endpoint_delete.go +++ b/api/http/handler/endpointgroups/endpointgroup_endpoint_delete.go @@ -25,38 +25,38 @@ import ( func (handler *Handler) endpointGroupDeleteEndpoint(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpointGroupID, err := request.RetrieveNumericRouteVariableValue(r, "id") if err != nil { - return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint group identifier route variable", err} + return &httperror.HandlerError{http.StatusBadRequest, "Invalid environment group identifier route variable", err} } endpointID, err := request.RetrieveNumericRouteVariableValue(r, "endpointId") if err != nil { - return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint identifier route variable", err} + return &httperror.HandlerError{http.StatusBadRequest, "Invalid environment identifier route variable", err} } _, err = handler.DataStore.EndpointGroup().EndpointGroup(portainer.EndpointGroupID(endpointGroupID)) if err == errors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint group with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment group with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint group with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment group with the specified identifier inside the database", err} } endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == errors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } endpoint.GroupID = portainer.EndpointGroupID(1) err = handler.DataStore.Endpoint().UpdateEndpoint(endpoint.ID, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist endpoint changes inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist environment changes inside the database", err} } err = handler.updateEndpointRelations(endpoint, nil) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist endpoint relations changes inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist environment relations changes inside the database", err} } return response.Empty(w) diff --git a/api/http/handler/endpointgroups/endpointgroup_inspect.go b/api/http/handler/endpointgroups/endpointgroup_inspect.go index eb573c145..e25290669 100644 --- a/api/http/handler/endpointgroups/endpointgroup_inspect.go +++ b/api/http/handler/endpointgroups/endpointgroup_inspect.go @@ -26,14 +26,14 @@ import ( func (handler *Handler) endpointGroupInspect(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpointGroupID, err := request.RetrieveNumericRouteVariableValue(r, "id") if err != nil { - return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint group identifier route variable", err} + return &httperror.HandlerError{http.StatusBadRequest, "Invalid environment group identifier route variable", err} } endpointGroup, err := handler.DataStore.EndpointGroup().EndpointGroup(portainer.EndpointGroupID(endpointGroupID)) if err == errors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint group with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment group with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint group with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment group with the specified identifier inside the database", err} } return response.JSON(w, endpointGroup) diff --git a/api/http/handler/endpointgroups/endpointgroup_list.go b/api/http/handler/endpointgroups/endpointgroup_list.go index b011d6a2c..6cb0cfabe 100644 --- a/api/http/handler/endpointgroups/endpointgroup_list.go +++ b/api/http/handler/endpointgroups/endpointgroup_list.go @@ -23,7 +23,7 @@ import ( func (handler *Handler) endpointGroupList(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpointGroups, err := handler.DataStore.EndpointGroup().EndpointGroups() if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve endpoint groups from the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve environment groups from the database", err} } securityContext, err := security.RetrieveRestrictedRequestContext(r) diff --git a/api/http/handler/endpointgroups/endpointgroup_update.go b/api/http/handler/endpointgroups/endpointgroup_update.go index 7d8c284f4..ab60c289c 100644 --- a/api/http/handler/endpointgroups/endpointgroup_update.go +++ b/api/http/handler/endpointgroups/endpointgroup_update.go @@ -45,7 +45,7 @@ func (payload *endpointGroupUpdatePayload) Validate(r *http.Request) error { func (handler *Handler) endpointGroupUpdate(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpointGroupID, err := request.RetrieveNumericRouteVariableValue(r, "id") if err != nil { - return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint group identifier route variable", err} + return &httperror.HandlerError{http.StatusBadRequest, "Invalid environment group identifier route variable", err} } var payload endpointGroupUpdatePayload @@ -56,9 +56,9 @@ func (handler *Handler) endpointGroupUpdate(w http.ResponseWriter, r *http.Reque endpointGroup, err := handler.DataStore.EndpointGroup().EndpointGroup(portainer.EndpointGroupID(endpointGroupID)) if err == errors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint group with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment group with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint group with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment group with the specified identifier inside the database", err} } if payload.Name != "" { @@ -123,7 +123,7 @@ func (handler *Handler) endpointGroupUpdate(w http.ResponseWriter, r *http.Reque if updateAuthorizations { endpoints, err := handler.DataStore.Endpoint().Endpoints() if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve endpoints from the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve environments from the database", err} } for _, endpoint := range endpoints { @@ -140,13 +140,13 @@ func (handler *Handler) endpointGroupUpdate(w http.ResponseWriter, r *http.Reque err = handler.DataStore.EndpointGroup().UpdateEndpointGroup(endpointGroup.ID, endpointGroup) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist endpoint group changes inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist environment group changes inside the database", err} } if tagsChanged { endpoints, err := handler.DataStore.Endpoint().Endpoints() if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve endpoints from the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve environments from the database", err} } @@ -154,7 +154,7 @@ func (handler *Handler) endpointGroupUpdate(w http.ResponseWriter, r *http.Reque if endpoint.GroupID == endpointGroup.ID { err = handler.updateEndpointRelations(&endpoint, endpointGroup) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist endpoint relations changes inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist environment relations changes inside the database", err} } } } diff --git a/api/http/handler/endpointproxy/proxy_azure.go b/api/http/handler/endpointproxy/proxy_azure.go index 8176edf8a..b838f0edc 100644 --- a/api/http/handler/endpointproxy/proxy_azure.go +++ b/api/http/handler/endpointproxy/proxy_azure.go @@ -14,19 +14,19 @@ import ( func (handler *Handler) proxyRequestsToAzureAPI(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpointID, err := request.RetrieveNumericRouteVariableValue(r, "id") if err != nil { - return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint identifier route variable", err} + return &httperror.HandlerError{http.StatusBadRequest, "Invalid environment identifier route variable", err} } endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == errors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } err = handler.requestBouncer.AuthorizedEndpointOperation(r, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access endpoint", err} + return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access environment", err} } var proxy http.Handler diff --git a/api/http/handler/endpointproxy/proxy_docker.go b/api/http/handler/endpointproxy/proxy_docker.go index 9ac89edbc..0f0db7af6 100644 --- a/api/http/handler/endpointproxy/proxy_docker.go +++ b/api/http/handler/endpointproxy/proxy_docker.go @@ -17,24 +17,24 @@ import ( func (handler *Handler) proxyRequestsToDockerAPI(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpointID, err := request.RetrieveNumericRouteVariableValue(r, "id") if err != nil { - return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint identifier route variable", err} + return &httperror.HandlerError{http.StatusBadRequest, "Invalid environment identifier route variable", err} } endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } err = handler.requestBouncer.AuthorizedEndpointOperation(r, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access endpoint", err} + return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access environment", err} } if endpoint.Type == portainer.EdgeAgentOnDockerEnvironment { if endpoint.EdgeID == "" { - return &httperror.HandlerError{http.StatusInternalServerError, "No Edge agent registered with the endpoint", errors.New("No agent available")} + return &httperror.HandlerError{http.StatusInternalServerError, "No Edge agent registered with the environment", errors.New("No agent available")} } tunnel := handler.ReverseTunnelService.GetTunnelDetails(endpoint.ID) diff --git a/api/http/handler/endpointproxy/proxy_kubernetes.go b/api/http/handler/endpointproxy/proxy_kubernetes.go index 82d922ca1..2e3323079 100644 --- a/api/http/handler/endpointproxy/proxy_kubernetes.go +++ b/api/http/handler/endpointproxy/proxy_kubernetes.go @@ -17,24 +17,24 @@ import ( func (handler *Handler) proxyRequestsToKubernetesAPI(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpointID, err := request.RetrieveNumericRouteVariableValue(r, "id") if err != nil { - return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint identifier route variable", err} + return &httperror.HandlerError{http.StatusBadRequest, "Invalid environment identifier route variable", err} } endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } err = handler.requestBouncer.AuthorizedEndpointOperation(r, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access endpoint", err} + return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access environment", err} } if endpoint.Type == portainer.EdgeAgentOnKubernetesEnvironment { if endpoint.EdgeID == "" { - return &httperror.HandlerError{http.StatusInternalServerError, "No Edge agent registered with the endpoint", errors.New("No agent available")} + return &httperror.HandlerError{http.StatusInternalServerError, "No Edge agent registered with the environment", errors.New("No agent available")} } tunnel := handler.ReverseTunnelService.GetTunnelDetails(endpoint.ID) diff --git a/api/http/handler/endpointproxy/proxy_storidge.go b/api/http/handler/endpointproxy/proxy_storidge.go index 6cc59ff17..147845bc0 100644 --- a/api/http/handler/endpointproxy/proxy_storidge.go +++ b/api/http/handler/endpointproxy/proxy_storidge.go @@ -17,19 +17,19 @@ import ( func (handler *Handler) proxyRequestsToStoridgeAPI(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpointID, err := request.RetrieveNumericRouteVariableValue(r, "id") if err != nil { - return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint identifier route variable", err} + return &httperror.HandlerError{http.StatusBadRequest, "Invalid environment identifier route variable", err} } endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } err = handler.requestBouncer.AuthorizedEndpointOperation(r, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access endpoint", err} + return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access environment", err} } var storidgeExtension *portainer.EndpointExtension @@ -40,7 +40,7 @@ func (handler *Handler) proxyRequestsToStoridgeAPI(w http.ResponseWriter, r *htt } if storidgeExtension == nil { - return &httperror.HandlerError{http.StatusServiceUnavailable, "Storidge extension not supported on this endpoint", errors.New("This extension is not supported")} + return &httperror.HandlerError{http.StatusServiceUnavailable, "Storidge extension not supported on this environment", errors.New("This extension is not supported")} } proxyExtensionKey := strconv.Itoa(endpointID) + "_" + strconv.Itoa(int(portainer.StoridgeEndpointExtension)) + "_" + storidgeExtension.URL diff --git a/api/http/handler/endpoints/endpoint_association_delete.go b/api/http/handler/endpoints/endpoint_association_delete.go index c7f9046c8..2ef6fe6c4 100644 --- a/api/http/handler/endpoints/endpoint_association_delete.go +++ b/api/http/handler/endpoints/endpoint_association_delete.go @@ -30,18 +30,18 @@ import ( func (handler *Handler) endpointAssociationDelete(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpointID, err := request.RetrieveNumericRouteVariableValue(r, "id") if err != nil { - return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint identifier route variable", err} + return &httperror.HandlerError{http.StatusBadRequest, "Invalid environment identifier route variable", err} } endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } if endpoint.Type != portainer.EdgeAgentOnKubernetesEnvironment && endpoint.Type != portainer.EdgeAgentOnDockerEnvironment { - return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint type", errors.New("Invalid endpoint type")} + return &httperror.HandlerError{http.StatusBadRequest, "Invalid environment type", errors.New("Invalid environment type")} } endpoint.EdgeID = "" @@ -55,7 +55,7 @@ func (handler *Handler) endpointAssociationDelete(w http.ResponseWriter, r *http err = handler.DataStore.Endpoint().UpdateEndpoint(portainer.EndpointID(endpointID), endpoint) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Failed persisting endpoint in database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Failed persisting environment in database", err} } handler.ReverseTunnelService.SetTunnelStatusToIdle(endpoint.ID) diff --git a/api/http/handler/endpoints/endpoint_create.go b/api/http/handler/endpoints/endpoint_create.go index 50e462869..67f6086d1 100644 --- a/api/http/handler/endpoints/endpoint_create.go +++ b/api/http/handler/endpoints/endpoint_create.go @@ -53,13 +53,13 @@ const ( func (payload *endpointCreatePayload) Validate(r *http.Request) error { name, err := request.RetrieveMultiPartFormValue(r, "Name", false) if err != nil { - return errors.New("Invalid endpoint name") + return errors.New("Invalid environment name") } payload.Name = name endpointCreationType, err := request.RetrieveNumericMultiPartFormValue(r, "EndpointCreationType", false) if err != nil || endpointCreationType == 0 { - return errors.New("Invalid endpoint type value. Value must be one of: 1 (Docker environment), 2 (Agent environment), 3 (Azure environment), 4 (Edge Agent environment) or 5 (Local Kubernetes environment)") + return errors.New("Invalid environment type value. Value must be one of: 1 (Docker environment), 2 (Agent environment), 3 (Azure environment), 4 (Edge Agent environment) or 5 (Local Kubernetes environment)") } payload.EndpointCreationType = endpointCreationEnum(endpointCreationType) @@ -133,7 +133,7 @@ func (payload *endpointCreatePayload) Validate(r *http.Request) error { default: endpointURL, err := request.RetrieveMultiPartFormValue(r, "URL", true) if err != nil { - return errors.New("Invalid endpoint URL") + return errors.New("Invalid environment URL") } payload.URL = endpointURL @@ -189,7 +189,7 @@ func (handler *Handler) endpointCreate(w http.ResponseWriter, r *http.Request) * endpointGroup, err := handler.DataStore.EndpointGroup().EndpointGroup(endpoint.GroupID) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint group inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment group inside the database", err} } edgeGroups, err := handler.DataStore.EdgeGroup().EdgeGroups() @@ -238,7 +238,7 @@ func (handler *Handler) createEndpoint(payload *endpointCreatePayload) (*portain if payload.EndpointCreationType == agentEnvironment { agentPlatform, err := handler.pingAndCheckPlatform(payload) if err != nil { - return nil, &httperror.HandlerError{http.StatusInternalServerError, "Unable to get endpoint type", err} + return nil, &httperror.HandlerError{http.StatusInternalServerError, "Unable to get environment type", err} } if agentPlatform == portainer.AgentPlatformDocker { @@ -288,7 +288,7 @@ func (handler *Handler) createAzureEndpoint(payload *endpointCreatePayload) (*po err = handler.saveEndpointAndUpdateAuthorizations(endpoint) if err != nil { - return nil, &httperror.HandlerError{http.StatusInternalServerError, "An error occured while trying to create the endpoint", err} + return nil, &httperror.HandlerError{http.StatusInternalServerError, "An error occured while trying to create the environment", err} } return endpoint, nil @@ -299,7 +299,7 @@ func (handler *Handler) createEdgeAgentEndpoint(payload *endpointCreatePayload) portainerURL, err := url.Parse(payload.URL) if err != nil { - return nil, &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint URL", err} + return nil, &httperror.HandlerError{http.StatusBadRequest, "Invalid environment URL", err} } portainerHost, _, err := net.SplitHostPort(portainerURL.Host) @@ -308,7 +308,7 @@ func (handler *Handler) createEdgeAgentEndpoint(payload *endpointCreatePayload) } if portainerHost == "localhost" { - return nil, &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint URL", errors.New("cannot use localhost as endpoint URL")} + return nil, &httperror.HandlerError{http.StatusBadRequest, "Invalid environment URL", errors.New("cannot use localhost as environment URL")} } edgeKey := handler.ReverseTunnelService.GenerateEdgeKey(payload.URL, portainerHost, endpointID) @@ -335,7 +335,7 @@ func (handler *Handler) createEdgeAgentEndpoint(payload *endpointCreatePayload) err = handler.saveEndpointAndUpdateAuthorizations(endpoint) if err != nil { - return nil, &httperror.HandlerError{http.StatusInternalServerError, "An error occured while trying to create the endpoint", err} + return nil, &httperror.HandlerError{http.StatusInternalServerError, "An error occured while trying to create the environment", err} } return endpoint, nil @@ -455,12 +455,12 @@ func (handler *Handler) snapshotAndPersistEndpoint(endpoint *portainer.Endpoint) if strings.Contains(err.Error(), "Invalid request signature") { err = errors.New("agent already paired with another Portainer instance") } - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to initiate communications with endpoint", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to initiate communications with environment", err} } err = handler.saveEndpointAndUpdateAuthorizations(endpoint) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "An error occured while trying to create the endpoint", err} + return &httperror.HandlerError{http.StatusInternalServerError, "An error occured while trying to create the environment", err} } return nil diff --git a/api/http/handler/endpoints/endpoint_delete.go b/api/http/handler/endpoints/endpoint_delete.go index a2dcf1924..43032f881 100644 --- a/api/http/handler/endpoints/endpoint_delete.go +++ b/api/http/handler/endpoints/endpoint_delete.go @@ -26,14 +26,14 @@ import ( func (handler *Handler) endpointDelete(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpointID, err := request.RetrieveNumericRouteVariableValue(r, "id") if err != nil { - return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint identifier route variable", err} + return &httperror.HandlerError{http.StatusBadRequest, "Invalid environment identifier route variable", err} } endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == errors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } if endpoint.TLSConfig.TLS { @@ -46,14 +46,14 @@ func (handler *Handler) endpointDelete(w http.ResponseWriter, r *http.Request) * err = handler.DataStore.Endpoint().DeleteEndpoint(portainer.EndpointID(endpointID)) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to remove endpoint from the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to remove environment from the database", err} } handler.ProxyManager.DeleteEndpointProxy(endpoint) err = handler.DataStore.EndpointRelation().DeleteEndpointRelation(endpoint.ID) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to remove endpoint relation from the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to remove environment relation from the database", err} } for _, tagID := range endpoint.TagIDs { diff --git a/api/http/handler/endpoints/endpoint_dockerhub_status.go b/api/http/handler/endpoints/endpoint_dockerhub_status.go index 7a8cc44a3..5be4d39a4 100644 --- a/api/http/handler/endpoints/endpoint_dockerhub_status.go +++ b/api/http/handler/endpoints/endpoint_dockerhub_status.go @@ -26,14 +26,14 @@ type dockerhubStatusResponse struct { func (handler *Handler) endpointDockerhubStatus(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpointID, err := request.RetrieveNumericRouteVariableValue(r, "id") if err != nil { - return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint identifier route variable", err} + return &httperror.HandlerError{http.StatusBadRequest, "Invalid environment identifier route variable", err} } endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } if !endpointutils.IsLocalEndpoint(endpoint) { diff --git a/api/http/handler/endpoints/endpoint_extension_add.go b/api/http/handler/endpoints/endpoint_extension_add.go index 36112e5ea..7e08fc1b8 100644 --- a/api/http/handler/endpoints/endpoint_extension_add.go +++ b/api/http/handler/endpoints/endpoint_extension_add.go @@ -32,14 +32,14 @@ func (payload *endpointExtensionAddPayload) Validate(r *http.Request) error { func (handler *Handler) endpointExtensionAdd(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpointID, err := request.RetrieveNumericRouteVariableValue(r, "id") if err != nil { - return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint identifier route variable", err} + return &httperror.HandlerError{http.StatusBadRequest, "Invalid environment identifier route variable", err} } endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } var payload endpointExtensionAddPayload @@ -69,7 +69,7 @@ func (handler *Handler) endpointExtensionAdd(w http.ResponseWriter, r *http.Requ err = handler.DataStore.Endpoint().UpdateEndpoint(endpoint.ID, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist endpoint changes inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist environment changes inside the database", err} } return response.JSON(w, extension) diff --git a/api/http/handler/endpoints/endpoint_extension_remove.go b/api/http/handler/endpoints/endpoint_extension_remove.go index 13e06a1f5..75d798cd7 100644 --- a/api/http/handler/endpoints/endpoint_extension_remove.go +++ b/api/http/handler/endpoints/endpoint_extension_remove.go @@ -15,14 +15,14 @@ import ( func (handler *Handler) endpointExtensionRemove(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpointID, err := request.RetrieveNumericRouteVariableValue(r, "id") if err != nil { - return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint identifier route variable", err} + return &httperror.HandlerError{http.StatusBadRequest, "Invalid environment identifier route variable", err} } endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == errors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } extensionType, err := request.RetrieveNumericRouteVariableValue(r, "extensionType") @@ -38,7 +38,7 @@ func (handler *Handler) endpointExtensionRemove(w http.ResponseWriter, r *http.R err = handler.DataStore.Endpoint().UpdateEndpoint(endpoint.ID, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist endpoint changes inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist environment changes inside the database", err} } return response.Empty(w) diff --git a/api/http/handler/endpoints/endpoint_inspect.go b/api/http/handler/endpoints/endpoint_inspect.go index bab2452f5..b538be794 100644 --- a/api/http/handler/endpoints/endpoint_inspect.go +++ b/api/http/handler/endpoints/endpoint_inspect.go @@ -26,19 +26,19 @@ import ( func (handler *Handler) endpointInspect(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpointID, err := request.RetrieveNumericRouteVariableValue(r, "id") if err != nil { - return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint identifier route variable", err} + return &httperror.HandlerError{http.StatusBadRequest, "Invalid environment identifier route variable", err} } endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == errors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } err = handler.requestBouncer.AuthorizedEndpointOperation(r, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access endpoint", err} + return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access environment", err} } hideFields(endpoint) diff --git a/api/http/handler/endpoints/endpoint_list.go b/api/http/handler/endpoints/endpoint_list.go index 92fca9f63..5f8b1b5d6 100644 --- a/api/http/handler/endpoints/endpoint_list.go +++ b/api/http/handler/endpoints/endpoint_list.go @@ -60,12 +60,12 @@ func (handler *Handler) endpointList(w http.ResponseWriter, r *http.Request) *ht endpointGroups, err := handler.DataStore.EndpointGroup().EndpointGroups() if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve endpoint groups from the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve environment groups from the database", err} } endpoints, err := handler.DataStore.Endpoint().Endpoints() if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve endpoints from the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve environments from the database", err} } settings, err := handler.DataStore.Settings().Settings() diff --git a/api/http/handler/endpoints/endpoint_registries_inspect.go b/api/http/handler/endpoints/endpoint_registries_inspect.go index 405fe9495..03c0fe66c 100644 --- a/api/http/handler/endpoints/endpoint_registries_inspect.go +++ b/api/http/handler/endpoints/endpoint_registries_inspect.go @@ -16,7 +16,7 @@ import ( func (handler *Handler) endpointRegistryInspect(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpointID, err := request.RetrieveNumericRouteVariableValue(r, "id") if err != nil { - return &httperror.HandlerError{StatusCode: http.StatusBadRequest, Message: "Invalid endpoint identifier route variable", Err: err} + return &httperror.HandlerError{StatusCode: http.StatusBadRequest, Message: "Invalid environment identifier route variable", Err: err} } registryID, err := request.RetrieveNumericRouteVariableValue(r, "registryId") diff --git a/api/http/handler/endpoints/endpoint_registries_list.go b/api/http/handler/endpoints/endpoint_registries_list.go index 06309624f..7d276e000 100644 --- a/api/http/handler/endpoints/endpoint_registries_list.go +++ b/api/http/handler/endpoints/endpoint_registries_list.go @@ -27,14 +27,14 @@ func (handler *Handler) endpointRegistriesList(w http.ResponseWriter, r *http.Re endpointID, err := request.RetrieveNumericRouteVariableValue(r, "id") if err != nil { - return &httperror.HandlerError{StatusCode: http.StatusBadRequest, Message: "Invalid endpoint identifier route variable", Err: err} + return &httperror.HandlerError{StatusCode: http.StatusBadRequest, Message: "Invalid environment identifier route variable", Err: err} } endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } isAdmin := securityContext.IsAdmin @@ -92,7 +92,7 @@ func (handler *Handler) isNamespaceAuthorized(endpoint *portainer.Endpoint, name accessPolicies, err := kcl.GetNamespaceAccessPolicies() if err != nil { - return false, errors.Wrap(err, "unable to retrieve endpoint's namespaces policies") + return false, errors.Wrap(err, "unable to retrieve environment's namespaces policies") } namespacePolicy, ok := accessPolicies[namespace] diff --git a/api/http/handler/endpoints/endpoint_registry_access.go b/api/http/handler/endpoints/endpoint_registry_access.go index 8dde41d35..d74fe721e 100644 --- a/api/http/handler/endpoints/endpoint_registry_access.go +++ b/api/http/handler/endpoints/endpoint_registry_access.go @@ -25,7 +25,7 @@ func (payload *registryAccessPayload) Validate(r *http.Request) error { func (handler *Handler) endpointRegistryAccess(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpointID, err := request.RetrieveNumericRouteVariableValue(r, "id") if err != nil { - return &httperror.HandlerError{StatusCode: http.StatusBadRequest, Message: "Invalid endpoint identifier route variable", Err: err} + return &httperror.HandlerError{StatusCode: http.StatusBadRequest, Message: "Invalid environment identifier route variable", Err: err} } registryID, err := request.RetrieveNumericRouteVariableValue(r, "registryId") @@ -35,9 +35,9 @@ func (handler *Handler) endpointRegistryAccess(w http.ResponseWriter, r *http.Re endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{StatusCode: http.StatusNotFound, Message: "Unable to find an endpoint with the specified identifier inside the database", Err: err} + return &httperror.HandlerError{StatusCode: http.StatusNotFound, Message: "Unable to find an environment with the specified identifier inside the database", Err: err} } else if err != nil { - return &httperror.HandlerError{StatusCode: http.StatusInternalServerError, Message: "Unable to find an endpoint with the specified identifier inside the database", Err: err} + return &httperror.HandlerError{StatusCode: http.StatusInternalServerError, Message: "Unable to find an environment with the specified identifier inside the database", Err: err} } securityContext, err := security.RetrieveRestrictedRequestContext(r) @@ -47,7 +47,7 @@ func (handler *Handler) endpointRegistryAccess(w http.ResponseWriter, r *http.Re err = handler.requestBouncer.AuthorizedEndpointOperation(r, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access endpoint", err} + return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access environment", err} } if !securityContext.IsAdmin { @@ -56,9 +56,9 @@ func (handler *Handler) endpointRegistryAccess(w http.ResponseWriter, r *http.Re registry, err := handler.DataStore.Registry().Registry(portainer.RegistryID(registryID)) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{StatusCode: http.StatusNotFound, Message: "Unable to find an endpoint with the specified identifier inside the database", Err: err} + return &httperror.HandlerError{StatusCode: http.StatusNotFound, Message: "Unable to find an environment with the specified identifier inside the database", Err: err} } else if err != nil { - return &httperror.HandlerError{StatusCode: http.StatusInternalServerError, Message: "Unable to find an endpoint with the specified identifier inside the database", Err: err} + return &httperror.HandlerError{StatusCode: http.StatusInternalServerError, Message: "Unable to find an environment with the specified identifier inside the database", Err: err} } var payload registryAccessPayload diff --git a/api/http/handler/endpoints/endpoint_settings_update.go b/api/http/handler/endpoints/endpoint_settings_update.go index 5cccf5aed..116868a6e 100644 --- a/api/http/handler/endpoints/endpoint_settings_update.go +++ b/api/http/handler/endpoints/endpoint_settings_update.go @@ -53,7 +53,7 @@ func (payload *endpointSettingsUpdatePayload) Validate(r *http.Request) error { func (handler *Handler) endpointSettingsUpdate(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpointID, err := request.RetrieveNumericRouteVariableValue(r, "id") if err != nil { - return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint identifier route variable", err} + return &httperror.HandlerError{http.StatusBadRequest, "Invalid environment identifier route variable", err} } var payload endpointSettingsUpdatePayload @@ -64,9 +64,9 @@ func (handler *Handler) endpointSettingsUpdate(w http.ResponseWriter, r *http.Re endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == errors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } securitySettings := endpoint.SecuritySettings @@ -111,7 +111,7 @@ func (handler *Handler) endpointSettingsUpdate(w http.ResponseWriter, r *http.Re err = handler.DataStore.Endpoint().UpdateEndpoint(portainer.EndpointID(endpointID), endpoint) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Failed persisting endpoint in database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Failed persisting environment in database", err} } return response.JSON(w, endpoint) diff --git a/api/http/handler/endpoints/endpoint_snapshot.go b/api/http/handler/endpoints/endpoint_snapshot.go index 4fc16acbe..67930cfe3 100644 --- a/api/http/handler/endpoints/endpoint_snapshot.go +++ b/api/http/handler/endpoints/endpoint_snapshot.go @@ -26,25 +26,25 @@ import ( func (handler *Handler) endpointSnapshot(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpointID, err := request.RetrieveNumericRouteVariableValue(r, "id") if err != nil { - return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint identifier route variable", err} + return &httperror.HandlerError{http.StatusBadRequest, "Invalid environment identifier route variable", err} } endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == errors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } if !snapshot.SupportDirectSnapshot(endpoint) { - return &httperror.HandlerError{http.StatusBadRequest, "Snapshots not supported for this endpoint", err} + return &httperror.HandlerError{http.StatusBadRequest, "Snapshots not supported for this environment", err} } snapshotError := handler.SnapshotService.SnapshotEndpoint(endpoint) latestEndpointReference, err := handler.DataStore.Endpoint().Endpoint(endpoint.ID) if latestEndpointReference == nil { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } latestEndpointReference.Status = portainer.EndpointStatusUp @@ -57,7 +57,7 @@ func (handler *Handler) endpointSnapshot(w http.ResponseWriter, r *http.Request) err = handler.DataStore.Endpoint().UpdateEndpoint(latestEndpointReference.ID, latestEndpointReference) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist endpoint changes inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist environment changes inside the database", err} } return response.Empty(w) diff --git a/api/http/handler/endpoints/endpoint_snapshots.go b/api/http/handler/endpoints/endpoint_snapshots.go index 3c986a1ec..7ccf379ff 100644 --- a/api/http/handler/endpoints/endpoint_snapshots.go +++ b/api/http/handler/endpoints/endpoint_snapshots.go @@ -22,7 +22,7 @@ import ( func (handler *Handler) endpointSnapshots(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpoints, err := handler.DataStore.Endpoint().Endpoints() if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve endpoints from the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve environments from the database", err} } for _, endpoint := range endpoints { @@ -34,13 +34,13 @@ func (handler *Handler) endpointSnapshots(w http.ResponseWriter, r *http.Request latestEndpointReference, err := handler.DataStore.Endpoint().Endpoint(endpoint.ID) if latestEndpointReference == nil { - log.Printf("background schedule error (endpoint snapshot). Endpoint not found inside the database anymore (endpoint=%s, URL=%s) (err=%s)\n", endpoint.Name, endpoint.URL, err) + log.Printf("background schedule error (environment snapshot). Environment not found inside the database anymore (endpoint=%s, URL=%s) (err=%s)\n", endpoint.Name, endpoint.URL, err) continue } endpoint.Status = portainer.EndpointStatusUp if snapshotError != nil { - log.Printf("background schedule error (endpoint snapshot). Unable to create snapshot (endpoint=%s, URL=%s) (err=%s)\n", endpoint.Name, endpoint.URL, snapshotError) + log.Printf("background schedule error (environment snapshot). Unable to create snapshot (endpoint=%s, URL=%s) (err=%s)\n", endpoint.Name, endpoint.URL, snapshotError) endpoint.Status = portainer.EndpointStatusDown } @@ -49,7 +49,7 @@ func (handler *Handler) endpointSnapshots(w http.ResponseWriter, r *http.Request err = handler.DataStore.Endpoint().UpdateEndpoint(latestEndpointReference.ID, latestEndpointReference) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist endpoint changes inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist environment changes inside the database", err} } } diff --git a/api/http/handler/endpoints/endpoint_status_inspect.go b/api/http/handler/endpoints/endpoint_status_inspect.go index 3577e3aac..390517251 100644 --- a/api/http/handler/endpoints/endpoint_status_inspect.go +++ b/api/http/handler/endpoints/endpoint_status_inspect.go @@ -65,19 +65,19 @@ type endpointStatusInspectResponse struct { func (handler *Handler) endpointStatusInspect(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpointID, err := request.RetrieveNumericRouteVariableValue(r, "id") if err != nil { - return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint identifier route variable", err} + return &httperror.HandlerError{http.StatusBadRequest, "Invalid environment identifier route variable", err} } endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } err = handler.requestBouncer.AuthorizedEdgeEndpointOperation(r, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access endpoint", err} + return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access environment", err} } if endpoint.EdgeID == "" { @@ -107,7 +107,7 @@ func (handler *Handler) endpointStatusInspect(w http.ResponseWriter, r *http.Req err = handler.DataStore.Endpoint().UpdateEndpoint(endpoint.ID, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to Unable to persist endpoint changes inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to Unable to persist environment changes inside the database", err} } settings, err := handler.DataStore.Settings().Settings() diff --git a/api/http/handler/endpoints/endpoint_update.go b/api/http/handler/endpoints/endpoint_update.go index 6788867f1..91edd1d2c 100644 --- a/api/http/handler/endpoints/endpoint_update.go +++ b/api/http/handler/endpoints/endpoint_update.go @@ -71,7 +71,7 @@ func (payload *endpointUpdatePayload) Validate(r *http.Request) error { func (handler *Handler) endpointUpdate(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpointID, err := request.RetrieveNumericRouteVariableValue(r, "id") if err != nil { - return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint identifier route variable", err} + return &httperror.HandlerError{http.StatusBadRequest, "Invalid environment identifier route variable", err} } var payload endpointUpdatePayload @@ -82,9 +82,9 @@ func (handler *Handler) endpointUpdate(w http.ResponseWriter, r *http.Request) * endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == errors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } if payload.Name != nil { @@ -257,7 +257,7 @@ func (handler *Handler) endpointUpdate(w http.ResponseWriter, r *http.Request) * if payload.URL != nil || payload.TLS != nil || endpoint.Type == portainer.AzureEnvironment { _, err = handler.ProxyManager.CreateAndRegisterEndpointProxy(endpoint) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to register HTTP proxy for the endpoint", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to register HTTP proxy for the environment", err} } } @@ -272,18 +272,18 @@ func (handler *Handler) endpointUpdate(w http.ResponseWriter, r *http.Request) * err = handler.DataStore.Endpoint().UpdateEndpoint(endpoint.ID, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist endpoint changes inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist environment changes inside the database", err} } if (endpoint.Type == portainer.EdgeAgentOnDockerEnvironment || endpoint.Type == portainer.EdgeAgentOnKubernetesEnvironment) && (groupIDChanged || tagsChanged) { relation, err := handler.DataStore.EndpointRelation().EndpointRelation(endpoint.ID) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find endpoint relation inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find environment relation inside the database", err} } endpointGroup, err := handler.DataStore.EndpointGroup().EndpointGroup(endpoint.GroupID) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find endpoint group inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find environment group inside the database", err} } edgeGroups, err := handler.DataStore.EdgeGroup().EdgeGroups() @@ -307,7 +307,7 @@ func (handler *Handler) endpointUpdate(w http.ResponseWriter, r *http.Request) * err = handler.DataStore.EndpointRelation().UpdateEndpointRelation(endpoint.ID, relation) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist endpoint relation changes inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist environment relation changes inside the database", err} } } diff --git a/api/http/handler/kubernetes/handler.go b/api/http/handler/kubernetes/handler.go index 015b063c9..f0a83ae6c 100644 --- a/api/http/handler/kubernetes/handler.go +++ b/api/http/handler/kubernetes/handler.go @@ -56,12 +56,12 @@ func kubeOnlyMiddleware(next http.Handler) http.Handler { return http.HandlerFunc(func(rw http.ResponseWriter, request *http.Request) { endpoint, err := middlewares.FetchEndpoint(request) if err != nil { - httperror.WriteError(rw, http.StatusInternalServerError, "Unable to find an endpoint on request context", err) + httperror.WriteError(rw, http.StatusInternalServerError, "Unable to find an environment on request context", err) return } if !endpointutils.IsKubernetesEndpoint(endpoint) { - errMessage := "Endpoint is not a kubernetes endpoint" + errMessage := "Environment is not a kubernetes environment" httperror.WriteError(rw, http.StatusBadRequest, errMessage, errors.New(errMessage)) return } diff --git a/api/http/handler/kubernetes/kubernetes_config.go b/api/http/handler/kubernetes/kubernetes_config.go index 31734dcb1..898aef0a4 100644 --- a/api/http/handler/kubernetes/kubernetes_config.go +++ b/api/http/handler/kubernetes/kubernetes_config.go @@ -33,19 +33,19 @@ import ( func (handler *Handler) getKubernetesConfig(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpointID, err := request.RetrieveNumericRouteVariableValue(r, "id") if err != nil { - return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint identifier route variable", err} + return &httperror.HandlerError{http.StatusBadRequest, "Invalid environment identifier route variable", err} } endpoint, err := handler.dataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } tokenData, err := security.RetrieveTokenData(r) if err != nil { - return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access endpoint", err} + return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access environment", err} } bearerToken, err := handler.JwtService.GenerateTokenForKubeconfig(tokenData) diff --git a/api/http/handler/kubernetes/kubernetes_nodes_limits.go b/api/http/handler/kubernetes/kubernetes_nodes_limits.go index 5e1f06215..18a46d05c 100644 --- a/api/http/handler/kubernetes/kubernetes_nodes_limits.go +++ b/api/http/handler/kubernetes/kubernetes_nodes_limits.go @@ -28,14 +28,14 @@ import ( func (handler *Handler) getKubernetesNodesLimits(w http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpointID, err := request.RetrieveNumericRouteVariableValue(r, "id") if err != nil { - return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint identifier route variable", err} + return &httperror.HandlerError{http.StatusBadRequest, "Invalid environment identifier route variable", err} } endpoint, err := handler.dataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } cli, err := handler.kubernetesClientFactory.GetKubeClient(endpoint) diff --git a/api/http/handler/kubernetes/namespaces_toggle_system.go b/api/http/handler/kubernetes/namespaces_toggle_system.go index 5c71bf748..8caad850f 100644 --- a/api/http/handler/kubernetes/namespaces_toggle_system.go +++ b/api/http/handler/kubernetes/namespaces_toggle_system.go @@ -36,7 +36,7 @@ func (payload *namespacesToggleSystemPayload) Validate(r *http.Request) error { func (handler *Handler) namespacesToggleSystem(rw http.ResponseWriter, r *http.Request) *httperror.HandlerError { endpoint, err := middlewares.FetchEndpoint(r) if err != nil { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint on request context", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment on request context", err} } namespaceName, err := request.RetrieveRouteVariableValue(r, "namespace") diff --git a/api/http/handler/stacks/stack_create.go b/api/http/handler/stacks/stack_create.go index fe5a0526f..64132b617 100644 --- a/api/http/handler/stacks/stack_create.go +++ b/api/http/handler/stacks/stack_create.go @@ -71,9 +71,9 @@ func (handler *Handler) stackCreate(w http.ResponseWriter, r *http.Request) *htt endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } if endpointutils.IsDockerEndpoint(endpoint) && !endpoint.SecuritySettings.AllowStackManagementForRegularUsers { @@ -96,7 +96,7 @@ func (handler *Handler) stackCreate(w http.ResponseWriter, r *http.Request) *htt err = handler.requestBouncer.AuthorizedEndpointOperation(r, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access endpoint", err} + return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access environment", err} } tokenData, err := security.RetrieveTokenData(r) diff --git a/api/http/handler/stacks/stack_delete.go b/api/http/handler/stacks/stack_delete.go index 424255b89..d2038459d 100644 --- a/api/http/handler/stacks/stack_delete.go +++ b/api/http/handler/stacks/stack_delete.go @@ -72,9 +72,9 @@ func (handler *Handler) stackDelete(w http.ResponseWriter, r *http.Request) *htt endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find the endpoint associated to the stack inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find the environment associated to the stack inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find the endpoint associated to the stack inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find the environment associated to the stack inside the database", err} } resourceControl, err := handler.DataStore.ResourceControl().ResourceControlByResourceIDAndType(stackutils.ResourceControlID(stack.EndpointID, stack.Name), portainer.StackResourceControl) @@ -85,7 +85,7 @@ func (handler *Handler) stackDelete(w http.ResponseWriter, r *http.Request) *htt if !isOrphaned { err = handler.requestBouncer.AuthorizedEndpointOperation(r, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access endpoint", err} + return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access environment", err} } if stack.Type == portainer.DockerSwarmStack || stack.Type == portainer.DockerComposeStack { @@ -149,14 +149,14 @@ func (handler *Handler) deleteExternalStack(r *http.Request, w http.ResponseWrit endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find the endpoint associated to the stack inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find the environment associated to the stack inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find the endpoint associated to the stack inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find the environment associated to the stack inside the database", err} } err = handler.requestBouncer.AuthorizedEndpointOperation(r, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access endpoint", err} + return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access environment", err} } stack = &portainer.Stack{ diff --git a/api/http/handler/stacks/stack_file.go b/api/http/handler/stacks/stack_file.go index 35d38d378..e5c5056d3 100644 --- a/api/http/handler/stacks/stack_file.go +++ b/api/http/handler/stacks/stack_file.go @@ -54,16 +54,16 @@ func (handler *Handler) stackFile(w http.ResponseWriter, r *http.Request) *httpe endpoint, err := handler.DataStore.Endpoint().Endpoint(stack.EndpointID) if err == bolterrors.ErrObjectNotFound { if !securityContext.IsAdmin { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } if endpoint != nil { err = handler.requestBouncer.AuthorizedEndpointOperation(r, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access endpoint", err} + return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access environment", err} } if stack.Type == portainer.DockerSwarmStack || stack.Type == portainer.DockerComposeStack { diff --git a/api/http/handler/stacks/stack_inspect.go b/api/http/handler/stacks/stack_inspect.go index 05c1ab102..b1cb8638b 100644 --- a/api/http/handler/stacks/stack_inspect.go +++ b/api/http/handler/stacks/stack_inspect.go @@ -49,16 +49,16 @@ func (handler *Handler) stackInspect(w http.ResponseWriter, r *http.Request) *ht endpoint, err := handler.DataStore.Endpoint().Endpoint(stack.EndpointID) if err == bolterrors.ErrObjectNotFound { if !securityContext.IsAdmin { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } if endpoint != nil { err = handler.requestBouncer.AuthorizedEndpointOperation(r, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access endpoint", err} + return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access environment", err} } if stack.Type == portainer.DockerSwarmStack || stack.Type == portainer.DockerComposeStack { diff --git a/api/http/handler/stacks/stack_list.go b/api/http/handler/stacks/stack_list.go index f4b4fb673..aeb950bda 100644 --- a/api/http/handler/stacks/stack_list.go +++ b/api/http/handler/stacks/stack_list.go @@ -42,7 +42,7 @@ func (handler *Handler) stackList(w http.ResponseWriter, r *http.Request) *httpe endpoints, err := handler.DataStore.Endpoint().Endpoints() if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve endpoints from database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve environments from database", err} } stacks, err := handler.DataStore.Stack().Stacks() diff --git a/api/http/handler/stacks/stack_migrate.go b/api/http/handler/stacks/stack_migrate.go index 19377f418..cfca05944 100644 --- a/api/http/handler/stacks/stack_migrate.go +++ b/api/http/handler/stacks/stack_migrate.go @@ -26,7 +26,7 @@ type stackMigratePayload struct { func (payload *stackMigratePayload) Validate(r *http.Request) error { if payload.EndpointID == 0 { - return errors.New("Invalid endpoint identifier. Must be a positive number") + return errors.New("Invalid environment identifier. Must be a positive number") } return nil } @@ -68,14 +68,14 @@ func (handler *Handler) stackMigrate(w http.ResponseWriter, r *http.Request) *ht endpoint, err := handler.DataStore.Endpoint().Endpoint(stack.EndpointID) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } err = handler.requestBouncer.AuthorizedEndpointOperation(r, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access endpoint", err} + return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access environment", err} } if stack.Type == portainer.DockerSwarmStack || stack.Type == portainer.DockerComposeStack { @@ -111,9 +111,9 @@ func (handler *Handler) stackMigrate(w http.ResponseWriter, r *http.Request) *ht targetEndpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(payload.EndpointID)) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } stack.EndpointID = portainer.EndpointID(payload.EndpointID) @@ -132,7 +132,7 @@ func (handler *Handler) stackMigrate(w http.ResponseWriter, r *http.Request) *ht } if !isUnique { - errorMessage := fmt.Sprintf("A stack with the name '%s' is already running on endpoint '%s'", stack.Name, targetEndpoint.Name) + errorMessage := fmt.Sprintf("A stack with the name '%s' is already running on environment '%s'", stack.Name, targetEndpoint.Name) return &httperror.HandlerError{http.StatusConflict, errorMessage, errors.New(errorMessage)} } diff --git a/api/http/handler/stacks/stack_start.go b/api/http/handler/stacks/stack_start.go index 4b036a287..3a6ca0285 100644 --- a/api/http/handler/stacks/stack_start.go +++ b/api/http/handler/stacks/stack_start.go @@ -50,14 +50,14 @@ func (handler *Handler) stackStart(w http.ResponseWriter, r *http.Request) *http endpoint, err := handler.DataStore.Endpoint().Endpoint(stack.EndpointID) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } err = handler.requestBouncer.AuthorizedEndpointOperation(r, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access endpoint", err} + return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access environment", err} } isUnique, err := handler.checkUniqueName(endpoint, stack.Name, stack.ID, stack.SwarmID != "") diff --git a/api/http/handler/stacks/stack_stop.go b/api/http/handler/stacks/stack_stop.go index 8b435c560..6aea8e375 100644 --- a/api/http/handler/stacks/stack_stop.go +++ b/api/http/handler/stacks/stack_stop.go @@ -48,14 +48,14 @@ func (handler *Handler) stackStop(w http.ResponseWriter, r *http.Request) *httpe endpoint, err := handler.DataStore.Endpoint().Endpoint(stack.EndpointID) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } err = handler.requestBouncer.AuthorizedEndpointOperation(r, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access endpoint", err} + return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access environment", err} } if stack.Type == portainer.DockerSwarmStack || stack.Type == portainer.DockerComposeStack { diff --git a/api/http/handler/stacks/stack_update.go b/api/http/handler/stacks/stack_update.go index 99aeab570..49476fe7a 100644 --- a/api/http/handler/stacks/stack_update.go +++ b/api/http/handler/stacks/stack_update.go @@ -91,14 +91,14 @@ func (handler *Handler) stackUpdate(w http.ResponseWriter, r *http.Request) *htt endpoint, err := handler.DataStore.Endpoint().Endpoint(stack.EndpointID) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{StatusCode: http.StatusNotFound, Message: "Unable to find the endpoint associated to the stack inside the database", Err: err} + return &httperror.HandlerError{StatusCode: http.StatusNotFound, Message: "Unable to find the environment associated to the stack inside the database", Err: err} } else if err != nil { - return &httperror.HandlerError{StatusCode: http.StatusInternalServerError, Message: "Unable to find the endpoint associated to the stack inside the database", Err: err} + return &httperror.HandlerError{StatusCode: http.StatusInternalServerError, Message: "Unable to find the environment associated to the stack inside the database", Err: err} } err = handler.requestBouncer.AuthorizedEndpointOperation(r, endpoint) if err != nil { - return &httperror.HandlerError{StatusCode: http.StatusForbidden, Message: "Permission denied to access endpoint", Err: err} + return &httperror.HandlerError{StatusCode: http.StatusForbidden, Message: "Permission denied to access environment", Err: err} } securityContext, err := security.RetrieveRestrictedRequestContext(r) diff --git a/api/http/handler/stacks/stack_update_git.go b/api/http/handler/stacks/stack_update_git.go index 7e1e7883c..48b3b14d2 100644 --- a/api/http/handler/stacks/stack_update_git.go +++ b/api/http/handler/stacks/stack_update_git.go @@ -88,14 +88,14 @@ func (handler *Handler) stackUpdateGit(w http.ResponseWriter, r *http.Request) * endpoint, err := handler.DataStore.Endpoint().Endpoint(stack.EndpointID) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{StatusCode: http.StatusNotFound, Message: "Unable to find the endpoint associated to the stack inside the database", Err: err} + return &httperror.HandlerError{StatusCode: http.StatusNotFound, Message: "Unable to find the environment associated to the stack inside the database", Err: err} } else if err != nil { - return &httperror.HandlerError{StatusCode: http.StatusInternalServerError, Message: "Unable to find the endpoint associated to the stack inside the database", Err: err} + return &httperror.HandlerError{StatusCode: http.StatusInternalServerError, Message: "Unable to find the environment associated to the stack inside the database", Err: err} } err = handler.requestBouncer.AuthorizedEndpointOperation(r, endpoint) if err != nil { - return &httperror.HandlerError{StatusCode: http.StatusForbidden, Message: "Permission denied to access endpoint", Err: err} + return &httperror.HandlerError{StatusCode: http.StatusForbidden, Message: "Permission denied to access environment", Err: err} } if stack.Type == portainer.DockerSwarmStack || stack.Type == portainer.DockerComposeStack { diff --git a/api/http/handler/stacks/stack_update_git_redeploy.go b/api/http/handler/stacks/stack_update_git_redeploy.go index 445ba9604..9b9d485ee 100644 --- a/api/http/handler/stacks/stack_update_git_redeploy.go +++ b/api/http/handler/stacks/stack_update_git_redeploy.go @@ -84,14 +84,14 @@ func (handler *Handler) stackGitRedeploy(w http.ResponseWriter, r *http.Request) endpoint, err := handler.DataStore.Endpoint().Endpoint(stack.EndpointID) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{StatusCode: http.StatusNotFound, Message: "Unable to find the endpoint associated to the stack inside the database", Err: err} + return &httperror.HandlerError{StatusCode: http.StatusNotFound, Message: "Unable to find the environment associated to the stack inside the database", Err: err} } else if err != nil { - return &httperror.HandlerError{StatusCode: http.StatusInternalServerError, Message: "Unable to find the endpoint associated to the stack inside the database", Err: err} + return &httperror.HandlerError{StatusCode: http.StatusInternalServerError, Message: "Unable to find the environment associated to the stack inside the database", Err: err} } err = handler.requestBouncer.AuthorizedEndpointOperation(r, endpoint) if err != nil { - return &httperror.HandlerError{StatusCode: http.StatusForbidden, Message: "Permission denied to access endpoint", Err: err} + return &httperror.HandlerError{StatusCode: http.StatusForbidden, Message: "Permission denied to access environment", Err: err} } securityContext, err := security.RetrieveRestrictedRequestContext(r) diff --git a/api/http/handler/tags/tag_delete.go b/api/http/handler/tags/tag_delete.go index f1465dfce..9d756cb89 100644 --- a/api/http/handler/tags/tag_delete.go +++ b/api/http/handler/tags/tag_delete.go @@ -43,7 +43,7 @@ func (handler *Handler) tagDelete(w http.ResponseWriter, r *http.Request) *httpe for endpointID := range tag.Endpoints { endpoint, err := handler.DataStore.Endpoint().Endpoint(endpointID) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve endpoint from the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve environment from the database", err} } tagIdx := findTagIndex(endpoint.TagIDs, tagID) @@ -51,7 +51,7 @@ func (handler *Handler) tagDelete(w http.ResponseWriter, r *http.Request) *httpe endpoint.TagIDs = removeElement(endpoint.TagIDs, tagIdx) err = handler.DataStore.Endpoint().UpdateEndpoint(endpoint.ID, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to update endpoint", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to update environment", err} } } } @@ -59,7 +59,7 @@ func (handler *Handler) tagDelete(w http.ResponseWriter, r *http.Request) *httpe for endpointGroupID := range tag.EndpointGroups { endpointGroup, err := handler.DataStore.EndpointGroup().EndpointGroup(endpointGroupID) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve endpoint group from the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve environment group from the database", err} } tagIdx := findTagIndex(endpointGroup.TagIDs, tagID) @@ -67,14 +67,14 @@ func (handler *Handler) tagDelete(w http.ResponseWriter, r *http.Request) *httpe endpointGroup.TagIDs = removeElement(endpointGroup.TagIDs, tagIdx) err = handler.DataStore.EndpointGroup().UpdateEndpointGroup(endpointGroup.ID, endpointGroup) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to update endpoint group", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to update environment group", err} } } } endpoints, err := handler.DataStore.Endpoint().Endpoints() if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve endpoints from the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve environments from the database", err} } edgeGroups, err := handler.DataStore.EdgeGroup().EdgeGroups() @@ -91,7 +91,7 @@ func (handler *Handler) tagDelete(w http.ResponseWriter, r *http.Request) *httpe if (tag.Endpoints[endpoint.ID] || tag.EndpointGroups[endpoint.GroupID]) && (endpoint.Type == portainer.EdgeAgentOnDockerEnvironment || endpoint.Type == portainer.EdgeAgentOnKubernetesEnvironment) { err = handler.updateEndpointRelations(endpoint, edgeGroups, edgeStacks) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to update endpoint relations in the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to update environment relations in the database", err} } } } @@ -103,7 +103,7 @@ func (handler *Handler) tagDelete(w http.ResponseWriter, r *http.Request) *httpe edgeGroup.TagIDs = removeElement(edgeGroup.TagIDs, tagIdx) err = handler.DataStore.EdgeGroup().UpdateEdgeGroup(edgeGroup.ID, edgeGroup) if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to update endpoint group", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to update environment group", err} } } } diff --git a/api/http/handler/webhooks/webhook_execute.go b/api/http/handler/webhooks/webhook_execute.go index 5449bd07a..2fbc12772 100644 --- a/api/http/handler/webhooks/webhook_execute.go +++ b/api/http/handler/webhooks/webhook_execute.go @@ -46,9 +46,9 @@ func (handler *Handler) webhookExecute(w http.ResponseWriter, r *http.Request) * endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find an environment with the specified identifier inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an endpoint with the specified identifier inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find an environment with the specified identifier inside the database", err} } imageTag, _ := request.RetrieveQueryParameter(r, "tag", true) diff --git a/api/http/handler/websocket/attach.go b/api/http/handler/websocket/attach.go index 7b28ec655..ef7b13a8d 100644 --- a/api/http/handler/websocket/attach.go +++ b/api/http/handler/websocket/attach.go @@ -48,14 +48,14 @@ func (handler *Handler) websocketAttach(w http.ResponseWriter, r *http.Request) endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == errors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find the endpoint associated to the stack inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find the environment associated to the stack inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find the endpoint associated to the stack inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find the environment associated to the stack inside the database", err} } err = handler.requestBouncer.AuthorizedEndpointOperation(r, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access endpoint", err} + return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access environment", err} } params := &webSocketRequestParams{ diff --git a/api/http/handler/websocket/exec.go b/api/http/handler/websocket/exec.go index 7e451b252..149a15a15 100644 --- a/api/http/handler/websocket/exec.go +++ b/api/http/handler/websocket/exec.go @@ -55,14 +55,14 @@ func (handler *Handler) websocketExec(w http.ResponseWriter, r *http.Request) *h endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == errors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find the endpoint associated to the stack inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find the environment associated to the stack inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find the endpoint associated to the stack inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find the environment associated to the stack inside the database", err} } err = handler.requestBouncer.AuthorizedEndpointOperation(r, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access endpoint", err} + return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access environment", err} } params := &webSocketRequestParams{ diff --git a/api/http/handler/websocket/pod.go b/api/http/handler/websocket/pod.go index e917d5a75..bd3dd0871 100644 --- a/api/http/handler/websocket/pod.go +++ b/api/http/handler/websocket/pod.go @@ -64,14 +64,14 @@ func (handler *Handler) websocketPodExec(w http.ResponseWriter, r *http.Request) endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find the endpoint associated to the stack inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find the environment associated to the stack inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find the endpoint associated to the stack inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find the environment associated to the stack inside the database", err} } err = handler.requestBouncer.AuthorizedEndpointOperation(r, endpoint) if err != nil { - return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access endpoint", err} + return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access environment", err} } serviceAccountToken, isAdminToken, err := handler.getToken(r, endpoint, false) diff --git a/api/http/handler/websocket/shell_pod.go b/api/http/handler/websocket/shell_pod.go index e7e5861b3..a2bb727a0 100644 --- a/api/http/handler/websocket/shell_pod.go +++ b/api/http/handler/websocket/shell_pod.go @@ -25,14 +25,14 @@ func (handler *Handler) websocketShellPodExec(w http.ResponseWriter, r *http.Req endpoint, err := handler.DataStore.Endpoint().Endpoint(portainer.EndpointID(endpointID)) if err == bolterrors.ErrObjectNotFound { - return &httperror.HandlerError{http.StatusNotFound, "Unable to find the endpoint associated to the stack inside the database", err} + return &httperror.HandlerError{http.StatusNotFound, "Unable to find the environment associated to the stack inside the database", err} } else if err != nil { - return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find the endpoint associated to the stack inside the database", err} + return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find the environment associated to the stack inside the database", err} } tokenData, err := security.RetrieveTokenData(r) if err != nil { - return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access endpoint", err} + return &httperror.HandlerError{http.StatusForbidden, "Permission denied to access environment", err} } cli, err := handler.KubernetesClientFactory.GetKubeClient(endpoint) diff --git a/api/http/middlewares/endpoint.go b/api/http/middlewares/endpoint.go index b23d3ac5a..2f3967e0c 100644 --- a/api/http/middlewares/endpoint.go +++ b/api/http/middlewares/endpoint.go @@ -25,7 +25,7 @@ func WithEndpoint(endpointService portainer.EndpointService, endpointIDParam str endpointID, err := requesthelpers.RetrieveNumericRouteVariableValue(request, endpointIDParam) if err != nil { - httperror.WriteError(rw, http.StatusBadRequest, "Invalid endpoint identifier route variable", err) + httperror.WriteError(rw, http.StatusBadRequest, "Invalid environment identifier route variable", err) return } @@ -36,7 +36,7 @@ func WithEndpoint(endpointService portainer.EndpointService, endpointIDParam str if err == bolterrors.ErrObjectNotFound { statusCode = http.StatusNotFound } - httperror.WriteError(rw, statusCode, "Unable to find an endpoint with the specified identifier inside the database", err) + httperror.WriteError(rw, statusCode, "Unable to find an environment with the specified identifier inside the database", err) return } @@ -51,7 +51,7 @@ func WithEndpoint(endpointService portainer.EndpointService, endpointIDParam str func FetchEndpoint(request *http.Request) (*portainer.Endpoint, error) { contextData := request.Context().Value(contextEndpoint) if contextData == nil { - return nil, errors.New("Unable to find endpoint data in request context") + return nil, errors.New("Unable to find environment data in request context") } return contextData.(*portainer.Endpoint), nil diff --git a/api/http/security/bouncer.go b/api/http/security/bouncer.go index dee955e50..692c49544 100644 --- a/api/http/security/bouncer.go +++ b/api/http/security/bouncer.go @@ -113,7 +113,7 @@ func (bouncer *RequestBouncer) AuthorizedEndpointOperation(r *http.Request, endp // AuthorizedEdgeEndpointOperation verifies that the request was received from a valid Edge endpoint func (bouncer *RequestBouncer) AuthorizedEdgeEndpointOperation(r *http.Request, endpoint *portainer.Endpoint) error { if endpoint.Type != portainer.EdgeAgentOnKubernetesEnvironment && endpoint.Type != portainer.EdgeAgentOnDockerEnvironment { - return errors.New("Invalid endpoint type") + return errors.New("Invalid environment type") } edgeIdentifier := r.Header.Get(portainer.PortainerAgentEdgeIDHeader) diff --git a/api/internal/snapshot/snapshot.go b/api/internal/snapshot/snapshot.go index 249ed168c..2640958bb 100644 --- a/api/internal/snapshot/snapshot.go +++ b/api/internal/snapshot/snapshot.go @@ -126,7 +126,7 @@ func (service *Service) startSnapshotLoop() error { go func() { err := service.snapshotEndpoints() if err != nil { - log.Printf("[ERROR] [internal,snapshot] [message: background schedule error (endpoint snapshot).] [error: %s]", err) + log.Printf("[ERROR] [internal,snapshot] [message: background schedule error (environment snapshot).] [error: %s]", err) } for { @@ -134,7 +134,7 @@ func (service *Service) startSnapshotLoop() error { case <-ticker.C: err := service.snapshotEndpoints() if err != nil { - log.Printf("[ERROR] [internal,snapshot] [message: background schedule error (endpoint snapshot).] [error: %s]", err) + log.Printf("[ERROR] [internal,snapshot] [message: background schedule error (environment snapshot).] [error: %s]", err) } case <-service.shutdownCtx.Done(): log.Println("[DEBUG] [internal,snapshot] [message: shutting down snapshotting]") @@ -166,13 +166,13 @@ func (service *Service) snapshotEndpoints() error { latestEndpointReference, err := service.dataStore.Endpoint().Endpoint(endpoint.ID) if latestEndpointReference == nil { - log.Printf("background schedule error (endpoint snapshot). Endpoint not found inside the database anymore (endpoint=%s, URL=%s) (err=%s)\n", endpoint.Name, endpoint.URL, err) + log.Printf("background schedule error (environment snapshot). Environment not found inside the database anymore (endpoint=%s, URL=%s) (err=%s)\n", endpoint.Name, endpoint.URL, err) continue } latestEndpointReference.Status = portainer.EndpointStatusUp if snapshotError != nil { - log.Printf("background schedule error (endpoint snapshot). Unable to create snapshot (endpoint=%s, URL=%s) (err=%s)\n", endpoint.Name, endpoint.URL, snapshotError) + log.Printf("background schedule error (environment snapshot). Unable to create snapshot (endpoint=%s, URL=%s) (err=%s)\n", endpoint.Name, endpoint.URL, snapshotError) latestEndpointReference.Status = portainer.EndpointStatusDown } @@ -181,7 +181,7 @@ func (service *Service) snapshotEndpoints() error { err = service.dataStore.Endpoint().UpdateEndpoint(latestEndpointReference.ID, latestEndpointReference) if err != nil { - log.Printf("background schedule error (endpoint snapshot). Unable to update endpoint (endpoint=%s, URL=%s) (err=%s)\n", endpoint.Name, endpoint.URL, err) + log.Printf("background schedule error (environment snapshot). Unable to update environment (endpoint=%s, URL=%s) (err=%s)\n", endpoint.Name, endpoint.URL, err) continue } } @@ -201,12 +201,12 @@ func FetchDockerID(snapshot portainer.DockerSnapshot) (string, error) { } if info["Swarm"] == nil { - return "", errors.New("swarm endpoint is missing swarm info snapshot") + return "", errors.New("swarm environment is missing swarm info snapshot") } swarmInfo := info["Swarm"].(map[string]interface{}) if swarmInfo["Cluster"] == nil { - return "", errors.New("swarm endpoint is missing cluster info snapshot") + return "", errors.New("swarm environment is missing cluster info snapshot") } clusterInfo := swarmInfo["Cluster"].(map[string]interface{}) diff --git a/api/kubernetes/cli/client.go b/api/kubernetes/cli/client.go index 0fc40d384..85344ca36 100644 --- a/api/kubernetes/cli/client.go +++ b/api/kubernetes/cli/client.go @@ -94,7 +94,7 @@ func (factory *ClientFactory) CreateClient(endpoint *portainer.Endpoint) (*kuber return factory.buildEdgeClient(endpoint) } - return nil, errors.New("unsupported endpoint type") + return nil, errors.New("unsupported environment type") } type agentHeaderRoundTripper struct { @@ -125,7 +125,7 @@ func (factory *ClientFactory) buildEdgeClient(endpoint *portainer.Endpoint) (*ku if tunnel.Status == portainer.EdgeAgentIdle { err := factory.reverseTunnelService.SetTunnelStatusToRequired(endpoint.ID) if err != nil { - return nil, fmt.Errorf("failed opening tunnel to endpoint: %w", err) + return nil, fmt.Errorf("failed opening tunnel to environment: %w", err) } if endpoint.EdgeCheckinInterval == 0 { diff --git a/api/stacks/deploy.go b/api/stacks/deploy.go index ccf5eb441..797a415e3 100644 --- a/api/stacks/deploy.go +++ b/api/stacks/deploy.go @@ -51,7 +51,7 @@ func RedeployWhenChanged(stackID portainer.StackID, deployer StackDeployer, data endpoint, err := datastore.Endpoint().Endpoint(stack.EndpointID) if err != nil { - return errors.WithMessagef(err, "failed to find the endpoint %v associated to the stack %v", stack.EndpointID, stack.ID) + return errors.WithMessagef(err, "failed to find the environment %v associated to the stack %v", stack.EndpointID, stack.ID) } author := stack.UpdatedBy diff --git a/api/stacks/deploy_test.go b/api/stacks/deploy_test.go index 58b7de913..6ccb9beea 100644 --- a/api/stacks/deploy_test.go +++ b/api/stacks/deploy_test.go @@ -101,7 +101,7 @@ func Test_redeployWhenChanged(t *testing.T) { tmpDir, _ := ioutil.TempDir("", "stack") err := store.Endpoint().CreateEndpoint(&portainer.Endpoint{ID: 1}) - assert.NoError(t, err, "error creating endpoint") + assert.NoError(t, err, "error creating environment") username := "user" err = store.User().CreateUser(&portainer.User{Username: username, Role: portainer.AdministratorRole}) diff --git a/app/azure/_module.js b/app/azure/_module.js index 30fd789b9..10c6cf60c 100644 --- a/app/azure/_module.js +++ b/app/azure/_module.js @@ -20,7 +20,7 @@ angular.module('portainer.azure', ['portainer.app']).config([ EndpointProvider.setOfflineModeFromStatus(endpoint.Status); await StateManager.updateEndpointState(endpoint, []); } catch (e) { - Notifications.error('Failed loading endpoint', e); + Notifications.error('Failed loading environment', e); $state.go('portainer.home', {}, { reload: true }); } }); diff --git a/app/docker/__module.js b/app/docker/__module.js index 94e7e969c..a34a8e4cd 100644 --- a/app/docker/__module.js +++ b/app/docker/__module.js @@ -24,10 +24,10 @@ angular.module('portainer.docker', ['portainer.app']).config([ if (status === 2) { if (!endpoint.Snapshots[0]) { - throw new Error('Endpoint is unreachable and there is no snapshot available for offline browsing.'); + throw new Error('Environment is unreachable and there is no snapshot available for offline browsing.'); } if (endpoint.Snapshots[0].Swarm) { - throw new Error('Endpoint is unreachable. Connect to another swarm manager.'); + throw new Error('Environment is unreachable. Connect to another swarm manager.'); } } @@ -38,7 +38,7 @@ angular.module('portainer.docker', ['portainer.app']).config([ const extensions = await LegacyExtensionManager.initEndpointExtensions(endpoint); await StateManager.updateEndpointState(endpoint, extensions); } catch (e) { - Notifications.error('Failed loading endpoint', e); + Notifications.error('Failed loading environment', e); $state.go('portainer.home', {}, { reload: true }); } diff --git a/app/docker/views/dashboard/dashboard.html b/app/docker/views/dashboard/dashboard.html index 2e909e6bc..cdc2ba083 100644 --- a/app/docker/views/dashboard/dashboard.html +++ b/app/docker/views/dashboard/dashboard.html @@ -1,6 +1,6 @@ - Endpoint summary + Environment summary
@@ -34,12 +34,12 @@
- + - + - +
EndpointEnvironment {{ endpoint.Name }} diff --git a/app/docker/views/docker-features-configuration/docker-features-configuration.html b/app/docker/views/docker-features-configuration/docker-features-configuration.html index d906d86c6..3ca6b421f 100644 --- a/app/docker/views/docker-features-configuration/docker-features-configuration.html +++ b/app/docker/views/docker-features-configuration/docker-features-configuration.html @@ -14,7 +14,7 @@
- These features are only available for an Agent enabled endpoints. + These features are only available for an Agent enabled environments.
diff --git a/app/edge/components/associated-endpoints-datatable/associatedEndpointsDatatable.html b/app/edge/components/associated-endpoints-datatable/associatedEndpointsDatatable.html index d19f4b8bc..f5da826c8 100644 --- a/app/edge/components/associated-endpoints-datatable/associatedEndpointsDatatable.html +++ b/app/edge/components/associated-endpoints-datatable/associatedEndpointsDatatable.html @@ -52,7 +52,7 @@
Loading...
No endpoint available.No environment available.
diff --git a/app/edge/components/edge-job-form/edgeJobForm.html b/app/edge/components/edge-job-form/edgeJobForm.html index d94f24004..b3d75e3a2 100644 --- a/app/edge/components/edge-job-form/edgeJobForm.html +++ b/app/edge/components/edge-job-form/edgeJobForm.html @@ -75,7 +75,7 @@
- Time should be set according to the chosen endpoints' timezone. + Time should be set according to the chosen environments' timezone.
@@ -130,7 +130,7 @@ />
- Time should be set according to the chosen endpoints' timezone. + Time should be set according to the chosen environments' timezone.
@@ -215,7 +215,7 @@
- Target endpoints + Target environments
- Endpoint + Environment diff --git a/app/edge/components/edge-stack-endpoints-datatable/edgeStackEndpointsDatatable.html b/app/edge/components/edge-stack-endpoints-datatable/edgeStackEndpointsDatatable.html index 69bb34b98..2cb16bc40 100644 --- a/app/edge/components/edge-stack-endpoints-datatable/edgeStackEndpointsDatatable.html +++ b/app/edge/components/edge-stack-endpoints-datatable/edgeStackEndpointsDatatable.html @@ -57,7 +57,7 @@ Loading... - No endpoint available. + No environment available. diff --git a/app/edge/components/edge-stack-endpoints-datatable/edgeStackEndpointsDatatableController.js b/app/edge/components/edge-stack-endpoints-datatable/edgeStackEndpointsDatatableController.js index 8a0c12765..f71f6d330 100644 --- a/app/edge/components/edge-stack-endpoints-datatable/edgeStackEndpointsDatatableController.js +++ b/app/edge/components/edge-stack-endpoints-datatable/edgeStackEndpointsDatatableController.js @@ -101,7 +101,7 @@ export class EdgeStackEndpointsDatatableController { this.state.filteredDataSet = endpoints; this.state.totalFilteredDataSet = totalCount; } catch (err) { - this.Notifications.error('Failure', err, 'Unable to retrieve endpoints'); + this.Notifications.error('Failure', err, 'Unable to retrieve environments'); } finally { this.state.loading = false; } diff --git a/app/edge/components/edge-stack-status/edgeStackStatus.html b/app/edge/components/edge-stack-status/edgeStackStatus.html index 5ffda22b5..02c8a07d0 100644 --- a/app/edge/components/edge-stack-status/edgeStackStatus.html +++ b/app/edge/components/edge-stack-status/edgeStackStatus.html @@ -1,3 +1,3 @@ -{{ $ctrl.status.acknowledged || 0 }} -{{ $ctrl.status.ok || 0 }} -{{ $ctrl.status.error || 0 }} +{{ $ctrl.status.acknowledged || 0 }} +{{ $ctrl.status.ok || 0 }} +{{ $ctrl.status.error || 0 }} diff --git a/app/edge/components/group-form/groupForm.html b/app/edge/components/group-form/groupForm.html index 128b9e6e7..2d9c79dc4 100644 --- a/app/edge/components/group-form/groupForm.html +++ b/app/edge/components/group-form/groupForm.html @@ -30,7 +30,7 @@ Static
-

Manually select Edge endpoints

+

Manually select Edge environments

@@ -40,7 +40,7 @@ Dynamic
-

Automatically associate endpoints via tags

+

Automatically associate environments via tags

@@ -49,9 +49,9 @@
- +
- Associated endpoints + Associated environments
-
No Edge endpoints are available. Head over to the Endpoints view to add endpoints.
+
No Edge environments are available. Head over to the Environments view to add environments.
@@ -84,7 +84,7 @@ Partial match
-

Associate any endpoint matching at least one of the selected tags

+

Associate any environment matching at least one of the selected tags

@@ -94,7 +94,7 @@ Full match
-

Associate any endpoint matching all of the selected tags

+

Associate any environment matching all of the selected tags

@@ -106,7 +106,7 @@
- Associated endpoints by tags + Associated environments by tags
- Endpoints Count + Environments Count diff --git a/app/edge/views/edge-jobs/edgeJob/edgeJobController.js b/app/edge/views/edge-jobs/edgeJob/edgeJobController.js index f88e9576d..190f45fb4 100644 --- a/app/edge/views/edge-jobs/edgeJob/edgeJobController.js +++ b/app/edge/views/edge-jobs/edgeJob/edgeJobController.js @@ -161,7 +161,7 @@ export class EdgeJobController { this.results = results; } } catch (err) { - this.Notifications.error('Failure', err, 'Unable to retrieve endpoint list'); + this.Notifications.error('Failure', err, 'Unable to retrieve environment list'); } this.$window.onbeforeunload = () => { diff --git a/app/edge/views/edge-stacks/editEdgeStackView/editEdgeStackView.html b/app/edge/views/edge-stacks/editEdgeStackView/editEdgeStackView.html index 74bab4ec9..d5d5c04b5 100644 --- a/app/edge/views/edge-stacks/editEdgeStackView/editEdgeStackView.html +++ b/app/edge/views/edge-stacks/editEdgeStackView/editEdgeStackView.html @@ -26,11 +26,11 @@
- Endpoints + Environments
KubernetesEndpointConverter.apiToEndpoint(item)); } catch (err) { - throw new PortainerError('Unable to retrieve endpoints', err); + throw new PortainerError('Unable to retrieve environments', err); } } diff --git a/app/kubernetes/views/applications/create/createApplication.html b/app/kubernetes/views/applications/create/createApplication.html index a8b3304ee..149b90152 100644 --- a/app/kubernetes/views/applications/create/createApplication.html +++ b/app/kubernetes/views/applications/create/createApplication.html @@ -926,7 +926,7 @@

Server metrics features must be enabled in the - endpoint configuration view. + environment configuration view.

diff --git a/app/kubernetes/views/cluster/clusterController.js b/app/kubernetes/views/cluster/clusterController.js index 1c695d042..2d649df18 100644 --- a/app/kubernetes/views/cluster/clusterController.js +++ b/app/kubernetes/views/cluster/clusterController.js @@ -66,7 +66,7 @@ class KubernetesClusterController { }); } } catch (err) { - this.Notifications.error('Failure', err, 'Unable to retrieve endpoints'); + this.Notifications.error('Failure', err, 'Unable to retrieve environments'); } } diff --git a/app/kubernetes/views/cluster/node/nodeController.js b/app/kubernetes/views/cluster/node/nodeController.js index bb5c3a90f..9a726add7 100644 --- a/app/kubernetes/views/cluster/node/nodeController.js +++ b/app/kubernetes/views/cluster/node/nodeController.js @@ -238,7 +238,7 @@ class KubernetesNodeController { }); } } catch (err) { - this.Notifications.error('Failure', err, 'Unable to retrieve endpoints'); + this.Notifications.error('Failure', err, 'Unable to retrieve environments'); } } diff --git a/app/kubernetes/views/configure/configure.html b/app/kubernetes/views/configure/configure.html index 9ea2f7cf5..4f9dc6d70 100644 --- a/app/kubernetes/views/configure/configure.html +++ b/app/kubernetes/views/configure/configure.html @@ -1,5 +1,5 @@ - Endpoints > {{ ctrl.endpoint.Name }} > Kubernetes configuration + Environment > {{ ctrl.endpoint.Name }} > Kubernetes configuration diff --git a/app/kubernetes/views/configure/configureController.js b/app/kubernetes/views/configure/configureController.js index 8e41a3848..4e38cd27d 100644 --- a/app/kubernetes/views/configure/configureController.js +++ b/app/kubernetes/views/configure/configureController.js @@ -294,7 +294,7 @@ class KubernetesConfigureController { this.oldFormValues = Object.assign({}, this.formValues); } catch (err) { - this.Notifications.error('Failure', err, 'Unable to retrieve endpoint configuration'); + this.Notifications.error('Failure', err, 'Unable to retrieve environment configuration'); } finally { this.state.viewReady = true; } diff --git a/app/kubernetes/views/dashboard/dashboard.html b/app/kubernetes/views/dashboard/dashboard.html index e449d57f3..903c54075 100644 --- a/app/kubernetes/views/dashboard/dashboard.html +++ b/app/kubernetes/views/dashboard/dashboard.html @@ -1,5 +1,5 @@ - Endpoint summary + Environment summary @@ -8,12 +8,12 @@
- + - + diff --git a/app/kubernetes/views/resource-pools/access/resourcePoolAccess.html b/app/kubernetes/views/resource-pools/access/resourcePoolAccess.html index 7a34c74c0..d6ba1d52b 100644 --- a/app/kubernetes/views/resource-pools/access/resourcePoolAccess.html +++ b/app/kubernetes/views/resource-pools/access/resourcePoolAccess.html @@ -38,8 +38,8 @@
- No user nor team access has been set on the endpoint. Head over to the - endpoint access view to manage them. + No user nor team access has been set on the environment. Head over to the + environment access view to manage them.
The ingress feature must be enabled in the - endpoint configuration view to be able to register ingresses inside this + environment configuration view to be able to register ingresses inside this namespace.
diff --git a/app/kubernetes/views/resource-pools/edit/resourcePool.html b/app/kubernetes/views/resource-pools/edit/resourcePool.html index 90b33db11..29d39b3a4 100644 --- a/app/kubernetes/views/resource-pools/edit/resourcePool.html +++ b/app/kubernetes/views/resource-pools/edit/resourcePool.html @@ -165,7 +165,7 @@
The ingress feature must be enabled in the - endpoint configuration view to be able to register ingresses inside + environment configuration view to be able to register ingresses inside this namespace.
diff --git a/app/portainer/__module.js b/app/portainer/__module.js index d5a29f75e..a2432ba9b 100644 --- a/app/portainer/__module.js +++ b/app/portainer/__module.js @@ -72,7 +72,7 @@ angular.module('portainer.app', ['portainer.oauth', componentsModule, settingsMo return endpoint; } catch (e) { - Notifications.error('Failed loading endpoint', e); + Notifications.error('Failed loading environment', e); $state.go('portainer.home', {}, { reload: true }); return; } diff --git a/app/portainer/components/access-datatable/accessDatatable.html b/app/portainer/components/access-datatable/accessDatatable.html index 7dc4540d3..52c323103 100644 --- a/app/portainer/components/access-datatable/accessDatatable.html +++ b/app/portainer/components/access-datatable/accessDatatable.html @@ -3,7 +3,7 @@
- Access tagged as inherited are inherited from the group access. They cannot be removed or modified at the endpoint level but they can be overriden. + Access tagged as inherited are inherited from the group access. They cannot be removed or modified at the environment level but they can be overriden.
Access tagged as override are overriding the group access for the related users/teams.
diff --git a/app/portainer/components/accessControlPanel/porAccessControlPanel.html b/app/portainer/components/accessControlPanel/porAccessControlPanel.html index 40e6135f0..5fc0967b3 100644 --- a/app/portainer/components/accessControlPanel/porAccessControlPanel.html +++ b/app/portainer/components/accessControlPanel/porAccessControlPanel.html @@ -18,7 +18,7 @@ {{ $ctrl.resourceControl.Ownership }} @@ -145,7 +145,7 @@ Public
-

I want any user with access to this endpoint to be able to manage this resource

+

I want any user with access to this environment to be able to manage this resource

diff --git a/app/portainer/components/associated-endpoints-selector/associatedEndpointsSelector.html b/app/portainer/components/associated-endpoints-selector/associatedEndpointsSelector.html index 26136e419..5cd20d771 100644 --- a/app/portainer/components/associated-endpoints-selector/associatedEndpointsSelector.html +++ b/app/portainer/components/associated-endpoints-selector/associatedEndpointsSelector.html @@ -1,11 +1,11 @@
- You can select which endpoint should be part of this group by moving them to the associated endpoints table. Simply click on any endpoint entry to move it from one table to the + You can select which environment should be part of this group by moving them to the associated environments table. Simply click on any environment entry to move it from one table to the other.
-
Available endpoints
+
Available environments
-
Associated endpoints
+
Associated environments
- +
EndpointEnvironment {{ ctrl.endpoint.Name }}
- Endpoint + Environment Role diff --git a/app/portainer/components/datatables/endpoints-datatable/endpointsDatatable.html b/app/portainer/components/datatables/endpoints-datatable/endpointsDatatable.html index 415191f4b..54023c703 100644 --- a/app/portainer/components/datatables/endpoints-datatable/endpointsDatatable.html +++ b/app/portainer/components/datatables/endpoints-datatable/endpointsDatatable.html @@ -15,7 +15,7 @@ Remove Loading...
No endpoint available.No environment available.
diff --git a/app/portainer/components/datatables/roles-datatable/rolesDatatable.html b/app/portainer/components/datatables/roles-datatable/rolesDatatable.html index 107e08fb6..9ea5b1500 100644 --- a/app/portainer/components/datatables/roles-datatable/rolesDatatable.html +++ b/app/portainer/components/datatables/roles-datatable/rolesDatatable.html @@ -22,20 +22,20 @@ - Endpoint administrator - Full control of all resources in an endpoint + Environment administrator + Full control of all resources in an environment Helpdesk - Read-only access of all resources in an endpoint + Read-only access of all resources in an environment Read-only user - Read-only access of assigned resources in an endpoint + Read-only access of assigned resources in an environment Standard user - Full control of assigned resources in an endpoint + Full control of assigned resources in an environment diff --git a/app/portainer/components/datatables/stacks-datatable/stacksDatatable.html b/app/portainer/components/datatables/stacks-datatable/stacksDatatable.html index 8d440d045..552b0ee23 100644 --- a/app/portainer/components/datatables/stacks-datatable/stacksDatatable.html +++ b/app/portainer/components/datatables/stacks-datatable/stacksDatatable.html @@ -180,7 +180,7 @@ tooltip-append-to-body="true" tooltip-placement="bottom" tooltip-class="portainer-tooltip" - uib-tooltip="This stack was created inside an endpoint that is no longer registered inside Portainer." + uib-tooltip="This stack was created inside an environment that is no longer registered inside Portainer." > Orphaned diff --git a/app/portainer/components/endpoint-list/endpointList.html b/app/portainer/components/endpoint-list/endpointList.html index f24929b28..cd2b2a5a8 100644 --- a/app/portainer/components/endpoint-list/endpointList.html +++ b/app/portainer/components/endpoint-list/endpointList.html @@ -49,7 +49,7 @@ Loading...
- No endpoint available. + No environment available.
diff --git a/app/portainer/components/endpoint-selector/endpointSelector.html b/app/portainer/components/endpoint-selector/endpointSelector.html index c3800195f..10b057c56 100644 --- a/app/portainer/components/endpoint-selector/endpointSelector.html +++ b/app/portainer/components/endpoint-selector/endpointSelector.html @@ -1,5 +1,5 @@ - + {{ $select.selected.Name }} diff --git a/app/portainer/components/endpointSecurity/porEndpointSecurity.html b/app/portainer/components/endpointSecurity/porEndpointSecurity.html index f9c7fee8f..c18c64fa1 100644 --- a/app/portainer/components/endpointSecurity/porEndpointSecurity.html +++ b/app/portainer/components/endpointSecurity/porEndpointSecurity.html @@ -4,7 +4,7 @@
diff --git a/app/portainer/components/forms/group-form/groupForm.html b/app/portainer/components/forms/group-form/groupForm.html index 6b0b81cb4..16de62842 100644 --- a/app/portainer/components/forms/group-form/groupForm.html +++ b/app/portainer/components/forms/group-form/groupForm.html @@ -36,20 +36,20 @@ > - +
- Associated endpoints + Associated environments
- You can select which endpoint should be part of this group by moving them to the associated endpoints table. Simply click on any endpoint entry to move it from one table to + You can select which environment should be part of this group by moving them to the associated environments table. Simply click on any environment entry to move it from one table to the other.
-
Available endpoints
+
Available environments
-
Associated endpoints
+
Associated environments
@@ -87,7 +87,7 @@
- Unassociated endpoints + Unassociated environments
diff --git a/app/portainer/components/forms/group-form/groupFormController.js b/app/portainer/components/forms/group-form/groupFormController.js index 1f2c7b54d..9f9eb7acf 100644 --- a/app/portainer/components/forms/group-form/groupFormController.js +++ b/app/portainer/components/forms/group-form/groupFormController.js @@ -38,10 +38,10 @@ class GroupFormController { } else if (this.pageType === 'edit') { this.GroupService.addEndpoint(this.model.Id, endpoint) .then(() => { - this.Notifications.success('Success', 'Endpoint successfully added to group'); + this.Notifications.success('Success', 'Environment successfully added to group'); this.reloadTablesContent(); }) - .catch((err) => this.Notifications.error('Error', err, 'Unable to add endpoint to group')); + .catch((err) => this.Notifications.error('Error', err, 'Unable to add environment to group')); } } @@ -51,10 +51,10 @@ class GroupFormController { } else if (this.pageType === 'edit') { this.GroupService.removeEndpoint(this.model.Id, endpoint.Id) .then(() => { - this.Notifications.success('Success', 'Endpoint successfully removed from group'); + this.Notifications.success('Success', 'Environment successfully removed from group'); this.reloadTablesContent(); }) - .catch((err) => this.Notifications.error('Error', err, 'Unable to remove endpoint from group')); + .catch((err) => this.Notifications.error('Error', err, 'Unable to remove environment from group')); } } diff --git a/app/portainer/components/forms/stack-from-template-form/stackFromTemplateForm.html b/app/portainer/components/forms/stack-from-template-form/stackFromTemplateForm.html index 1f3907ee4..30c499458 100644 --- a/app/portainer/components/forms/stack-from-template-form/stackFromTemplateForm.html +++ b/app/portainer/components/forms/stack-from-template-form/stackFromTemplateForm.html @@ -65,7 +65,7 @@
{{ $ctrl.state.formValidationError }}
This template type cannot be deployed on this endpoint.
This template type cannot be deployed on this environment.
diff --git a/app/portainer/components/information-panel-offline/informationPanelOffline.html b/app/portainer/components/information-panel-offline/informationPanelOffline.html index 17942ee5a..bcd5bfc51 100644 --- a/app/portainer/components/information-panel-offline/informationPanelOffline.html +++ b/app/portainer/components/information-panel-offline/informationPanelOffline.html @@ -2,7 +2,7 @@

- This endpoint is currently offline (read-only). Data shown is based on the latest available snapshot. + This environment is currently offline (read-only). Data shown is based on the latest available snapshot.

diff --git a/app/portainer/components/information-panel-offline/informationPanelOfflineController.js b/app/portainer/components/information-panel-offline/informationPanelOfflineController.js index d4096c1c5..14329ca72 100644 --- a/app/portainer/components/information-panel-offline/informationPanelOfflineController.js +++ b/app/portainer/components/information-panel-offline/informationPanelOfflineController.js @@ -18,7 +18,7 @@ angular.module('portainer.app').controller('InformationPanelOfflineController', $state.reload(); }) .catch(function onError(err) { - Notifications.error('Failure', err, 'An error occured during endpoint snapshot'); + Notifications.error('Failure', err, 'An error occured during environment snapshot'); }); } @@ -31,7 +31,7 @@ angular.module('portainer.app').controller('InformationPanelOfflineController', ctrl.snapshotTime = data.Snapshots[0].Time; }) .catch(function onError(err) { - Notifications.error('Failure', err, 'Unable to retrieve endpoint information'); + Notifications.error('Failure', err, 'Unable to retrieve environment information'); }); } }, diff --git a/app/portainer/services/api/endpointService.js b/app/portainer/services/api/endpointService.js index 852d398f9..827b40b60 100644 --- a/app/portainer/services/api/endpointService.js +++ b/app/portainer/services/api/endpointService.js @@ -57,7 +57,7 @@ angular.module('portainer.app').factory('EndpointService', [ }) .catch(function error(err) { deferred.notify({ upload: false }); - deferred.reject({ msg: 'Unable to update endpoint', err: err }); + deferred.reject({ msg: 'Unable to update environment', err: err }); }); return deferred.promise; }; @@ -84,7 +84,7 @@ angular.module('portainer.app').factory('EndpointService', [ deferred.resolve(response.data); }) .catch(function error(err) { - deferred.reject({ msg: 'Unable to create endpoint', err: err }); + deferred.reject({ msg: 'Unable to create environment', err: err }); }); return deferred.promise; @@ -131,7 +131,7 @@ angular.module('portainer.app').factory('EndpointService', [ deferred.resolve(response.data); }) .catch(function error(err) { - deferred.reject({ msg: 'Unable to create endpoint', err: err }); + deferred.reject({ msg: 'Unable to create environment', err: err }); }); return deferred.promise; @@ -145,7 +145,7 @@ angular.module('portainer.app').factory('EndpointService', [ deferred.resolve(response.data); }) .catch(function error(err) { - deferred.reject({ msg: 'Unable to create endpoint', err: err }); + deferred.reject({ msg: 'Unable to create environment', err: err }); }); return deferred.promise; diff --git a/app/portainer/services/api/stackService.js b/app/portainer/services/api/stackService.js index da3a1a545..33ee75401 100644 --- a/app/portainer/services/api/stackService.js +++ b/app/portainer/services/api/stackService.js @@ -56,7 +56,7 @@ angular.module('portainer.app').factory('StackService', [ .then(function success(data) { var swarm = data; if (swarm.Id === stack.SwarmId) { - deferred.reject({ msg: 'Target endpoint is located in the same Swarm cluster as the current endpoint', err: null }); + deferred.reject({ msg: 'Target environment is located in the same Swarm cluster as the current environment', err: null }); return; } return Stack.migrate({ id: stack.Id, endpointId: stack.EndpointId }, { EndpointID: targetEndpointId, SwarmID: swarm.Id, Name: newName }).$promise; diff --git a/app/portainer/services/modalService.js b/app/portainer/services/modalService.js index 7e03ba7bb..9203d6248 100644 --- a/app/portainer/services/modalService.js +++ b/app/portainer/services/modalService.js @@ -154,9 +154,9 @@ angular.module('portainer.app').factory('ModalService', [ service.confirmDeassociate = function (callback) { const message = - '

De-associating this Edge endpoint will mark it as non associated and will clear the registered Edge ID.

' + - '

Any agent started with the Edge key associated to this endpoint will be able to re-associate with this endpoint.

' + - '

You can re-use the Edge ID and Edge key that you used to deploy the existing Edge agent to associate a new Edge device to this endpoint.

'; + '

De-associating this Edge environment will mark it as non associated and will clear the registered Edge ID.

' + + '

Any agent started with the Edge key associated to this environment will be able to re-associate with this environment.

' + + '

You can re-use the Edge ID and Edge key that you used to deploy the existing Edge agent to associate a new Edge device to this environment.

'; service.confirm({ title: 'About de-associating', message: $sanitize(message), @@ -258,7 +258,7 @@ angular.module('portainer.app').factory('ModalService', [ service.confirmEndpointSnapshot = function (callback) { service.confirm({ title: 'Are you sure?', - message: 'Triggering a manual refresh will poll each endpoint to retrieve its information, this may take a few moments.', + message: 'Triggering a manual refresh will poll each environment to retrieve its information, this may take a few moments.', buttons: { confirm: { label: 'Continue', diff --git a/app/portainer/services/stateManager.js b/app/portainer/services/stateManager.js index 047a29813..5930e82c9 100644 --- a/app/portainer/services/stateManager.js +++ b/app/portainer/services/stateManager.js @@ -200,7 +200,7 @@ angular.module('portainer.app').factory('StateManager', [ deferred.resolve(); }) .catch(function error(err) { - deferred.reject({ msg: 'Unable to connect to the Docker endpoint', err: err }); + deferred.reject({ msg: 'Unable to connect to the Docker environment', err: err }); }) .finally(function final() { state.loading = false; diff --git a/app/portainer/settings/general/ssl-certificate/ssl-certificate.html b/app/portainer/settings/general/ssl-certificate/ssl-certificate.html index 84c52b69d..222f62f4e 100644 --- a/app/portainer/settings/general/ssl-certificate/ssl-certificate.html +++ b/app/portainer/settings/general/ssl-certificate/ssl-certificate.html @@ -7,7 +7,7 @@

- Forcing HTTPs only will cause Portainer to stop listening on the HTTP port. Any edge agent endpoint that is using HTTP will no longer be available. + Forcing HTTPs only will cause Portainer to stop listening on the HTTP port. Any edge agent environment that is using HTTP will no longer be available.

diff --git a/app/portainer/views/auth/authController.js b/app/portainer/views/auth/authController.js index e132f7dae..1735c66bd 100644 --- a/app/portainer/views/auth/authController.js +++ b/app/portainer/views/auth/authController.js @@ -129,7 +129,7 @@ class AuthenticationController { return this.$state.go('portainer.home'); } } catch (err) { - this.error(err, 'Unable to retrieve endpoints'); + this.error(err, 'Unable to retrieve environments'); } } diff --git a/app/portainer/views/endpoints/access/endpointAccess.html b/app/portainer/views/endpoints/access/endpointAccess.html index ea754aac7..f0c96ea86 100644 --- a/app/portainer/views/endpoints/access/endpointAccess.html +++ b/app/portainer/views/endpoints/access/endpointAccess.html @@ -1,14 +1,14 @@ - + - Endpoints > {{ ctrl.endpoint.Name }} > Access management + Environments > {{ ctrl.endpoint.Name }} > Access management
- + diff --git a/app/portainer/views/endpoints/access/endpointAccessController.js b/app/portainer/views/endpoints/access/endpointAccessController.js index e16b56442..6d7e2329e 100644 --- a/app/portainer/views/endpoints/access/endpointAccessController.js +++ b/app/portainer/views/endpoints/access/endpointAccessController.js @@ -20,7 +20,7 @@ class EndpointAccessController { this.endpoint = await this.EndpointService.endpoint(this.$transition$.params().id); this.group = await this.GroupService.group(this.endpoint.GroupId); } catch (err) { - this.Notifications.error('Failure', err, 'Unable to retrieve endpoint information'); + this.Notifications.error('Failure', err, 'Unable to retrieve environment information'); } } diff --git a/app/portainer/views/endpoints/create/createEndpointController.js b/app/portainer/views/endpoints/create/createEndpointController.js index dde612ab5..828ecbae9 100644 --- a/app/portainer/views/endpoints/create/createEndpointController.js +++ b/app/portainer/views/endpoints/create/createEndpointController.js @@ -112,11 +112,11 @@ angular $scope.state.actionInProgress = true; EndpointService.createLocalEndpoint(name, URL, publicURL, groupId, tagIds) .then(function success() { - Notifications.success('Endpoint created', name); + Notifications.success('Environment created', name); $state.go('portainer.endpoints', {}, { reload: true }); }) .catch(function error(err) { - Notifications.error('Failure', err, 'Unable to create endpoint'); + Notifications.error('Failure', err, 'Unable to create environment'); }) .finally(function final() { $scope.state.actionInProgress = false; @@ -158,11 +158,11 @@ angular $scope.state.actionInProgress = true; EndpointService.createLocalKubernetesEndpoint(name, tagIds) .then(function success(result) { - Notifications.success('Endpoint created', name); + Notifications.success('Environment created', name); $state.go('portainer.endpoints.endpoint.kubernetesConfig', { id: result.Id }); }) .catch(function error(err) { - Notifications.error('Failure', err, 'Unable to create endpoint'); + Notifications.error('Failure', err, 'Unable to create environment'); }) .finally(function final() { $scope.state.actionInProgress = false; @@ -220,11 +220,11 @@ angular $scope.state.actionInProgress = true; EndpointService.createAzureEndpoint(name, applicationId, tenantId, authenticationKey, groupId, tagIds) .then(function success() { - Notifications.success('Endpoint created', name); + Notifications.success('Environment created', name); $state.go('portainer.endpoints', {}, { reload: true }); }) .catch(function error(err) { - Notifications.error('Failure', err, 'Unable to create endpoint'); + Notifications.error('Failure', err, 'Unable to create environment'); }) .finally(function final() { $scope.state.actionInProgress = false; @@ -251,7 +251,7 @@ angular CheckinInterval ); - Notifications.success('Endpoint created', name); + Notifications.success('Environment created', name); switch (endpoint.Type) { case PortainerEndpointTypes.EdgeAgentOnDockerEnvironment: case PortainerEndpointTypes.EdgeAgentOnKubernetesEnvironment: @@ -267,7 +267,7 @@ angular return endpoint; } catch (err) { - Notifications.error('Failure', err, 'Unable to create endpoint'); + Notifications.error('Failure', err, 'Unable to create environment'); } finally { $scope.state.actionInProgress = false; } diff --git a/app/portainer/views/endpoints/create/createendpoint.html b/app/portainer/views/endpoints/create/createendpoint.html index 3827ff671..a3c32cab8 100644 --- a/app/portainer/views/endpoints/create/createendpoint.html +++ b/app/portainer/views/endpoints/create/createendpoint.html @@ -1,6 +1,6 @@ - - Endpoints > Add endpoint + + Environments > Add environment
@@ -130,8 +130,8 @@

- Allows you to create an endpoint that can be registered with an Edge agent. The Edge agent will initiate the communications with the Portainer instance. All the - required information on how to connect an Edge agent to this endpoint will be available after endpoint creation. + Allows you to create an environment that can be registered with an Edge agent. The Edge agent will initiate the communications with the Portainer instance. All the + required information on how to connect an Edge agent to this environment will be available after environment creation.

You can read more about the Edge agent in the userguide available here.

@@ -257,7 +257,7 @@
@@ -350,7 +350,7 @@ Public IP @@ -487,8 +487,8 @@ analytics-event="portainer-endpoint-creation" analytics-properties="{ metadata: { type: 'docker-api' } }" > - Add endpoint - Creating endpoint... + Add environment + Creating environment...
diff --git a/app/portainer/views/endpoints/edit/endpoint.html b/app/portainer/views/endpoints/edit/endpoint.html index 1078a01e2..aeb80bd9b 100644 --- a/app/portainer/views/endpoints/edit/endpoint.html +++ b/app/portainer/views/endpoints/edit/endpoint.html @@ -1,11 +1,11 @@ - + - Endpoints > {{ endpoint.Name }} + Environments > {{ endpoint.Name }} @@ -14,7 +14,7 @@

- This Edge endpoint is associated to an Edge environment {{ state.kubernetesEndpoint ? '(Kubernetes)' : '(Docker)' }}. + This Edge environment is associated to an Edge environment {{ state.kubernetesEndpoint ? '(Kubernetes)' : '(Docker)' }}.

Edge key: {{ endpoint.EdgeKey }} @@ -86,7 +86,7 @@

- For those prestaging the edge agent, use the following join token to associate the Edge agent with this endpoint. + For those prestaging the edge agent, use the following join token to associate the Edge agent with this environment.

You can read more about pre-staging in the userguide available here.

@@ -128,7 +128,7 @@
@@ -166,7 +166,7 @@ Poll frequency
@@ -220,8 +220,8 @@ ng-click="updateEndpoint()" button-spinner="state.actionInProgress" > - Update endpoint - Updating endpoint... + Update environment + Updating environment... Cancel
diff --git a/app/portainer/views/endpoints/edit/endpointController.js b/app/portainer/views/endpoints/edit/endpointController.js index 2318a9509..f28cb28c9 100644 --- a/app/portainer/views/endpoints/edit/endpointController.js +++ b/app/portainer/views/endpoints/edit/endpointController.js @@ -125,10 +125,10 @@ function EndpointController( try { $scope.state.actionInProgress = true; await EndpointService.deassociateEndpoint(endpoint.Id); - Notifications.success('Endpoint de-associated', $scope.endpoint.Name); + Notifications.success('Environment de-associated', $scope.endpoint.Name); $state.reload(); } catch (err) { - Notifications.error('Failure', err, 'Unable to de-associate endpoint'); + Notifications.error('Failure', err, 'Unable to de-associate environment'); } finally { $scope.state.actionInProgress = false; } @@ -179,12 +179,12 @@ function EndpointController( $scope.state.actionInProgress = true; EndpointService.updateEndpoint(endpoint.Id, payload).then( function success() { - Notifications.success('Endpoint updated', $scope.endpoint.Name); + Notifications.success('Environment updated', $scope.endpoint.Name); EndpointProvider.setEndpointPublicURL(endpoint.PublicURL); $state.go('portainer.endpoints', {}, { reload: true }); }, function error(err) { - Notifications.error('Failure', err, 'Unable to update endpoint'); + Notifications.error('Failure', err, 'Unable to update environment'); $scope.state.actionInProgress = false; }, function update(evt) { @@ -264,7 +264,7 @@ function EndpointController( configureState(); } catch (err) { - Notifications.error('Failure', err, 'Unable to retrieve endpoint details'); + Notifications.error('Failure', err, 'Unable to retrieve environment details'); } }); } diff --git a/app/portainer/views/endpoints/endpoints.html b/app/portainer/views/endpoints/endpoints.html index 7f1813ca7..657cceb86 100644 --- a/app/portainer/views/endpoints/endpoints.html +++ b/app/portainer/views/endpoints/endpoints.html @@ -1,16 +1,16 @@ - + - Endpoint management + Environment management
- + Groups > {{ group.Name }} > Access management diff --git a/app/portainer/views/groups/create/creategroup.html b/app/portainer/views/groups/create/creategroup.html index bddbfb650..f19069355 100644 --- a/app/portainer/views/groups/create/creategroup.html +++ b/app/portainer/views/groups/create/creategroup.html @@ -1,6 +1,6 @@ - - Endpoint groups > Add group + + Environment groups > Add group
diff --git a/app/portainer/views/groups/edit/group.html b/app/portainer/views/groups/edit/group.html index 0c0566486..ddbb927d1 100644 --- a/app/portainer/views/groups/edit/group.html +++ b/app/portainer/views/groups/edit/group.html @@ -1,5 +1,5 @@ - + Groups > {{ ::group.Name }} diff --git a/app/portainer/views/groups/groups.html b/app/portainer/views/groups/groups.html index 42e491286..714af8c68 100644 --- a/app/portainer/views/groups/groups.html +++ b/app/portainer/views/groups/groups.html @@ -1,14 +1,14 @@ - + - Endpoint group management + Environment group management
- +
diff --git a/app/portainer/views/groups/groupsController.js b/app/portainer/views/groups/groupsController.js index 67fc81af6..b261968d4 100644 --- a/app/portainer/views/groups/groupsController.js +++ b/app/portainer/views/groups/groupsController.js @@ -15,7 +15,7 @@ function GroupsController($scope, $state, $async, GroupService, Notifications) { try { await GroupService.deleteGroup(group.Id); - Notifications.success('Endpoint group successfully removed', group.Name); + Notifications.success('Environment group successfully removed', group.Name); _.remove($scope.groups, group); } catch (err) { Notifications.error('Failure', err, 'Unable to remove group'); @@ -31,7 +31,7 @@ function GroupsController($scope, $state, $async, GroupService, Notifications) { $scope.groups = data; }) .catch(function error(err) { - Notifications.error('Failure', err, 'Unable to retrieve endpoint groups'); + Notifications.error('Failure', err, 'Unable to retrieve environment groups'); $scope.groups = []; }); } diff --git a/app/portainer/views/home/home.html b/app/portainer/views/home/home.html index 3fc6bd415..3b1a4d47c 100644 --- a/app/portainer/views/home/home.html +++ b/app/portainer/views/home/home.html @@ -4,7 +4,7 @@ - Endpoints + Environments @@ -26,7 +26,7 @@ style="width: 100%; height: 100%; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center;" ng-if="state.connectingToEdgeEndpoint" > - Connecting to the Edge endpoint... + Connecting to the Edge environment...
@@ -35,8 +35,8 @@

No environment available for management. Please head over the - endpoints view - to add an endpoint. + environments view + to add an environment.

@@ -44,7 +44,7 @@
- This will restore the Portainer metadata which contains information about the endpoints, stacks and applications, as well as the configured users. + This will restore the Portainer metadata which contains information about the environments, stacks and applications, as well as the configured users.
diff --git a/app/portainer/views/init/endpoint/initEndpoint.html b/app/portainer/views/init/endpoint/initEndpoint.html index 4d2686997..0db2685f9 100644 --- a/app/portainer/views/init/endpoint/initEndpoint.html +++ b/app/portainer/views/init/endpoint/initEndpoint.html @@ -8,10 +8,10 @@
- +
- +
@@ -22,7 +22,7 @@
- +
@@ -37,8 +37,8 @@
- - + +
@@ -48,7 +48,7 @@
- +
@@ -69,10 +69,10 @@
- +
- +
diff --git a/app/portainer/views/init/endpoint/initEndpointController.js b/app/portainer/views/init/endpoint/initEndpointController.js index 235390a23..510982ac2 100644 --- a/app/portainer/views/init/endpoint/initEndpointController.js +++ b/app/portainer/views/init/endpoint/initEndpointController.js @@ -61,7 +61,7 @@ class InitEndpointController { case PortainerEndpointConnectionTypes.AGENT: return this.createAgentEndpoint(); default: - this.Notifications.error('Failure', 'Unable to determine which action to do to create endpoint'); + this.Notifications.error('Failure', 'Unable to determine which action to do to create environment'); } } diff --git a/app/portainer/views/registries/registries.html b/app/portainer/views/registries/registries.html index 742b3122f..3daf4862b 100644 --- a/app/portainer/views/registries/registries.html +++ b/app/portainer/views/registries/registries.html @@ -9,7 +9,7 @@ - View registries via an endpoint to manage access for user(s) and/or team(s) + View registries via an environment to manage access for user(s) and/or team(s) diff --git a/app/portainer/views/registries/registriesController.js b/app/portainer/views/registries/registriesController.js index 568516de7..0fe991f30 100644 --- a/app/portainer/views/registries/registriesController.js +++ b/app/portainer/views/registries/registriesController.js @@ -23,7 +23,7 @@ angular.module('portainer.app').controller('RegistriesController', [ $scope.removeAction = function (selectedItems) { const regAttrMsg = selectedItems.length > 1 ? 'hese' : 'his'; const registriesMsg = selectedItems.length > 1 ? 'registries' : 'registry'; - const msg = `T${regAttrMsg} ${registriesMsg} might be used by applications inside one or more endpoints. Removing the ${registriesMsg} could lead to a service interruption for the applications using t${regAttrMsg} ${registriesMsg}. Do you want to remove the selected ${registriesMsg}?`; + const msg = `T${regAttrMsg} ${registriesMsg} might be used by applications inside one or more environments. Removing the ${registriesMsg} could lead to a service interruption for the applications using t${regAttrMsg} ${registriesMsg}. Do you want to remove the selected ${registriesMsg}?`; ModalService.confirmDeletion(msg, function onConfirm(confirmed) { if (!confirmed) { diff --git a/app/portainer/views/roles/roles.html b/app/portainer/views/roles/roles.html index a595909f1..9d73e610a 100644 --- a/app/portainer/views/roles/roles.html +++ b/app/portainer/views/roles/roles.html @@ -45,7 +45,7 @@
- Effective role for each endpoint will be displayed for the selected user + Effective role for each environment will be displayed for the selected user
diff --git a/app/portainer/views/settings/settings.html b/app/portainer/views/settings/settings.html index de3bbe41e..8b2245b3f 100644 --- a/app/portainer/views/settings/settings.html +++ b/app/portainer/views/settings/settings.html @@ -94,7 +94,7 @@ Edge agent default poll frequency
diff --git a/app/portainer/views/sidebar/sidebar.html b/app/portainer/views/sidebar/sidebar.html index 5a365f0d1..fe83ac39b 100644 --- a/app/portainer/views/sidebar/sidebar.html +++ b/app/portainer/views/sidebar/sidebar.html @@ -80,7 +80,7 @@
This stack was created outside of Portainer. Control over this stack is limited. - This stack is orphaned. You can reassociate it with the current environment using the "Associate to this endpoint" feature. + This stack is orphaned. You can reassociate it with the current environment using the "Associate to this environment" feature.

@@ -82,10 +82,10 @@
- Associate to this endpoint + Associate to this environment

- This feature allows you to reassociate this stack to the current endpoint. + This feature allows you to reassociate this stack to the current environment.

diff --git a/app/portainer/views/stacks/edit/stackController.js b/app/portainer/views/stacks/edit/stackController.js index 4c9289fed..f11546a34 100644 --- a/app/portainer/views/stacks/edit/stackController.js +++ b/app/portainer/views/stacks/edit/stackController.js @@ -70,9 +70,9 @@ angular.module('portainer.app').controller('StackController', [ } }; - $scope.$on('$destroy', function() { + $scope.$on('$destroy', function () { $scope.state.isEditorDirty = false; - }) + }); $scope.handleEnvVarChange = handleEnvVarChange; function handleEnvVarChange(value) { @@ -106,7 +106,7 @@ angular.module('portainer.app').controller('StackController', [ ModalService.confirm({ title: 'Are you sure?', message: - 'This action will deploy a new instance of this stack on the target endpoint, please note that this does NOT relocate the content of any persistent volumes that may be attached to this stack.', + 'This action will deploy a new instance of this stack on the target environment, please note that this does NOT relocate the content of any persistent volumes that may be attached to this stack.', buttons: { confirm: { label: 'Migrate', @@ -289,7 +289,7 @@ angular.module('portainer.app').controller('StackController', [ $scope.endpoints = data.value; }) .catch(function error(err) { - Notifications.error('Failure', err, 'Unable to retrieve endpoints'); + Notifications.error('Failure', err, 'Unable to retrieve environments'); }); $q.all({ diff --git a/app/portainer/views/users/edit/user.html b/app/portainer/views/users/edit/user.html index f8b339336..1dbc16fcf 100644 --- a/app/portainer/views/users/edit/user.html +++ b/app/portainer/views/users/edit/user.html @@ -24,7 +24,7 @@ Administrator diff --git a/app/portainer/views/users/users.html b/app/portainer/views/users/users.html index 7d888b46b..70ddb8ba4 100644 --- a/app/portainer/views/users/users.html +++ b/app/portainer/views/users/users.html @@ -75,7 +75,7 @@ Administrator @@ -112,8 +112,8 @@
- Note: non-administrator users who aren't in a team don't have access to any endpoints by default. Head over to the - Endpoints view to manage their accesses. + Note: non-administrator users who aren't in a team don't have access to any environments by default. Head over to the + Environments view to manage their accesses.
diff --git a/test/e2e/cypress/integration/ci_basic_tests/init.spec.js b/test/e2e/cypress/integration/ci_basic_tests/init.spec.js index b0440ea0a..a1cb21ff0 100644 --- a/test/e2e/cypress/integration/ci_basic_tests/init.spec.js +++ b/test/e2e/cypress/integration/ci_basic_tests/init.spec.js @@ -8,7 +8,7 @@ context('Init admin user test', () => { cy.url().should('include', 'init/endpoint'); cy.saveLocalStorage(); }); - it('Select local docker endpoint and init', function () { + it('Select local docker environment and init', function () { cy.initEndpoint(); cy.url().should('include', 'home'); }); diff --git a/test/e2e/cypress/integration/init.spec.js b/test/e2e/cypress/integration/init.spec.js index f1c69b4a0..7a0bce690 100644 --- a/test/e2e/cypress/integration/init.spec.js +++ b/test/e2e/cypress/integration/init.spec.js @@ -8,7 +8,7 @@ context('Init admin & local docker endpoint', () => { cy.url().should('include', 'init/endpoint'); cy.saveLocalStorage(); }); - it('Select local docker endpoint and init', function () { + it('Select local docker environment and init', function () { cy.initEndpoint(); cy.url().should('include', 'home'); });