* 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>
Этот коммит содержится в:
Harshil Sharma
2024-03-13 10:26:06 +05:30
коммит произвёл GitHub
родитель ccc00b9077
Коммит 774df37464
28 изменённых файлов: 493 добавлений и 117 удалений

Просмотреть файл

@@ -554,31 +554,6 @@ func (s *Server) doPostPriorityConfigDefaultTrueMigration() {
}
}
func (s *Server) doElasticsearchFixChannelIndex(c request.CTX) {
s.AddLicenseListener(func(oldLicense, newLicense *model.License) {
s.elasticsearchFixChannelIndex(c, newLicense)
})
s.elasticsearchFixChannelIndex(c, s.License())
}
func (s *Server) elasticsearchFixChannelIndex(c request.CTX, license *model.License) {
if model.BuildEnterpriseReady != "true" || license == nil || !*license.Features.Elasticsearch {
mlog.Debug("Skipping triggering Elasticsearch channel index fix job as build is not Enterprise ready")
return
}
// If the migration is already marked as completed, don't do it again.
if _, err := s.Store().System().GetByName(model.MigrationKeyElasticsearchFixChannelIndex); err == nil {
mlog.Debug("Skipping triggering Elasticsearch channel index fix job as it is already marked completed in database")
return
}
if _, appErr := s.Jobs.CreateJobOnce(c, model.JobTypeElasticsearchFixChannelIndex, nil); appErr != nil {
mlog.Fatal("failed to start job for fixing Elasticsearch channels index", mlog.Err(appErr))
}
}
func (s *Server) doCloudS3PathMigrations(c request.CTX) {
// This migration is only applicable for cloud environments
if os.Getenv("MM_CLOUD_FILESTORE_BIFROST") == "" {
@@ -672,7 +647,6 @@ func (s *Server) doAppMigrations() {
s.doFirstAdminSetupCompleteMigration()
s.doRemainingSchemaMigrations()
s.doPostPriorityConfigDefaultTrueMigration()
s.doElasticsearchFixChannelIndex(c)
s.doCloudS3PathMigrations(c)
s.doDeleteEmptyDraftsMigration(c)
s.doDeleteOrphanDraftsMigration(c)