Skip to content

Commit

Permalink
Added other columns to exporters table
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoBiscosi committed Jul 10, 2024
1 parent ac4817f commit 7835b5c
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 8 deletions.
3 changes: 0 additions & 3 deletions http_src/vue/ntop_vue.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ import { default as PageCountryStats } from "./page-country-stats.vue"
import { default as PageAsStats } from "./page-as-stats.vue"
import { default as PageProbes } from "./page-probes.vue"
import { default as PageExporters } from "./page-exporters.vue"
import { default as PageSankeyTest } from "./sankey-test.vue"
//import { default as PageChatbot } from "./page-chatbot.vue"

/* Config pages */
import { default as PageSNMPConfig } from "./page-snmp-config.vue"
Expand Down Expand Up @@ -187,7 +185,6 @@ let ntopVue = {
PageFlowDeviceDetails: PageFlowDeviceDetails,
PageFlowDeviceInterfaceDetails: PageFlowDeviceInterfaceDetails,
PageHistoricalFlow: PageHistoricalFlow,
PageSankeyTest: PageSankeyTest,

// components
AlertInfo: AlertInfo,
Expand Down
8 changes: 6 additions & 2 deletions http_src/vue/page-exporters.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,14 @@ const map_table_def_columns = (columns) => {
return value
},
"exported_flows": (value, row) => {
if (!value)
return '';
return formatterUtils.getFormatter("number")(value);
},
"interface_name": (value, row) => {
return value
"dropped_flows": (value, row) => {
if (!value)
return '';
return formatterUtils.getFormatter("number")(value);
},
"flow_exporters": (value, row) => {
if (!value) {
Expand Down
33 changes: 31 additions & 2 deletions httpdocs/tables_config/exporters.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"use_current_page": false,
"enable_search": false,
"paging": false,
"display_empty_rows": false,
"display_empty_rows": true,
"default_sort": {
"column_id": "exported_flows",
"sort": 1
},
"columns": [
{
"id": "ip",
"title_i18n": "flow_devices.probe_ip",
"title_i18n": "flow_devices.flow_exporter_ip",
"data_field": "ip",
"sortable": true,
"class": [
Expand All @@ -28,12 +28,22 @@
"text-nowrap"
]
},
{
"id": "export_type",
"title_i18n": "flow_devices.exporter_type",
"data_field": "export_type",
"sortable": true,
"class": [
"text-nowrap"
]
},
{
"id": "exported_flows",
"title_i18n": "graphs.metric_labels.exported_flows",
"data_field": "exported_flows",
"sortable": true,
"class": [
"text-center",
"text-nowrap"
]
},
Expand All @@ -42,6 +52,25 @@
"title_i18n": "graphs.metric_labels.dropped_flows",
"data_field": "dropped_flows",
"sortable": true,
"class": [
"text-center",
"text-nowrap"
]
},
{
"id": "description",
"title_i18n": "flow_devices.snmp_description",
"data_field": "description",
"sortable": true,
"class": [
"text-nowrap"
]
},
{
"id": "location",
"title_i18n": "flow_devices.snmp_location",
"data_field": "location",
"sortable": true,
"class": [
"text-nowrap"
]
Expand Down
6 changes: 5 additions & 1 deletion scripts/locales/en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3207,6 +3207,7 @@ local lang = {
["enable_flow_ratio"] = "Enable Flow/SNMP Ratio",
["exporter_devices"] = "NetFlow/IPFIX Exporters",
["exporter_ip"] = "Flow Exporter IP",
["exporter_type"] = "Export Type",
["exporter_list_per_obs"] = "Flow Exporter Devices per Obs. Point %{obs_point}",
["exporters"] = "Flow Exp.",
["flow_device_x"] = "<a href=\"%{url}\">Flow Exporter</a>: %{device}",
Expand All @@ -3233,7 +3234,10 @@ local lang = {
["observation_point_x"] = "Observation Point %{observation_point}",
["observation_points"] = "Observation Points",
["out_errors"] = "Out Errors",
["probe_ip"] = "nProbe IP",
["flow_exporter_ip"] = "Exporter IP",
["packet"] = "Packet",
["netflow_ipfix"] = "NetFlow/IPFIX",
["sflow"] = "sFlow",
["promisc"] = "Promisc",
["ratio_not_ready"] = "Computing flow ratio...",
["remember_counter_ratio"] = "The Counters/SNMP Ratio can be enabled following these steps:",
Expand Down

0 comments on commit 7835b5c

Please sign in to comment.