Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
c9330e3b
Commit
c9330e3b
authored
Apr 20, 2016
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(network insight) template additions
parent
3ee2d303
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
9 deletions
+17
-9
networkinsight.volt
...se/mvc/app/views/OPNsense/Diagnostics/networkinsight.volt
+17
-9
No files found.
src/opnsense/mvc/app/views/OPNsense/Diagnostics/networkinsight.volt
View file @
c9330e3b
...
@@ -211,7 +211,7 @@ POSSIBILITY OF SUCH DAMAGE.
...
@@ -211,7 +211,7 @@ POSSIBILITY OF SUCH DAMAGE.
}
}
var selected_time = get_time_select();
var selected_time = get_time_select();
var time_url = selected_time.from + '/' + selected_time.to;
var time_url = selected_time.from + '/' + selected_time.to;
ajaxGet('/api/diagnostics/networkinsight/top/FlowDstPortTotals/'+time_url+'/dst_port,protocol/octets/
10
/',
ajaxGet('/api/diagnostics/networkinsight/top/FlowDstPortTotals/'+time_url+'/dst_port,protocol/octets/
25
/',
{'filter_field': 'if', 'filter_value': $('#interface_select').val()}, function(data, status){
{'filter_field': 'if', 'filter_value': $('#interface_select').val()}, function(data, status){
if (status == 'success'){
if (status == 'success'){
nv.addGraph(function() {
nv.addGraph(function() {
...
@@ -280,7 +280,7 @@ POSSIBILITY OF SUCH DAMAGE.
...
@@ -280,7 +280,7 @@ POSSIBILITY OF SUCH DAMAGE.
}
}
var selected_time = get_time_select();
var selected_time = get_time_select();
var time_url = selected_time.from + '/' + selected_time.to;
var time_url = selected_time.from + '/' + selected_time.to;
ajaxGet('/api/diagnostics/networkinsight/top/FlowSourceAddrTotals/'+time_url+'/src_addr/octets/
10
/',
ajaxGet('/api/diagnostics/networkinsight/top/FlowSourceAddrTotals/'+time_url+'/src_addr/octets/
25
/',
{'filter_field': 'if', 'filter_value': $('#interface_select').val()}, function(data, status){
{'filter_field': 'if', 'filter_value': $('#interface_select').val()}, function(data, status){
if (status == 'success'){
if (status == 'success'){
nv.addGraph(function() {
nv.addGraph(function() {
...
@@ -346,8 +346,7 @@ POSSIBILITY OF SUCH DAMAGE.
...
@@ -346,8 +346,7 @@ POSSIBILITY OF SUCH DAMAGE.
filters['filter_value'].push($("#address_detail").val());
filters['filter_value'].push($("#address_detail").val());
}
}
var time_url = $("#date_detail").val().replace('-', '/');
var time_url = $("#date_detail_from").val() + '/' + $("#date_detail_to").val();
console.log(service_names);
ajaxGet('/api/diagnostics/networkinsight/top/FlowSourceAddrDetails/'+time_url+'/service_port,protocol,if,src_addr,dst_addr/octets/100/',
ajaxGet('/api/diagnostics/networkinsight/top/FlowSourceAddrDetails/'+time_url+'/service_port,protocol,if,src_addr,dst_addr/octets/100/',
{'filter_field': filters['filter_field'].join(','), 'filter_value': filters['filter_value'].join(',')}, function(data, status){
{'filter_field': filters['filter_field'].join(','), 'filter_value': filters['filter_value'].join(',')}, function(data, status){
if (status == 'success'){
if (status == 'success'){
...
@@ -468,15 +467,22 @@ POSSIBILITY OF SUCH DAMAGE.
...
@@ -468,15 +467,22 @@ POSSIBILITY OF SUCH DAMAGE.
var date_begin = Date.UTC(now.getUTCFullYear(),now.getUTCMonth(), now.getUTCDate(), 0, 0, 0, 0);
var date_begin = Date.UTC(now.getUTCFullYear(),now.getUTCMonth(), now.getUTCDate(), 0, 0, 0, 0);
var date_end = Date.UTC(now.getUTCFullYear(),now.getUTCMonth(), now.getUTCDate(), 23, 59, 59, 0);
var date_end = Date.UTC(now.getUTCFullYear(),now.getUTCMonth(), now.getUTCDate(), 23, 59, 59, 0);
var tmp_date = new Date();
var tmp_date = new Date();
for (i=0; i <
200
; i++) {
for (i=0; i <
62
; i++) {
from_date_ts = (date_begin - (24*60*60*1000 * i)) / 1000;
from_date_ts = (date_begin - (24*60*60*1000 * i)) / 1000;
to_date_ts = parseInt((date_end - (24*60*60*1000 * i)) / 1000);
to_date_ts = parseInt((date_end - (24*60*60*1000 * i)) / 1000);
tmp_date = new Date(from_date_ts*1000);
tmp_date = new Date(from_date_ts*1000);
tmp = tmp_date.getDate() + '/' + (tmp_date.getMonth()+1) + '/' + tmp_date.getFullYear();
tmp = tmp_date.getDate() + '/' + (tmp_date.getMonth()+1) + '/' + tmp_date.getFullYear();
$("#date_detail").append($("<option/>").val(from_date_ts+'-'+to_date_ts).text(tmp));
$("#date_detail_from").append($("<option/>").val(from_date_ts).text(tmp));
$("#date_detail_to").append($("<option/>").val(to_date_ts).text(tmp));
}
}
$("#date_detail").selectpicker('refresh');
$("#date_detail_from").selectpicker('refresh');
$("#date_detail_to").selectpicker('refresh');
$("#date_detail_from").change(function(){
// change to date on change from date.
$("#date_detail_to").prop('selectedIndex', $("#date_detail_from").prop('selectedIndex'));
$("#date_detail_to").selectpicker('refresh');
});
chart_interface_totals();
chart_interface_totals();
chart_top_dst_port_usage();
chart_top_dst_port_usage();
...
@@ -553,7 +559,7 @@ POSSIBILITY OF SUCH DAMAGE.
...
@@ -553,7 +559,7 @@ POSSIBILITY OF SUCH DAMAGE.
<table class="table table-condensed">
<table class="table table-condensed">
<thead>
<thead>
<tr>
<tr>
<th>{{ lang._('Date') }}</th>
<th>{{ lang._('Date
(from/to)
') }}</th>
<th>{{ lang._('Interface') }}</th>
<th>{{ lang._('Interface') }}</th>
<th>{{ lang._('(dst) Port') }}</th>
<th>{{ lang._('(dst) Port') }}</th>
<th>{{ lang._('(src) Address') }}</th>
<th>{{ lang._('(src) Address') }}</th>
...
@@ -562,7 +568,9 @@ POSSIBILITY OF SUCH DAMAGE.
...
@@ -562,7 +568,9 @@ POSSIBILITY OF SUCH DAMAGE.
<tbody>
<tbody>
<tr>
<tr>
<td>
<td>
<select class="selectpicker" id="date_detail" data-live-search="true" data-size="10">
<select class="selectpicker" id="date_detail_from" data-live-search="true" data-size="10">
</select>
<select class="selectpicker" id="date_detail_to" data-live-search="true" data-size="10">
</select>
</select>
</td>
</td>
<td>
<td>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment