Merge branch 'master' of ssh://git.infini.ltd:64221/infini/search-center

This commit is contained in:
silenceqi 2021-02-20 22:16:11 +08:00
commit 31509eab09
3 changed files with 3 additions and 2 deletions

View File

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

View File

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

View File

@ -21,7 +21,7 @@
display: inline-block;
vertical-align: middle;
font-size: 20px;
margin: 6px 0 0 12px;
margin: 0 0 0 6px;
font-family: 'Myriad Pro', 'Helvetica Neue', Arial, Helvetica, sans-serif;
font-weight: 600;
}