def get_service_journal_page(service):
if service in config.sections():
if get_service_action(service, 'status')['status'] == 'not-found':
abort(400,'Sorry, but service \'{}\' unit not found in system.'.format(config.get(service, 'title')))
journal_lines = get_service_journal(service, 100)
return template('journal', hostname=gethostname(), service=config.get(service, 'title'), journal=journal_lines['journal'])
else:
abort(400, 'Sorry, but \'{}\' is not defined in config.'.format(service))
# Serve static content
评论列表
文章目录