mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[MM-54522] Add trial info to log + support packet (#24596)
Automatic Merge
This commit is contained in:
@@ -421,6 +421,11 @@ func NewServer(options ...Option) (*Server, error) {
|
||||
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)
|
||||
mlog.Info(
|
||||
logCurrentVersion,
|
||||
@@ -432,7 +437,11 @@ func NewServer(options ...Option) (*Server, error) {
|
||||
mlog.String("service_environment", model.GetServiceEnvironment()),
|
||||
)
|
||||
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 {
|
||||
mlog.Info("Team Edition Build", mlog.Bool("enterprise_build", false))
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
"os"
|
||||
"runtime"
|
||||
"runtime/pprof"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -111,9 +112,11 @@ func (a *App) generateSupportPacketYaml(c *request.Context) (*model.FileData, er
|
||||
|
||||
licenseTo := ""
|
||||
supportedUsers := 0
|
||||
var isTrial bool
|
||||
if license := a.Srv().License(); license != nil {
|
||||
supportedUsers = *license.Features.Users
|
||||
licenseTo = license.Customer.Company
|
||||
isTrial = license.IsTrial
|
||||
}
|
||||
|
||||
/* Jobs */
|
||||
@@ -183,6 +186,7 @@ func (a *App) generateSupportPacketYaml(c *request.Context) (*model.FileData, er
|
||||
/* License */
|
||||
LicenseTo: licenseTo,
|
||||
LicenseSupportedUsers: supportedUsers,
|
||||
LicenseIsTrial: strconv.FormatBool(isTrial),
|
||||
|
||||
/* Server stats */
|
||||
ActiveUsers: int(uniqueUserCount),
|
||||
|
||||
@@ -117,6 +117,7 @@ type SupportPacket struct {
|
||||
|
||||
LicenseTo string `yaml:"license_to"`
|
||||
LicenseSupportedUsers int `yaml:"license_supported_users,omitempty"`
|
||||
LicenseIsTrial string `yaml:"license_is_trial,omitempty"`
|
||||
|
||||
/* Server stats */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user