node.py
Go to the documentation of this file.
1 #! /usr/bin/env python
2 
3 """
4 usage: %(progname)s [args]
5 """
6 
7 import nstart
8 
9 import os, sys, string, time, getopt, re
10 from pyclearsilver.log import *
11 
12 import neo_cgi, neo_util, neo_cs
13 
14 from pyclearsilver import CSPage
15 from pyclearsilver import odb
16 
17 import MBPage
18 import db_webui
19 
20 import roslib
21 import roslib.scriptutil
22 
23 import webutil
24 import nodeutil
25 
26 
27 
29  def setup(self, hdf):
30  pass
31 
32  def display(self, hdf):
33  node = hdf.getValue("Query.node", "")
34  hdf.setValue("CGI.cur.node", node)
35  webutil.set_tabs(hdf, ["status", "nodes"])
36  webutil.grabTopics(hdf, ["/topics"])
37 
38  node_data = nodeutil.node_info(node)
39 
40  webutil.hdf_array(hdf, sorted(node_data["subscriptions"]), "CGI.cur.subscriptions")
41  webutil.hdf_array(hdf, sorted(node_data["publications"]), "CGI.cur.publications")
42  webutil.hdf_array(hdf, sorted(node_data["services"]), "CGI.cur.services")
43 
44  if "error" in node_data:
45  hdf.setValue("CGI.cur.error", node_data["error"])
46 
47 def run(context):
48  return MyPage(context, pagename="node", nologin=False)
49 
50 def main():
51  context = CSPage.Context()
52  run(context).start()
53 
54 if __name__ == "__main__":
55  main()
def run(context)
Definition: node.py:47


webui
Author(s): Scott Hassan
autogenerated on Mon Jun 10 2019 15:51:24