From 48cc1283cc062c0c0507190f8cc7ee276f4ad6e9 Mon Sep 17 00:00:00 2001 From: marcos Date: Wed, 14 Apr 2021 15:09:19 +0200 Subject: [PATCH] add black theme to widget dashboard --- .../include/functions_treeview.php | 4 +- .../include/graphs/flot/jquery.flot.js | 2 +- pandora_console/include/graphs/pandora.d3.js | 1 + .../functions_pandora_networkmap.js | 83 ++++++++++--------- .../include/javascript/pandora_dashboards.js | 1 + .../lib/Dashboard/Widgets/tree_view.php | 2 +- .../include/styles/pandora_black.css | 15 ++++ pandora_console/operation/tree.php | 2 +- 8 files changed, 64 insertions(+), 46 deletions(-) diff --git a/pandora_console/include/functions_treeview.php b/pandora_console/include/functions_treeview.php index 4a09a20dd9..d72abf3c33 100755 --- a/pandora_console/include/functions_treeview.php +++ b/pandora_console/include/functions_treeview.php @@ -290,7 +290,7 @@ function treeview_printModuleTable($id_module, $server_data=false, $no_head=fals } $last_data_str .= ' '; - $last_data_str .= html_print_image('images/clock2.png', true, ['title' => $last_data['timestamp'], 'width' => '18px']); + $last_data_str .= html_print_image('images/clock2.png', true, ['title' => $last_data['timestamp'], 'width' => '18px', 'class' => 'invert_filter']); $is_snapshot = is_snapshot_data($last_data['datos']); $is_large_image = is_text_to_black_string($last_data['datos']); @@ -307,7 +307,7 @@ function treeview_printModuleTable($id_module, $server_data=false, $no_head=fals } if ($salida !== null) { - $last_data_str = html_print_image('images/clock2.png', true, ['title' => $last_data['timestamp'], 'width' => '18px']); + $last_data_str = html_print_image('images/clock2.png', true, ['title' => $last_data['timestamp'], 'width' => '18px', 'class' => 'invert_filter']); } $last_data_str .= $salida; diff --git a/pandora_console/include/graphs/flot/jquery.flot.js b/pandora_console/include/graphs/flot/jquery.flot.js index 2f4ac4e4a5..009b9adc96 100644 --- a/pandora_console/include/graphs/flot/jquery.flot.js +++ b/pandora_console/include/graphs/flot/jquery.flot.js @@ -247,7 +247,7 @@ Licensed under the MIT license. // Create the text layer container, if it doesn't exist if (this.textContainer == null) { - this.textContainer = $("
") + this.textContainer = $("
") .css({ position: "absolute", top: 0, diff --git a/pandora_console/include/graphs/pandora.d3.js b/pandora_console/include/graphs/pandora.d3.js index 0c2e364994..4f5ce6735f 100644 --- a/pandora_console/include/graphs/pandora.d3.js +++ b/pandora_console/include/graphs/pandora.d3.js @@ -2486,6 +2486,7 @@ function printClockAnalogic1( var face = svg .append("g") .attr("id", "clock-face") + .attr("class", "invert_filter") .attr( "transform", "translate(" + diff --git a/pandora_console/include/javascript/functions_pandora_networkmap.js b/pandora_console/include/javascript/functions_pandora_networkmap.js index 3450caa518..aba931fb22 100644 --- a/pandora_console/include/javascript/functions_pandora_networkmap.js +++ b/pandora_console/include/javascript/functions_pandora_networkmap.js @@ -1211,43 +1211,43 @@ function add_agent_node(agents) { graph.nodes.push(temp_node); /*jQuery.each(data['rel'], function(i, relation) { - var temp_link = {}; - if (i == 0) { - var found = 0; - temp_link['source'] = graph.nodes[temp_node['id']]; - jQuery.each(graph.nodes, function(j, element) { - if (element.id_agent == relation['id_agent_end']) { - found = j; - } - }); - temp_link['target'] = graph.nodes[found]; - } - else { - var found = 0; - temp_link['target'] = graph.nodes[temp_node['id']]; - jQuery.each(graph.nodes, function(j, element) { - if (element.id_agent == relation['id_agent_start']) { - found = j; - } - }); - temp_link['source'] = graph.nodes[found]; - } - temp_link['id_db'] = String(relation['id_db']); - temp_link['id_agent_end'] = String(relation['id_agent_end']); - temp_link['id_agent_start'] = String(relation['id_agent_start']); - temp_link['id_module_end'] = relation['id_module_end']; - temp_link['id_module_start'] = relation['id_module_start']; - temp_link['source_in_db'] = String(relation['source_in_db']); - temp_link['target_in_db'] = String(relation['target_in_db']); - temp_link['arrow_end'] = relation['arrow_end']; - temp_link['arrow_start'] = relation['arrow_start']; - temp_link['status_end'] = relation['status_end']; - temp_link['status_start'] = relation['status_start']; - temp_link['text_end'] = relation['text_end']; - temp_link['text_start'] = relation['text_start']; - - graph.links.push(temp_link); - });*/ + var temp_link = {}; + if (i == 0) { + var found = 0; + temp_link['source'] = graph.nodes[temp_node['id']]; + jQuery.each(graph.nodes, function(j, element) { + if (element.id_agent == relation['id_agent_end']) { + found = j; + } + }); + temp_link['target'] = graph.nodes[found]; + } + else { + var found = 0; + temp_link['target'] = graph.nodes[temp_node['id']]; + jQuery.each(graph.nodes, function(j, element) { + if (element.id_agent == relation['id_agent_start']) { + found = j; + } + }); + temp_link['source'] = graph.nodes[found]; + } + temp_link['id_db'] = String(relation['id_db']); + temp_link['id_agent_end'] = String(relation['id_agent_end']); + temp_link['id_agent_start'] = String(relation['id_agent_start']); + temp_link['id_module_end'] = relation['id_module_end']; + temp_link['id_module_start'] = relation['id_module_start']; + temp_link['source_in_db'] = String(relation['source_in_db']); + temp_link['target_in_db'] = String(relation['target_in_db']); + temp_link['arrow_end'] = relation['arrow_end']; + temp_link['arrow_start'] = relation['arrow_start']; + temp_link['status_end'] = relation['status_end']; + temp_link['status_start'] = relation['status_start']; + temp_link['text_end'] = relation['text_end']; + temp_link['text_start'] = relation['text_start']; + + graph.links.push(temp_link); + });*/ draw_elements_graph(); init_drag_and_drop(); @@ -3385,8 +3385,8 @@ function init_graph(parameter_object) { "stroke-opacity: 0.75; " + "stroke-dasharray: none; " + "stroke-dashoffset: 0" - ); - + ) + .attr("class", "fill_222"); window.layer_graph .append("text") .append("tspan") @@ -3406,6 +3406,7 @@ function init_graph(parameter_object) { "stroke: none; " + "font-family: Verdana" ) + .attr("class", "fill_fff") .attr( "x", networkmap_dimensions[0] + node_radius - holding_area_dimensions[0] @@ -4072,7 +4073,7 @@ function draw_elements_graph() { node_temp .append("text") - .attr("class", "node_text") + .attr("class", "node_text fill_fff") .attr("id", "node_text_" + networkmap_id) .attr( "style", @@ -4094,7 +4095,7 @@ function draw_elements_graph() { .text(function(d) { return ellipsize(get_node_name_ov(d), 30); }) - .classed("dragable_node", true) //own dragable + .classed("dragable_node fill_fff", true) //own dragable .on("click", selected_node) .on("contextmenu", function(d) { show_menu("node", d); diff --git a/pandora_console/include/javascript/pandora_dashboards.js b/pandora_console/include/javascript/pandora_dashboards.js index a322dbe4d7..710e2de2ba 100644 --- a/pandora_console/include/javascript/pandora_dashboards.js +++ b/pandora_console/include/javascript/pandora_dashboards.js @@ -952,6 +952,7 @@ function show_module_detail_dialog( period, module_name ) { + console.log("empezamos"); var params = {}; var f = new Date(); period = $("#period").val(); diff --git a/pandora_console/include/lib/Dashboard/Widgets/tree_view.php b/pandora_console/include/lib/Dashboard/Widgets/tree_view.php index 27445a24c3..edb843bda0 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/tree_view.php +++ b/pandora_console/include/lib/Dashboard/Widgets/tree_view.php @@ -686,7 +686,7 @@ class TreeViewWidget extends Widget ]; // Show the modal window of an module. - $output .= '