[REV] optimize node ready column

This commit is contained in:
Bay 2017-12-27 14:15:40 +08:00
parent 8a5e0e1549
commit 77a80c1602

View File

@ -171,14 +171,14 @@ func NewCmdNode() cli.Command {
serviceTable.AddHeaders("Uid", "IP", "HostName", "NodeRole", "NodeMode", "Alived", "Schedulable", "Ready")
var rest []*model.HostNode
for _, v := range list {
var ready bool = false
if v.NodeStatus != nil {
ready = true
var ready bool=false
if isNodeReady(v){
ready=true
}
if v.Role.HasRule("manage") {
handleStatus(serviceTable, ready, v)
} else {
rest = append(rest, v)
handleStatus(serviceTable,ready,v)
}else{
rest=append(rest,v)
}
}
if len(rest) > 0 {