<%# LuCI - Lua Configuration Interface Copyright 2008 Steven Barth Copyright 2008 Jo-Philipp Wich Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 $Id$ -%> <%- local opkg = require "luci.model.ipkg" local fs = require "nixio.fs" local fstat = fs.statvfs(opkg.overlay_root()) local wa = require "luci.tools.webadmin" local space_total = fstat and fstat.blocks or 0 local space_free = fstat and fstat.bfree or 0 local space_used = space_total - space_free local used_perc = math.floor(0.5 + ((space_total > 0) and ((100 / space_total) * space_used) or 100)) local free_byte = space_free * fstat.frsize -%>

<%:Hello!%>

<%:Free space%>: <%=(100-used_perc)%>% (<%=wa.byte_format(free_byte)%>)
 

<%- if free_byte > 140000 then -%>

<%:Install LUCI-MOD-ADMIN-FULL%>

<%- end -%>

<%_This is the administration area of LuCI.%>

<%_LuCI is a free, flexible, and user friendly graphical interface for configuring OpenWrt.%>
<%:On the following pages you can adjust all important settings of this device.%>

<%:As we always want to improve this interface we are looking forward to your feedback and suggestions.%>

<%:And now have fun with your OpenWrt device!%>

<%_The LuCI Team%>