Fix black theme issues
This commit is contained in:
parent
f0637438f3
commit
758933a211
|
@ -29,6 +29,12 @@ function chordDiagram(recipient, elements, matrix, width) {
|
||||||
var width = 700;
|
var width = 700;
|
||||||
var margin = 150;
|
var margin = 150;
|
||||||
var padding = 0.02;
|
var padding = 0.02;
|
||||||
|
var consoleStyle = document.getElementById("hidden-selected_style_theme")
|
||||||
|
.value;
|
||||||
|
var textColor =
|
||||||
|
consoleStyle === "pandora_black" ? "rgb(240, 240, 240)" : "rgb(0, 0, 0)";
|
||||||
|
var tooltipColor =
|
||||||
|
consoleStyle === "pandora_black" ? "rgb(0, 0, 0)" : "rgb(240, 240, 240)";
|
||||||
|
|
||||||
function chart(selection) {
|
function chart(selection) {
|
||||||
selection.each(function(data) {
|
selection.each(function(data) {
|
||||||
|
@ -103,7 +109,6 @@ function chordDiagram(recipient, elements, matrix, width) {
|
||||||
const chords = chord.chords();
|
const chords = chord.chords();
|
||||||
let aux = 0;
|
let aux = 0;
|
||||||
$.each(chords, function(key, value) {
|
$.each(chords, function(key, value) {
|
||||||
console.log(aux);
|
|
||||||
if (aux < 5) {
|
if (aux < 5) {
|
||||||
if (
|
if (
|
||||||
(value.source.index == i && value.target.subindex == i) ||
|
(value.source.index == i && value.target.subindex == i) ||
|
||||||
|
@ -159,6 +164,7 @@ function chordDiagram(recipient, elements, matrix, width) {
|
||||||
.attr("text-anchor", function(d) {
|
.attr("text-anchor", function(d) {
|
||||||
return d.angle > Math.PI ? "end" : null;
|
return d.angle > Math.PI ? "end" : null;
|
||||||
})
|
})
|
||||||
|
.attr("style", "fill: " + textColor)
|
||||||
.attr("transform", function(d) {
|
.attr("transform", function(d) {
|
||||||
return (
|
return (
|
||||||
"rotate(" +
|
"rotate(" +
|
||||||
|
@ -266,7 +272,12 @@ function chordDiagram(recipient, elements, matrix, width) {
|
||||||
|
|
||||||
$("#tooltip").attr(
|
$("#tooltip").attr(
|
||||||
"style",
|
"style",
|
||||||
"background: #fff;" +
|
"background: " +
|
||||||
|
tooltipColor +
|
||||||
|
";" +
|
||||||
|
"color: " +
|
||||||
|
textColor +
|
||||||
|
";" +
|
||||||
"position: absolute;" +
|
"position: absolute;" +
|
||||||
"display: inline-block;" +
|
"display: inline-block;" +
|
||||||
"width: auto;" +
|
"width: auto;" +
|
||||||
|
|
|
@ -2,20 +2,28 @@
|
||||||
/**
|
/**
|
||||||
* Netflow live view
|
* Netflow live view
|
||||||
*
|
*
|
||||||
* @package Pandora FMS open.
|
* @category Netflow
|
||||||
* @subpackage UI file.
|
* @package Pandora FMS
|
||||||
|
* @subpackage Community
|
||||||
|
* @version 1.0.0
|
||||||
|
* @license See below
|
||||||
*
|
*
|
||||||
* Pandora FMS - http://pandorafms.com
|
* ______ ___ _______ _______ ________
|
||||||
* ==================================================
|
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||||
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||||
|
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||||
|
*
|
||||||
|
* ============================================================================
|
||||||
|
* Copyright (c) 2005-2022 Artica Soluciones Tecnologicas
|
||||||
* Please see http://pandorafms.org for full contribution list
|
* Please see http://pandorafms.org for full contribution list
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation; version 2
|
* as published by the Free Software Foundation for version 2.
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
|
* ============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
|
@ -40,7 +48,7 @@ if (! check_acl($config['id_user'], 0, 'AR') && ! check_acl($config['id_user'],
|
||||||
$pure = get_parameter('pure', 0);
|
$pure = get_parameter('pure', 0);
|
||||||
|
|
||||||
// Ajax callbacks.
|
// Ajax callbacks.
|
||||||
if (is_ajax()) {
|
if (is_ajax() === true) {
|
||||||
$get_filter_type = get_parameter('get_filter_type', 0);
|
$get_filter_type = get_parameter('get_filter_type', 0);
|
||||||
$get_filter_values = get_parameter('get_filter_values', 0);
|
$get_filter_values = get_parameter('get_filter_values', 0);
|
||||||
|
|
||||||
|
@ -117,7 +125,7 @@ $draw = get_parameter('draw_button', '');
|
||||||
$save = get_parameter('save_button', '');
|
$save = get_parameter('save_button', '');
|
||||||
$update = get_parameter('update_button', '');
|
$update = get_parameter('update_button', '');
|
||||||
|
|
||||||
if (!is_metaconsole()) {
|
if (is_metaconsole() === false) {
|
||||||
// Header.
|
// Header.
|
||||||
ui_print_page_header(
|
ui_print_page_header(
|
||||||
__('Netflow live view'),
|
__('Netflow live view'),
|
||||||
|
@ -505,7 +513,7 @@ if (is_metaconsole()) {
|
||||||
|
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
|
|
||||||
if ($draw != '') {
|
if (empty($draw) === false) {
|
||||||
// Draw.
|
// Draw.
|
||||||
echo '<br/>';
|
echo '<br/>';
|
||||||
|
|
||||||
|
@ -513,6 +521,11 @@ if (is_metaconsole()) {
|
||||||
if ($netflow_disable_custom_lvfilters && $filter_selected == 0) {
|
if ($netflow_disable_custom_lvfilters && $filter_selected == 0) {
|
||||||
ui_print_error_message(__('No filter selected'));
|
ui_print_error_message(__('No filter selected'));
|
||||||
} else {
|
} else {
|
||||||
|
// Hidden input for handle properly the text colors.
|
||||||
|
html_print_input_hidden(
|
||||||
|
'selected_style_theme',
|
||||||
|
$config['style']
|
||||||
|
);
|
||||||
// Draw the netflow chart.
|
// Draw the netflow chart.
|
||||||
echo netflow_draw_item(
|
echo netflow_draw_item(
|
||||||
$start_date,
|
$start_date,
|
||||||
|
|
Loading…
Reference in New Issue