mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 05:00:25 +08:00 
			
		
		
		
	节点看板增加缓存目录用量
This commit is contained in:
		@@ -3,6 +3,7 @@
 | 
			
		||||
package boards
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	teaconst "github.com/TeaOSLab/EdgeAdmin/internal/const"
 | 
			
		||||
	"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
 | 
			
		||||
	"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/cluster/node/nodeutils"
 | 
			
		||||
@@ -140,6 +141,23 @@ func (this *IndexAction) RunGet(params struct {
 | 
			
		||||
		this.Data["loadValues"] = statMaps
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// CacheDirs
 | 
			
		||||
	{
 | 
			
		||||
		var statMaps = []maps.Map{}
 | 
			
		||||
		for _, stat := range resp.CacheDirsValues {
 | 
			
		||||
			var m = maps.Map{}
 | 
			
		||||
			err = json.Unmarshal(stat.ValueJSON, &m)
 | 
			
		||||
			if err != nil {
 | 
			
		||||
				continue
 | 
			
		||||
			}
 | 
			
		||||
			statMaps = append(statMaps, maps.Map{
 | 
			
		||||
				"time":  timeutil.FormatTime("H:i", stat.CreatedAt),
 | 
			
		||||
				"value": m,
 | 
			
		||||
			})
 | 
			
		||||
		}
 | 
			
		||||
		this.Data["cacheDirValues"] = statMaps
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// 指标
 | 
			
		||||
	{
 | 
			
		||||
		var chartMaps = []maps.Map{}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user