luci-app-statistics: allow host name for data push
authorFlorian Eckert <fe@dev.tdt.de>
Wed, 16 Dec 2020 14:53:08 +0000 (15:53 +0100)
committerFlorian Eckert <fe@dev.tdt.de>
Wed, 16 Dec 2020 14:55:39 +0000 (15:55 +0100)
Up do now only an ip address was a allowd.

Fixes: #4288
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/plugins/network.js

index 2429b8ac77572628d861fbc771b1090cceab7cdc..b184335f18eacfffa351ff6963c8c29be97f9663 100644 (file)
@@ -57,7 +57,7 @@ return baseclass.extend({
 
                o = ss.option(form.Value, 'host', _('Server host'));
                o.default = '0.0.0.0';
-               o.datatype = 'ipaddr("nomask")';
+               o.datatype = 'or(hostname,ipaddr("nomask"))';
 
                o = ss.option(form.Value, 'port', _('Server port'));
                o.default = '25826';