def render(self):
view = View('none')
box = BoxElement(title='widget.info.header', icon='server', padding=False)
table = TableElement(
content=[
('widget.info.os', '%s %s (%s)' % (platform.system(), platform.release(), platform.architecture()[0])),
('widget.info.hostname', platform.node()),
('widget.info.ipaddress', prism.settings.PRISM_CONFIG['host']),
('widget.info.uptime', self.get_uptime())
]
)
box.add(table)
view.add(box)
return view
评论列表
文章目录