Deprecate admin advisor (#26045)
* Deprecate admin advisor * Webapp portion * More webapp deprecation * More cleanup * Linting * emoved metric ack dialog from annoucenemet bar * Cleanued up uninsed i18n strings * Updated test * fixed types * Updating server test * Updated i18n * Updated cypress test: * Updated cypress test: --------- Co-authored-by: harshil Sharma <harshilsharma63@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
dc8fc773dc
Коммит
e9b9d4ff60
@@ -6,16 +6,12 @@ package sqlstore
|
||||
import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
sq "github.com/mattermost/squirrel"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/v8/channels/store"
|
||||
"github.com/mattermost/mattermost/server/v8/channels/utils"
|
||||
)
|
||||
|
||||
type SqlSystemStore struct {
|
||||
@@ -59,24 +55,6 @@ func (s SqlSystemStore) SaveOrUpdate(system *model.System) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s SqlSystemStore) SaveOrUpdateWithWarnMetricHandling(system *model.System) error {
|
||||
if err := s.SaveOrUpdate(system); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if strings.HasPrefix(system.Name, model.WarnMetricStatusStorePrefix) &&
|
||||
(system.Value == model.WarnMetricStatusRunonce || system.Value == model.WarnMetricStatusLimitReached) {
|
||||
if err := s.SaveOrUpdate(&model.System{
|
||||
Name: model.SystemWarnMetricLastRunTimestampKey,
|
||||
Value: strconv.FormatInt(utils.MillisFromTime(time.Now()), 10),
|
||||
}); err != nil {
|
||||
return errors.Wrapf(err, "failed to save system property with name=%s", model.SystemWarnMetricLastRunTimestampKey)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s SqlSystemStore) Update(system *model.System) error {
|
||||
query := "UPDATE Systems SET Value=:Value WHERE Name=:Name"
|
||||
if _, err := s.GetMasterX().NamedExec(query, system); err != nil {
|
||||
|
||||
Ссылка в новой задаче
Block a user