Пример #1
0
 def display(self):
     html.begin_checkbox_group()
     for state, state_name in sorted(defines.interface_oper_states().items()):
         if state >= 8:
             continue # skip artificial state 8 (degraded) and 9 (admin down)
         varname = self.name + "_" + str(state)
         html.checkbox(varname, True, label=state_name)
         if state in (4, 7):
             html.write("<br>")
     html.end_checkbox_group()
Пример #2
0
 def __init__(self, infoname, name, title):
     varname = infoname + "_" + name
     varnames = [
         varname + "_" + str(x) for x in defines.interface_oper_states()
     ]
     Filter.__init__(self, varname, title, infoname, varnames, [])
Пример #3
0
 def __init__(self, infoname, name, title):
     varname = infoname + "_" + name
     varnames = [ varname + "_" + str(x) for x in defines.interface_oper_states() ]
     Filter.__init__(self, varname, title, infoname, varnames, [])