Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFS Gluon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
firmware
FFS Gluon
Commits
fda2d10b
Unverified
Commit
fda2d10b
authored
7 years ago
by
Matthias Schiffer
Browse files
Options
Downloads
Patches
Plain Diff
gluon-web-admin: simplify info.html template
parent
13b32535
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
package/gluon-web-admin/files/lib/gluon/web/view/admin/info.html
+17
-24
17 additions, 24 deletions
.../gluon-web-admin/files/lib/gluon/web/view/admin/info.html
with
17 additions
and
24 deletions
package/gluon-web-admin/files/lib/gluon/web/view/admin/info.html
+
17
−
24
View file @
fda2d10b
...
...
@@ -9,38 +9,31 @@
local
platform =
require
'
gluon.platform
'
local
util =
require
"
gluon.util
"
local
_ =
translate
local
keys =
{
hostname =
translate('Hostname'),
primary_mac =
translate('MAC
address
'),
model =
translate('Hardware
model
'),
version =
translate('Gluon
version
'),
release =
translate('Firmware
release
'),
site =
translate('Site'),
pubkey =
translate('Public
VPN
key
'),
}
local
values =
{
hostname =
pretty_hostname.get(uci),
primary_mac =
sysconfig.primary_mac,
model =
platform.get_model(),
version =
util.trim(fs.readfile('/lib/gluon/gluon-version')),
release =
util.trim(fs.readfile('/lib/gluon/release')),
site =
site.site_name(),
pubkey =
'n/a'
,
}
local
pubkey
local
meshvpn_enabled =
uci:get_bool("fastd",
"
mesh_vpn
",
"
enabled
")
if
meshvpn_enabled
then
local
pubkey =
util.trim(lutil.exec('/etc/init.d/fastd
show_key
mesh_vpn
'))
if
pubkey
~
=
''
then
values.
pubkey =
pubkey
pubkey =
util.trim(lutil.exec('/etc/init.d/fastd
show_key
mesh_vpn
'))
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
'),
util.trim
(
fs.readfile
('/
lib
/
gluon
/
gluon-version
'))
},
{
_
('
Firmware
release
'),
util.trim
(
fs.readfile
('/
lib
/
gluon
/
release
'))
},
{
_
('
Site
'),
site.site_name
()
},
{
_
('
Public
VPN
key
'),
pubkey
},
}
-
%
>
<h2><
%
:Information
%
></h2>
<
%
for
_
,
key
in
ipairs
(
{'
hostname
',
'
primary_mac
',
'
model
',
'
version
',
'
release
',
'
site
',
'
pubkey
'}
)
do
%
>
<
%
for
_
,
v
in
ipairs
(
values
)
do
%
>
<div
class=
"gluon-value"
>
<div
class=
"gluon-value-title"
><
%=
keys
[
key
]%
></div><div
class=
"gluon-value-field"
><
%=
pcdata
(
v
alues
[
key
]
or
'
n
/
a
')%
></div>
<div
class=
"gluon-value-title"
><
%=
v
[1
]%
></div><div
class=
"gluon-value-field"
><
%=
pcdata
(
v
[2
]
or
'
n
/
a
')%
></div>
</div>
<
%
end
%
>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment