Revision c81b97f2 src/Ganeti/Query/Node.hs

b/src/Ganeti/Query/Node.hs
42 42
import Ganeti.Query.Language
43 43
import Ganeti.Query.Common
44 44
import Ganeti.Query.Types
45
import Ganeti.Utils (niceSort)
45 46

  
46 47
-- | Runtime is the resulting type for NodeInfo call.
47 48
type Runtime = Either RpcError RpcResultNodeInfo
......
182 183
     QffNormal)
183 184
  , (FieldDefinition "pinst_list" "PriInstances" QFTOther
184 185
       "List of instances with this node as primary",
185
     FieldConfig (\cfg -> rsNormal . map instName . fst .
186
     FieldConfig (\cfg -> rsNormal . niceSort . map instName . fst .
186 187
                          getNodeInstances cfg . nodeName), QffNormal)
187 188
  , (FieldDefinition "sinst_list" "SecInstances" QFTOther
188 189
       "List of instances with this node as secondary",
189
     FieldConfig (\cfg -> rsNormal . map instName . snd .
190
     FieldConfig (\cfg -> rsNormal . niceSort . map instName . snd .
190 191
                          getNodeInstances cfg . nodeName), QffNormal)
191 192
  , (FieldDefinition "role" "Role" QFTText nodeRoleDoc,
192 193
     FieldConfig ((rsNormal .) . getNodeRole), QffNormal)

Also available in: Unified diff