You need to sign in or sign up before continuing.
提交 3a38a83d 编写于 作者: J jeff

component status

上级 1b15e5e7
......@@ -64,10 +64,12 @@ func GetComponentStatus(namespace string, componentName string) (interface{}, er
return nil, err
} else {
for _, v := range pods.Items {
component.TotalBackends++
component.HealthyBackends++
for _, c := range v.Status.ContainerStatuses {
component.TotalBackends++
if c.Ready {
component.HealthyBackends++
if !c.Ready {
component.HealthyBackends--
break
}
}
}
......@@ -118,10 +120,12 @@ func GetAllComponentsStatus() (map[string]interface{}, error) {
continue
} else {
for _, v := range pods.Items {
component.TotalBackends++
component.HealthyBackends++
for _, c := range v.Status.ContainerStatuses {
component.TotalBackends++
if c.Ready {
component.HealthyBackends++
if !c.Ready {
component.HealthyBackends--
break
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册