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
104c92df
Commit
104c92df
authored
10 years ago
by
Matthias Schiffer
Browse files
Options
Downloads
Patches
Plain Diff
gluon-status-page: remove workaround for now fixed LuCi bug
parent
14553d42
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-status-page/files/lib/gluon/status-page/www/cgi-bin/status
+3
-16
3 additions, 16 deletions
...tatus-page/files/lib/gluon/status-page/www/cgi-bin/status
with
3 additions
and
16 deletions
package/gluon-status-page/files/lib/gluon/status-page/www/cgi-bin/status
+
3
−
16
View file @
104c92df
...
@@ -76,26 +76,13 @@ for _, ifname in ipairs(interfaces) do
...
@@ -76,26 +76,13 @@ for _, ifname in ipairs(interfaces) do
io.write("
</pre>
")
io.write("
</pre>
")
end
end
local
err
, fastd_status = pcall(
local
stat
, fastd_status = pcall(
function()
function()
local fastd_sock = nixio.socket('unix', 'stream')
local fastd_sock = nixio.socket('unix', 'stream')
assert(fastd_sock:connect('/var/run/fastd.mesh_vpn.socket'))
assert(fastd_sock:connect('/var/run/fastd.mesh_vpn.socket'))
-- Stop as soon as we see an empty chunk
local function guard_source(src)
return function()
local chunk, err = src()
if not chunk then return nil, err end
if chunk:len() == 0 then return nil end
return chunk
end
end
source = guard_source(ltn12.source.file(fastd_sock))
decoder = json.Decoder()
decoder = json.Decoder()
ltn12.pump.all(source, decoder:sink())
ltn12.pump.all(ltn12.source.file(fastd_sock), decoder:sink())
fastd_sock:close()
return decoder:get()
return decoder:get()
end
end
)
)
...
@@ -103,7 +90,7 @@ local err, fastd_status = pcall(
...
@@ -103,7 +90,7 @@ local err, fastd_status = pcall(
io.write("
<h2>
VPN status
</h2>
")
io.write("
<h2>
VPN status
</h2>
")
io.write("
<pre>
")
io.write("
<pre>
")
if
fastd_
stat
us
then
if stat then
io.write(string.format("fastd running for %.3f seconds\n", fastd_status.uptime/1000))
io.write(string.format("fastd running for %.3f seconds\n", fastd_status.uptime/1000))
local peers = 0
local peers = 0
...
...
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