本文整理汇总了Python中service.Service.getMessage方法的典型用法代码示例。如果您正苦于以下问题:Python Service.getMessage方法的具体用法?Python Service.getMessage怎么用?Python Service.getMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类service.Service
的用法示例。
在下文中一共展示了Service.getMessage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: print
# 需要导入模块: from service import Service [as 别名]
# 或者: from service.Service import getMessage [as 别名]
print("<td style='border: 0;'><select name='lang' onchange='langSelect()'>")
loc.renderOptions()
print("</select></td>")
print("</tr></table>")
print("</div>")
print("<div id='outer'>")
print("<div id='container'>")
if message:
print message
# service
#msg = ""
msg = service.getMessage()
if not config.isLoaded():
msg = loc.str('need_service_reload_message')
renderService(service, loc, msg)
if service.state == "running":
# running contents:
# frontedns
for sec in config.data.sections:
if sec.name == "frontend":
stat = stats[sec.attributes[0] + "/FRONTEND"]
print("<table class='nomargin'><tr><td width=200 class='nobottom'>")
print("<h3>" + loc.str('frontend') + " : ")
for a in sec.attributes:
示例2: print
# 需要导入模块: from service import Service [as 别名]
# 或者: from service.Service import getMessage [as 别名]
print("</tr></table>")
print("</div>")
### contents #####
print("<div id='outer'>")
print("<div id='container'>")
if message:
print message
# service
renderService(service, loc, "")
if service.state == "running":
stats = IptablesStats(req['host'], service.getMessage())
#print(stats.getMessage() + "<br>")
# interfaces:
print("Interfaces")
print("<table>")
for iface in stats.interfaces:
print("<tr><td>" + iface.name + "</td><td>" + iface.subnet + "/" + str(iface.mask) + "</td><tr>")
print("<script language='javascript'>addInterface('" + iface.name + "');</script>")
print("</table>")
# rules (FORWARD):
print("FORWARD chain : policy " + stats.forward_chain.policy)
print("<table>")
print("<tr>")