Rebuild channel index (#26080)
* WIP * Added rebuild channels index functionality * Added rough logic to send message to all sysadmins * WIP * WIP * WIP * Cleanup * i18n fix * reading through all pages of system admins * Fixed webapp style * i18n fix * Added help text * i18n fix * i18n update * Updated system console button action * Updated snapshots * some cleanup * Updated snapshot * Update server/channels/app/server.go Co-authored-by: Daniel Espino García <larkox@gmail.com> * fixed typo * Refactoring to improve readibility * moved index check to API later during config update * Added some docs * Updated get system bot --------- Co-authored-by: Daniel Espino García <larkox@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
ccc00b9077
Коммит
774df37464
@@ -36,18 +36,21 @@ func (a *App) SetSearchEngine(se *searchengine.Broker) {
|
||||
a.ch.srv.platform.SearchEngine = se
|
||||
}
|
||||
|
||||
func (a *App) PurgeElasticsearchIndexes(c request.CTX) *model.AppError {
|
||||
func (a *App) PurgeElasticsearchIndexes(c request.CTX, indexes []string) *model.AppError {
|
||||
engine := a.SearchEngine().ElasticsearchEngine
|
||||
if engine == nil {
|
||||
err := model.NewAppError("PurgeElasticsearchIndexes", "ent.elasticsearch.test_config.license.error", nil, "", http.StatusNotImplemented)
|
||||
return err
|
||||
}
|
||||
|
||||
if err := engine.PurgeIndexes(c); err != nil {
|
||||
return err
|
||||
var appErr *model.AppError
|
||||
if len(indexes) > 0 {
|
||||
appErr = engine.PurgeIndexList(c, indexes)
|
||||
} else {
|
||||
appErr = engine.PurgeIndexes(c)
|
||||
}
|
||||
|
||||
return nil
|
||||
return appErr
|
||||
}
|
||||
|
||||
func (a *App) PurgeBleveIndexes(c request.CTX) *model.AppError {
|
||||
|
||||
Ссылка в новой задаче
Block a user