% # Note that this file is not a valid *.html file! # It is intended to be a bottlepy - style template # used for the scripting part of TheOnionBox! # from tob_template_tools import * import psutil cpu_count = psutil.cpu_count() host = get('host') %> {{!header_row('Host', 'General Information', 'host')}} {{!standard_row('Name', host['name'])}} {{!standard_row('OS', "{} {} (Version: {})".format(host['system'], host['release'], host['version']))}} {{!standard_row('System', "{} {}".format(host['processor'], host['machine']))}} % if host['up']: {{!standard_row('Latest Reboot', host['up'])}} % end {{!standard_row('# of CPU Cores', cpu_count)}}