73cd5520d85af3b9cb26fe86e5f7137a6cb04eb4
[myslice.git] / plugins / univbrisfv / __init__1.py
1 from unfold.plugin import Plugin
2
3 class UnivbrisFv (Plugin):
4     """
5     ////////////////////////////////////////
6     modified querytable for univbris foam
7     ///////////////////////////////////////
8     """
9
10     def __init__ (self, init_key=None,datatables_options={}, **settings):
11         Plugin.__init__ (self, **settings)
12         self.columns = list (['switch dpid','port no<->peer dpid/port no.','selected'])
13         self.init_key=init_key
14         self.datatables_options=datatables_options
15
16     def template_file (self):
17         return "univbrisfv.html"
18
19     def template_env (self, request):
20         env={}
21         env.update(self.__dict__)
22         env['columns']=self.columns
23         return env
24
25     def requirements (self):
26         reqs = {
27             'js_files' : [ "js/spin-presets.js", "js/spin.min.js", "js/jquery.spin.js", 
28                            "js/dataTables.js", "js/dataTables.bootstrap.js", "js/with-datatables.js",
29                            "js/manifold.js", "js/manifold-query.js", 
30                            "js/unfold-helper.js",
31                            "js/univbrisfv.js", 
32                            ] ,
33             'css_files': [ "css/dataTables.bootstrap.css",
34                            "css/dataTables.full_numbers.css",
35                            "css/univbrisfv.css" , 
36                            ],}
37         return reqs
38
39     # the list of things passed to the js plugin
40     def json_settings_list (self):
41         return ['plugin_uuid', 'domid', 'datatables_options', 'init_key',]