@cryptotaxi247 / netdata-1 / commits / 8457257a0

Update network-connections-chart.html

Costa Tsaousis committed Feb 3, 2024 at 11:02 UTC 8457257a0b013401668b9d7daf1cc851c5dadce7
1 file changed +3 -2
collectors/network-viewer.plugin/network-connections-chart.html
+3 -2
@@ -33,11 +33,12 @@
33
34 function transformData(dataPayload) {
35 // console.log("dataPayload", dataPayload);
36 - const desiredColumns = ["Direction", "Protocol", "Namespace", "Process", "CommandLine", "LocalIP", "LocalPort", "RemoteIP", "RemotePort", "LocalAddressSpace", "RemoteAddressSpace"];
36 + const desiredColumns = ["Direction", "Protocol", "Namespace", "Process", "LocalIP", "LocalPort", "RemoteIP", "RemotePort", "LocalAddressSpace", "RemoteAddressSpace"];
37
38 const transformedData = [];
39 const appMap = new Map();
40
41 + console.log(dataPayload);
42 dataPayload.data.forEach(row => {
43 const rowData = {};
44 desiredColumns.forEach(columnName => {
@@ -631,7 +632,7 @@
632
633 // Modify your fetchData function to call drawApplications after data transformation
634 function fetchDataAndUpdateChart() {
634 - fetch('http://localhost:19999/api/v1/function?function=network-viewer')
635 + fetch('http://localhost:19999/api/v1/function?function=network-connections')
636 .then(response => response.json())
637 .then(data => {
638 lastPayload = data;