Ejemplo n.º 1
0
	def get(self, dashboard_name, widget_name, action):
		d = Dashboard.from_yaml(dashboard_name)
		widget = d.get_widget(widget_name)
		result = ""
		if action == "config":
			result = widget.generate_config()
		elif action == "data":
			result = widget.get_data()
		self.response.headers['Content-type'] = "application/json"
		self.response.write(result)
Ejemplo n.º 2
0
	def get(self, dashboard_name):
		t = Dashboard.from_yaml(dashboard_name).generate_template()

		template = env.from_string(t)
		self.response.write(template.render())