Remove clusterID and default name to ID

This commit is contained in:
Alan Bernstein 2020-08-20 17:52:25 -05:00
parent 5705b45864
commit 1a04e94fc1
2 changed files with 3 additions and 7 deletions

8
api.go
View file

@ -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
}

View file

@ -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"`
}