mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
Add log preferences
This commit is contained in:
parent
311065e0ca
commit
2dc31415b5
3 changed files with 145 additions and 4 deletions
|
|
@ -37,6 +37,7 @@ on_disk_dbs_active = ""
|
|||
nbox_active = ""
|
||||
alerts_active = ""
|
||||
users_active = ""
|
||||
logging_active = ""
|
||||
|
||||
if (subpage_active == nil or subpage_active == "") then
|
||||
subpage_active = "report"
|
||||
|
|
@ -63,6 +64,9 @@ end
|
|||
if (subpage_active == "users") then
|
||||
users_active = "active"
|
||||
end
|
||||
if (subpage_active == "logging") then
|
||||
logging_active = "active"
|
||||
end
|
||||
|
||||
|
||||
-- ================================================================================
|
||||
|
|
@ -379,6 +383,21 @@ function printStatsRrds()
|
|||
</form> ]]
|
||||
end
|
||||
|
||||
-- ================================================================================
|
||||
function printLogging()
|
||||
print('<form>')
|
||||
print('<input type=hidden name="subpage_active" value="logging"/>\n')
|
||||
print('<table class="table">')
|
||||
print('<tr><th colspan=2 class="info">Logging</th></tr>')
|
||||
|
||||
loggingSelector("Logging level", "Choose the logging level.", "toggle_logging_level", "ntopng.prefs.logging_level")
|
||||
|
||||
print('<tr><th colspan=2 style="text-align:right;"><button type="submit" class="btn btn-primary" style="width:115px">Save</button></th></tr>')
|
||||
print('</table>')
|
||||
print [[<input id="csrf" name="csrf" type="hidden" value="]] print(ntop.getRandomCSRFValue()) print [[" />
|
||||
</form> ]]
|
||||
end
|
||||
|
||||
|
||||
print[[
|
||||
<table class="table table-bordered">
|
||||
|
|
@ -392,6 +411,7 @@ end
|
|||
<a href="]] print(ntop.getHttpPrefix()) print[[/lua/admin/prefs.lua?subpage_active=on_disk_dbs" class="list-group-item ]] print(on_disk_dbs_active) print[[">On-Disk Databases</a>
|
||||
<a href="]] print(ntop.getHttpPrefix()) print[[/lua/admin/prefs.lua?subpage_active=alerts" class="list-group-item ]] print(alerts_active) print[[">Alerts</a>
|
||||
<a href="]] print(ntop.getHttpPrefix()) print[[/lua/admin/prefs.lua?subpage_active=report" class="list-group-item ]] print(report_active) print[[">Units of Measurement</a>
|
||||
<a href="]] print(ntop.getHttpPrefix()) print[[/lua/admin/prefs.lua?subpage_active=logging" class="list-group-item ]] print(logging_active) print[[">Log</a>
|
||||
]]
|
||||
|
||||
if (ntop.isPro()) then
|
||||
|
|
@ -425,6 +445,9 @@ end
|
|||
if (subpage_active == "users") then
|
||||
printUsers()
|
||||
end
|
||||
if (subpage_active == "logging") then
|
||||
printLogging()
|
||||
end
|
||||
|
||||
print[[
|
||||
</td></tr>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue