mirror of
https://github.com/grafana/grafana.git
synced 2024-11-23 01:16:31 -06:00
remove org deprecation logs (#27788)
This commit is contained in:
parent
d322417217
commit
c764e3c37b
@ -104,11 +104,6 @@ func (ss *SqlStore) Init() error {
|
||||
ss.addAlertNotificationUidByIdHandler()
|
||||
ss.addPreferencesQueryAndCommandHandlers()
|
||||
|
||||
err = ss.logOrgsNotice()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if ss.skipEnsureDefaultOrgAndUser {
|
||||
return nil
|
||||
}
|
||||
@ -116,30 +111,6 @@ func (ss *SqlStore) Init() error {
|
||||
return ss.ensureMainOrgAndAdminUser()
|
||||
}
|
||||
|
||||
func (ss *SqlStore) logOrgsNotice() error {
|
||||
type targetCount struct {
|
||||
Count int64
|
||||
}
|
||||
|
||||
return ss.WithDbSession(context.Background(), func(session *DBSession) error {
|
||||
resp := make([]*targetCount, 0)
|
||||
if err := session.SQL("select count(id) as Count from org").Find(&resp); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if resp[0].Count > 1 {
|
||||
ss.log.Warn(`[Deprecation notice]`)
|
||||
ss.log.Warn(`Fewer than 1% of Grafana installations use organizations, and we feel that most of those`)
|
||||
ss.log.Warn(`users would have a better experience using Teams instead. As such, we are considering de-emphasizing`)
|
||||
ss.log.Warn(`and eventually deprecating Organizations in a future Grafana release. If you would like to provide`)
|
||||
ss.log.Warn(`feedback or describe your need, please do so in the issue linked below`)
|
||||
ss.log.Warn(`https://github.com/grafana/grafana/issues/24588`)
|
||||
}
|
||||
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
func (ss *SqlStore) ensureMainOrgAndAdminUser() error {
|
||||
err := ss.InTransaction(context.Background(), func(ctx context.Context) error {
|
||||
systemUserCountQuery := models.GetSystemUserCountStatsQuery{}
|
||||
|
Loading…
Reference in New Issue
Block a user