4 usage: %(progname)s [args] 9 import os, sys, string, time, getopt, re
12 import neo_cgi, neo_util, neo_cs
14 from pyclearsilver
import CSPage
15 from pyclearsilver
import odb
21 import roslib.scriptutil
25 from roslib.names
import ns_join, get_ros_namespace, make_caller_id, make_global_ns, GLOBALNS
29 return make_caller_id(
'rosparam-%s'%os.getpid())
33 self.
master = roslib.scriptutil.get_master()
36 webutil.grabTopics(hdf, [])
37 webutil.set_tabs(hdf, [
"status",
"params"])
40 self.
flatten(hdf, params, path=
"CGI.cur.params.")
43 for k,v
in params.items():
45 if type(v) == type({}):
46 self.
flatten(hdf, v, _path +
".")
48 hdf.setValue(_path, str(v)[:128])
52 key = hdf.getValue(
"Query.element_id",
"")
53 value = hdf.getValue(
"Query.update_value",
"")
54 delete = hdf.getValue(
"Query.delete",
"")
55 hdf.setValue(
"CGI.result", hdf.getValue(
"Query.original_html",
"ERROR"))
60 hdf.setValue(
"CGI.result",
"OK")
62 hdf.setValue(
"CGI.result",
"")
63 elif key !=
"" and value !=
"":
66 hdf.setValue(
"CGI.result", value)
68 hdf.setValue(
"Content",
"ajax_result.cs")
71 key = hdf.getValue(
"Query.key",
"")
72 value = hdf.getValue(
"Query.value",
"")
74 if key !=
"" and value !=
"":
77 hdf.setValue(
"CGI.result", value)
82 return MyPage(context, pagename=
"params", nologin=
False)
85 context = CSPage.Context()
88 if __name__ ==
"__main__":
def redirectUri(self, redirectTo)
def Action_Edit(self, hdf)
def Action_New(self, hdf)
def flatten(self, hdf, params, path="")