Skip to content
Snippets Groups Projects
Unverified Commit 395f7fc2 authored by Maciej Krüger's avatar Maciej Krüger
Browse files

gluon-web-admin: use info module

parent 1b40cadc
No related branches found
No related tags found
No related merge requests found
<%-
local uci = require('simple-uci').cursor()
local pretty_hostname = require 'pretty_hostname'
local info = require 'gluon.info'
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
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 },
}
local values = info.get_info_pretty(translate)
-%>
<h2><%:Information%></h2>
<% for _, v in ipairs(values) do %>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment