enable cluster on create
This commit is contained in:
parent
523ba2fbec
commit
c83aa38de9
|
@ -33,6 +33,7 @@ func (h *APIHandler) HandleCreateClusterAction(w http.ResponseWriter, req *http.
|
|||
esClient := elastic.GetClient(h.Config.Elasticsearch)
|
||||
id := util.GetUUID()
|
||||
conf.Created = time.Now()
|
||||
conf.Enabled=true
|
||||
conf.Updated = conf.Created
|
||||
//conf.ID = id
|
||||
index:=orm.GetIndexName(model.ClusterConfig{})
|
||||
|
|
|
@ -12,7 +12,7 @@ type ClusterConfig struct {
|
|||
} `json:"basic_auth,omitempty" elastic_mapping:"basic_auth:{type:object}"`
|
||||
Order int `json:"order,omitempty" elastic_mapping:"order:{type:integer}"`
|
||||
Description string `json:"description,omitempty" elastic_mapping:"description:{type:text}"`
|
||||
Enabled bool `json:"enabled" elastic_mapping:"enabled:{type:boolean}"`
|
||||
Enabled bool `json:"enabled,omitempty" elastic_mapping:"enabled:{type:boolean}"`
|
||||
Created time.Time `json:"created,omitempty" elastic_mapping:"created:{type:date}"`
|
||||
Updated time.Time `json:"updated,omitempty" elastic_mapping:"updated:{type:date}"`
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue