diff --git a/api.go b/api.go index 232a510e8..018eb8091 100644 --- a/api.go +++ b/api.go @@ -1739,13 +1739,11 @@ func (api *API) State() string { return api.cluster.State() } -// ClusterID returns the cluster ID. -func (api *API) ClusterID() string { - return api.cluster.id -} - // ClusterName returns the cluster name. func (api *API) ClusterName() string { + if api.cluster.Name == "" { + return api.cluster.id + } return api.cluster.Name } diff --git a/http/handler.go b/http/handler.go index 6f08664a4..63e51ef6d 100644 --- a/http/handler.go +++ b/http/handler.go @@ -704,7 +704,6 @@ func (h *Handler) handleGetStatus(w http.ResponseWriter, r *http.Request) { Nodes: h.api.Hosts(r.Context()), NodeStates: h.api.HostStates(r.Context()), LocalID: h.api.Node().ID, - ClusterID: h.api.ClusterID(), ClusterName: h.api.ClusterName(), } w.Header().Set("Content-Type", "application/json") @@ -765,7 +764,6 @@ type getStatusResponse struct { Nodes []*pilosa.Node `json:"nodes"` NodeStates map[string]string `json:"nodeStates"` LocalID string `json:"localID"` - ClusterID string `json:"clusterID"` ClusterName string `json:"clusterName"` }