Add versioning information to Freifunk status
authorSteven Barth <steven@midlink.org>
Mon, 26 Jan 2009 10:21:20 +0000 (10:21 +0000)
committerSteven Barth <steven@midlink.org>
Mon, 26 Jan 2009 10:21:20 +0000 (10:21 +0000)
modules/freifunk/luasrc/controller/freifunk/freifunk.lua

index 847083b..e30cdb1 100644 (file)
@@ -128,6 +128,7 @@ function jsonstatus()
        local http = require "luci.http"
        local json = require "luci.json"
        local ltn12 = require "luci.ltn12"
+       local version = require "luci.version"
        local webadmin = require "luci.tools.webadmin"
 
        local cursor = uci.cursor_state()
@@ -146,7 +147,12 @@ function jsonstatus()
                hostname = sys.hostname()
        }
 
-       root.brand = cursor:get_all("luci", "brand")
+       root.firmware = {
+               luciname=version.luciname,
+               luciversion=version.luciversion,
+               distname=version.distname,
+               distversion=version.distversion
+       }
 
        root.freifunk = {}
        cursor:foreach("freifunk", "public", function(s)