|
@@ -3,6 +3,7 @@ package installationinfo
|
|
|
import (
|
|
import (
|
|
|
"fmt"
|
|
"fmt"
|
|
|
config "github.com/OliveTin/OliveTin/internal/config"
|
|
config "github.com/OliveTin/OliveTin/internal/config"
|
|
|
|
|
+ sv "github.com/OliveTin/OliveTin/internal/stringvariables"
|
|
|
"gopkg.in/yaml.v3"
|
|
"gopkg.in/yaml.v3"
|
|
|
"time"
|
|
"time"
|
|
|
)
|
|
)
|
|
@@ -18,6 +19,10 @@ type sosReportConfig struct {
|
|
|
ListenAddressRestActions string
|
|
ListenAddressRestActions string
|
|
|
ListenAddressGrpcActions string
|
|
ListenAddressGrpcActions string
|
|
|
Timezone string
|
|
Timezone string
|
|
|
|
|
+ TimeNow string
|
|
|
|
|
+ ConfigDirectory string
|
|
|
|
|
+ WebuiDirectory string
|
|
|
|
|
+ ThemesDirectory string
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func configToSosreport(cfg *config.Config) *sosReportConfig {
|
|
func configToSosreport(cfg *config.Config) *sosReportConfig {
|
|
@@ -30,10 +35,16 @@ func configToSosreport(cfg *config.Config) *sosReportConfig {
|
|
|
ListenAddressRestActions: cfg.ListenAddressRestActions,
|
|
ListenAddressRestActions: cfg.ListenAddressRestActions,
|
|
|
ListenAddressGrpcActions: cfg.ListenAddressGrpcActions,
|
|
ListenAddressGrpcActions: cfg.ListenAddressGrpcActions,
|
|
|
Timezone: time.Now().Location().String(),
|
|
Timezone: time.Now().Location().String(),
|
|
|
|
|
+ TimeNow: time.Now().String(),
|
|
|
|
|
+ ConfigDirectory: cfg.GetDir(),
|
|
|
|
|
+ WebuiDirectory: sv.Get("internal.webuidir"),
|
|
|
|
|
+ ThemesDirectory: sv.Get("internal.themesdir"),
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func GetSosReport() string {
|
|
func GetSosReport() string {
|
|
|
|
|
+ refreshRuntimeInfo()
|
|
|
|
|
+
|
|
|
ret := ""
|
|
ret := ""
|
|
|
|
|
|
|
|
ret += "### SOSREPORT START (copy all text to SOSREPORT END)\n"
|
|
ret += "### SOSREPORT START (copy all text to SOSREPORT END)\n"
|