mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 16:09:32 +00:00
parent
8ff903534b
commit
a13684b3d1
4 changed files with 109 additions and 84 deletions
|
|
@ -19,50 +19,77 @@ print [[
|
|||
<style type="text/css">
|
||||
#map-canvas { width: 640px; height: 480px; }
|
||||
</style>
|
||||
<div class="container-fluid">
|
||||
<hr>
|
||||
<h2>]]
|
||||
print(i18n("export_data.export_data"))
|
||||
print [[</H2>
|
||||
<p> <p>
|
||||
|
||||
<form class="form-horizontal" action="]]
|
||||
print (ntop.getHttpPrefix())
|
||||
print [[/lua/do_export_data.lua">
|
||||
]]
|
||||
<section class="panel panel-default">
|
||||
|
||||
print [[
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">]]
|
||||
print(i18n("export_data.host"))
|
||||
print[[</label>
|
||||
<div class="controls">
|
||||
<input type="hidden" id="hostIP" name="ip">
|
||||
<input type="hidden" name="ifid" value="]] print(getInterfaceId(ifname).."") print[[">
|
||||
<input type="text" id="hostIPSearch" placeholder="]] print(i18n("export_data.ip_or_mac_address")) print[[" class="form-control">
|
||||
</div>
|
||||
<label><small>]] print(i18n("export_data.note_host")) print[[</small></label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="hostVlan">]] print(i18n("vlan")) print[[:</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="hostVlan" name="vlan" placeholder="]] print(i18n("vlan")) print[[" class="form-control">
|
||||
</div>
|
||||
<label><small>]] print(i18n("export_data.note_vlan")) print[[</small></label>
|
||||
</div>
|
||||
</br>
|
||||
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<button type="submit" class="btn btn-primary">]] print(i18n("export_data.export_json_data")) print[[</button>
|
||||
<button class="btn btn-default" type="reset">]] print(i18n("export_data.reset_form")) print[[</button>
|
||||
</div>
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"> ]] print(i18n("export_data.export_data")) print[[ </h3>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<form action="]] print(ntop.getHttpPrefix()) print[[/lua/do_export_data.lua">
|
||||
<input type=hidden name="ifid" value=]] print(tostring(getInterfaceId(ifname))) print[[>
|
||||
|
||||
<div class="row">
|
||||
<div class='col-md-3'>
|
||||
</div>
|
||||
|
||||
<div class='col-md-6'>
|
||||
<b>]] print(i18n("export_data.hosts")) print[[:</b>
|
||||
<br>
|
||||
|
||||
<div class="form-group form-inline">
|
||||
<div class="btn-group" data-toggle="buttons" id="export_hosts_buttons" name="export_hosts_buttons">
|
||||
<label class="btn btn-default active">
|
||||
<input type="radio" id="all_hosts" name="mode" value="all" autocomplete="off" data-toggle="toggle" checked="checked">]] print(i18n("export_data.all_hosts")) print[[
|
||||
</label>
|
||||
<label class="btn btn-default">
|
||||
<input type="radio" id="local_hosts" name="mode" value="local" autocomplete="off" data-toggle=" toggle">]] print(i18n("export_data.local_hosts")) print[[
|
||||
</label>
|
||||
<label class="btn btn-default">
|
||||
<input type="radio" id="remote_hosts" name="mode" value="remote" autocomplete="off" data-toggle=" toggle">]] print(i18n("export_data.remote_hosts")) print[[
|
||||
</label>
|
||||
<label class="btn btn-default">
|
||||
<input type="radio" id="single_host" name="mode" value="filtered" autocomplete="off" data-toggle=" toggle">]] print(i18n("export_data.single")) print[[
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<input type="text" id="hostIPSearch" name="host" placeholder="]] print(i18n("export_data.ip_or_mac_address")) print[[" class="form-control" disabled/>
|
||||
|
||||
<input type="number" min="1" max="65535" placeholder="]] print(i18n("vlan")) print[[" style="display:inline;" id="hostVlan" name="vlan" class="form-control" value="" disabled/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='col-md-3'>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class='col-md-10'>
|
||||
<input type="hidden" name="search" value=""/>
|
||||
</div>
|
||||
|
||||
<div class='col-md-2'>
|
||||
<div class="btn-group pull-right">
|
||||
<input type="submit" value="]] print(i18n("export_data.export_json_data")) print[[" class="btn btn-default pull-right">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
<b>]] print(i18n('notes')) print[[</b>
|
||||
<ul>
|
||||
<li>]] print(i18n('export_data.note_maximum_number')) print[[</li>
|
||||
<li>]] print(i18n('export_data.note_active_hosts')) print[[</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<script type='text/javascript'>
|
||||
$('#hostVlan').val('');
|
||||
$('#hostIPSearch').val('');
|
||||
|
||||
function auto_ip_mac () {
|
||||
$('#hostIPSearch').typeahead({
|
||||
source: function (query, process) {
|
||||
|
|
@ -72,20 +99,26 @@ print [[/lua/find_host.lua', { query: query }, function (data) {
|
|||
return process(data.results);
|
||||
});
|
||||
}, afterSelect: function(item) {
|
||||
$("#hostIP").val(item.ip);
|
||||
$('#hostIPSearch').val(item.ip.split("@")[0]);
|
||||
$('#hostVlan').val(item.ip.split("@")[1] || '');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('#export_hosts_buttons :input').change(function() {
|
||||
$('#hostVlan, #hostIPSearch').prop('disabled', this.id === "single_host" ? false : true);
|
||||
if(this.id !== "single_host") {
|
||||
$('#hostVlan').val('');
|
||||
$('#hostIPSearch').val('');
|
||||
}
|
||||
});
|
||||
|
||||
$(document).ready(function(){
|
||||
auto_ip_mac();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
]]
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue