1 from engine.plugin import Plugin
3 class QuickFilter (Plugin) :
5 def __init__ (self, list=[], with_datatables=False, **settings):
6 Plugin.__init__ (self, **settings)
7 self.list=[{'key': 'Slice', 'values': ['slice1','slice2']}, \
8 {'key': 'Type', 'values': ['type1','type2']}, \
9 {'key': 'Network', 'values': ['net1','net2']}]
10 self.add_to_settings ('list')
11 self.with_datatables = with_datatables
12 self.add_to_settings ('with_datatables')
13 self.criterias = [{'key': 'Slice', 'values': ['slice1','slice2']}, \
14 {'key': 'Type', 'values': ['type1','type2']}, \
15 {'key': 'Network', 'values': ['net1','net2']}]
17 def title (self) : return "Title for Quick "
19 def template_file (self): return "quickfilter.html"
21 def requirements (self):
22 reqs = { 'js_files' : [ "js/quickfilter.js" ],
23 'css_files': [ "css/quickfilter.css" ],
25 if self.with_datatables:
26 reqs['js_files'].append ("datatables/js/dataTables.js")
27 reqs['js_files'].append ("js/with-datatables.js")
28 print self.classname(),reqs