[MM-54522] Add trial info to log + support packet (#24596)
Automatic Merge
Этот коммит содержится в:
@@ -421,6 +421,11 @@ func NewServer(options ...Option) (*Server, error) {
|
|||||||
s.EmailService.InitEmailBatching()
|
s.EmailService.InitEmailBatching()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
isTrial := false
|
||||||
|
if licence := s.License(); licence != nil {
|
||||||
|
isTrial = licence.IsTrial
|
||||||
|
}
|
||||||
|
|
||||||
logCurrentVersion := fmt.Sprintf("Current version is %v (%v/%v/%v/%v)", model.CurrentVersion, model.BuildNumber, model.BuildDate, model.BuildHash, model.BuildHashEnterprise)
|
logCurrentVersion := fmt.Sprintf("Current version is %v (%v/%v/%v/%v)", model.CurrentVersion, model.BuildNumber, model.BuildDate, model.BuildHash, model.BuildHashEnterprise)
|
||||||
mlog.Info(
|
mlog.Info(
|
||||||
logCurrentVersion,
|
logCurrentVersion,
|
||||||
@@ -432,7 +437,11 @@ func NewServer(options ...Option) (*Server, error) {
|
|||||||
mlog.String("service_environment", model.GetServiceEnvironment()),
|
mlog.String("service_environment", model.GetServiceEnvironment()),
|
||||||
)
|
)
|
||||||
if model.BuildEnterpriseReady == "true" {
|
if model.BuildEnterpriseReady == "true" {
|
||||||
mlog.Info("Enterprise Build", mlog.Bool("enterprise_build", true))
|
mlog.Info(
|
||||||
|
"Enterprise Build",
|
||||||
|
mlog.Bool("enterprise_build", true),
|
||||||
|
mlog.Bool("is_trial", isTrial),
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
mlog.Info("Team Edition Build", mlog.Bool("enterprise_build", false))
|
mlog.Info("Team Edition Build", mlog.Bool("enterprise_build", false))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"runtime"
|
"runtime"
|
||||||
"runtime/pprof"
|
"runtime/pprof"
|
||||||
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -111,9 +112,11 @@ func (a *App) generateSupportPacketYaml(c *request.Context) (*model.FileData, er
|
|||||||
|
|
||||||
licenseTo := ""
|
licenseTo := ""
|
||||||
supportedUsers := 0
|
supportedUsers := 0
|
||||||
|
var isTrial bool
|
||||||
if license := a.Srv().License(); license != nil {
|
if license := a.Srv().License(); license != nil {
|
||||||
supportedUsers = *license.Features.Users
|
supportedUsers = *license.Features.Users
|
||||||
licenseTo = license.Customer.Company
|
licenseTo = license.Customer.Company
|
||||||
|
isTrial = license.IsTrial
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Jobs */
|
/* Jobs */
|
||||||
@@ -183,6 +186,7 @@ func (a *App) generateSupportPacketYaml(c *request.Context) (*model.FileData, er
|
|||||||
/* License */
|
/* License */
|
||||||
LicenseTo: licenseTo,
|
LicenseTo: licenseTo,
|
||||||
LicenseSupportedUsers: supportedUsers,
|
LicenseSupportedUsers: supportedUsers,
|
||||||
|
LicenseIsTrial: strconv.FormatBool(isTrial),
|
||||||
|
|
||||||
/* Server stats */
|
/* Server stats */
|
||||||
ActiveUsers: int(uniqueUserCount),
|
ActiveUsers: int(uniqueUserCount),
|
||||||
|
|||||||
@@ -117,6 +117,7 @@ type SupportPacket struct {
|
|||||||
|
|
||||||
LicenseTo string `yaml:"license_to"`
|
LicenseTo string `yaml:"license_to"`
|
||||||
LicenseSupportedUsers int `yaml:"license_supported_users,omitempty"`
|
LicenseSupportedUsers int `yaml:"license_supported_users,omitempty"`
|
||||||
|
LicenseIsTrial string `yaml:"license_is_trial,omitempty"`
|
||||||
|
|
||||||
/* Server stats */
|
/* Server stats */
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user