Add support for "archived" flag in Tempmon Client views

This commit is contained in:
Lance Edgar 2018-09-28 12:22:43 -05:00
parent c1f05bf014
commit 66807a801b

View file

@ -55,6 +55,7 @@ class TempmonClientView(MasterView):
'delay', 'delay',
'enabled', 'enabled',
'online', 'online',
'archived',
] ]
form_fields = [ form_fields = [
@ -65,25 +66,31 @@ class TempmonClientView(MasterView):
'probes', 'probes',
'enabled', 'enabled',
'online', 'online',
'archived',
] ]
def configure_grid(self, g): def configure_grid(self, g):
super(TempmonClientView, self).configure_grid(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_active = True
g.filters['hostname'].default_verb = 'contains' g.filters['hostname'].default_verb = 'contains'
g.set_link('hostname')
# location
g.filters['location'].default_active = True g.filters['location'].default_active = True
g.filters['location'].default_verb = 'contains' 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') g.set_link('location')
# archived
g.filters['archived'].default_active = True
g.filters['archived'].default_verb = 'is_false'
def configure_form(self, f): def configure_form(self, f):
super(TempmonClientView, self).configure_form(f) super(TempmonClientView, self).configure_form(f)