luci-app-openvpn: add ovpn upload support & more 2235/head
authorDirk Brenken <dev@brenken.org>
Sat, 20 Oct 2018 19:22:49 +0000 (21:22 +0200)
committerDirk Brenken <dev@brenken.org>
Tue, 23 Oct 2018 19:17:22 +0000 (21:17 +0200)
commit0b04912f8d495ea836d565f3536b59d030225cfa
tree143498433847d1e42e59dcc66652fbef2a3a4bbb
parenta0cc0769d8faf38172312a376d33aec241c19126
luci-app-openvpn: add ovpn upload support & more

* add the ability to upload ovpn files directly,
  incl. appropriate uci entry in openvpn config
* add the ability to edit ovpn files directly ('file' mode),
  beside the 'basic' and 'advanced' modes for normal setups
* client side checks to validate instance name & template selection,
  incl. online error reporting
* automatically remove non-ascii characters & windows line endings
  from transfered ovpn file
* change from after_commit to after_apply hook
* remove misleading default values for Port & Protocol in Overview

Signed-off-by: Dirk Brenken <dev@brenken.org>
applications/luci-app-openvpn/luasrc/controller/openvpn.lua
applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua
applications/luci-app-openvpn/luasrc/model/cbi/openvpn-file.lua [new file with mode: 0644]
applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua
applications/luci-app-openvpn/luasrc/view/openvpn/cbi-select-input-add.htm
applications/luci-app-openvpn/luasrc/view/openvpn/ovpn_css.htm [new file with mode: 0644]
applications/luci-app-openvpn/luasrc/view/openvpn/pageswitch.htm