luci-app-lxc: code cleanup
authorPetar Koretic <petar.koretic@sartura.hr>
Thu, 30 Oct 2014 16:04:27 +0000 (17:04 +0100)
committerLuka Perkov <luka@openwrt.org>
Fri, 31 Oct 2014 00:50:39 +0000 (20:50 -0400)
commit8467d0ea3f7ae2280c95b094391d831971407e5d
treea933d7876e63ab2e3bab0037696de137d98041c4
parentf8f7c74f0c66d5b926b63154c755db34ab75769d
luci-app-lxc: code cleanup

Number of suggested rewrites:
* use lua ubus bindings instead of os.execute
* combine multiple actions to use same handler 'lxc_action' and pass
actions as arguments to consolidate code
* read openwrt version from lua directly
* start using String.prototype.format for string formatting

Also, drop 'rename' and 'clone' until they are fully functional on all
platforms.

Thanks Jo-Philipp for suggestions on how to improve the code.

Signed-off-by: Petar Koretic <petar.koretic@sartura.hr>
utils/luci-app-lxc/files/controller/lxc.lua
utils/luci-app-lxc/files/view/lxc.htm