@@ -73,34 +73,11 @@ func GetAdminInfo(ctx context.Context, client MinioAdmin) (*UsageInfo, error) {
7373 // we are trimming uint64 to int64 this will report an incorrect measurement for numbers greater than
7474 // 9,223,372,036,854,775,807
7575
76- var backendType string
77- var rrSCParity float64
78- var standardSCParity float64
79- var onlineDrives float64
80- var offlineDrives float64
81-
82- if v , success := serverInfo .Backend .(map [string ]interface {}); success {
83- bt , ok := v ["backendType" ]
84- if ok {
85- backendType = bt .(string )
86- }
87- rp , ok := v ["rrSCParity" ]
88- if ok {
89- rrSCParity = rp .(float64 )
90- }
91- sp , ok := v ["standardSCParity" ]
92- if ok {
93- standardSCParity = sp .(float64 )
94- }
95- onDrives , ok := v ["onlineDisks" ]
96- if ok {
97- onlineDrives = onDrives .(float64 )
98- }
99- offDrives , ok := v ["offlineDisks" ]
100- if ok {
101- offlineDrives = offDrives .(float64 )
102- }
103- }
76+ backendType := serverInfo .Backend .Type
77+ rrSCParity := serverInfo .Backend .RRSCParity
78+ standardSCParity := serverInfo .Backend .StandardSCParity
79+ onlineDrives := serverInfo .Backend .OnlineDisks
80+ offlineDrives := serverInfo .Backend .OfflineDisks
10481
10582 var usedSpace int64
10683 // serverArray contains the serverProperties which describe the servers in the network
@@ -139,7 +116,7 @@ func GetAdminInfo(ctx context.Context, client MinioAdmin) (*UsageInfo, error) {
139116 }
140117
141118 backendData := & models.BackendProperties {
142- BackendType : backendType ,
119+ BackendType : string ( backendType ) ,
143120 RrSCParity : int64 (rrSCParity ),
144121 StandardSCParity : int64 (standardSCParity ),
145122 OnlineDrives : int64 (onlineDrives ),
0 commit comments