From 05cc72eb0f6ce7eb025520bfdec455e08ab54b90 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Fri, 12 May 2023 14:16:04 +0200 Subject: [PATCH 1/6] #10696 new widget for netflow --- .../include/lib/Dashboard/Widget.php | 4 + .../include/lib/Dashboard/Widgets/netflow.php | 458 ++++++++++++++++++ 2 files changed, 462 insertions(+) create mode 100644 pandora_console/include/lib/Dashboard/Widgets/netflow.php diff --git a/pandora_console/include/lib/Dashboard/Widget.php b/pandora_console/include/lib/Dashboard/Widget.php index 245c9f0481..76b87f0b01 100644 --- a/pandora_console/include/lib/Dashboard/Widget.php +++ b/pandora_console/include/lib/Dashboard/Widget.php @@ -416,6 +416,10 @@ class Widget $className .= '\OsQuickReportWidget'; break; + case 'netflow': + $className .= '\Netflow'; + break; + case 'GroupedMeterGraphs': case 'ColorModuleTabs': case 'BlockHistogram': diff --git a/pandora_console/include/lib/Dashboard/Widgets/netflow.php b/pandora_console/include/lib/Dashboard/Widgets/netflow.php new file mode 100644 index 0000000000..d4e6410247 --- /dev/null +++ b/pandora_console/include/lib/Dashboard/Widgets/netflow.php @@ -0,0 +1,458 @@ +width = $width; + + // Height. + $this->height = $height; + + // Grid Width. + $this->gridWidth = $gridWidth; + + // Options. + $this->values = $this->getOptionsWidget(); + + // Positions. + $this->position = $this->getPositionWidget(); + + // Page. + $this->page = basename(__FILE__); + + // ClassName. + $class = new \ReflectionClass($this); + $this->className = $class->getShortName(); + + // Title. + $this->title = __('Netflow'); + + // Name. + if (empty($this->name) === true) { + $this->name = 'netflow'; + } + } + + + /** + * Generates inputs for form (specific). + * + * @return array Of inputs. + * + * @throws Exception On error. + */ + public function getFormInputs(): array + { + $values = $this->values; + + // Retrieve global - common inputs. + $inputs = parent::getFormInputs(); + + // Default values. + if (isset($values['quantity']) === false) { + $values['quantity'] = 5; + } + + // Default values. + if (isset($values['period']) === false) { + $values['period'] = SECONDS_1WEEK; + } + + // Default values. + if (isset($values['max_values']) === false) { + $values['max_values'] = 10; + } + + // Period. + $inputs[] = [ + 'label' => __('Interval'), + 'arguments' => [ + 'name' => 'period', + 'type' => 'interval', + 'value' => $values['period'], + 'nothing' => __('None'), + 'nothing_value' => 0, + 'style_icon' => 'flex-grow: 0', + ], + ]; + $chart_types = netflow_get_chart_types(); + $chart_types['usage_map'] = __('Usage map'); + $inputs[] = [ + 'label' => __('Type graph'), + 'arguments' => [ + 'name' => 'chart_type', + 'type' => 'select', + 'fields' => $chart_types, + 'selected' => $values['chart_type'], + ], + ]; + + $aggregate_list = [ + 'srcip' => __('Src Ip Address'), + 'dstip' => __('Dst Ip Address'), + 'srcport' => __('Src Port'), + 'dstport' => __('Dst Port'), + ]; + $inputs[] = [ + 'label' => __('Aggregated by'), + 'id' => 'aggregated', + 'arguments' => [ + 'name' => 'aggregate', + 'type' => 'select', + 'fields' => $aggregate_list, + 'selected' => $values['aggregate'], + ], + ]; + + $inputs[] = [ + 'label' => __('Data to show'), + 'id' => 'data_to_show', + 'arguments' => [ + 'name' => 'action', + 'type' => 'select', + 'fields' => network_get_report_actions(), + 'selected' => $values['action'], + ], + ]; + + $max_values = [ + '2' => '2', + '5' => '5', + '10' => '10', + '15' => '15', + '20' => '20', + '25' => '25', + '50' => '50', + ]; + + $inputs[] = [ + 'label' => __('Max values'), + 'arguments' => [ + 'name' => 'max_values', + 'type' => 'select', + 'fields' => $max_values, + 'selected' => $values['max_values'], + ], + ]; + + return $inputs; + } + + + /** + * Get Post for widget. + * + * @return array + */ + public function getPost():array + { + // Retrieve global - common inputs. + $values = parent::getPost(); + + $values['period'] = \get_parameter('period', 0); + $values['chart_type'] = \get_parameter('chart_type', ''); + $values['aggregate'] = \get_parameter('aggregate'); + $values['max_values'] = \get_parameter('max_values', 10); + $values['action'] = \get_parameter('action', 'srcip'); + + return $values; + } + + + /** + * Draw widget. + * + * @return string + */ + public function load() + { + global $config; + + $output = ''; + + $size = parent::getSize(); + + $start_date = (time() - $this->values['period']); + $end_date = time(); + if ($this->values['chart_type'] === 'usage_map') { + $map_data = netflow_build_map_data( + $start_date, + $end_date, + $this->values['max_values'], + ($this->values['action'] === 'talkers') ? 'srcip' : 'dstip' + ); + $has_data = !empty($map_data['nodes']); + + if ($has_data === true) { + $map_manager = new \NetworkMap($map_data); + $map_manager->printMap(); + } else { + ui_print_info_message(__('No data to show')); + } + } else { + $netflowContainerClass = ($this->values['chart_type'] === 'netflow_data' || $this->values['chart_type'] === 'netflow_summary' || $this->values['chart_type'] === 'netflow_top_N') ? '' : 'white_box'; + $filter = [ + 'aggregate' => $this->values['aggregate'], + 'netflow_monitoring_interval' => 300, + ]; + + $output .= html_print_input_hidden( + 'selected_style_theme', + $config['style'], + true + ); + $style = 'height: 100%; border: none;'; + if ($this->values['chart_type'] !== 'netflow_area') { + $style .= ' width: 95%;'; + } + + // Draw the netflow chart. + $output .= html_print_div( + [ + 'class' => $netflowContainerClass, + 'style' => $style, + 'content' => netflow_draw_item( + $start_date, + $end_date, + 12, + $this->values['chart_type'], + $filter, + $this->values['max_values'], + '', + 'HTML', + 0 + ), + ], + true + ); + } + + return $output; + + } + + + /** + * Return aux javascript code for forms. + * + * @return string + */ + public function getFormJS() + { + return ' + $(document).ready(function(){ + //Limit 1 week + $("#period_select option").each(function(key, element){ + if(element.value > 604800){ + $(element).remove(); + } + }) + $("#period_manual option").each(function(key, element){ + if(element.value > 604800){ + $(element).remove(); + } + }); + $("#period_manual input").on("change", function(e){ + if($("#hidden-period").val() > 604800) { + $(this).val(1); + $("#hidden-period").val(604800); + $("#period_manual select option").removeAttr("selected"); + setTimeout(() => { + $("#period_default select option[value=\'604800\']").attr("selected", "selected"); + $("#period_manual select option[value=\'604800\']").attr("selected", "selected"); + $("#period_manual select").val(604800); + }, 500); + } + }); + if(this.value === "usage_map") { + $("#data_to_show").show(); + $("#aggregated").hide(); + } else { + $("#data_to_show").hide(); + $("#aggregated").show(); + } + $("#chart_type").on("change", function(e){ + if(this.value === "usage_map") { + $("#data_to_show").show(); + $("#aggregated").hide(); + } else { + $("#data_to_show").hide(); + $("#aggregated").show(); + } + }); + }); + '; + } + + + /** + * Get description. + * + * @return string. + */ + public static function getDescription() + { + return __('Netflow'); + } + + + /** + * Get Name. + * + * @return string. + */ + public static function getName() + { + return 'netflow'; + } + + + /** + * Get size Modal Configuration. + * + * @return array + */ + public function getSizeModalConfiguration(): array + { + $size = [ + 'width' => 400, + 'height' => 530, + ]; + + return $size; + } + + +} From 5adcdb1cae17071f2e242d4eb92832642885d4ca Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Tue, 16 May 2023 09:34:59 +0200 Subject: [PATCH 2/6] #10696 fixed select Usage map --- pandora_console/include/lib/Dashboard/Widgets/netflow.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/lib/Dashboard/Widgets/netflow.php b/pandora_console/include/lib/Dashboard/Widgets/netflow.php index d4e6410247..1451ccd9d9 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/netflow.php +++ b/pandora_console/include/lib/Dashboard/Widgets/netflow.php @@ -396,7 +396,7 @@ class Netflow extends Widget }, 500); } }); - if(this.value === "usage_map") { + if($("#chart_type").val() === "usage_map") { $("#data_to_show").show(); $("#aggregated").hide(); } else { From e737cb4f014dd63cbf38a67f15d0b2fa9a2a6434 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Tue, 16 May 2023 13:36:32 +0200 Subject: [PATCH 3/6] #10696 added image netflow widget --- pandora_console/images/widgets/netflow.png | Bin 0 -> 7588 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 pandora_console/images/widgets/netflow.png diff --git a/pandora_console/images/widgets/netflow.png b/pandora_console/images/widgets/netflow.png new file mode 100644 index 0000000000000000000000000000000000000000..1b2b216824e0a5a4c67d39d20a28cd5805aa90a5 GIT binary patch literal 7588 zcmV;V9b4jwP)vqqX~?lGF?oJjmZ;dV`yal z>TS=`uq}T`T$=+t5=EFh<((O}5Qe@#GYQkx3s-N7Fp&Tv>`L1nZ8n<~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5Iepn2c> zW_6Tkp_Q8b-|NU!U2{>R(VjDLT#$-o9lAP*-IvzS|6)X)2HTWOzAMpHg5w2ZX5p$W zktRkZzw}nZ{0G6;e*NWZ7tfyjpiV0dh;1KH7N}6lg;rSp`tV6}m(BiQ=&c*q29~R; zGT*vjGS!Z3n)GV#gxxg%gYt>({z4{s-Oh?!kHZj zv0C1q6TT^yLTTDV3uqDv9WG{npHax=T!Q=#-3G-*)_+d%8#V6KO%9j!RbOFHo4w+y zZ4KQ~W|u4cQH6cGXmae8i)Y8!5{kI)WL6D7Oeo;MP-a8I=&2LMY2FI6WG;WTUz@}H zoW|YzIo_(IH_JVJ@?hDY*DPGC^*5J(?E`<6Z=iH~heG*dMUg3MpAo9osQaO-UmbLX z2YNq8sFAxj+gz!{qkyw_`>)k@?^wSiFq8@CnB=S01~3mzDA*oWH`{0<{hRNEX8g4; zWY4yr`jZ)EV0i8NKe+OtQQD5K_%`o^iVJ*ln_Ao&-VHl^o7%D(PwWs_wutBAF54ln ztilru9+oZQdfa0cJd~>N#P*F+%UHv`Zu`cXq!hwijq)K@qYO{1Mm=<^QBu*!$I#wd z9 Date: Thu, 8 Jun 2023 15:56:13 +0200 Subject: [PATCH 4/6] #10696 delete switches from graphs in netflow widget --- .../include/lib/Dashboard/Widgets/netflow.php | 3 ++- pandora_console/include/styles/netflow_widget.css | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 pandora_console/include/styles/netflow_widget.css diff --git a/pandora_console/include/lib/Dashboard/Widgets/netflow.php b/pandora_console/include/lib/Dashboard/Widgets/netflow.php index 1451ccd9d9..6af2e78bab 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/netflow.php +++ b/pandora_console/include/lib/Dashboard/Widgets/netflow.php @@ -298,6 +298,7 @@ class Netflow extends Widget */ public function load() { + ui_require_css_file('netflow_widget', 'include/styles/', true); global $config; $output = ''; @@ -333,7 +334,7 @@ class Netflow extends Widget $config['style'], true ); - $style = 'height: 100%; border: none;'; + $style = 'width:100%; height: 100%; border: none;'; if ($this->values['chart_type'] !== 'netflow_area') { $style .= ' width: 95%;'; } diff --git a/pandora_console/include/styles/netflow_widget.css b/pandora_console/include/styles/netflow_widget.css new file mode 100644 index 0000000000..04b093c989 --- /dev/null +++ b/pandora_console/include/styles/netflow_widget.css @@ -0,0 +1,9 @@ +.menu_graph { + display: none; +} +.parent_graph { + width: 97% !important; +} +#image_hide_show_labels { + display: none !important; +} From 81991cc4fe2381182db989f093ec08f9e1bb7bf1 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Mon, 12 Jun 2023 10:48:10 +0200 Subject: [PATCH 5/6] #10696 new icon netflow --- pandora_console/images/widgets/netflow.png | Bin 7588 -> 10896 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/pandora_console/images/widgets/netflow.png b/pandora_console/images/widgets/netflow.png index 1b2b216824e0a5a4c67d39d20a28cd5805aa90a5..5a34c1635f0ebbb840f2c400ab1adc16b28bdfed 100644 GIT binary patch delta 10868 zcmV-)DvQ;mJCIe7cYi7aNkl(Cbx4#lnj~K4t=LyaxZOQ_wSTX9h9}ZWuz2REo&kYD z4?gQWbhA1WX~BwJ`D|ne5&^B7Ryl1j7%0F&ma8jVouKkP`_9o+zPTwevLVU`dKL5xp@JcQ-3>jwUVIpcipj1suR}@F7ag ze*IZOqdk_MM}Nl9$lB-0mqmxa067tm*0K8FXJEcBVkK%;KZIVh6637wXAwzQ9N|PO z0qIEgo4UUweUQeN_8mS!vsqOEW}AqqNCYpm(oB}1Y4LM()9^ktRzWxIgtp!bJ5y}yjGh&$Y!^`=-D>pjxr2xo+xZ(L_w?F9-t0XzoWCl zPX~Oo63m@2aH2Yqz+Dm!M0ob(p{pbi$+j#fL-$_@MF&Wd<4aq-flbIZd! zwr(a9i+_xIBSG0>`KfZv>ZcJdKu*-Id5zOPK0Y+&n_*P9VPT48-3A?Z?))&`t@dnL zdQv1Z2#0u{JpYGq^4@?KbfMAHm*|e}JHW%_lH{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;?g8;TOlWE0?Ag=2 z`G}>-^PMUX5Ar5{un5+S(tq>zGUz8*l?uTRhjd8NLeJ0DFnfAD|C!cP$E4PQ5EqT= z;5Tg0unrp2p+Afx+>uYZD%HUg@CPCsTG2_LPv?bHtwuP%&C;wSPl#0E$aF>FdpmiJLeoroEY|C_|Xj4%4~LdrT`Jb%TP$9S}$UhmfA z*u^)Ae$@=Oc($i*fz&OVVDFwkB<2gnxH$W&-=qaJYuz4}{jwJ_j_ikNBZfhh1}bRv zhSsKzipH0LPNTJ;FEqon$-N-&h88}Vy^1$-gzFq?_=wWOI8F+JL&{OmL-E}f4q9y{ z_ET_oM0qfBC1rwZN*Z^O@oSBF@Ky z$lFBjp4oU*aN+h*ert6|Hp z-$CPMF%znUN4l(>=MhUPs3)EB_0(@oChqB^(PLFzyT=j}FQf%raC8^hRYi-Po7Tgu zPewy{b2YS#cYo||myQ?={(Yt%jQOQt(%d!hbhU7&YmNqmw)~PpG+;mDSe5Ex@4@5x zxvDQsi4&9Rp8fQ|uFdNrGEW?7qbn?^Y|qd(t%Nsx&ZrMF81%JjM{A&Y-}`2DlxU%q zn*HDF$W&c(QKQkGGjUvyie(+TI*8qu*3bW9M4blPlz&XVE74Vg;{{@7;i@f>CPpQ{ z^j5&KLMD0L&Wc=-(XDakK~>ltI;$6b*8S?m(_-g$H^+ zN2rmzH``pP#G`<-cl)o^cJElfBruc-=$PcI)&?*SO(@tNRyW&dBmJB2gl7D;FJ#ZQ zpZb#-W?*>j`aihxp;6k7uJ|_Zgo+D%a+_M*8r}^%e4E;`8c*yHShk4g;x5}Eu&lxp z3uhjdE#i9IV-`G=s_?}2jZ({4!@X|%#+sxQ!ds2es`LY7!6G(NFZC~oBc2Oms2o$Je9)&Kwi07*qoM6N<$ Ef Date: Wed, 19 Jul 2023 10:36:30 +0200 Subject: [PATCH 6/6] #10696 fixed resize circular mesh --- pandora_console/include/functions_graph.php | 5 ++++- pandora_console/include/functions_netflow.php | 7 ++++++- pandora_console/include/graphs/functions_d3.php | 4 ++-- pandora_console/include/graphs/pandora.d3.js | 13 ++++++++----- .../include/lib/Dashboard/Widgets/netflow.php | 8 +++++++- pandora_console/include/styles/netflow_widget.css | 4 ++++ 6 files changed, 31 insertions(+), 10 deletions(-) diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index d1702ef9d6..5be8dc1233 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -4618,7 +4618,10 @@ function graph_netflow_circular_mesh($data) include_once $config['homedir'].'/include/graphs/functions_d3.php'; - return d3_relationship_graph($data['elements'], $data['matrix'], 900, true); + $width = (empty($data['width']) === false) ? $data['width'] : 900; + $height = (empty($data['height']) === false) ? $data['height'] : 900; + + return d3_relationship_graph($data['elements'], $data['matrix'], $width, true, $height); } diff --git a/pandora_console/include/functions_netflow.php b/pandora_console/include/functions_netflow.php index 66e1ad1a9f..9d0c492971 100644 --- a/pandora_console/include/functions_netflow.php +++ b/pandora_console/include/functions_netflow.php @@ -1233,7 +1233,9 @@ function netflow_draw_item( $max_aggregates, $connection_name='', $output='HTML', - $address_resolution=false + $address_resolution=false, + $width_content=false, + $height_content=false ) { $aggregate = $filter['aggregate']; $interval = ($end_date - $start_date); @@ -1432,6 +1434,9 @@ function netflow_draw_item( netflow_aggregate_is_ip($aggregate) ); + $data_circular['width'] = $width_content; + $data_circular['height'] = $height_content; + $html = '
'; $html .= graph_netflow_circular_mesh($data_circular); $html .= '
'; diff --git a/pandora_console/include/graphs/functions_d3.php b/pandora_console/include/graphs/functions_d3.php index acb675423a..baa957acc9 100644 --- a/pandora_console/include/graphs/functions_d3.php +++ b/pandora_console/include/graphs/functions_d3.php @@ -57,7 +57,7 @@ function include_javascript_d3($return=false) } -function d3_relationship_graph($elements, $matrix, $width=700, $return=false) +function d3_relationship_graph($elements, $matrix, $width=700, $return=false, $height=700) { global $config; @@ -72,7 +72,7 @@ function d3_relationship_graph($elements, $matrix, $width=700, $return=false) $output = '
'; $output .= include_javascript_d3(true); $output .= ""; if (!$return) { diff --git a/pandora_console/include/graphs/pandora.d3.js b/pandora_console/include/graphs/pandora.d3.js index 5c8b59013b..64313904bc 100644 --- a/pandora_console/include/graphs/pandora.d3.js +++ b/pandora_console/include/graphs/pandora.d3.js @@ -22,7 +22,7 @@ // matrix = [[0, 0, 2], // a[a => a, a => b, a => c] // [5, 0, 1], // b[b => a, b => b, b => c] // [2, 3, 0]]; // c[c => a, c => b, c => c] -function chordDiagram(recipient, elements, matrix, width) { +function chordDiagram(recipient, elements, matrix, width, height) { d3.chart = d3.chart || {}; d3.chart.chordWheel = function(options) { // Default values @@ -59,10 +59,13 @@ function chordDiagram(recipient, elements, matrix, width) { .enter() .append("svg:svg") .attr("width", width) - .attr("height", width) + .attr("height", height) .attr("class", "dependencyWheel") .append("g") - .attr("transform", "translate(" + width / 2 + "," + width / 2 + ")"); + .attr( + "transform", + "translate(" + width / 2 + "," + height / 2 + ") scale(1.2)" + ); var arc = d3.svg .arc() @@ -206,8 +209,8 @@ function chordDiagram(recipient, elements, matrix, width) { .on("mousemove", move_tooltip); function move_tooltip(d) { - x = d3.event.pageX + 10; - y = d3.event.pageY + 10; + x = d3.event.layerX + 10; + y = d3.event.layerY + 10; $("#tooltip").css("left", x + "px"); $("#tooltip").css("top", y + "px"); diff --git a/pandora_console/include/lib/Dashboard/Widgets/netflow.php b/pandora_console/include/lib/Dashboard/Widgets/netflow.php index 6af2e78bab..be603e452b 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/netflow.php +++ b/pandora_console/include/lib/Dashboard/Widgets/netflow.php @@ -339,6 +339,10 @@ class Netflow extends Widget $style .= ' width: 95%;'; } + if ($size['width'] > $size['height']) { + $size['width'] = $size['height']; + } + // Draw the netflow chart. $output .= html_print_div( [ @@ -353,7 +357,9 @@ class Netflow extends Widget $this->values['max_values'], '', 'HTML', - 0 + 0, + ($size['width'] - 50), + ($size['height'] - 20), ), ], true diff --git a/pandora_console/include/styles/netflow_widget.css b/pandora_console/include/styles/netflow_widget.css index 04b093c989..c7be7fe90d 100644 --- a/pandora_console/include/styles/netflow_widget.css +++ b/pandora_console/include/styles/netflow_widget.css @@ -7,3 +7,7 @@ #image_hide_show_labels { display: none !important; } + +.select2-search--dropdown .select2-search__field { + padding: 0px !important; +}