mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-11-30 02:38:17 +08:00
[REV] fix log show failure bug
This commit is contained in:
parent
0cb9af2c3d
commit
fea6c5babb
@ -61,7 +61,7 @@ func (n *node) Get(node string) (*client.HostNode, *util.APIHandleError) {
|
||||
return nil, util.CreateAPIHandleError(code, err)
|
||||
}
|
||||
if code != 200 {
|
||||
return nil, util.CreateAPIHandleError(code, fmt.Errorf("Get database center configs code %d", code))
|
||||
return nil, util.CreateAPIHandleError(code, fmt.Errorf("Get node detail code %d", code))
|
||||
}
|
||||
return &gc, nil
|
||||
}
|
||||
@ -75,7 +75,7 @@ func (n *node) GetNodeResource(node string) (*client.NodePodResource, *util.APIH
|
||||
return nil, util.CreateAPIHandleError(code, err)
|
||||
}
|
||||
if code != 200 {
|
||||
return nil, util.CreateAPIHandleError(code, fmt.Errorf("Get database center configs code %d", code))
|
||||
return nil, util.CreateAPIHandleError(code, fmt.Errorf("Get node resource code %d", code))
|
||||
}
|
||||
return &gc, nil
|
||||
}
|
||||
@ -89,7 +89,7 @@ func (n *node) GetNodeByRule(rule string) ([]*client.HostNode, *util.APIHandleEr
|
||||
return nil, util.CreateAPIHandleError(code, err)
|
||||
}
|
||||
if code != 200 {
|
||||
return nil, util.CreateAPIHandleError(code, fmt.Errorf("Get database center configs code %d", code))
|
||||
return nil, util.CreateAPIHandleError(code, fmt.Errorf("Get node rule code %d", code))
|
||||
}
|
||||
return gc, nil
|
||||
}
|
||||
@ -102,7 +102,7 @@ func (n *node) List() ([]*client.HostNode, *util.APIHandleError) {
|
||||
return nil, util.CreateAPIHandleError(code, err)
|
||||
}
|
||||
if code != 200 {
|
||||
return nil, util.CreateAPIHandleError(code, fmt.Errorf("Get database center configs code %d", code))
|
||||
return nil, util.CreateAPIHandleError(code, fmt.Errorf("Get node list code %d", code))
|
||||
}
|
||||
return gc, nil
|
||||
}
|
||||
@ -116,7 +116,7 @@ func (n *node) GetAllNodeHealth() (map[string][]map[string]string, *util.APIHand
|
||||
return nil, util.CreateAPIHandleError(code, err)
|
||||
}
|
||||
if code != 200 {
|
||||
return nil, util.CreateAPIHandleError(code, fmt.Errorf("Get database center configs code %d", code))
|
||||
return nil, util.CreateAPIHandleError(code, fmt.Errorf("Get node health code %d", code))
|
||||
}
|
||||
return gc, nil
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ func (s *services) Pods() ([]*podInfo, *util.APIHandleError) {
|
||||
return nil, util.CreateAPIHandleError(code, err)
|
||||
}
|
||||
if code != 200 {
|
||||
return nil, util.CreateAPIHandleError(code, fmt.Errorf("Get database center configs code %d", code))
|
||||
return nil, util.CreateAPIHandleError(code, fmt.Errorf("Get pods code %d", code))
|
||||
}
|
||||
return gc, nil
|
||||
}
|
||||
@ -82,7 +82,7 @@ func (s *services) EventLog(eventID, level string) ([]*model.MessageData, *util.
|
||||
return nil, util.CreateAPIHandleError(code, err)
|
||||
}
|
||||
if code != 200 {
|
||||
return nil, util.CreateAPIHandleError(code, fmt.Errorf("Get database center configs code %d", code))
|
||||
return nil, util.CreateAPIHandleError(code, fmt.Errorf("Get event log code %d", code))
|
||||
}
|
||||
return message, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user