mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-09 02:33:43 +08:00
Merge remote-tracking branch 'remotes/github/pr/37' into v2.0.0
# Conflicts: # server/internal/controller/admin/admin/monitor.go # server/internal/library/casbin/enforcer.go # server/internal/logic/admin/member.go # server/internal/logic/admin/role.go # server/internal/logic/middleware/init.go # server/internal/logic/sys/addons_config.go # server/internal/logic/sys/config.go # server/internal/logic/sys/log.go # server/internal/model/input/form/base.go
This commit is contained in:
@@ -7,6 +7,10 @@ package admin
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"runtime"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
@@ -15,15 +19,14 @@ import (
|
||||
"github.com/shirou/gopsutil/v3/host"
|
||||
"github.com/shirou/gopsutil/v3/mem"
|
||||
"github.com/shirou/gopsutil/v3/process"
|
||||
|
||||
"hotgo/internal/consts"
|
||||
"hotgo/internal/model"
|
||||
"hotgo/internal/service"
|
||||
"hotgo/internal/websocket"
|
||||
"hotgo/utility/file"
|
||||
"hotgo/utility/format"
|
||||
"os"
|
||||
"runtime"
|
||||
"time"
|
||||
"hotgo/utility/simple"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -76,7 +79,7 @@ func (c *cMonitor) RunInfo(client *websocket.Client, req *websocket.WRequest) {
|
||||
"goSize": file.DirSize(pwd),
|
||||
}
|
||||
|
||||
isDemo := g.Cfg().MustGet(client.Context(), "hotgo.isDemo", false).Bool()
|
||||
isDemo := g.Cfg().MustGet(client.Context(), simple.AppName(client.Context())+".isDemo", false).Bool()
|
||||
if isDemo {
|
||||
data["rootPath"] = consts.DemoTips
|
||||
data["pwd"] = consts.DemoTips
|
||||
|
||||
Reference in New Issue
Block a user