<%-
	local uci = require('simple-uci').cursor()
	local pretty_hostname = require 'pretty_hostname'

	local site = require 'gluon.site'
	local sysconfig = require 'gluon.sysconfig'
	local platform = require 'gluon.platform'
	local util = require "gluon.util"
	local has_vpn, vpn = pcall(require, 'gluon.mesh-vpn')

	local _ = translate


	local pubkey
	if has_vpn and vpn.enabled() then
		local _, active_vpn = vpn.get_active_provider()

		if active_vpn ~= nil then
			pubkey = active_vpn.public_key()
		end

		if pubkey == '' then
			pubkey = nil
		end
	end

	local values = {
		{ _('Hostname'), pretty_hostname.get(uci) },
		{ _('MAC address'), sysconfig.primary_mac },
		{ _('Hardware model'), platform.get_model() },
		{ _('Gluon version') .. " / " .. _('Site version'), util.trim(util.readfile('/lib/gluon/gluon-version')) 
			.. " / " .. util.trim(util.readfile('/lib/gluon/site-version')) },
		{ _('Firmware release'), util.trim(util.readfile('/lib/gluon/release')) },
		{ _('Site'), site.site_name() },
		{ _('Public VPN key'), pubkey },
	}
-%>
<h2><%:Information%></h2>
<% for _, v in ipairs(values) do %>
<div class="gluon-value">
	<div class="gluon-value-title"><%|v[1]%></div><div class="gluon-value-field-text"><%|v[2] or 'n/a'%></div>
</div>
<% end %>
