Exemplo n.º 1
0
    def children_nodes(self):
        children = CompositeNode.children_nodes(self)

        stats = get_c_stat_names()

        # remove all nodes that do not have a stat
        nodeNameList = []
        for c in children:
            if c.name not in stats:
                c.prune()
            else:
                nodeNameList.append( c.name)
        
        # add all stats to node tree (unless already there)
        for stat in stats:
            if stat not in nodeNameList:
                n = CStatNode(stat)
                cd = { 'name'   : stat,
                       'parent' : self,
                       'log_on_change': -1,
                       'time_last_changed': ''}
                
                n.configure( cd)

        return CompositeNode.children_nodes(self)
Exemplo n.º 2
0
    def children_nodes(self):
        children = CompositeNode.children_nodes(self)

        stats = get_c_stat_names()

        # remove all nodes that do not have a stat
        nodeNameList = []
        for c in children:
            if c.name not in stats:
                c.prune()
            else:
                nodeNameList.append(c.name)

        # add all stats to node tree (unless already there)
        for stat in stats:
            if stat not in nodeNameList:
                n = CStatNode(stat)
                cd = {
                    'name': stat,
                    'parent': self,
                    'log_on_change': -1,
                    'time_last_changed': ''
                }

                n.configure(cd)

        return CompositeNode.children_nodes(self)
Exemplo n.º 3
0
 def children_nodes(self,**options):
     nodes = CompositeNode.children_nodes(self, **options)
     nodes.sort(lambda x,y: cmp(x.name, y.name))
     return nodes
Exemplo n.º 4
0
 def children_nodes(self, **options):
     nodes = CompositeNode.children_nodes(self, **options)
     nodes.sort(lambda x, y: cmp(x.name, y.name))
     return nodes
Exemplo n.º 5
0
 def children_nodes(self, **options):
     return self._alias_root.children_nodes(**options) + \
         CompositeNode.children_nodes(self, **options)
Exemplo n.º 6
0
 def children_nodes(self, **options):
     return self._alias_root.children_nodes(**options) + \
         CompositeNode.children_nodes(self, **options)