コード例 #1
0
ファイル: stat_dhcp_dmz.py プロジェクト: poyhsiao/lzweb
	def statDhcpHandler(self, **kwargs):
		self.msg = []
		refresh_time = kwargs['time']
		stat_dhcp_dmz_jcfg = xte_stat_dhcp_dmz.get()
		tmp = controller.lookup.get_template("stat_dhcp.mako")
		if stat_dhcp_dmz_jcfg[0]: 
			return tmp.render(stat_dhcp_args = stat_dhcp_dmz_jcfg[1],
				dhcp_caption = self.caption,
				time = refresh_time,
				msg_list = self.msg)
		else:
			self.addMsg(str(stat_dhcp_dmz_jcfg[1]))
			return tmp.render(stat_dhcp_args = {},
				dhcp_caption = self.caption,
				time = refresh_time,
				msg_list = self.msg)
コード例 #2
0
ファイル: stat_dhcp_dmz.py プロジェクト: poyhsiao/lzweb
	def index(self):
		try:
			stat_dhcp_dmz_jcfg = xte_stat_dhcp_dmz.get()
			tmp = controller.lookup.get_template("stat_dhcp.mako")
			if stat_dhcp_dmz_jcfg[0]: 
				return tmp.render(stat_dhcp_args = stat_dhcp_dmz_jcfg[1],
					dhcp_caption = self.caption,
					time = "0",
					msg_list = self.msg)
			else:
				self.addMsg(str(stat_dhcp_dmz_jcfg[1]))
				return tmp.render(stat_dhcp_args = {},
					dhcp_caption = self.caption,
					time = "0",
					msg_list = self.msg)
		except:
			exceptions.html_error_template().render()