Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into onelab
[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     def __init__ (self, init_key=None,datatables_options={}, **settings):
10         Plugin.__init__ (self, **settings)
11         self.columns = list (['switch dpid','port no<->peer dpid/port no.','selected'])
12         self.init_key=init_key
13         self.datatables_options=datatables_options
14
15     def template_file (self):
16         return "univbrisfv.html"
17
18     def template_env (self, request):
19         env={}
20         env.update(self.__dict__)
21         env['columns']=self.columns
22         return env
23
24     def requirements (self):
25         reqs = {
26             'js_files' : [ "js/spin-presets.js", "js/spin.min.js", "js/jquery.spin.js", 
27                            "js/dataTables.js", "js/dataTables.bootstrap.js", "js/with-datatables.js",
28                            "js/manifold.js", "js/manifold-query.js", 
29                            "js/unfold-helper.js",
30                            "js/univbrisfv.js", 
31                            ] ,
32             'css_files': [ "css/dataTables.bootstrap.css",
33                            "css/dataTables.full_numbers.css",
34                            "css/univbrisfv.css" , 
35                            ],}
36         return reqs
37
38     # the list of things passed to the js plugin
39     def json_settings_list (self):
40         return ['plugin_uuid', 'domid', 'datatables_options', 'init_key',]