Optimized preferences redis read

DNS resolution is not slower on embedded boxes
Preferences layout renders better when resizing the windows
This commit is contained in:
Luca Deri 2015-05-27 00:35:28 +02:00
parent 1d3e98b101
commit 1b47d05507
10 changed files with 1477 additions and 21 deletions

View file

@ -1432,14 +1432,14 @@ function prefsInputField(label, comment, key, value)
end
end
print('<tr><td><strong>'..label..'</strong><p><small>'..comment..'</small></td>')
print('<tr><td width=50%><strong>'..label..'</strong><p><small>'..comment..'</small></td>')
print [[
<td class="input-group col-lg-3" align=right><form class="navbar-form navbar-right">]]
print('<input id="csrf" name="csrf" type="hidden" value="'..ntop.getRandomCSRFValue()..'" />\n')
print [[
<div class="input-group" >
<input type="text" class="form-control" name="]] print(key) print [[" value="]] print(value.."") print [[">
<input type="text" class="form-control" name="]] print(key) print [[" value="]] print(value.."") print [[">
<span class="input-group-btn">
<button class="btn btn-default" type="submit">Save</button>
</span>
@ -1473,7 +1473,7 @@ function toggleTableButton(label, comment, on_label, on_value, on_color , off_la
off_active = "btn-default"
end
if(label ~= "") then print('<tr><td><strong>'..label..'</strong><p><small>'..comment..'</small></td><td with=250 align=right>\n') end
if(label ~= "") then print('<tr><td width=50%><strong>'..label..'</strong><p><small>'..comment..'</small></td><td align=right>\n') end
print('<form>\n<div class="btn-group btn-toggle">')
print('<input id="csrf" name="csrf" type="hidden" value="'..ntop.getRandomCSRFValue()..'" />\n')
print('<input type=hidden name='..submit_field..' value='..rev_value..'>\n')