mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-02 00:40:10 +00:00
Add preference to select the timeseries database to use
This commit is contained in:
parent
44abcd442c
commit
af1fc50ce6
13 changed files with 74 additions and 64 deletions
|
|
@ -1179,6 +1179,27 @@ function printStatsTimeseries()
|
|||
print('<table class="table">')
|
||||
print('<tr><th colspan=2 class="info">'..i18n("prefs.databases")..'</th></tr>')
|
||||
|
||||
local elementToSwitch = {"ts_post_data_url"}
|
||||
local showElementArray = {false, true}
|
||||
|
||||
multipleTableButtonPrefs(subpage_active.entries["multiple_timeseries_database"].title,
|
||||
subpage_active.entries["multiple_timeseries_database"].description,
|
||||
{"RRD", "InfluxDB"}, {"rrd", "influxdb"},
|
||||
"rrd",
|
||||
"primary",
|
||||
"timeseries_driver",
|
||||
"ntopng.prefs.timeseries_driver", nil,
|
||||
elementToSwitch, showElementArray, nil, true--[[show]])
|
||||
|
||||
local active_driver = ntop.getPref("ntopng.prefs.timeseries_driver")
|
||||
|
||||
prefsInputFieldPrefs(subpage_active.entries["influxdb_url"].title,
|
||||
subpage_active.entries["influxdb_url"].description,
|
||||
"ntopng.prefs.",
|
||||
"ts_post_data_url",
|
||||
"",
|
||||
false, active_driver == "influxdb", nil, nil, {attributes={spellcheck="false"}, pattern=getURLPattern(), required=true})
|
||||
|
||||
mysql_retention = 7
|
||||
prefsInputFieldPrefs(subpage_active.entries["mysql_retention"].title, subpage_active.entries["mysql_retention"].description .. "-F mysql;<host|socket>;<dbname>;<table name>;<user>;<pw>.",
|
||||
"ntopng.prefs.", "mysql_retention", mysql_retention, "number", not subpage_active.entries["mysql_retention"].hidden, nil, nil, {min=1, max=365*5, --[[ TODO check min/max ]]})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue