Add support for "archived" flag in Tempmon Client views
This commit is contained in:
parent
c1f05bf014
commit
66807a801b
|
@ -55,6 +55,7 @@ class TempmonClientView(MasterView):
|
|||
'delay',
|
||||
'enabled',
|
||||
'online',
|
||||
'archived',
|
||||
]
|
||||
|
||||
form_fields = [
|
||||
|
@ -65,25 +66,31 @@ class TempmonClientView(MasterView):
|
|||
'probes',
|
||||
'enabled',
|
||||
'online',
|
||||
'archived',
|
||||
]
|
||||
|
||||
def configure_grid(self, g):
|
||||
super(TempmonClientView, self).configure_grid(g)
|
||||
|
||||
# config_key
|
||||
g.set_label('config_key', "Key")
|
||||
g.set_sort_defaults('config_key')
|
||||
g.set_link('config_key')
|
||||
|
||||
# hostname
|
||||
g.filters['hostname'].default_active = True
|
||||
g.filters['hostname'].default_verb = 'contains'
|
||||
g.set_link('hostname')
|
||||
|
||||
# location
|
||||
g.filters['location'].default_active = True
|
||||
g.filters['location'].default_verb = 'contains'
|
||||
g.set_sort_defaults('config_key')
|
||||
|
||||
g.set_type('enabled', 'boolean')
|
||||
g.set_type('online', 'boolean')
|
||||
|
||||
g.set_label('config_key', "Key")
|
||||
|
||||
g.set_link('config_key')
|
||||
g.set_link('hostname')
|
||||
g.set_link('location')
|
||||
|
||||
# archived
|
||||
g.filters['archived'].default_active = True
|
||||
g.filters['archived'].default_verb = 'is_false'
|
||||
|
||||
def configure_form(self, f):
|
||||
super(TempmonClientView, self).configure_form(f)
|
||||
|
||||
|
|
Loading…
Reference in a new issue