2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 07:57:21 +08:00

fix: lint

This commit is contained in:
耗子
2024-09-28 11:52:52 +08:00
parent 5bb43dbf0f
commit 4e01168f3c
2 changed files with 7 additions and 2 deletions

View File

@@ -4,10 +4,10 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/spf13/cast"
"slices"
"github.com/expr-lang/expr"
"github.com/spf13/cast"
"github.com/TheTNB/panel/internal/biz"
"github.com/TheTNB/panel/internal/panel"
@@ -284,7 +284,7 @@ func (r *appRepo) preCheck(app *api.App) error {
}
output, err := expr.Eval(app.Depends, env)
if err != nil {
return err
}
result := cast.ToString(output)

View File

@@ -5,25 +5,30 @@ type Load struct {
Load5 []float64 `json:"load5"`
Load15 []float64 `json:"load15"`
}
type CPU struct {
Percent []string `json:"percent"`
}
type Mem struct {
Total string `json:"total"`
Available []string `json:"available"`
Used []string `json:"used"`
}
type SWAP struct {
Total string `json:"total"`
Used []string `json:"used"`
Free []string `json:"free"`
}
type Network struct {
Sent []string `json:"sent"`
Recv []string `json:"recv"`
Tx []string `json:"tx"`
Rx []string `json:"rx"`
}
type MonitorData struct {
Times []string `json:"times"`
Load Load `json:"load"`